mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Store the flatten type in struct hlsl_ir_if.
This commit is contained in:
Notes:
Henri Verbeet
2025-10-30 19:59:51 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1732
@@ -1060,7 +1060,7 @@ static void insert_early_return_break(struct hlsl_ctx *ctx,
|
||||
|
||||
hlsl_block_add_jump(ctx, &then_block, HLSL_IR_JUMP_BREAK, NULL, &cf_instr->loc);
|
||||
|
||||
if (!(iff = hlsl_new_if(ctx, &load->node, &then_block, NULL, &cf_instr->loc)))
|
||||
if (!(iff = hlsl_new_if(ctx, &load->node, &then_block, NULL, HLSL_IF_FLATTEN_DEFAULT, &cf_instr->loc)))
|
||||
return;
|
||||
list_add_after(&load->node.entry, &iff->entry);
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ static bool lower_return(struct hlsl_ctx *ctx, struct hlsl_ir_function_decl *fun
|
||||
|
||||
load = hlsl_block_add_simple_load(ctx, block, func->early_return_var, &cf_instr->loc);
|
||||
not = hlsl_block_add_unary_expr(ctx, block, HLSL_OP1_LOGIC_NOT, load, &cf_instr->loc);
|
||||
hlsl_block_add_if(ctx, block, not, &then_block, NULL, &cf_instr->loc);
|
||||
hlsl_block_add_if(ctx, block, not, &then_block, NULL, HLSL_IF_FLATTEN_DEFAULT, &cf_instr->loc);
|
||||
}
|
||||
|
||||
return has_early_return;
|
||||
@@ -13866,7 +13866,7 @@ static struct hlsl_ir_if *loop_unrolling_generate_var_check(struct hlsl_ctx *ctx
|
||||
load = hlsl_block_add_simple_load(ctx, dst, var, loc);
|
||||
cond = hlsl_block_add_unary_expr(ctx, dst, HLSL_OP1_LOGIC_NOT, load, loc);
|
||||
|
||||
if (!(iff = hlsl_new_if(ctx, cond, &then_block, NULL, loc)))
|
||||
if (!(iff = hlsl_new_if(ctx, cond, &then_block, NULL, HLSL_IF_FLATTEN_DEFAULT, loc)))
|
||||
return NULL;
|
||||
hlsl_block_add_instr(dst, iff);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user