Skip to content
Snippets Groups Projects

vkd3d-shader/ir: Prepare the CFG structurizer for handling Hull Shaders.

Merged Giovanni Mascellani requested to merge giomasce/vkd3d:stromboli into master
3 unresolved threads

Hull Shaders contain two functions instead of just one, so all the algorithms that require computing a CFG need to be run twice. Here we refactor the code so that this can be done more easily.

This MR is relatively long, but it is essentially just moving code around, so hopefully it is not too difficult to review anyway.

Merge request reports

Loading
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 approved this merge request

    approved this merge request

  • Giovanni Mascellani changed title from vkd3d-shader/ir: Prepare the CFG structurizer per handling Hull Shaders. to vkd3d-shader/ir: Prepare the CFG structurizer for handling Hull Shaders.

    changed title from vkd3d-shader/ir: Prepare the CFG structurizer per handling Hull Shaders. to vkd3d-shader/ir: Prepare the CFG structurizer for handling Hull Shaders.

  • Conor McCarthy
    Conor McCarthy @cmccarthy started a thread on an outdated change in commit 125d52c1
4571 4571 return VKD3D_OK;
4572 4572 }
4573 4573
4574 static enum vkd3d_result vsir_program_materialize_undominated_ssas_to_temps(struct vsir_program *program,
4575 struct vkd3d_shader_message_context *message_context)
4576 {
4577 struct vsir_cfg cfg;
4578 enum vkd3d_result result;
  • Conor McCarthy
    Conor McCarthy @cmccarthy started a thread on an outdated change in commit 41296e6d
  • 4324 4367 break;
    4325 4368
    4326 4369 case STRUCTURE_TYPE_LOOP:
    4327 if ((ret = vsir_cfg_structure_list_emit_loop(cfg, &structure->u.loop, loop_idx)) < 0)
    4370 if ((ret = vsir_cfg_structure_list_emit_loop(cfg, &structure->u.loop,
    4371 loop_idx)) < 0)
  • added 6 commits

    • 3bb8dafa - vkd3d-shader/ir: Split undominated SSA materialization.
    • 8be3174a - vkd3d-shader/ir: Refactor declaration emission outside of the CFG structure.
    • d36648f0 - vkd3d-shader/ir: Split handling blocks when emitting a structured program.
    • 06362a37 - vkd3d-shader/ir: Split handling loops when emitting a structured program.
    • 595921f0 - vkd3d-shader/ir: Split handling selections when emitting a structured program.
    • 270d52b0 - vkd3d-shader/ir: Split handling jumps when emitting a structured program.

    Compare with previous version

  • added 45 commits

    • 270d52b0...2b7d9790 - 38 commits from branch wine:master
    • e012f238 - vkd3d-shader/ir: Split program structurization.
    • 2a0c03ab - vkd3d-shader/ir: Split undominated SSA materialization.
    • f18d1e69 - vkd3d-shader/ir: Refactor declaration emission outside of the CFG structure.
    • 54939ea3 - vkd3d-shader/ir: Split handling blocks when emitting a structured program.
    • ff5282c0 - vkd3d-shader/ir: Split handling loops when emitting a structured program.
    • 2ec75e5b - vkd3d-shader/ir: Split handling selections when emitting a structured program.
    • d9e38a08 - vkd3d-shader/ir: Split handling jumps when emitting a structured program.

    Compare with previous version

  • Conor McCarthy approved this merge request

    approved this merge request

  • added 7 commits

    • 700d36bf - vkd3d-shader/ir: Split program structurization.
    • 2696abbe - vkd3d-shader/ir: Split undominated SSA materialization.
    • bd5adc0d - vkd3d-shader/ir: Refactor declaration emission outside of the CFG structure.
    • b4331aea - vkd3d-shader/ir: Split handling blocks when emitting a structured program.
    • 5b9d9369 - vkd3d-shader/ir: Split handling loops when emitting a structured program.
    • 783d8930 - vkd3d-shader/ir: Split handling selections when emitting a structured program.
    • 22c41f7d - vkd3d-shader/ir: Split handling jumps when emitting a structured program.

    Compare with previous version

  • Yes, that's what they do, and that's what "splitting" means in my mind. I'm not terribly attached to that formulation, though, so if you have another suggestion I can use yours.

    We'd generally use something like "Introduce a helper function to/for ...".

  • Henri Verbeet approved this merge request

    approved this merge request

  • added 12 commits

    • 22c41f7d...eb15f970 - 5 commits from branch wine:master
    • d891ac50 - vkd3d-shader/ir: Split program structurization.
    • 27801e56 - vkd3d-shader/ir: Split undominated SSA materialization.
    • b4cfc24f - vkd3d-shader/ir: Refactor declaration emission outside of the CFG structure.
    • 5e42f677 - vkd3d-shader/ir: Split handling blocks when emitting a structured program.
    • 052df4d6 - vkd3d-shader/ir: Split handling loops when emitting a structured program.
    • 1a8a4c77 - vkd3d-shader/ir: Split handling selections when emitting a structured program.
    • a7dc6dcc - vkd3d-shader/ir: Split handling jumps when emitting a structured program.

    Compare with previous version

  • Alexandre Julliard approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading