vkd3d-shader/ir: Run validation after each VSIR pass, part 1/N.
The idea is that VSIR should validate after each step, so that it's easier to catch problems. At some point that will require introducing VSIR dialects, but I'd say that's something we want anyway.
Normally validation is never run, so that shouldn't add any meaningful runnig time to end users. It might increase running times for developers and the CI; if that's found to be excessive we can add another compilation option to run validation only at the end, similarly to what happens now, but still leave the option to run it after each step when that's useful.
Adding more structure to the VSIR passes might also enable other interesting debugging features, like dumping VSIR after each pass (to the log, or to a file).
What's the feeling about this?
Merge request reports
Activity
The CI is currently failing because the validator is apparently not ready yet to handle code after each stage. That looks DXIL-specific, which is probably why I didn't immediately notice it (working on macOS). However I still welcome feedback on the general idea, while I fix validation.
added 8 commits
- bfe06398 - vkd3d-shader/ir: Emit a warning instead of an error on validation failures.
- 98014b94 - vkd3d-shader/ir: Do not decide the control flow type on NOPs.
- 00211018 - vkd3d-shader/ir: Run validation after lowering instructions.
- c5fbde16 - vkd3d-shader/ir: Run validation after materializing PHI SSAs to TEMPs.
- 90efb1f1 - vkd3d-shader/ir: Run validation after lowering switches to selection ladders.
- a12a9fba - vkd3d-shader/ir: Run validation after structurization.
- 9327210c - vkd3d-shader/ir: Run validation after flattening control flow constructs.
- fd1548a3 - vkd3d-shader/ir: Run validation after materializing undominated SSAs to TEMPs.
Toggle commit listThe CI is currently failing because the validator is apparently not ready yet to handle code after each stage. That looks DXIL-specific, which is probably why I didn't immediately notice it (working on macOS). However I still welcome feedback on the general idea, while I fix validation.
Broadly this seems fine and welcome. I'm not so sure about the name "vsir_program_run_normalisation_step"; I'd be tempted to suggest something like "vsir_program_transform" or even "vsir_transform".
added 6 commits
- 5538ab1f - vkd3d-shader/ir: Run validation after lowering instructions.
- c40b444e - vkd3d-shader/ir: Run validation after materializing PHI SSAs to TEMPs.
- 9e526b4b - vkd3d-shader/ir: Run validation after lowering switches to selection ladders.
- f4ef33fa - vkd3d-shader/ir: Run validation after structurization.
- c3cb79b1 - vkd3d-shader/ir: Run validation after flattening control flow constructs.
- 18abba2a - vkd3d-shader/ir: Run validation after materializing undominated SSAs to TEMPs.
Toggle commit listadded 10 commits
-
18abba2a...03d76f65 - 2 commits from branch
wine:master
- 829e6f5c - vkd3d-shader/ir: Emit a warning instead of an error on validation failures.
- ffb7284f - vkd3d-shader/ir: Do not decide the control flow type on NOPs.
- fade5dd5 - vkd3d-shader/ir: Run validation after lowering instructions.
- 4a28433e - vkd3d-shader/ir: Run validation after materializing PHI SSAs to TEMPs.
- e935dcb8 - vkd3d-shader/ir: Run validation after lowering switches to selection ladders.
- 455c826a - vkd3d-shader/ir: Run validation after structurization.
- 08c1f4d4 - vkd3d-shader/ir: Run validation after flattening control flow constructs.
- 7b9a1bf6 - vkd3d-shader/ir: Run validation after materializing undominated SSAs to TEMPs.
Toggle commit list-
18abba2a...03d76f65 - 2 commits from branch