vkd3d-shader/hlsl: Move the "dimx" and "dimy" fields to the type-specific union.

This commit is contained in:
Elizabeth Figura
2024-10-30 11:51:05 -05:00
committed by Henri Verbeet
parent 392398794f
commit 29bac62ba2
Notes: Henri Verbeet 2025-01-10 20:14:49 +01:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1326
7 changed files with 304 additions and 280 deletions

View File

@@ -610,8 +610,8 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type,
return 0;
}
value |= (type->dimy & 0x7) << FX_4_NUMERIC_ROWS_SHIFT;
value |= (type->dimx & 0x7) << FX_4_NUMERIC_COLUMNS_SHIFT;
value |= (type->e.numeric.dimy & 0x7) << FX_4_NUMERIC_ROWS_SHIFT;
value |= (type->e.numeric.dimx & 0x7) << FX_4_NUMERIC_COLUMNS_SHIFT;
if (type->modifiers & HLSL_MODIFIER_COLUMN_MAJOR)
value |= FX_4_NUMERIC_COLUMN_MAJOR_MASK;
@@ -1047,13 +1047,13 @@ static uint32_t write_fx_2_parameter(const struct hlsl_type *type, const char *n
switch (type->class)
{
case HLSL_CLASS_VECTOR:
put_u32(buffer, type->dimx);
put_u32(buffer, type->dimy);
put_u32(buffer, type->e.numeric.dimx);
put_u32(buffer, type->e.numeric.dimy);
break;
case HLSL_CLASS_SCALAR:
case HLSL_CLASS_MATRIX:
put_u32(buffer, type->dimy);
put_u32(buffer, type->dimx);
put_u32(buffer, type->e.numeric.dimy);
put_u32(buffer, type->e.numeric.dimx);
break;
case HLSL_CLASS_STRUCT:
put_u32(buffer, type->e.record.field_count);