d3dcompiler: Fix matrix dimension declaration for matrix<...> syntax.

Addendum to 4952bcfa4c.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-06-03 21:06:53 -05:00 committed by Alexandre Julliard
parent 1dcfb01b29
commit f114a0a8e6
2 changed files with 4 additions and 2 deletions

View file

@ -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:

View file

@ -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[] =