vkd3d-shader/hlsl: Introduce hlsl_ir_stateblock_constant.

This commit is contained in:
Francisco Casas
2024-03-18 15:31:04 -03:00
committed by Alexandre Julliard
parent ee0d439a1b
commit 80320f6129
Notes: Alexandre Julliard 2024-04-11 17:02:42 -05:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/739
4 changed files with 79 additions and 7 deletions

View File

@@ -3746,6 +3746,9 @@ static bool dce(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context)
case HLSL_IR_RESOURCE_STORE:
case HLSL_IR_SWITCH:
break;
case HLSL_IR_STATEBLOCK_CONSTANT:
/* Stateblock constants should not appear in the shader program. */
vkd3d_unreachable();
}
return false;
@@ -3869,6 +3872,9 @@ static void compute_liveness_recurse(struct hlsl_block *block, unsigned int loop
case HLSL_IR_CALL:
/* We should have inlined all calls before computing liveness. */
vkd3d_unreachable();
case HLSL_IR_STATEBLOCK_CONSTANT:
/* Stateblock constants should not appear in the shader program. */
vkd3d_unreachable();
case HLSL_IR_STORE:
{