Closed creikey closed 5 months ago
The issue is in shadowing the uv
variable, causing a segfault
I was running into a similar (but unrelated) thing yesterday. The reason is most likely an internal error reported by SPIRVCross, but the error handling in SPIRVCross in release mode and with C++ exceptions disabled just silently aborts (which then looks like a regular crash on most systems I'm aware of - at least it looked like that on macOS).
TL;DR: I need to find a way to report such internal compiler errors from SPIRVCross - for instance by enabling and then catching exceptions from out of SPIRVCross (at least as first step, the next problem will be that those messages won't be very useful in many cases).
PS: wrote a SPIRCross ticket here, but independently from whether that's fixed or not I'll need to find a workaround.
PS: this was the problem I was running into, also looked like a "silent crash", but was actually a SPIRCross error:
https://github.com/floooh/sokol-tools/issues/94
...and this ticket is similar:
Once branch storage-buffer
is merged, this type of problems (internal SPIRVCross compiler errors) will produce a proper error message. Interestingly I cannot reproduce the problem anymore with your shader though (I just did some small changes for the new separate texture/sampler stuff). Maybe updating the Khronos dependencies helped. Closing this ticket, even though the fix (better error message) isn't in master yet.
The shader: