mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Validate RESOURCE registers.
This commit is contained in:
parent
a0b98c1610
commit
b7b5b0cff8
Notes:
Henri Verbeet
2024-09-30 21:06:02 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1123
@ -5977,6 +5977,23 @@ static void vsir_validate_register(struct validation_context *ctx,
|
||||
"Invalid dimension SCALAR for a SAMPLER register.");
|
||||
break;
|
||||
|
||||
case VKD3DSPR_RESOURCE:
|
||||
if (reg->precision != VKD3D_SHADER_REGISTER_PRECISION_DEFAULT)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_PRECISION,
|
||||
"Invalid precision %#x for a RESOURCE register.",
|
||||
reg->precision);
|
||||
|
||||
if (reg->data_type != VKD3D_DATA_UNUSED)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE,
|
||||
"Invalid data type %#x for a RESOURCE register.",
|
||||
reg->data_type);
|
||||
|
||||
if (reg->dimension != VSIR_DIMENSION_VEC4)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DIMENSION,
|
||||
"Invalid dimension %#x for a RESOURCE register.",
|
||||
reg->dimension);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user