Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/ir.c:
ctx->phase = instruction->handler_idx; ctx->dcl_temps_found = false; return;
case VKD3DSIH_DCL_HS_MAX_TESSFACTOR:
I think all these checks should go (also) in the frontend, not just live inside the validator.
I don't know what's Henri's view on that, but there is probably a philosophical point here that was discussed a little bit when introducing the validator, possibly not enough: the way I see it frontends should do their own validation independently of the VSIR validator in `ir.c` or whatever other check is done during the processing of a shader, and the VSIR validator should just remain a development tool to have an independent check that the shader remains valid during its processing. This is the reason why the validation doesn't happen by default, it requires the explicit usage of `force_validation` (we still expect vkd3d-shader to error out on invalid input shaders even if `force_validation` is not used); incidentally, it is not the reason why my initial idea was to `assert()` on validation feature, but it's not my intention to rehash that discussion.
If we want to rely on the validator to reject bad input shaders for normal usage (not just for development), then the VSIR validator should be run by default (and possibly have an option to disable it for development), but I'm not sure it's a good idea.