From: Giovanni Mascellani gmascellani@codeweavers.com
Hull shaders have a different temps count for each phase, and the parser only reports the count for the patch constant phase. In order to properly check for temps count on hull shaders, we first need to decode its phases. --- libs/vkd3d-shader/ir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 6cfad1147..171dbb53b 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -1628,7 +1628,8 @@ static void vsir_validate_instruction(struct validation_context *ctx) if (ctx->dcl_temps_found && ctx->parser->shader_version.type != VKD3D_SHADER_TYPE_HULL) validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_DUPLICATE_DCL_TEMPS, "Duplicate DCL_TEMPS instruction."); ctx->dcl_temps_found = true; - if (instruction->declaration.count != ctx->parser->shader_desc.temp_count) + if (instruction->declaration.count != ctx->parser->shader_desc.temp_count && + ctx->parser->shader_version.type != VKD3D_SHADER_TYPE_HULL) validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DCL_TEMPS, "Invalid DCL_TEMPS count %u, expected %u.", instruction->declaration.count, ctx->parser->shader_desc.temp_count); break;