https://git.reactos.org/?p=reactos.git;a=commitdiff;h=50442c0d0b8bd40c95fc1e883d477ae0a165ca04

commit 50442c0d0b8bd40c95fc1e883d477ae0a165ca04
Author:     winesync <[email protected]>
AuthorDate: Mon Sep 21 22:50:19 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Thu Feb 4 16:37:03 2021 +0100

    [WINESYNC] d3dx9/tests: Add tests for 32 bpp BMP with alpha.
    
    Signed-off-by: Vijay Kiran Kamuju <[email protected]>
    Signed-off-by: Matteo Bruni <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id a30fd8c0e44833b2a6412987a348273bfe42fe2f by Christian Costa 
<[email protected]>
---
 modules/rostests/winetests/d3dx9_36/surface.c | 27 +++++++++++++++++++++++++++
 sdk/tools/winesync/d3dx9.cfg                  |  2 +-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/winetests/d3dx9_36/surface.c 
b/modules/rostests/winetests/d3dx9_36/surface.c
index b7c52a28b0f..56b79d80cb2 100644
--- a/modules/rostests/winetests/d3dx9_36/surface.c
+++ b/modules/rostests/winetests/d3dx9_36/surface.c
@@ -67,6 +67,26 @@ static const unsigned char bmp_8bpp[] = {
 0x00,0x00
 };
 
+/* 2x2 bmp (32 bpp XRGB) */
+static const unsigned char bmp_32bpp_xrgb[] =
+{
+    
0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,
+    
0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00,
+    
0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00,
+    
0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2,
+    0xc2,0x00,0xa3,0xb3,0xc3,0x00
+};
+
+/* 2x2 bmp (32 bpp ARGB) */
+static const unsigned char bmp_32bpp_argb[] =
+{
+    
0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00,
+    
0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00,
+    
0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00,
+    
0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2,
+    0xc2,0x00,0xa3,0xb3,0xc3,0x01
+};
+
 static const unsigned char png_grayscale[] =
 {
     0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 
0x49,
@@ -560,6 +580,13 @@ static void test_D3DXGetImageInfo(void)
     ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth);
     ok(info.Format == D3DFMT_P8, "Got format %u, expected %u\n", info.Format, 
D3DFMT_P8);
 
+    hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_xrgb, 
sizeof(bmp_32bpp_xrgb), &info);
+    ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+    ok(info.Format == D3DFMT_X8R8G8B8, "Got unexpected format %u.\n", 
info.Format);
+    hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, 
sizeof(bmp_32bpp_argb), &info);
+    ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+    todo_wine ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format 
%u.\n", info.Format);
+
     /* Grayscale PNG */
     hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, 
sizeof(png_grayscale), &info);
     ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected 
%#x\n", hr, D3D_OK);
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index f10001f1381..b3d7639fde3 100644
--- a/sdk/tools/winesync/d3dx9.cfg
+++ b/sdk/tools/winesync/d3dx9.cfg
@@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, 
include/d3dx9anim.h: sdk/inc
   include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: 
sdk/include/dxsdk/d3dx9of.h,
   include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, 
include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
   include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: 
sdk/include/dxsdk/d3dx9xof.h}
-tags: {wine: ccdb74d81ac4a95aa87414f6459a8b44d451358a}
+tags: {wine: a30fd8c0e44833b2a6412987a348273bfe42fe2f}

Reply via email to