Skip to content
Snippets Groups Projects

vkd3d-shader/tpf: Compile HLSL to tpf through vsir, part 1.

Merged Francisco Casas requested to merge fcasas/vkd3d:hlsl2vsir_tpf into master
3 unresolved threads

An initial set of patches contributing to the HLSL IR -> tpf -> vsir part of the vsir translation.

Merge request reports

Merge request pipeline #33386 skipped

Merge request pipeline skipped for 7eee877d

Approval is optional

Merged by Henri VerbeetHenri Verbeet 6 months ago (Oct 16, 2024 7:46pm UTC)

Merge details

  • Changes merged into with 7eee877d.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Francisco Casas added 6 commits

    added 6 commits

    • 0778d11b - vkd3d-shader/tpf: Replace some uses of ctx->profile with tpf->shader_version.
    • 1a5c47bc - vkd3d-shader/tpf: Rename "tpf_writer" to "tpf_compiler".
    • fd4a9440 - vkd3d-shader/tpf: Use tpf_compiler as arg on the tpf_compile() callees.
    • 76203079 - vkd3d-shader/tpf: Avoid using ctx->profile.
    • 24fb00ce - vkd3d-shader/tpf: Add "sm4_" prefix to sysval_semantic_from_hlsl().
    • eaac6b8a - vkd3d-shader/tpf: Store the I/O signatures on the vsir_program.

    Compare with previous version

    • Subject: [PATCH 1/8] vkd3d-shader/d3dbc: Remove "hlsl_" prefix from external
       functions.
      
      They are no longer rely on HLSL IR.

      Does it still belong in hlsl.h in that case?

      Subject: [PATCH 3/8] vkd3d-shader/tpf: Replace some uses of ctx->profile with
       tpf->shader_version.

      Wouldn't it be easier/nicer to get the version from the vsir_program, once we store that in struct tpf_compiler?

    • Author Developer

      Does it still belong in hlsl.h in that case?

      Right, these can be moved to vkd3d_shader_private.h, I did that.

      I also did it for hlsl_sm4_register_from_semantic() and sysval_semantic_from_hlsl().

      Wouldn't it be easier/nicer to get the version from the vsir_program, once we store that in struct tpf_compiler?

      Good point, I moved the patches after the patch that adds the vsir_program to the tpf_compiler struct, to indeed use the tpf_compiler->program->version.

    • Please register or sign in to reply
  • Francisco Casas added 8 commits

    added 8 commits

    • 3df573f0 - vkd3d-shader/d3dbc: Remove "hlsl_" prefix from external functions.
    • 6d0058f2 - vkd3d-shader/hlsl: Split hlsl_sm4_write()
    • aa1f7c2b - vkd3d-shader/tpf: Rename "tpf_writer" to "tpf_compiler".
    • 246bd96e - vkd3d-shader/tpf: Use tpf_compiler as arg on the tpf_compile() callees.
    • 11c5af0c - vkd3d-shader/tpf: Store the I/O signatures on the vsir_program.
    • fdca3385 - vkd3d-shader/tpf: Replace uses of ctx->profile with tpf->program->shader_version.
    • 70185188 - vkd3d-shader/tpf: Make sysval_semantic_from_hlsl() independent of HLSL IR.
    • 0ac181a3 - vkd3d-shader/tpf: Make hlsl_sm4_register_from_semantic() independent of HLSL IR.

    Compare with previous version

  • Francisco Casas added 4 commits

    added 4 commits

    • 0bdc2e4b - vkd3d-shader/tpf: Store the I/O signatures on the vsir_program.
    • 388ffb9b - vkd3d-shader/tpf: Replace uses of ctx->profile with tpf->program->shader_version.
    • 5bab24e7 - vkd3d-shader/tpf: Make sysval_semantic_from_hlsl() independent of HLSL IR.
    • b8dec423 - vkd3d-shader/tpf: Make hlsl_sm4_register_from_semantic() independent of HLSL IR.

    Compare with previous version

  • Author Developer

    :arrow_up: Superficial improvements.

  • Francisco Casas added 91 commits

    added 91 commits

    • b8dec423...cd249a47 - 83 commits from branch wine:master
    • 5dac236b - vkd3d-shader/d3dbc: Remove "hlsl_" prefix from external functions.
    • a14edbe6 - vkd3d-shader/hlsl: Split hlsl_sm4_write()
    • d64fd50a - vkd3d-shader/tpf: Rename "tpf_writer" to "tpf_compiler".
    • 17721d78 - vkd3d-shader/tpf: Use tpf_compiler as arg on the tpf_compile() callees.
    • 90284ba2 - vkd3d-shader/tpf: Store the I/O signatures on the vsir_program.
    • 2c63b8f0 - vkd3d-shader/tpf: Replace uses of ctx->profile with tpf->program->shader_version.
    • 97726a48 - vkd3d-shader/tpf: Make sysval_semantic_from_hlsl() independent of HLSL IR.
    • eccb79e8 - vkd3d-shader/tpf: Make hlsl_sm4_register_from_semantic() independent of HLSL IR.

    Compare with previous version

  • Author Developer

    :arrow_up: Rebased.

    • Signature mask inversion should be done in the TPF writer. VSIR used_mask is "uninverted", i.e. it's the actual used mask regardless of whether it's input or output.

      Similarly flushing PS output sysvals to NONE should be done in the TPF writer.

      I guess sm4_sysval_semantic_from_semantic() has the precedent in the sm1 version, but _from_name() seems maybe clearer?

    • Author Developer

      Signature mask inversion should be done in the TPF writer. VSIR used_mask is "uninverted", i.e. it's the actual used mask regardless of whether it's input or output.

      Similarly flushing PS output sysvals to NONE should be done in the TPF writer.

      I see, I made these stay in tpf.c.

      I guess sm4_sysval_semantic_from_semantic() has the precedent in the sm1 version, but _from_name() seems maybe clearer?

      I went for _from_semantic_name(), both for sm1 and sm4.

    • Please register or sign in to reply
  • Francisco Casas added 42 commits

    added 42 commits

    • eccb79e8...bc351f4b - 34 commits from branch wine:master
    • d9c0667b - vkd3d-shader/d3dbc: Remove "hlsl_" prefix from external functions.
    • bde3dc5a - vkd3d-shader/hlsl: Split hlsl_sm4_write()
    • d92697b2 - vkd3d-shader/tpf: Rename "tpf_writer" to "tpf_compiler".
    • a0f7d817 - vkd3d-shader/tpf: Use tpf_compiler as arg on the tpf_compile() callees.
    • 2bb5e757 - vkd3d-shader/tpf: Store the I/O signatures on the vsir_program.
    • 0b8db237 - vkd3d-shader/tpf: Replace uses of ctx->profile with tpf->program->shader_version.
    • f4865c16 - vkd3d-shader/tpf: Make sysval_semantic_from_hlsl() independent of HLSL IR.
    • 76a7c6d5 - vkd3d-shader/tpf: Make hlsl_sm4_register_from_semantic() independent of HLSL IR.

    Compare with previous version

  • Elizabeth Figura approved this merge request

    approved this merge request

  • Henri Verbeet approved this merge request

    approved this merge request

  • Henri Verbeet added 10 commits

    added 10 commits

    • 76a7c6d5...0ab5e1cb - 2 commits from branch wine:master
    • 36013977 - vkd3d-shader/d3dbc: Remove the "hlsl_" prefix from external functions.
    • 5b21cc67 - vkd3d-shader/hlsl: Split hlsl_sm4_write().
    • 16d9a10d - vkd3d-shader/tpf: Rename "tpf_writer" to "tpf_compiler".
    • 10442369 - vkd3d-shader/tpf: Pass a tpf_compiler structure to tpf_compile() callees.
    • c75fbaf9 - vkd3d-shader/tpf: Use the I/O signatures from the vsir program in tpf_write_signature().
    • 7cc8151b - vkd3d-shader/tpf: Replace uses of ctx->profile with tpf->program->shader_version.
    • a243862b - vkd3d-shader/tpf: Make sysval_semantic_from_hlsl() independent of HLSL IR.
    • 7eee877d - vkd3d-shader/tpf: Make hlsl_sm4_register_from_semantic() independent of HLSL IR.

    Compare with previous version

Please register or sign in to reply
Loading