3 ms·
Regarding bytecode delivery, have you seen SPIR-V? As for modules, avoiding them is a performance feature since it is easier to optimize code when you compile
by ryao 1y ago
Regarding bytecode delivery, have you seen SPIR-V?
As for modules, avoiding them is a performance feature since it is easier to optimize code when you compile everything in one unit. Rather than go toward modules, modern graphics has moved away from them by removing dynamic linking from newer shader languages such as SPIR-V. I believe a limited form of dynamic linking was later introduced in the form of graphics pipeline libraries for avoiding performance issues from a combinatoric explosion of partially redundant compilations when translating shaders from Direct3D 11 and earlier, but for anything outside of translating other APIs, you are supposed to avoid using that as far as I know.
- TazeTSchnitzel 1y agoDynamic linking is returning because of ray-tracing also.
- pjmlp 1y agoOf course, but that is only for Vulkan, technically it is possible with OpenGL 4.6, but I doubt anyone is bothering with it. It is also the way on most proprietary APIs. Metal and DirectX have dynamic linking, shader libraries, and one thing slang thankfully has, is exactly being a modern modular language, which has been given to Khronos as GLSL successor, alongside the already major adoption HLSL, GLSL is done.
- deleted 1y ago[deleted]
- manchmalscott 1y agoI mean, in my personal projects I've transpiled GLSL into spir-v bytecode for use with OpenGL 4.5, even. Libshaderc has suppported that for years.
- pjmlp 1y agoMaybe using extensions? "Khronos Releases OpenGL 4.6 with SPIR-V Support" https://www.khronos.org/news/press/khronos-releases-opengl-4.6-with-spir-v-support https://www.khronos.org/news/press/khronos-releases-opengl-4... > OpenGL 4.6 adds support for ingesting SPIR-V shaders to the core specification, guaranteeing that SPIR-V shaders will be widely supported by OpenGL implementations
- BearOso 1y ago> Of course, but that is only for Vulkan, technically it is possible with OpenGL 4.6, but I doubt anyone is bothering with it. https://devblogs.microsoft.com/directx/directx-adopting-spir-v/ https://devblogs.microsoft.com/directx/directx-adopting-spir...
- pjmlp 1y agoYes, and what does that change in the context of GLSL?