4 ms·
No surprise here, given the extent HLSL is already the de facto shading language for Vulkan. Khronos already mentioned in a couple of conferences that there wi
by pjmlp 2y ago
No surprise here, given the extent HLSL is already the de facto shading language for Vulkan.
Khronos already mentioned in a couple of conferences that there will be no further work improving GLSL, and given DirectX weight in the industry, HLSL kind of took over.
Additionally for the NVidia fans, it might be that Slang also gets a place in the Vulkan ecosystem, discussions are ongoing, as revealed on SIGGRAPH sessions.
- gigatexal 2y agoWill this help games be more compatible with the proton layer on Linux or is this not related?
- jsheard 2y agoIn theory if DirectX games start passing shaders to the driver in SPIR-V, the same format Vulkan uses, then yes it should make Protons job easier. Translating the current DXIL format to SPIR-V is apparently non-trivial to say the least: https://themaister.net/blog/2021/09/05/my-personal-hell-of-translating-dxil-to-spir-v-part-1/ https://themaister.net/blog/2021/09/05/my-personal-hell-of-t... https://themaister.net/blog/2021/10/03/my-personal-hell-of-translating-dxil-to-spir-v-part-2/ https://themaister.net/blog/2021/10/03/my-personal-hell-of-t... https://themaister.net/blog/2021/11/07/my-personal-hell-of-translating-dxil-to-spir-v-part-3/ https://themaister.net/blog/2021/11/07/my-personal-hell-of-t... https://themaister.net/blog/2022/04/11/my-personal-hell-of-translating-dxil-to-spir-v-part-4/ https://themaister.net/blog/2022/04/11/my-personal-hell-of-t... https://themaister.net/blog/2022/04/24/my-personal-hell-of-translating-dxil-to-spir-v-part-5/ https://themaister.net/blog/2022/04/24/my-personal-hell-of-t...
- trelane 2y agoMaybe. Maybe not; it could well be an incompatible flavour of SPIR-V.
- MindSpunk 2y agoIt's unlikely to diverge from the same general flavor as vulkan. The worst parts of the DXIL to SPIR-V conversion I remember from that chain of blog posts is rebuilding structured control flow and how it interacts with atomics and wave convergence. That's a problem that goes away irrespective of any DX extensions to SPIR-V for supporting the binding model DX uses.
- TillE 2y agoMy understanding was that dxc lacked support for compiling various HLSL features to SPIR-V (hence SM7 now), so there are still a bunch of Vulkan-focused projects like Godot which only support GLSL. But yes, the games industry has been almost entirely HLSL since forever, and this is going to help remove the final obstacles.
- minraws 2y agoYep, especially DXC HLSL to SPIRV was a big issue when it came to supporting new features from Vulkan. Though I would still like to see if slang can succeed and I am always a bit afraid of Microsoft just dropping the ball somewhere.
- Simran-B 2y agoWhat about WGSL though, the shader language of WebGPU? WebGPU is kind of Vulkan lite, but unlike with Vulkan, Apple is on board and actually the reason why WGSL exists as yet another shading language.
- jsheard 2y agoWhat about it? Nobody wanted WGSL, it's just an artifact of having to appease Apple during WebGPUs development as you say. I don't see why it would be adopted for anything else. The old WebGPU meeting notes have some choice quotes from (IIRC) Unity and Adobe engineers literally begging the committee not to invent a new shader language.
- fngjdflmdflg 2y ago>The old WebGPU meeting notes have some choice quotes from (IIRC) Unity and Adobe engineers literally begging the committee not to invent a new shader language. This was an interesting tidbit, so I tried to find the source for it. While I did not find it, I did find the December 2019 minutes[0] which has a related point: >Apple is not comfortable working under Khronos IP framework, because of dispute between Apple Legal & Khronos which is private. Can’t talk about the substance of this dispute. Can’t make any statement for Apple to agree to Khronos IP framework. So we’re discussing, what if we don’t fork? We can’t say whether we’re (Apple) happy with that. I found this link via rust hn[1] which I found after reading this blog post:[2] >Vulkan used a bytecode, called SPIR-V, so you could target it from any shader language you wanted. WebGPU was going to use SPIR-V, but then Apple said no The lobsters thread also links to a relevant HN post:[3] >I know, I was there. I also think that objection to SPIR-V wasn't completely unfounded. SPIR-V is a nice binary representation of shaders, but it has problems in the context of WebGPU adoption: It's so low level [...] It has a lot of instructions [...] Friction in the features we need, vs features Khronos needs. [...] there is no single well specified and tested textual shading language. HLSL doesn't have a spec. The linked blog post from lobsters was also discussed on HN, which you also commented in.[4] It would be great if you could find that Unity/Adobe discussion as I would be interested to read it. [0] https://docs.google.com/document/d/1F6ns6I3zs-2JL_dT9hOkX_253vEtKxuUkTGvxpuv8Ac/edit https://docs.google.com/document/d/1F6ns6I3zs-2JL_dT9hOkX_25... [1] https://lobste.rs/s/q4ment/i_want_talk_about_webgpu https://lobste.rs/s/q4ment/i_want_talk_about_webgpu [2] https://cohost.org/mcc/post/1406157-i-want-to-talk-about-webgpu https://cohost.org/mcc/post/1406157-i-want-to-talk-about-web... [3] https://news.ycombinator.com/item?id=23089745 https://news.ycombinator.com/item?id=23089745 [4] https://news.ycombinator.com/item?id=35800988 https://news.ycombinator.com/item?id=35800988
- camel-cdr 2y agoI haven't used either in a while, what is missing from GLSL?
- pjmlp 2y agoC based, no support for modular programming, everything needs to be a giant include, no one is adding features to it as Khronos isn't assigned any budget to it. HLSL has evolved to be C++ like, including lightweight templates, mesh shaders and work graphs, has module support via libraries, is continuously being improved on each DirectX release.
- flohofwoe 2y agoI'm not a fan of GLSL either, but adding C++ like baggage to shading languages like HLSL and especially MSL do (which is C++) is a massive mistake IMHO, I'd prefer WGSL over that sort of pointless language complexity any day.
- pjmlp 2y agoLong term shading languages will be a transition phase, and most GPUs will turn into general purpose compute devices, where we can write code like in the old days of software rendering, except it will be hardware accelerated anyway. We already see this with rendering engines that are using CUDA instead, or as shown at Vulkanised sessions. I do agree that to the extent C++ has grown, and the security issues, something else would be preferable, maybe NVidia has some luck with their Slang adoption proposal.
- NotGMan 2y agoAt some point you have to stop working in assembly and graduate to a high-level language and beyond. Modern GPU stuff is getting too complex to be practical without higher language features.
- flohofwoe 2y agoFrom the pov of assembly, C and any other high level language are basically the same. That doesn't mean that climbing even higher up on the abstraction ladder is a good thing though (especially for performance).
- hgs3 2y ago> Khronos already mentioned in a couple of conferences that there will be no further work improving GLSL Unfortunately, HLSL isn’t an open standard like GLSL. Is it Khronos's intention to focus solely on SPIR-V moving forward, leaving the choice of higher-level shader languages up to application developers?
- ferbivore 2y agoThere's likely to be very little funding for GLSL moving forward, and I would expect no major spec updates ever again, but vendors will probably keep publishing extensions for new GPU features and fixing things up. GLSL still has a fairly large user base. Whether SPIR-V is going to be the only Khronos shading language (or whatever you want to call it) moving forward, that's hard to say. Nvidia is pushing for Slang as a Khronos standard at the moment. Not sure if anyone's biting.
- pjmlp 2y agoYes, they officially stated at Vulkanised, SIGGRAPH among other places, that there is no budget for GLSL improvements, and also they aren't programming language experts anyway. It is up to the community to come up with alternative, and the game development community is mostly HLSL.