[PATCH 4/5] d3d11/tests: Add test for SM4 ld instruction.
Józef Kucia
jkucia at codeweavers.com
Tue Jan 5 14:52:33 CST 2016
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
We will be able to use a single pixel shader for the ld instruction
in this test when the resinfo instruction is implemented.
---
dlls/d3d11/tests/d3d11.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 876a86a..94d9b42 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -2904,6 +2904,55 @@ static void test_texture(void)
0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001,
0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e,
};
+ static const DWORD ps_ld_0_code[] =
+ {
+#if 0
+ Texture2D t;
+
+ float4 main(float4 position : SV_POSITION) : SV_TARGET
+ {
+ float3 p = float3(position.x / 640.0f, position.y / 480.0f, 0.0f);
+ p *= float3(4.0f, 4.0f, 1.0f);
+ return t.Load(int3(p));
+ }
+#endif
+ 0x43425844, 0x0aef49ac, 0x02fa5594, 0xfb8a34cd, 0x8e03ee1d, 0x00000001, 0x00000168, 0x00000003,
+ 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49,
+ 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000cc, 0x00000040,
+ 0x00000033, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000,
+ 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x05000036, 0x00100032,
+ 0x00000000, 0x00101046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, 0x00004002, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x0a000038, 0x001000f2, 0x00000000, 0x00100e46, 0x00000000,
+ 0x00004002, 0x3bcccccd, 0x3c088889, 0x3f800000, 0x3f800000, 0x0500001b, 0x001000f2, 0x00000000,
+ 0x00100e46, 0x00000000, 0x0700002d, 0x001020f2, 0x00000000, 0x00100e46, 0x00000000, 0x00107e46,
+ 0x00000000, 0x0100003e,
+ };
+ static const DWORD ps_ld_1_code[] =
+ {
+#if 0
+ Texture2D t;
+
+ float4 main(float4 position : SV_POSITION) : SV_TARGET
+ {
+ float3 p = float3(position.x / 640.0f, position.y / 480.0f, 1.0f);
+ p *= float3(2.0f, 2.0f, 1.0f);
+ return t.Load(int3(p));
+ }
+#endif
+ 0x43425844, 0xd43b0155, 0x1ae5af92, 0x34e50992, 0x5e7a0d1a, 0x00000001, 0x00000154, 0x00000003,
+ 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
+ 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49,
+ 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003,
+ 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000b8, 0x00000040,
+ 0x0000002e, 0x04001858, 0x00107000, 0x00000000, 0x00005555, 0x04002064, 0x00101032, 0x00000000,
+ 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032,
+ 0x00000000, 0x00101046, 0x00000000, 0x00004002, 0x3b4ccccd, 0x3b888889, 0x00000000, 0x00000000,
+ 0x0500001b, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000,
+ 0x00004002, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x0700002d, 0x001020f2, 0x00000000,
+ 0x00100e46, 0x00000000, 0x00107e46, 0x00000000, 0x0100003e,
+ };
static const DWORD ps_sample_code[] =
{
#if 0
@@ -2959,6 +3008,8 @@ static void test_texture(void)
0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000,
0x0020800a, 0x00000000, 0x00000000, 0x0100003e,
};
+ static const struct shader ps_ld_0 = {ps_ld_0_code, sizeof(ps_ld_0_code)};
+ static const struct shader ps_ld_1 = {ps_ld_1_code, sizeof(ps_ld_1_code)};
static const struct shader ps_sample = {ps_sample_code, sizeof(ps_sample_code)};
static const struct shader ps_sample_l = {ps_sample_l_code, sizeof(ps_sample_l_code)};
static const struct
@@ -3016,6 +3067,8 @@ static void test_texture(void)
}
tests[] =
{
+ {&ps_ld_0, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_0},
+ {&ps_ld_1, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_1},
{&ps_sample, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, 0.0f, 0.0f, level_0},
{&ps_sample, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, D3D11_FLOAT32_MAX, 0.0f, level_0},
{&ps_sample_l, D3D11_FILTER_MIN_MAG_MIP_POINT, 0.0f, 0.0f, D3D11_FLOAT32_MAX, -1.0f, level_0},
--
2.4.10
More information about the wine-patches
mailing list