I would like some input on how to solve this issue I'm having - whether I'm doing something wrong or this issue needs to be filed with some upstream project, but if that were the case I have no idea who I should report the bug to.
When using buffer references like in the small GLSL compute shader I shared with this post, I'm getting different results on NVIDIA and other devices, all tested on Linux (Debian 11). So far, only NVIDIA outputs the expected result.
On Intel, llvmpipe, and AMD, all single-component reads always return the .x component, so the printed result is: x=11, y=11, z=11, w=11, instead of the expected: x=11, y=22, z=33, w=44.
The erroneous behaviour is quite strange and specific, and makes no sense to me. For instance, outputting .zz instead of .z returns the expected value. And if the Vector is set before the TestRef function call instead of inside, the output is as expected.
I'm on Vulkan 1.3.268.0. There's no validation warning or error that I can see.
Since all those drivers except NVIDIA behave the same, it seems likely I'm doing something wrong somewhere, but I have not found what.
This happens across two different physical machines, one AMD and one Intel/NVIDIA, both on Debian. I haven't tried on other OSes yet.
This also happens on both my main project and this minimal repro, with quite different characteristics in the general setup (I'm not using push constants to send the address on my main project for instance but a storage buffer, but the result is the same).
I worked out a minimal repro project, for which I shared the .c file as well in case anyone is interested in trying to reproduce this result. The shader and .c can be compiled on Linux using the .sh file I also shared. Debug Printf display should be enabled in vkconfig to see the results.
Any help will be welcome ! I'm quite baffled trying to make sense of this behaviour at the moment.