Matteo Bruni (@Mystral) commented about dlls/d3dx11_43/tests/d3dx11.c:
+ return; + } + + miplevel = sub_resource_idx % texture_desc.MipLevels; + init_resource_readback((ID3D11Resource *)texture, rb_texture, + max(1, texture_desc.Width >> miplevel), + max(1, texture_desc.Height >> miplevel), + max(1, texture_desc.Depth >> miplevel), + sub_resource_idx, device, rb); + + ID3D11Device_Release(device); +} + +static void *get_readback_data(struct resource_readback *rb, uint32_t x, uint32_t y, uint32_t z, unsigned byte_width) +{ + return (BYTE *)rb->map_desc.pData + z * rb->map_desc.DepthPitch + y * rb->map_desc.RowPitch + x * byte_width; The d3dx10 version has the cast to `uint8_t` here. This is obviously no different in practice, but I'd try to keep the d3dx10 and d3dx11 test sources as close as possible.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9206#note_119633