Closed danielchasehooper closed 5 months ago
Yes this is a known issue which I need to take care of, see: https://github.com/KhronosGroup/SPIRV-Cross/issues/2177, there was basically an internal SPIRVCross error, but the error message isn't properly routed with C++ exceptions disabled.
(the issue in your code is however almost certainly the texture array, even if SPIRVCross would support this, sokol-gfx definitely won't, you'll need to use different texture uniforms, or alternatively a 2D-array-texture)
FYI I just fixed this in the storage-buffer
branch, SPIRVCross now generates C++ exceptions which are caught and converted into a regular error message (for instance with your test shader it looks like this:
/Users/floh/projects/sokol-tools/test/issue_104.glsl:0:0: error: SPIRVCross exception: MSL 2.0 or greater is required for arrays of textures.
I'll close the ticket right away even though the fix won't land in master until the storage-buffer branch is merged.
running this command crashes
sokol-shdc -l metal_macos -i crash.glsl -o shaderssdg.h
crash.glsl
contains thislooks like there is an error for it, but in release builds the error message isn't shown, which seems wrong.
in
spirv_cross_error_handling.hpp
line 48