On Fri Jan 19 19:47:23 2024 +0000, Giovanni Mascellani wrote:
the second requires us to write two passes, one to delete the
DCL_TEMPS and other to introduce them, No, I don't think we ever want to introduce it back. Just one very simple pass to get rid of it.
and avoid checking that DCL_TEMPS is present on the validator.
This actually simplifies the validator. Notice that your commit isn't complete anyway: for hull shaders you have to do more work to track the shader phases, as in TPF each phase is supposed to have its own DCL_TEMPS. It's not too hard, but again: to what good is this? The SPIR-V backend completely ignores that instruction. In general all the `DCL_` are rather metadata than instructions, and the general direction AFAICT is to move their content into actual metadata and then get rid of the instructions (unless you're feeding the disassembler, of course; here I'm talking about the SPIR-V backend).
Okay, the second option makes sense to me now, since we are ignoring VKD3DSIH_DCL_TEMPS instructions when writing vsir to the different output formats and just using vkd3d_shader_desc.dcl_temps.
I guess that the "vkd3d-shader/ir: Remove DCL_TEMPS instructions." commit you sent in !574 does it, so this MR should be waiting for that to get upstreamed.