Announcement

Collapse
No announcement yet.

Experimental Patches Add NIR As Alternate IR To Gallium3D

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Experimental Patches Add NIR As Alternate IR To Gallium3D

    Phoronix: Experimental Patches Add NIR As Alternate IR To Gallium3D

    Rob Clark has published a set of eight patches for review that add support for NIR as an alternate intermediate representation (IR) under Gallium3D...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Isn't NIR, Gallium IR, and LLVM IR all dead now with SPIR-V?

    Comment


    • #3
      Originally posted by uid313 View Post
      Isn't NIR, Gallium IR, and LLVM IR all dead now with SPIR-V?
      No.
      SPIR-V will be the input IR to the graphic stack when using Vulkan, but I don't believe it will be used internally.

      Comment


      • #4
        Releasing a spec for an IR is cheap. Implementing support across the ecosystem is not.

        Also, SPIR is not operating at the same level as TGSI. TGSI is internal to Gallium - SPIR is more like GLSL IR except that it is standardized so that vendors stop duplicating the work of compiling shaders.

        NIR and TGSI are never an exposed external format to compile against. They are generated internally so one compiler can translate from many languages (GL, DX, CL, SPIRV, etc) to many drivers. Nir is just a heavily optimized format that Intel finds makes their driver compiler run faster, that is probably applicable elsewhere, but it will be nice to see results from this patchset in testing. SPIRV is an IR for the developers of graphics programs to compile their software to, so that any supporting driver can run the IR binary as a GPU program.

        Comment


        • #5
          Originally posted by uid313 View Post
          Isn't NIR, Gallium IR, and LLVM IR all dead now with SPIR-V?
          Nope.

          Comment


          • #6
            Originally posted by zanny View Post
            Releasing a spec for an IR is cheap. Implementing support across the ecosystem is not.

            Also, SPIR is not operating at the same level as TGSI. TGSI is internal to Gallium - SPIR is more like GLSL IR except that it is standardized so that vendors stop duplicating the work of compiling shaders.

            NIR and TGSI are never an exposed external format to compile against. They are generated internally so one compiler can translate from many languages (GL, DX, CL, SPIRV, etc) to many drivers. Nir is just a heavily optimized format that Intel finds makes their driver compiler run faster, that is probably applicable elsewhere, but it will be nice to see results from this patchset in testing. SPIRV is an IR for the developers of graphics programs to compile their software to, so that any supporting driver can run the IR binary as a GPU program.
            SPIR-V is an internal+ IR mostly like TGSI. No comparison with GLSL_asm and HLSL_asm. Not possible for SPIR-V to compile to TGSI, will probably replace it. The strongest possibility is SPIR->LLVM->HW or SPIR->HW.

            Comment


            • #7
              Originally posted by artivision View Post

              SPIR-V is an internal+ IR mostly like TGSI. No comparison with GLSL_asm and HLSL_asm. Not possible for SPIR-V to compile to TGSI, will probably replace it. The strongest possibility is SPIR->LLVM->HW or SPIR->HW.

              SPIR-V is on-disk format. I.e. store shaders in compiled form on the disk, and skip the first compilation stage. SPIR-V can't be optimized, or processed in some other way upfront, so other IR is needed for in-memory use like NIR or TGSI.

              Comment


              • #8
                If you look at the SPIR-V spec, you will notice that the original author of NIR (connor abbott) is one of the authors of the SPIR-V spec.

                Comment


                • #9
                  Originally posted by artivision View Post
                  SPIR-V is an internal+ IR mostly like TGSI.
                  Nope.
                  No comparison with GLSL_asm and HLSL_asm.
                  Nope.
                  Not possible for SPIR-V to compile to TGSI, will probably replace it.
                  Nope.
                  The strongest possibility is SPIR->LLVM->HW
                  Nop... Wait, yes, you got one right, at least for radeonsi.
                  or SPIR->HW.
                  Nope. It will be SPIRV->NIR->HW, or possibly SPIRV->NIR->TGSI->HW for some drivers.
                  Last edited by smitty3268; 20 October 2015, 02:32 PM.

                  Comment


                  • #10
                    Originally posted by smitty3268 View Post
                    Nope.

                    Nope.

                    Nope.

                    Nop... Wait, yes, you got one right, at least for radeonsi.

                    Nope. It will be SPIRV->NIR->HW, or possibly SPIRV->NIR->TGSI->HW for some drivers.
                    TGSI to LLVM is compilation, the same for TGSI to HW and LLVM to HW. SPIRV to TGSI is a conversion of typos like HLSL to GLSL, not impossible to convert but compile is impossible. Read first.
                    Last edited by artivision; 21 October 2015, 07:38 PM.

                    Comment

                    Working...
                    X