Nikolay Sivov (@nsivov) commented about libs/vkd3d-shader/hlsl_codegen.c:
- list_move_head(&block->instrs, &draft.instrs);
- hlsl_block_cleanup(&tmp_dst);
- hlsl_block_cleanup(&draft);
- for (i = 0; i < LOOP_UNROLLING_DEFAULT_MAX_ITERATIONS + 1; ++i)
copy_propagation_state_destroy(&partial_states[i]);
- return true;
+fail:
- hlsl_block_cleanup(&draft);
- hlsl_block_cleanup(&tmp_dst);
- for (i = 0; i < LOOP_UNROLLING_DEFAULT_MAX_ITERATIONS + 1; ++i)
copy_propagation_state_destroy(&partial_states[i]);
I find 1024 iteration loops disturbing. Why do we need to save this state? Could you give a small example for how this runs, and what gets saved.