Matteo Bruni (@Mystral) commented about dlls/d3dx10_43/texture.c:
+static HRESULT create_texture_helper(ID3D10Device *device, const void *data, SIZE_T size, + D3DX10_IMAGE_LOAD_INFO *load_info, ID3D10Resource **texture) +{ + D3D10_SUBRESOURCE_DATA *resource_data; + D3DX10_IMAGE_LOAD_INFO info; + HRESULT hr; + + create_image_load_info(load_info, &info); + + if (FAILED((hr = create_resource_data(data, size, &info, &resource_data)))) + return hr; + hr = create_texture(device, &info, resource_data, texture); + free(resource_data); + return hr; +}
The helpers themselves are probably okay but I don't like the naming. Shocking, I know... Maybe this one could be just create_texture(). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/228#note_2065