mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/ir: Do not decide the control flow type on NOPs.
This commit is contained in:
parent
829e6f5cd0
commit
ffb7284fb6
Notes:
Henri Verbeet
2024-09-05 16:38:53 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1043
@ -6243,12 +6243,13 @@ static void vsir_validate_instruction(struct validation_context *ctx)
|
|||||||
/* We support two different control flow types in shaders:
|
/* We support two different control flow types in shaders:
|
||||||
* block-based, like DXIL and SPIR-V, and structured, like D3DBC
|
* block-based, like DXIL and SPIR-V, and structured, like D3DBC
|
||||||
* and TPF. The shader is detected as block-based when its first
|
* and TPF. The shader is detected as block-based when its first
|
||||||
* instruction, except for DCL_* and phases, is a LABEL. Currently
|
* instruction, except for NOP, DCL_* and phases, is a LABEL.
|
||||||
* we mandate that each shader is either purely block-based or
|
* Currently we mandate that each shader is either purely block-based or
|
||||||
* purely structured. In principle we could allow structured
|
* purely structured. In principle we could allow structured
|
||||||
* constructs in a block, provided they are confined in a single
|
* constructs in a block, provided they are confined in a single
|
||||||
* block, but need for that hasn't arisen yet, so we don't. */
|
* block, but need for that hasn't arisen yet, so we don't. */
|
||||||
if (ctx->cf_type == CF_TYPE_UNKNOWN && !vsir_instruction_is_dcl(instruction))
|
if (ctx->cf_type == CF_TYPE_UNKNOWN && instruction->opcode != VKD3DSIH_NOP
|
||||||
|
&& !vsir_instruction_is_dcl(instruction))
|
||||||
{
|
{
|
||||||
if (instruction->opcode == VKD3DSIH_LABEL)
|
if (instruction->opcode == VKD3DSIH_LABEL)
|
||||||
ctx->cf_type = CF_TYPE_BLOCKS;
|
ctx->cf_type = CF_TYPE_BLOCKS;
|
||||||
|
Loading…
Reference in New Issue
Block a user