mstdn.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A general-purpose Mastodon server with a 500 character limit. All languages are welcome.

Administered by:

Server stats:

15K
active users

#SPIRV

0 posts0 participants0 posts today

I'm getting the material ready for my upcoming #GPGPU course that starts on March. Even though I most probably won't get to it,I also checked my trivial #SYCL programs. Apparently the 2025.0 version of the #Intel #OneAPI #DPCPP runtime doesn't like any #OpenCL platform except Intel's own (I have two other platforms that support #SPIRV, so why aren't they showing up? From the documentation I can find online this should be sufficient, but apparently it's not …)

I've been writing quite a few SPIR-V modules by hand for testing lately. It's tolerable, but only barely.

My primary complaints are:

1. Verbosity. A test for a single instruction tends to be at least 20 lines and sometimes much more.
2. SSA is great for compilers, not so much for humans.
3. Getting all of the type declarations and capabilities right is annoying.

Is there a better way? #spirv

Khronos' OpenCL Working Group has issued a Request for Proposal (#RFP) for OpenCL LLVM SPIR-V Backend. The goal of this project is to address and integrate specific functionalities that are currently available in the translator project but missing from the backend. All bids are due December 6, 2024.

Learn more: khronos.org/rfp/khronos-opencl
#LLVM #SPIRV #SPIR

The Khronos Group · The Khronos GroupDeploying and developing royalty-free open standards for 3D graphics, Virtual and Augmented Reality, Parallel Computing, Neural Networks, and Vision Processing

The rust-gpu project now has two more maintainers. Happy to see the project gaining speed!

I'm using rust-gpu for most my Vulkan experiments these days. It's one of the enablers of my SDF-compiler toolchain. It lets you define linking points, which in turn allows me to link my SDF generated SPIR-V code into rust-gpu generated SPIR-V modules.

rust-gpu.github.io/blog/2024/1

rust-gpu.github.io · Welcoming two new Rust GPU maintainers | Rust GPUWe’re thrilled to introduce two new maintainers for the

Finally got #HLSL -> #spirv -> running in #bevy! Just a simple compute shader for slope/normal/ocean detection at the moment. The spirv inpsector at khronos.org/spir/visualizer/ was a life saver! also, this is the first time ive use the build.rs in #rust suuuper handy for automatically recompiling the hlsl. Feels like bevy's Dx12 backend might need some love since i had to switch back to vulcan but so happy to have actually got it running.

I think people get tied up in knots when trying to parse SPIR-V with structured control flow.

You gotta do it in reverse structured post-order.

Once you lay out the basic blocks in that order, the nested control constructs map to *intervals* over that list. (:galaxy brain:)

For details, see Tint's SPIR-V to WGSL translator.

dawn.googlesource.com/dawn/+/r

#spirv#vulkan#wgsl

Does anyone know whether #SpirV supports closures?

By the spec, it seems like I can define a function inside a function.
Can the outer function return a pointer to the inner function?

And since we're here, is there a dedicated forum/community/chat where I can ask this kinds of questions?
The Khronos SPIR forum seems dead. =|

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.

-sigh-, I feel like I have no good option.

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?

#glsl#spirv#vulkan