Announcement

Collapse
No announcement yet.

Khronos Group Posts Their Vulkan + SPIR-V Q&A

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

  • #11
    Originally posted by dragorth View Post
    First, I don't consider any programing to be trivial when it involves codebase as large as these games. So, no, I didn't mean it will be trivial. You could say, however, that it would be trivial, once the drivers are available, compared to the initial OpenGL port, or the initial Mantle port, since the largest part of the work is done, and all that is left is fine tuning.
    It would still require porting HLSL shaders to GLSL which is probably non-trivial for a lot of games, although ones that have already been ported to OpenGL would have that part done.

    Comment


    • #12
      Originally posted by smitty3268 View Post
      It would still require porting HLSL shaders to GLSL which is probably non-trivial for a lot of games, although ones that have already been ported to OpenGL would have that part done.
      one of the reasonings behind SPIR-V was "we don't want to write multiple shaders". all it is needed is HLSL>SPIR-V

      at least according to this


      while this is how Unity 5 does it right now (i think it is also somewhat how UE4 does it. not sure but it is suspiciously alike)

      Comment


      • #13
        Originally posted by smitty3268 View Post
        It would still require porting HLSL shaders to GLSL which is probably non-trivial for a lot of games, although ones that have already been ported to OpenGL would have that part done.
        First, we already have several implementations of HLSL to GLSL to choose from, one from Valve that covers most use cases, the dx11 state tracker that is no longer developed but does have the converter, Wine has one they use to accelerate DX9 games as well as the DX10/11 they are working on, and then there is the DX9 state tracker that was just merged into Mesa.

        I think I am forgetting one that came out around the same time as Valve released theres. These are just the ones I know about that are for sure open source. I know of, several others, including the Unity one that we don't have the source to, and the Unreal Engine that we can get access to the sore, we just can't use it outside of Unreal, and several others that were abandoned before they were finished.

        Yes, DX9 and DX10/11 shaders are different, but we have the different converters for them. However, the optimal solution will be to turn one of those into a HLSL to SPIR-V converter that becomes a standard. Then we don't have that extra compile step.

        Comment


        • #14
          Originally posted by dragorth View Post
          However, the optimal solution will be to turn one of those into a HLSL to SPIR-V converter that becomes a standard. Then we don't have that extra compile step.
          Yeah, you are right. Once we have that it should be considerably simpler, and i imagine it will be a pretty high priority once Vulkan drivers are out.

          Regarding all the other HLSL translators available now - sure, they exist, but for the most part they kind of suck or have lots of limitations to them. Most only support a subset of HLSL, or only DX9, or etc.... The sooner we can rely on an HLSL -> SPIR-V compiler, the better off everyone will be.

          Comment

          Working...
          X