vkd3d-shader/ir: Validate interpolation mode in shader signatures.

This commit is contained in:
Giovanni Mascellani 2024-10-09 17:13:21 +02:00 committed by Henri Verbeet
parent 831a797837
commit e366fc3ad6
Notes: Henri Verbeet 2024-10-10 20:09:41 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1167

View File

@ -6595,6 +6595,11 @@ static void vsir_validate_signature_element(struct validation_context *ctx,
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
"element %u of %s signature: Invalid minimum precision %#x.",
idx, signature_type, element->min_precision);
if (element->interpolation_mode >= VKD3DSIM_COUNT)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE,
"element %u of %s signature: Invalid interpolation mode %#x.",
idx, signature_type, element->interpolation_mode);
}
static void vsir_validate_signature(struct validation_context *ctx,