vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_jump().

This commit is contained in:
Zebediah Figura
2022-11-10 20:08:44 -06:00
committed by Alexandre Julliard
parent dfe056596a
commit e5ec431784
Notes: Alexandre Julliard 2023-04-20 22:58:03 +02: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/169
4 changed files with 17 additions and 23 deletions

View File

@@ -516,10 +516,9 @@ static bool find_recursive_calls(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
static void insert_early_return_break(struct hlsl_ctx *ctx,
struct hlsl_ir_function_decl *func, struct hlsl_ir_node *cf_instr)
{
struct hlsl_ir_node *iff, *jump;
struct hlsl_block then_block;
struct hlsl_ir_jump *jump;
struct hlsl_ir_load *load;
struct hlsl_ir_node *iff;
hlsl_block_init(&then_block);
@@ -529,7 +528,7 @@ static void insert_early_return_break(struct hlsl_ctx *ctx,
if (!(jump = hlsl_new_jump(ctx, HLSL_IR_JUMP_BREAK, &cf_instr->loc)))
return;
hlsl_block_add_instr(&then_block, &jump->node);
hlsl_block_add_instr(&then_block, jump);
if (!(iff = hlsl_new_if(ctx, &load->node, &then_block, NULL, &cf_instr->loc)))
return;