From 6cbe5ffa154e577f87dfb637c595886eaa777209 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 9 Oct 2024 23:01:50 +0200 Subject: [PATCH] vkd3d-shader/ir: Disallow OUTPUT registers in source parameters. --- libs/vkd3d-shader/ir.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 91f6d023..e07fcece 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -6436,6 +6436,13 @@ static void vsir_validate_src_param(struct validation_context *ctx, "Invalid NULL register used as source parameter."); break; + case VKD3DSPR_OUTPUT: + if (ctx->program->shader_version.type != VKD3D_SHADER_TYPE_HULL + || (ctx->phase != VKD3DSIH_HS_FORK_PHASE && ctx->phase != VKD3DSIH_HS_JOIN_PHASE)) + validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, + "Invalid OUTPUT register used as source parameter."); + break; + default: break; }