Downloading Google Dawn on Windows10 fails due to filename too long.. here is the filename ImageSampleProjDrefExplicitLod_CheckForLod0_SpvParserHandleTest_ImageCoordsTest_MakeCoordinateOperandsForImageAccess_0.spvasm.expected.ir.msl
@ypujante
(And, those would be one of the unit tests of the SPIR-V to WGSL translator, converted to an end-to-end test so we can check the right thing will be emitted on all the backend languages.)
I'm finally at the point where I have to start working on perhaps the main feature of my programming language Squarepants: the ability to compile to GPU Shaders.
The most attractive target would be #SpirV which is an intermediate representation that works almost everywhere... Except on browsers, and only because #Apple didn't want to give control of the standard to the group that develops SpirV.
Instead, Apple imposed #WGSL , which is a language instead than an intermediate representation, so it's a pain in the ass to target and will end up with the same problem as #javascript .
At some point there will be translators from SpirV to WGSL, but I can't rely on those now.
So, what am I going to target?
Right now Squarepants compiles to javascript, so can run easily in both browsers and #nodejs.
There is a project to run SpirV (via Vulkan) on node, but has been dead for years, which means that if I want to compile to a native application, I need Squarepants to compile to C or LLVM first.
OTOH if I go through the square-peg-in-round-hole and target WGSL, then I can target browsers.
I know SPIR-V is not meant for human readability and all that, but damn. Is there not any way that the variables were named anything closer to useful than %13525? I understand that it's not a one-to-one match with my glsl variables, but like... This feels like it's actively trying to obfuscate the code 🥲
Maybe there's some glslang option I don't know about that tries to make them a bit clearer?
The SPIR Working Group developed 2 new SPIR-V extensions to provide shader authors with more guarantees about the execution model of shaders: SPV_KHR_maximal_reconvergence and VK_KHR_shader_quad_control.