Questions:
In d3dbc what does the `LABEL` instruction src parameter contain? I assume this instruction adds a block label so I'm using it for that, and currently emit it with an immediate constant.
These look like "label l0", "label l1", etc. in the disassembler. I.e., using VKD3DSPR_LABEL. They'd get called like "call l0", "call l1", etc. LABEL/CALL isn't terribly common though, to the point that I don't think Wine even has tests for them; the vsa/psa assemblers may be the only way to get them.
We lose the naming of block label ids. One way to handle this is include the necessary info in the IR to recreate the deleted namings in the backend. Another is add support for names to VSIR. Thoughts?
I imagine we could do something similar to SPIR-V's OpName if needed, but I don't think we have a strong reason to choose that option over just including e.g. an array with debug names in struct vkd3d_shader_desc.
The new instruction count sometimes gets ahead of the source count. This is handled by writing everything to a new instruction array, and swapping out the old one at the end. Simple and effective for the moment?
Sure.