[PATCH 1/2] gdi32: Add support for D3DDDIFMT_A4R4G4B4 and D3DDDIFMT_X4R4G4B4 to D3DKMTCreateDCFromMemory().

Henri Verbeet hverbeet at codeweavers.com
Thu Nov 17 05:11:35 CST 2016


These are needed by wined3d to support DCs on WINED3DFMT_B4G4R4A4_UNORM and
WINED3DFMT_B4G4R4X4_UNORM textures, as required by the Microsoft Motocross
Madness demo. Note that these formats are not available on versions of Windows
newer than Vista, and as far as I'm aware the application doesn't work on
those versions. I don't expect exposing more formats to be an issue in
practice, but these could be hidden behind a version check if needed.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/gdi32/dib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c
index 585d2ac..36a7b0f 100644
--- a/dlls/gdi32/dib.c
+++ b/dlls/gdi32/dib.c
@@ -1606,6 +1606,8 @@ NTSTATUS WINAPI D3DKMTCreateDCFromMemory( D3DKMT_CREATEDCFROMMEMORY *desc )
         { D3DDDIFMT_R5G6B5,   16, BI_BITFIELDS, 0,   0x0000f800, 0x000007e0, 0x0000001f },
         { D3DDDIFMT_X1R5G5B5, 16, BI_BITFIELDS, 0,   0x00007c00, 0x000003e0, 0x0000001f },
         { D3DDDIFMT_A1R5G5B5, 16, BI_BITFIELDS, 0,   0x00007c00, 0x000003e0, 0x0000001f },
+        { D3DDDIFMT_A4R4G4B4, 16, BI_BITFIELDS, 0,   0x00000f00, 0x000000f0, 0x0000000f },
+        { D3DDDIFMT_X4R4G4B4, 16, BI_BITFIELDS, 0,   0x00000f00, 0x000000f0, 0x0000000f },
         { D3DDDIFMT_P8,       8,  BI_RGB,       256, 0x00000000, 0x00000000, 0x00000000 },
     };
 
-- 
2.1.4




More information about the wine-patches mailing list