6 ms·
> The language is insprired by HLSL, the dominant shading language for graphics app developers. sorry wat ? https://trends.google.com/trends/explore?q=glsl,hls
by jcelerier 8y ago
> The language is insprired by HLSL, the dominant shading language for graphics app developers.
sorry wat ? https://trends.google.com/trends/explore?q=glsl,hlsl https://trends.google.com/trends/explore?q=glsl,hlsl
GLSL is used for multimedia apps, user interfaces (Qt at least uses it quite a bit), 3D authoring apps. ISF (Interactive Shader Format https://www.interactiveshaderformat.com/spec https://www.interactiveshaderformat.com/spec), fairly used in all the software chain around audio-visual installations, is based on GLSL. It's used on android, on embedded devices, etc etc...
> GLSL is the language used by WebGL, and was adopted by WebGL for the web platform. However, reaching cross-browser interoperability was extremely difficult due to incompatibilities in GLSL compilers. There remains a long tail of security and portability bugs with GLSL still being investigated
and how will implementing a whole new set of compilers for WHLSL solve this ?
> And since Windows and macOS/iOS don’t support Vulkan,
now this is just FUD. you can entirely write vulkan code and have it run on windows and apple platforms.
> the incoming SPIR-V would still need to be translated/compiled into another language
yes, that's the freakin point of SPIR-V
Also...
> In Metal Shading Language, you could, for example, write a shader that casts a pointer to an integer, adds 17, casts it back to a pointer, and dereferences it. This is a security problem because it means the shader could access any resource that happens to be in the address space of the application, which is contrary to the Web’s security model. Theoretically, it could be possible to specify a dialect of Metal Shading Language that doesn’t have raw pointers, but pointers are so fundamental to the C and C++ languages that the result would be completely unfamiliar. C++ also heavily relies on undefined behavior, so any effort to fully specify each of C++’s numerous features would be unlikely to be successful.
followed by
> The first is the safe pointer. Some form of reference semantics, which is the behavior pointers allow for, are used in almost every CPU-side programming language. Including pointers in WHLSL will make it easier for developers to migrate existing CPU-side code to the GPU
so instead of reusing an existing thing and just add one tiny dot of safety semantics on top of it, well no let's just NIH and reimplement a whole new language.
Seriously, they don't want to use a "safe metal" because "pointers are so fundamental to the C and C++ languages that the result would be completely unfamiliar".
So instead, they write a freakin new language - why the hell do they use the familiarity argument then ?
- pjmlp 8y ago> GLSL is used for multimedia apps, user interfaces (Qt at least uses it quite a bit), 3D authoring apps. ISF (Interactive Shader Format https://www.interactiveshaderformat.com/spec https://www.interactiveshaderformat.com/spec), fairly used in all the software chain around audio-visual installations, is based on GLSL. It's used on android, on embedded devices, etc etc... Google and Samsung are developing HLSL compiler for Vulkan, because a large majority of game studios don't want to bother with Vulkan on Android if they cannot port their shaders. There are plenty of HLSL compiler status talks at the Khronos web site and YouTube channel. > > And since Windows and macOS/iOS don’t support Vulkan, > now this is just FUD. you can entirely write vulkan code and have it run on windows and apple platforms. On the contrary, this is quite true. Apple does not support Vulkan, you need VulkanMK, which is basically a Vulkan portability layer making use of Metal API, and only supports the subset common to both APIs. Microsoft does not allow OpenGL ICDs on UWP/Store Apps, which is the mechanism used by Vulkan drivers on Windows, thus it is not possible to run either OpenGL or Vulkan code on UWP and Store apps. Which is why Microsoft ported Angle for UWP, however they haven't bothered with similar support for Vulkan. https://github.com/Microsoft/angle https://github.com/Microsoft/angle
- cztomsik 8y agoand who will make microsoft support whlsl? w3c? (serious question) I'm not against new standards, but I'd rather stick with something already adopted. Vulkan seems better than metal (proprietary). And I really don't have enough experience with HLSL and GLSL but they seemed fine both.
- flohofwoe 8y agoWHLSL is primarily relevant for the browser. So if Microsoft adds WebGPU support to their browser, they'll add a WHLSL compiler to it. I'm also quite sure there will be translation tools to translate WHLSL to HLSL, GLSL and MetalSL (probably going through SPIRV as IR, see for instance https://github.com/KhronosGroup/SPIRV-Cross https://github.com/KhronosGroup/SPIRV-Cross)
- skohan 8y ago