Announcement

Collapse
No announcement yet.

Google Gets DirectX Shader Compiler Working On Linux

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

  • #11
    Originally posted by smitty3268 View Post

    Pretty much. Although as i recall, the SPIR-V backend is mostly maintained by Google, so it may or may not be 100% complete and bug free. The front-end HLSL parser is the official MS one though.

    I believe there are 2 major camps right now with ports, with some people using this tool (on windows, previously) and others using glslang, which is closer to the SPIR-V camp but may not support HLSL as fully as this tool does.
    Nothing is 100% bug free. Nothing. Doesn't matter who's written it.

    Comment


    • #12
      Lets say that for some reason Microsoft ported DirectX to Linux. I know it's what you guys want but I think that would be terrible for Linux and OpenGL, a devastating move.

      Comment


      • #13
        I still can't envision how this fits in to the big picture.
        Can someone please elaborate on when/where this code is used?
        • build game for release
        • port game to OpenGL/Vulkan
        • load game
        • run game
        thx

        Comment


        • #14
          Originally posted by Mike Frett View Post
          Lets say that for some reason Microsoft ported DirectX to Linux. I know it's what you guys want but I think that would be terrible for Linux and OpenGL, a devastating move.
          To support DirectX on linux the drivers would also need to support it. Which means that apart from NVIDIA (which is using a single codebase anyway) it would take a long while to actually go anywhere.

          If they manage to make a compiler that from DX creates something that can run on OpenGL or Vulkan/Spir-V, then it's not going to be that terrible, as OpenGL/Vulkan will still be required to have the contraption work at all, and using them directly would be more efficient.

          Comment


          • #15
            Originally posted by slalomsk8er View Post
            I still can't envision how this fits in to the big picture.
            Can someone please elaborate on when/where this code is used?
            • build game for release
            • port game to OpenGL/Vulkan
            • load game
            • run game
            thx
            I can try.
            If you use a cross-platform game engine as a developer, chances are you never write any opengl/hlsl/vulkan shader code, you have node based UI system's that abstract this. The engine devs itself use whatever works best, but so far they already have working and tested in-house solution's that deal with the platform conversion, so i guess they don't really need this. The main problem is that each shader language has its own very specific anomaly's, as example you could not use most game hlsl shaders on other hlsl shader compatible applications like 3dsMax, let alone other games. This means you have to carefully write your cross platform pipeline anyway.
            You would have to omit any of the advanced features of the shader language to get to a point where you could recompile to different output formats and expect this to work.
            So it comes down to how many features, anomaly's you have in your shader code and how much extra work you want to put into building your export pipeline, especially if you rely on HLSL semantics or annotations, which do not fully exist in other shader languages.

            tldr; I don't think this changes much for anyone, except google projects.
            Last edited by andy22; 06-27-2018, 06:08 AM.

            Comment


            • #16
              For games, DirectX shader compatibility isn't enough. It must be other thing to think (hardware, network, inputs...).

              Comment


              • #17
                Am I correct in thinking that if SPIR-V ever upgrades its bytecode format (i.e similar to i.e GLSL 1.2 to GLSL 4.0 does for text) that this HLSL to SPIR-V transpiler will be churning out deprecated shader code?

                Surely this idea / technology is not new and is a tad similar to NVIDIA's old Cg transpiler just instead of using Cg as a language, we are using HLSL as the abstraction layer language.

                Comment


                • #18
                  Amazon's Lumberyard game engine (a fork of cryengine 3)and Cryengine 5 compile om Linux but do not render. Hope this helps with these engines. Both engines are on github too.

                  Comment


                  • #19
                    "Do you know if is it possible to compile DirectXShaderCompiler on Linux? It is mainly for having the compiler to generate SPIR-V shaders for Vulkan from HLSL sources on Linux."
                    -Cry-Mory junior render engineer at Crytek
                    https://github.com/Microsoft/DirectX...ment-400048473

                    Cryengine has alot of games that could be ported : https://en.wikipedia.org/wiki/List_of_CryEngine_games

                    Comment

                    Working...
                    X