=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9/tests: Add ID3DXConstantTable big vector test.

Alexandre Julliard julliard at winehq.org
Mon Jul 29 14:01:19 CDT 2013


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

Author: Rico Schüller <kgbricola at web.de>
Date:   Mon Jul 29 11:14:13 2013 +0200

d3dx9/tests: Add ID3DXConstantTable big vector test.

---

 dlls/d3dx9_36/tests/shader.c |  114 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 114 insertions(+), 0 deletions(-)

diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
index d37464a..171d62c 100644
--- a/dlls/d3dx9_36/tests/shader.c
+++ b/dlls/d3dx9_36/tests/shader.c
@@ -5450,6 +5450,114 @@ static const struct registerset_constants registerset_constants_special_int[] =
     {"ran[1]", {"ran", D3DXRS_INT4, 3, 3, D3DXPC_MATRIX_ROWS, D3DXPT_INT, 3,  2, 1, 0, 24, NULL}, 29},
 };
 
+/*
+ * fxc.exe /Tvs_3_0
+ */
+#if 0
+float3 vaf[10];
+float4 main(float4 pos : POSITION) : POSITION
+{
+    float4 tmp = 0;
+    tmp.y += pos.y + vaf[8].x;
+    return tmp;
+}
+#endif
+static const DWORD registerset_blob_bigvec[] =
+{
+0xfffe0300, 0x0020fffe, 0x42415443, 0x0000001c, 0x0000004b, 0xfffe0300, 0x00000001, 0x0000001c,
+0x00000100, 0x00000044, 0x00000030, 0x00000002, 0x00000009, 0x00000034, 0x00000000, 0x00666176,
+0x00030001, 0x00030001, 0x0000000a, 0x00000000, 0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73,
+0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
+0x332e3235, 0x00313131, 0x05000051, 0xa00f0009, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+0x0200001f, 0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x03000002, 0xe0020000,
+0xa0000008, 0x90550000, 0x02000001, 0xe00d0000, 0xa0000009, 0x0000ffff,
+};
+
+static const struct registerset_constants registerset_constants_bigvec_float[] =
+{
+    {"vaf",    {"vaf", D3DXRS_FLOAT4, 0, 9, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3, 10, 0, 120, NULL}, 0},
+    {"vaf[0]", {"vaf", D3DXRS_FLOAT4, 0, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[1]", {"vaf", D3DXRS_FLOAT4, 1, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[2]", {"vaf", D3DXRS_FLOAT4, 2, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[3]", {"vaf", D3DXRS_FLOAT4, 3, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[4]", {"vaf", D3DXRS_FLOAT4, 4, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[5]", {"vaf", D3DXRS_FLOAT4, 5, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[6]", {"vaf", D3DXRS_FLOAT4, 6, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[7]", {"vaf", D3DXRS_FLOAT4, 7, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[8]", {"vaf", D3DXRS_FLOAT4, 8, 1, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+    {"vaf[9]", {"vaf", D3DXRS_FLOAT4, 9, 0, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 3,  1, 0,  12, NULL}, 0},
+};
+
+static const struct registerset_test registerset_test_bigvec_float[] =
+{
+    {SetMatrix, 0, 0, 0, 16,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123}},
+    {SetMatrixArray},
+    {SetMatrixArray, 0, 1, 1, 16,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123}},
+    {SetMatrixArray, 0, 2, 2, 32,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
+        0x41a00123, 0x41b00123, 0x41c00123, 0x00000000, 0x00000000, 0x41f00123, 0x42000123, 0x00000000,
+        0x00000000, 0x42300123, 0x42400123, 0x00000000, 0x42600123, 0x42700123, 0x42800123}},
+    {SetMatrixArray, 0, 3, REGISTER_OUTPUT_SIZE / 16, 36,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
+        0x41a00123, 0x41b00123, 0x41c00123, 0x00000000, 0x00000000, 0x41f00123, 0x42000123, 0x00000000,
+        0x00000000, 0x42300123, 0x42400123, 0x00000000, 0x42600123, 0x42700123, 0x42800123, 0x00000000,
+        0x43000123, 0x43100123, 0x43200123}},
+    {SetMatrixTranspose, 0, 0, 0, 16,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123}},
+    {SetMatrixTransposeArray},
+    {SetMatrixTransposeArray, 0, 1, 1, 16,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123}},
+    {SetMatrixTransposeArray, 0, 2, 2, 32,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
+        0x41a00123, 0x00000000, 0x00000000, 0x00000000, 0x41b00123, 0x41f00123, 0x42300123, 0x00000000,
+        0x41c00123, 0x42000123, 0x42400123, 0x00000000, 0x41d00123, 0x42100123, 0x42500123}},
+    {SetMatrixTransposeArray, 0, 3, REGISTER_OUTPUT_SIZE / 16, 36,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
+        0x41a00123, 0x00000000, 0x00000000, 0x00000000, 0x41b00123, 0x41f00123, 0x42300123, 0x00000000,
+        0x41c00123, 0x42000123, 0x42400123, 0x00000000, 0x41d00123, 0x42100123, 0x42500123, 0x00000000,
+        0x43000123, 0x43400123, 0x43800123}},
+    {SetMatrixPointerArray},
+    {SetMatrixPointerArray, 0, 1, 1, 16,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123}},
+    {SetMatrixPointerArray, 0, 2, 2, 32,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
+        0x41900123, 0x41a00123, 0x41b00123, 0x00000000, 0x41d00123, 0x00000000, 0x41f00123, 0x00000000,
+        0x42100123, 0x00000000, 0x42300123, 0x00000000, 0x42500123, 0x42600123, 0x42700123}},
+    {SetMatrixPointerArray, 0, 3, REGISTER_OUTPUT_SIZE / 16, 36,
+        {0x40000123, 0x00000000, 0x40800123, 0x00000000, 0x40c00123, 0x40e00123, 0x41000123, 0x00000000,
+        0x41200123, 0x41300123, 0x41400123, 0x00000000, 0x41600123, 0x41700123, 0x41800123, 0x00000000,
+        0x41900123, 0x41a00123, 0x41b00123, 0x00000000, 0x41d00123, 0x00000000, 0x41f00123, 0x00000000,
+        0x42100123, 0x00000000, 0x42300123, 0x00000000, 0x42500123, 0x42600123, 0x42700123, 0x00000000,
+        0x42800123, 0x42900123, 0x43000123}},
+    {SetMatrixTransposePointerArray},
+    {SetMatrixTransposePointerArray, 0, 1, 1, 16,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123}},
+    {SetMatrixTransposePointerArray, 0, 2, 2, 32,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
+        0x41900123, 0x41d00123, 0x42100123, 0x00000000, 0x41a00123, 0x00000000, 0x00000000, 0x00000000,
+        0x41b00123, 0x41f00123, 0x42300123, 0x00000000, 0x41c00123, 0x42000123, 0x42400123}},
+    {SetMatrixTransposePointerArray, 0, 3, REGISTER_OUTPUT_SIZE / 16, 36,
+        {0x40000123, 0x40c00123, 0x41200123, 0x00000000, 0x00000000, 0x40e00123, 0x41300123, 0x00000000,
+        0x40800123, 0x41000123, 0x41400123, 0x00000000, 0x40a00123, 0x41100123, 0x41500123, 0x00000000,
+        0x41900123, 0x41d00123, 0x42100123, 0x00000000, 0x41a00123, 0x00000000, 0x00000000, 0x00000000,
+        0x41b00123, 0x41f00123, 0x42300123, 0x00000000, 0x41c00123, 0x42000123, 0x42400123, 0x00000000,
+        0x42800123, 0x43200123, 0x43600123}},
+};
+
 static const struct
 {
     const char *name;
@@ -5717,6 +5825,10 @@ registerset_data[] =
     {"int ran", "ran", 0, D3DXRS_INT4, registerset_blob_special_int, NULL, 0,
         registerset_constants_special_int,
         sizeof(registerset_constants_special_int) / sizeof(*registerset_constants_special_int)},
+    {"bigvec", "vaf", 0, D3DXRS_FLOAT4, registerset_blob_bigvec, registerset_test_bigvec_float,
+        sizeof(registerset_test_bigvec_float) / sizeof(*registerset_test_bigvec_float),
+        registerset_constants_bigvec_float,
+        sizeof(registerset_constants_bigvec_float) / sizeof(*registerset_constants_bigvec_float)},
 };
 
 static void registerset_clear(IDirect3DDevice9 *device)
@@ -6148,6 +6260,8 @@ registerset_defaults_data[] =
         0x335f7376, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461,
         0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932},
         {0x00000000}},
+    /* DefaultValue = NULL */
+    {"big vector", registerset_blob_bigvec},
 };
 
 static void test_registerset_defaults(void)




More information about the wine-cvs mailing list