Closed jakubtomsu closed 5 months ago
This will actually be fixed once the storage-buffer branch goes live (not in the sense that the shader is supported in HLSL, but that there's an actual error message).
It's an old known issue which was caused by C++ exceptions being disabled, SPIRVCross would then panic/crash instead of throwing a C++ excetion. The error message for your shader would then be this, which at least gives a hint what's wrong:
test.glsl:0:0: error: SPIRVCross exception: Sampling non-float textures is not supported in HLSL SM < 6.7.
The error happens down in SPIRVCross and seems to be HLSL specific, the other shader backends can compile the shader.
PS: also see https://github.com/floooh/sokol-tools/issues/123 (I closed this other ticket a bit prematurely even though the fix is currently only in a branch)
The compiler terminates with exit code
-1073740791
when I try to usetexture()
with ausampler2D
. Of course this shouldn't work, but it should print an error instead of crashing. It fails withisampler2D
as well. The error could suggest to usetexelFetch
instead.This is not a major issue, the error is would be mostly helpful when refactoring or to prevent typos.
Repro:
Some info about my setup: