Why not always returning the error? What is the advantage of doing some more parsing, if the only information we're going to return is just a generic failure error, without additional diagnostics?
Well, we should be providing the additional diagnostics. But generally, for much the same reasons that e.g. the HLSL compiler doesn't abort at the first sign of trouble. There may be multiple unrelated issues in the same shader, and knowing about subsequent issues sooner rather than later is generally helpful. At the very least because it might give someone interested in working on an application a better sense of the amount of effort required to make it work.
It might be that this ship has already sailed, since this is probably something preceding this MR, but I feel a bit awkward about how errors are silently ignored in a number of code paths (see for example `sm6_parser_emit_dx_store_output()`, but it's not the only place). I understand that we don't want to be overly zealous with rejecting invalid shaders, because it might be that even if our translation isn't perfect the translated shader is still good enough so that, say, a certain game is playable.
No, I think you're right about that; the default behaviour should be to reject invalid shaders. We may want to be able to relax that in some cases, but we could introduce compile options for that, perhaps enabled by VKD3D_CONFIG flags on the vkd3d side.