Matteo Bruni (@Mystral) commented about dlls/d3dx10_43/tests/d3dx10.c:
+ switch (resource_dimension) + { + case D3D10_RESOURCE_DIMENSION_TEXTURE2D: + { + const D3D10_TEXTURE2D_DESC *expected_desc_2d = &image_load_info->expected_resource_desc.desc_2d; + D3D10_TEXTURE2D_DESC desc_2d; + ID3D10Texture2D *tex_2d; + + hr = ID3D10Resource_QueryInterface(resource, &IID_ID3D10Texture2D, (void **)&tex_2d); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ID3D10Texture2D_GetDesc(tex_2d, &desc_2d); + check_texture2d_desc_values_(line, &desc_2d, expected_desc_2d->Width, expected_desc_2d->Height, + expected_desc_2d->MipLevels, expected_desc_2d->ArraySize, expected_desc_2d->Format, + expected_desc_2d->SampleDesc.Count, expected_desc_2d->SampleDesc.Quality, expected_desc_2d->Usage, + expected_desc_2d->BindFlags, expected_desc_2d->CPUAccessFlags, expected_desc_2d->MiscFlags, + image_load_info->todo_resource_desc); Unpacking `expected_desc_2d` in the call to `check_texture2d_desc_values_()` to pack it again immediately inside the function seems quite awkward. I'd consider just passing the expected descriptor to the test function, even if it that means adding some extra lines to pack values in an 'expected' structure when calling `check_texture2d_desc_values_()` directly.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9089#note_117567