Jan. 18, 2024
11:01 a.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
+ for (i = 0; i < instructions->count; ++i) + { + texkill_ins = &instructions->elements[i]; + + if (texkill_ins->handler_idx != VKD3DSIH_TEXKILL) + continue; + + if (!shader_instruction_array_insert_at(instructions, i + 1, components_read + 1)) + return VKD3D_ERROR_OUT_OF_MEMORY; + + if (tmp_idx == ~0u) + tmp_idx = parser->shader_desc.temp_count++; + + /* tmp = ins->dst[0] < 0 */ + + ins = texkill_ins + 1; `ins = &instructions->elements[i + 1]` feels more readable to me, and similarly below.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514#note_57879