vkd3d-shader/ir: Validate the register precision.

This commit is contained in:
Giovanni Mascellani
2023-10-24 19:37:40 -05:00
committed by Alexandre Julliard
parent f3c1a15a6f
commit 72d0f765f2
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
2 changed files with 7 additions and 0 deletions

View File

@@ -1498,6 +1498,10 @@ static void vsir_validate_register(struct validation_context *ctx,
if (reg->type >= VKD3DSPR_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, "Invalid register type %#x.",
reg->type);
if (reg->precision >= VKD3D_SHADER_REGISTER_PRECISION_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_PRECISION, "Invalid register precision %#x.",
reg->precision);
}
static void vsir_validate_dst_param(struct validation_context *ctx,