Announcement

Collapse
No announcement yet.

Microsoft Open-Sources DirectX Shader Compiler

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

  • Microsoft Open-Sources DirectX Shader Compiler

    Phoronix: Microsoft Open-Sources DirectX Shader Compiler

    Some more exciting graphics news today aside from a big Vulkan update is Microsoft announcing they have open-sourced a DirectX shader compiler...

    http://www.phoronix.com/scan.php?pag...tX-Shader-Comp

  • #2
    What's their motive? Seriously, they stand to benefit in some way - what motive is behind this I'd like to hear from more experienced readers in the industry.

    Comment


    • #3
      Originally posted by ElectricPrism View Post
      What's their motive? Seriously, they stand to benefit in some way - what motive is behind this I'd like to hear from more experienced readers in the industry.
      Capturing developer goodwill? As far as I can see, Vulkan is pretty much on par with DX12, but is cross platform. In a world where multi-platform titles are the norm, that's a pretty compelling advantage for Vulkan.
      Also (and this is probably just wishful thinking on my part), Microsoft may have realized there's no advantage to be had from keep these pieces of code secret.

      Comment


      • #4
        Depending on how the compiler structure is formated, it might be easier to go "Frontend -> Intermediate -> NIR" than "Frontend -> Intermediate -> DXIL -> NIR". That said, it might also be possible to do something like "Frontend -> Intermediate -> LLVM IR -> SPIR V" with relative ease for a quick upstream supported HLSL frontend and a community supported backend for Spir-V.

        Heavy oversimplification of the possibilities.

        Comment


        • #5
          This does sound like a trap but it might help with porting games over to Linux, if a complete DirectX compiler can be built for Linux. I for one do question MS's motives for making this move as DX is another of their crown jewels.

          Comment


          • #6
            Sounds a bit too good to be true... But even if it is, I'm all for it.

            I think I might be glimpsing their goal though: Open Source HLSL = Everyone stops bothering with GLSL and just use HLSL and HLSL -> Spir-V. As dependency on HLSL grows and grows, they'll start adding proprietary features to this compiler, and then at some point they will close the source again for another version of the compiler. Or just EEE for short. If this ain't along the lines of what they want then I'll be surprised. But they're sure underestimating us if they think the last E will be that easy.
            Last edited by rabcor; 23 January 2017, 09:01 PM.

            Comment


            • #7
              It should benefit glslang: https://github.com/KhronosGroup/glslang/issues/362

              Comment


              • #8
                Yes DX is one of their crown jewels, and in fact they are not opening DX proper (which would allow dx to run on other platforms) - they are opening a side tool for dx developers
                This way, dx is a more attractive platform to work on
                Otoh, it's unlikely this will help porting games *to* Linux, if anything it will help with developing them *from* Linux (or from IDEs other than visual studio, in which the community is expected to integrate the shader compiler as a tool)

                Comment


                • #9
                  Originally posted by silix View Post
                  Yes DX is one of their crown jewels, and in fact they are not opening DX proper (which would allow dx to run on other platforms) - they are opening a side tool for dx developers
                  This way, dx is a more attractive platform to work on
                  Otoh, it's unlikely this will help porting games *to* Linux, if anything it will help with developing them *from* Linux (or from IDEs other than visual studio, in which the community is expected to integrate the shader compiler as a tool)
                  Yeah it is not the complete DX compiler but just a tool for working with DX, upon closer reading.

                  Comment


                  • #10
                    Originally posted by DeepDayze View Post

                    Yeah it is not the complete DX compiler but just a tool for working with DX, upon closer reading.
                    The parser still can be useful for GL / Vulkan related tools. Many engines now translate HLSL into GLSL and SPIR-V. This can improve such translation.

                    Comment

                    Working...
                    X