vkd3d-shader/ir: Allow all DCL instructions to occur outside hull shader phases.

This commit is contained in:
Conor McCarthy 2024-04-24 12:28:45 +10:00 committed by Alexandre Julliard
parent def87539de
commit 98f73ca2e5
Notes: Alexandre Julliard 2024-05-13 22:58:15 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/857

View File

@ -5748,11 +5748,6 @@ static void vsir_validate_instruction(struct validation_context *ctx)
instruction->declaration.max_tessellation_factor);
return;
/* The DXIL parser can generate these outside phases, but this is not an issue. */
case VKD3DSIH_DCL_INPUT:
case VKD3DSIH_DCL_OUTPUT:
return;
case VKD3DSIH_DCL_INPUT_PRIMITIVE:
if (instruction->declaration.primitive_type.type == VKD3D_PT_UNDEFINED
|| instruction->declaration.primitive_type.type >= VKD3D_PT_COUNT)
@ -5810,7 +5805,9 @@ static void vsir_validate_instruction(struct validation_context *ctx)
break;
}
if (version->type == VKD3D_SHADER_TYPE_HULL && ctx->phase == VKD3DSIH_INVALID)
/* Only DCL instructions may occur outside hull shader phases. */
if (!vsir_instruction_is_dcl(instruction) && version->type == VKD3D_SHADER_TYPE_HULL
&& ctx->phase == VKD3DSIH_INVALID)
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_HANDLER,
"Instruction %#x appear before any phase instruction in a hull shader.",
instruction->handler_idx);