vkd3d-shader/ir: Validate the register dimension.

This commit is contained in:
Giovanni Mascellani
2023-10-24 19:43:31 -05:00
committed by Alexandre Julliard
parent f3a20be35a
commit 26e4191d4b
Notes: Alexandre Julliard 2023-11-02 22:49:42 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/432
3 changed files with 9 additions and 0 deletions

View File

@@ -1506,6 +1506,10 @@ static void vsir_validate_register(struct validation_context *ctx,
if (reg->data_type >= VKD3D_DATA_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE, "Invalid register data type %#x.",
reg->data_type);
if (reg->dimension >= VSIR_DIMENSION_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DIMENSION, "Invalid register dimension %#x.",
reg->dimension);
}
static void vsir_validate_dst_param(struct validation_context *ctx,