#Weird shader errors
26 messages · Page 1 of 1 (latest)
Maybe it was the shader compiler that got crashed?
I'm not sure what you mean
I mean, I don't understand how both compile and runtime checked wgsl shader could trigger an access violation.
So, I suspect it is a compiler bug.
Did you try running naga your_shader.wgsl?
I installed it and tried it, it says:
Validation successful
Then maybe lack of VRAM or driver bug
I doubt it, and idk how I would check for either tbh
@whole jasper you got multiple GPUs in your system? Like a discreet one and one dedicated ?
I've got a regular CPU + GPU setup, though my CPU like many others has integrated graphics if that's what you're asking.
I'm not sure what that means
It's so weird that it's specifically these lines that make it crash:
if (cornerIndex < 0 || cornerIndex > 7) {
continue;
}
let point = coordinates[cornerIndex];
I have no problem accessing coordinates with constants, but when it comes to accessing it with cornerIndex it loses it's mind, even though it's protected by the if clause
Is that the shader code or the rust code
shader code
There is the whole code up at the top
Right
I could make a repo also if people are interested
Another weird thing is that when I leave the let point = coordinates[cornerIndex]; the shader runs for a few frames, the retun buffer returns completely untouched, even though I add stuff to it before the crashing code is reached
Another weird thing (this one might be normal), is that even when the shader works fine, for the first few readbacks, the return buffer is completely untouched, like the shader didn't even run.
I found some workaround in the meantime
I will take a look when I next get to a rig