#zig compiled spir-v shaders with vulkan

1 messages · Page 1 of 1 (latest)

modern nacelle
#

Hi, I'm working on a vulkan wayland client and I've gotten the zig shaders to compile just fine and I'm embedding them just fine. They are passing the magic number header test when initially being loaded to vulkan, however, I'm still getting spirv-val validation errors with OpStore Pointer <id> '111[%111]' is not a logical pointer. OpStore %111 %104 None. I'm quite new to Zig, but I'm heavily referencing https://github.com/Snektron/vulkan-zig so I'm not sure what I'm doing wrong. It's not the end of the world if I have to fallback to glslc, but it'd be cool to write them in Zig. Thanks!

GitHub

Vulkan binding generator for Zig. Contribute to Snektron/vulkan-zig development by creating an account on GitHub.

#

edit: *refrencing the vulkan-zig project in the example/ subfolder

sudden rapids
#

i dont think the spir-v backend is in a usable state, though that could have changed since last I heard

modern nacelle
#

oh ok 👍

boreal isle
#

I've had to run some of my SPIRV output through spirv-opt to make it valid

#

which you should be doing anyways

#

(in my particular case it is because I define the same texture uniform multiple times and it does not like that)

modern nacelle
#

Oh, I think I tried that but it still errored out

#

I got glslc to work really easy so imma just stick with that