From 5b5a27dccb5d41c33a311abbc0b74fbda1fb8339 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 9 Oct 2024 23:01:03 +0200 Subject: [PATCH] vkd3d-shader/ir: Disallow INPUT registers in destination parameters. --- libs/vkd3d-shader/ir.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 56865b25..91f6d023 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -6388,23 +6388,12 @@ static void vsir_validate_dst_param(struct validation_context *ctx, break; case VKD3DSPR_IMMCONST: - validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, - "Invalid IMMCONST register used as destination parameter."); - break; - case VKD3DSPR_IMMCONST64: - validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, - "Invalid IMMCONST64 register used as destination parameter."); - break; - case VKD3DSPR_SAMPLER: - validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, - "Invalid SAMPLER register used as destination parameter."); - break; - case VKD3DSPR_RESOURCE: + case VKD3DSPR_INPUT: validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, - "Invalid RESOURCE register used as destination parameter."); + "Invalid %#x register used as destination parameter.", dst->reg.type); break; default: