On Sat Nov 11 19:01:41 2023 +0000, Henri Verbeet wrote:
There are few places still that have NOP/INVALID opcode assigned
directly, I left those out as they were not causing problems. If there is interested in using vsir_instruction_init() at all times, let me know. I think we generally should, yes. Note that there's a difference between creating a new NOP instruction and changing an existing instruction to NOP though; in the latter case we should use vkd3d_shader_instruction_make_nop() to preserve location information.
It's likely left uninitialized in a few places where NOP handler is set. We probably should call full init() at relatively top level, and then make_nop() if it's reset. That depends on whether location could change in between the two. For consistency, it makes sense to require handler_idx to be set only by a number of helpers.