vkd3d-shader/ir: Validate the register data type.

This commit is contained in:
Giovanni Mascellani
2023-10-24 19:41:09 -05:00
committed by Alexandre Julliard
parent 72d0f765f2
commit f3a20be35a
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

@@ -1502,6 +1502,10 @@ static void vsir_validate_register(struct validation_context *ctx,
if (reg->precision >= VKD3D_SHADER_REGISTER_PRECISION_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_PRECISION, "Invalid register precision %#x.",
reg->precision);
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);
}
static void vsir_validate_dst_param(struct validation_context *ctx,