=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d10core/tests: Add test for DXGI_FORMAT_BC5_UNORM format.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Mar 3 11:39:44 CST 2016


Module: wine
Branch: master
Commit: 90589e697e81694e9bb17349c47800bb1ec52f87
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=90589e697e81694e9bb17349c47800bb1ec52f87

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Mar  3 12:58:19 2016 +0100

d3d10core/tests: Add test for DXGI_FORMAT_BC5_UNORM format.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d10core/tests/device.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 806a1a2..d644603 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -3613,6 +3613,13 @@ static void test_texture(void)
         0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
         0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb,
     };
+    static const BYTE bc5_data[4 * 16] =
+    {
+        0x10, 0x7f, 0x77, 0x39, 0x05, 0x00, 0x00, 0x00, 0x10, 0x7f, 0x77, 0x39, 0x05, 0x00, 0x00, 0x00,
+        0x10, 0x7f, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24, 0x10, 0x7f, 0x49, 0x92, 0x24, 0x49, 0x92, 0x24,
+        0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+        0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb, 0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb,
+    };
     static const struct texture rgba_texture =
     {
         4, 4, 3, DXGI_FORMAT_R8G8B8A8_UNORM,
@@ -3628,6 +3635,7 @@ static void test_texture(void)
     static const struct texture bc2_texture = {8, 8, 1, DXGI_FORMAT_BC2_UNORM, {{bc2_data, 2 * 16}}};
     static const struct texture bc3_texture = {8, 8, 1, DXGI_FORMAT_BC3_UNORM, {{bc3_data, 2 * 16}}};
     static const struct texture bc4_texture = {8, 8, 1, DXGI_FORMAT_BC4_UNORM, {{bc4_data, 2 * 8}}};
+    static const struct texture bc5_texture = {8, 8, 1, DXGI_FORMAT_BC5_UNORM, {{bc5_data, 2 * 16}}};
     static const struct texture bc1_texture_srgb = {8, 8, 1, DXGI_FORMAT_BC1_UNORM_SRGB, {{bc1_data, 2 * 8}}};
     static const struct texture bc2_texture_srgb = {8, 8, 1, DXGI_FORMAT_BC2_UNORM_SRGB, {{bc2_data, 2 * 16}}};
     static const struct texture bc3_texture_srgb = {8, 8, 1, DXGI_FORMAT_BC3_UNORM_SRGB, {{bc3_data, 2 * 16}}};
@@ -3677,6 +3685,13 @@ static void test_texture(void)
         0xff0000ff, 0xff0000ff, 0xff000000, 0xff000000,
         0xff0000ff, 0xff0000ff, 0xff000000, 0xff000000,
     };
+    static const DWORD bc5_colors[] =
+    {
+        0xff002626, 0xff001010, 0xff007f7f, 0xff007f7f,
+        0xff001010, 0xff001010, 0xff007f7f, 0xff007f7f,
+        0xff00ffff, 0xff00ffff, 0xff000000, 0xff000000,
+        0xff00ffff, 0xff00ffff, 0xff000000, 0xff000000,
+    };
     static const DWORD sint8_colors[] =
     {
         0x7e80807e, 0x7e807e7e, 0x7e807e80, 0x7e7e7e80,
@@ -3712,6 +3727,7 @@ static void test_texture(void)
         {&ps_ld,       &bc3_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc_colors},
         {&ps_ld,       &bc3_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  1.0f, zero_colors},
         {&ps_ld,       &bc4_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc4_colors},
+        {&ps_ld,       &bc5_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc5_colors},
         {&ps_ld,       &bc1_texture_srgb, D3D10_FILTER_MIN_MAG_MIP_POINT,     0.0f, 0.0f,              0.0f,  0.0f, bc_colors},
         {&ps_ld,       &bc2_texture_srgb, D3D10_FILTER_MIN_MAG_MIP_POINT,     0.0f, 0.0f,              0.0f,  0.0f, bc_colors},
         {&ps_ld,       &bc3_texture_srgb, D3D10_FILTER_MIN_MAG_MIP_POINT,     0.0f, 0.0f,              0.0f,  0.0f, bc_colors},
@@ -3721,6 +3737,7 @@ static void test_texture(void)
         {&ps_sample,   &bc2_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc_colors},
         {&ps_sample,   &bc3_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc_colors},
         {&ps_sample,   &bc4_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc4_colors},
+        {&ps_sample,   &bc5_texture,   D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, bc5_colors},
         {&ps_sample,   &rgba_texture,  D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f,              0.0f,  0.0f, rgba_level_0},
         {&ps_sample,   &rgba_texture,  D3D10_FILTER_MIN_MAG_MIP_POINT,        0.0f, 0.0f, D3D10_FLOAT32_MAX,  0.0f, rgba_level_0},
         {&ps_sample,   &rgba_texture,  D3D10_FILTER_MIN_MAG_MIP_POINT,        2.0f, 0.0f, D3D10_FLOAT32_MAX,  0.0f, rgba_level_0},




More information about the wine-cvs mailing list