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.