[PATCH 2/3] d3dx10: Handle format converting for D3DX10CreateTextureFromMemory.
Matteo Bruni
matteo.mystral at gmail.com
Tue Jun 22 12:54:54 CDT 2021
On Fri, Jun 18, 2021 at 8:29 AM Ziqing Hui <zhui at codeweavers.com> wrote:
>
>
> Signed-off-by: Ziqing Hui <zhui at codeweavers.com>
> ---
> dlls/d3dx10_43/tests/d3dx10.c | 3 +-
> dlls/d3dx10_43/texture.c | 89 ++++++++++++++++++++++++++++++++---
> 2 files changed, 83 insertions(+), 9 deletions(-)
> + dst_format = (GUID *)dxgi_format_to_wic_guid(img_info.Format);
Casting away the const isn't very nice. It also seems unnecessary.
This patch made me look back to this hunk from D3DX10GetImageInfoFromMemory():
if (img_info->ImageFileFormat == D3DX10_IFF_DDS)
{
...
}
else
{
...
img_info->Format = DXGI_FORMAT_R8G8B8A8_UNORM;
...
}
That seems suspicious, can't formats other than DDS (e.g. WMP) support
higher bit depths with d3dx10?
More information about the wine-devel
mailing list