[PATCH v3 0/6] MR228: d3dx: improvements to texture creation functions

Piotr Caban (@piotr) wine at gitlab.winehq.org
Wed Jun 15 09:58:32 CDT 2022


On Wed Jun 15 14:04:22 2022 +0000, Matteo Bruni wrote:
> If I understand correctly, basically either (pseudocode):
> ```
> struct texture_data
> {
>     unsigned int subresource_count;
>     D3D10_SUBRESOURCE_DATA subresource_data[];
>     BYTE data[];
> };
> ```
> or
> ```
> struct texture_data
> {
>     unsigned int subresource_count;
>     struct
>     {
>         D3D10_SUBRESOURCE_DATA subresource_data;
>     } subresources[];
>     BYTE *data[];
> };
> ```
> I think I very slightly prefer the first option if it doesn't turn out
> unreasonably complicated. Both are fine for sure.
I was planning to skip the subresource_count since it's encoded in D3DX10_IMAGE_LOAD_INFO.

I think that the patches are currently implementing "first option" (unless you prefer to store subresource_count explicitly or use custom structure). I have added a comment saying that returned data contains both `D3D10_SUBRESOURCE_DATA` structures and actual data.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/228#note_2120



More information about the wine-devel mailing list