diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index e07fcece..00500554 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -6443,6 +6443,13 @@ static void vsir_validate_src_param(struct validation_context *ctx, "Invalid OUTPUT register used as source parameter."); break; + case VKD3DSPR_PATCHCONST: + if (ctx->program->shader_version.type != VKD3D_SHADER_TYPE_DOMAIN + && ctx->program->shader_version.type != VKD3D_SHADER_TYPE_HULL) + validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE, + "PATCHCONST register used as source parameters are only allowed in Hull and Domain Shaders."); + break; + default: break; }