vkd3d-shader/ir: Use vsir_instruction_is_dcl() in vsir_validate_instruction().

This commit is contained in:
Henri Verbeet 2024-01-22 20:35:28 +01:00 committed by Alexandre Julliard
parent 365ad56888
commit eabcaf15fb
Notes: Alexandre Julliard 2024-01-24 22:55:50 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/596

View File

@ -2898,8 +2898,7 @@ static void vsir_validate_instruction(struct validation_context *ctx)
* purely structured. In principle we could allow structured
* constructs in a block, provided they are confined in a single
* block, but need for that hasn't arisen yet, so we don't. */
if (ctx->cf_type == CF_TYPE_UNKNOWN && !(instruction->handler_idx >= VKD3DSIH_DCL
&& instruction->handler_idx <= VKD3DSIH_DCL_VERTICES_OUT))
if (ctx->cf_type == CF_TYPE_UNKNOWN && !vsir_instruction_is_dcl(instruction))
{
if (instruction->handler_idx == VKD3DSIH_LABEL)
ctx->cf_type = CF_TYPE_BLOCKS;