mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Allow declarations to specify type modifiers redundant with the type.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
b38f94cfdc
commit
1dbb146454
@@ -659,9 +659,13 @@ static struct hlsl_type *apply_type_modifiers(struct hlsl_ctx *ctx, struct hlsl_
|
||||
if (!(new_type = hlsl_type_clone(ctx, type, default_majority)))
|
||||
return NULL;
|
||||
|
||||
new_type->modifiers = add_modifiers(ctx, new_type->modifiers, *modifiers, loc);
|
||||
new_type->modifiers |= *modifiers;
|
||||
*modifiers &= ~HLSL_TYPE_MODIFIERS_MASK;
|
||||
|
||||
if ((new_type->modifiers & HLSL_MODIFIER_ROW_MAJOR) && (new_type->modifiers & HLSL_MODIFIER_COLUMN_MAJOR))
|
||||
hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
|
||||
"'row_major' and 'column_major' modifiers are mutually exclusive.");
|
||||
|
||||
if (new_type->type == HLSL_CLASS_MATRIX)
|
||||
new_type->reg_size = (hlsl_type_is_row_major(new_type) ? new_type->dimy : new_type->dimx) * 4;
|
||||
return new_type;
|
||||
|
Reference in New Issue
Block a user