[PATCH 4/5] d3dcompiler: Fix matrix dimension declaration for matrix<...> syntax.
Zebediah Figura
z.figura12 at gmail.com
Wed Jun 3 21:06:53 CDT 2020
Addendum to 4952bcfa4cf.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/d3dcompiler_43/hlsl.y | 2 +-
dlls/d3dcompiler_43/tests/hlsl_d3d9.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index 1797996ddbd..820352b0466 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -1866,7 +1866,7 @@ type: base_type
YYABORT;
}
- $$ = new_hlsl_type(NULL, HLSL_CLASS_MATRIX, $3->base_type, $5, $7);
+ $$ = new_hlsl_type(NULL, HLSL_CLASS_MATRIX, $3->base_type, $7, $5);
}
base_type:
diff --git a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c
index c8cf86d05c4..059f39e4c3e 100644
--- a/dlls/d3dcompiler_43/tests/hlsl_d3d9.c
+++ b/dlls/d3dcompiler_43/tests/hlsl_d3d9.c
@@ -897,9 +897,10 @@ static void test_constant_table(void)
"uniform float2 g[5];\n"
"uniform matrix_t i;\n"
"uniform struct matrix_record j;\n"
+ "uniform matrix<float,3,1> k;\n"
"float4 main(uniform float4 h) : COLOR\n"
"{\n"
- " return a + b + c._31 + d._31 + f.d._22 + g[e].x + h + i._33 + j.a._33;\n"
+ " return a + b + c._31 + d._31 + f.d._22 + g[e].x + h + i._33 + j.a._33 + k._31;\n"
"}";
D3DXCONSTANTTABLE_DESC table_desc;
@@ -923,6 +924,7 @@ static void test_constant_table(void)
{"g", D3DXRS_FLOAT4, 0, 5, D3DXPC_VECTOR, D3DXPT_FLOAT, 1, 2, 5, 0, 40},
{"i", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 3, 1, 0, 36},
{"j", D3DXRS_FLOAT4, 0, 3, D3DXPC_STRUCT, D3DXPT_VOID, 1, 9, 1, 1, 36},
+ {"k", D3DXRS_FLOAT4, 0, 3, D3DXPC_MATRIX_ROWS, D3DXPT_FLOAT, 3, 1, 1, 0, 12},
};
static const D3DXCONSTANT_DESC expect_fields_f[] =
--
2.26.2
More information about the wine-devel
mailing list