Skip to content
Snippets Groups Projects

vkd3d-shader/ir: Run validation after each VSIR pass, part 1/N.

Merged Giovanni Mascellani requested to merge giomasce/vkd3d:vulcano into master
1 unresolved thread

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

Merge request pipeline #31405 skipped

Merge request pipeline skipped for 7b9a1bf6

Merged by Henri VerbeetHenri Verbeet 7 months ago (Sep 5, 2024 2:38pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Giovanni Mascellani marked this merge request as draft

    marked this merge request as draft

  • 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.

    Compare with previous version

    • 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.

      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".

    • 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".

      Fine fore me, it's done.

    • Please register or sign in to reply
  • Giovanni Mascellani marked this merge request as ready

    marked this merge request as ready

  • Giovanni Mascellani approved this merge request

    approved this merge request

  • 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.

    Compare with previous version

  • Henri Verbeet approved this merge request

    approved this merge request

  • Henri Verbeet added 10 commits

    added 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.

    Compare with previous version

Please register or sign in to reply
Loading