mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Add a parameter for jump nodes and use it for 'discard'.
This commit is contained in:
committed by
Alexandre Julliard
parent
7e1fcdca89
commit
b40179da3a
Notes:
Alexandre Julliard
2023-06-27 23:33:43 +02: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/211
@ -666,7 +666,7 @@ static void insert_early_return_break(struct hlsl_ctx *ctx,
|
||||
return;
|
||||
list_add_after(&cf_instr->entry, &load->node.entry);
|
||||
|
||||
if (!(jump = hlsl_new_jump(ctx, HLSL_IR_JUMP_BREAK, &cf_instr->loc)))
|
||||
if (!(jump = hlsl_new_jump(ctx, HLSL_IR_JUMP_BREAK, NULL, &cf_instr->loc)))
|
||||
return;
|
||||
hlsl_block_add_instr(&then_block, jump);
|
||||
|
||||
@ -2848,8 +2848,15 @@ static void compute_liveness_recurse(struct hlsl_block *block, unsigned int loop
|
||||
index->idx.node->last_read = last_read;
|
||||
break;
|
||||
}
|
||||
case HLSL_IR_CONSTANT:
|
||||
case HLSL_IR_JUMP:
|
||||
{
|
||||
struct hlsl_ir_jump *jump = hlsl_ir_jump(instr);
|
||||
|
||||
if (jump->condition.node)
|
||||
jump->condition.node->last_read = last_read;
|
||||
break;
|
||||
}
|
||||
case HLSL_IR_CONSTANT:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user