mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Avoid shadowing "block" in resolve_loop_continue().
This commit is contained in:
committed by
Alexandre Julliard
parent
ca8492c855
commit
a102e99897
Notes:
Alexandre Julliard
2023-12-07 22:48:02 +01: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/506
@@ -487,27 +487,27 @@ static void resolve_loop_continue(struct hlsl_ctx *ctx, struct hlsl_block *block
|
|||||||
else if (instr->type == HLSL_IR_JUMP)
|
else if (instr->type == HLSL_IR_JUMP)
|
||||||
{
|
{
|
||||||
struct hlsl_ir_jump *jump = hlsl_ir_jump(instr);
|
struct hlsl_ir_jump *jump = hlsl_ir_jump(instr);
|
||||||
struct hlsl_block block;
|
struct hlsl_block cond_block;
|
||||||
|
|
||||||
if (jump->type != HLSL_IR_JUMP_UNRESOLVED_CONTINUE)
|
if (jump->type != HLSL_IR_JUMP_UNRESOLVED_CONTINUE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (type == LOOP_DO_WHILE)
|
if (type == LOOP_DO_WHILE)
|
||||||
{
|
{
|
||||||
if (!hlsl_clone_block(ctx, &block, cond))
|
if (!hlsl_clone_block(ctx, &cond_block, cond))
|
||||||
return;
|
return;
|
||||||
if (!append_conditional_break(ctx, &block))
|
if (!append_conditional_break(ctx, &cond_block))
|
||||||
{
|
{
|
||||||
hlsl_block_cleanup(&block);
|
hlsl_block_cleanup(&cond_block);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
list_move_before(&instr->entry, &block.instrs);
|
list_move_before(&instr->entry, &cond_block.instrs);
|
||||||
}
|
}
|
||||||
else if (type == LOOP_FOR)
|
else if (type == LOOP_FOR)
|
||||||
{
|
{
|
||||||
if (!hlsl_clone_block(ctx, &block, iter))
|
if (!hlsl_clone_block(ctx, &cond_block, iter))
|
||||||
return;
|
return;
|
||||||
list_move_before(&instr->entry, &block.instrs);
|
list_move_before(&instr->entry, &cond_block.instrs);
|
||||||
}
|
}
|
||||||
jump->type = HLSL_IR_JUMP_CONTINUE;
|
jump->type = HLSL_IR_JUMP_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user