mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Add a hlsl_block_add_loop() helper.
This commit is contained in:
committed by
Henri Verbeet
parent
62196b2bf1
commit
e5cabeafe5
Notes:
Henri Verbeet
2025-03-10 15:23:02 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1404
@@ -655,7 +655,6 @@ static struct hlsl_block *create_loop(struct hlsl_ctx *ctx, enum hlsl_loop_type
|
||||
{
|
||||
enum hlsl_loop_unroll_type unroll_type = HLSL_LOOP_UNROLL;
|
||||
unsigned int i, unroll_limit = 0;
|
||||
struct hlsl_ir_node *loop;
|
||||
|
||||
check_attribute_list_for_duplicates(ctx, attributes);
|
||||
check_loop_attributes(ctx, attributes, loc);
|
||||
@@ -714,9 +713,7 @@ static struct hlsl_block *create_loop(struct hlsl_ctx *ctx, enum hlsl_loop_type
|
||||
else
|
||||
list_move_head(&body->instrs, &cond->instrs);
|
||||
|
||||
if (!(loop = hlsl_new_loop(ctx, iter, body, unroll_type, unroll_limit, loc)))
|
||||
goto oom;
|
||||
hlsl_block_add_instr(init, loop);
|
||||
hlsl_block_add_loop(ctx, init, iter, body, unroll_type, unroll_limit, loc);
|
||||
|
||||
destroy_block(cond);
|
||||
destroy_block(body);
|
||||
|
||||
Reference in New Issue
Block a user