godot: [macOS] Shader failure at startup leaves Project Manager black
Godot version
4.0-alpha11
System information
macOS 12.4 MacBook Pro Intel® Iris™ Plus Graphics 655
Issue description
Firing up alpha 11 gives me a black window (other than the title bar). Capturing stdin/stderr gives:
arguments
0: /Applications/Godot_v4.0-alpha11.app/Contents/MacOS/Godot
Current path: /Users/[snip]
Godot Engine v4.0.alpha11.official.d631ee330 - https://godotengine.org
Vulkan API 1.1.198 - Using Vulkan Device #0: Intel - Intel(R) Iris(TM) Plus Graphics 655
[1;31mERROR:
[0;91m Reflection of SPIR-V shader stage 'Compute' failed finding interface variable.
[0;90m at: shader_compile_binary_from_spirv (drivers/vulkan/rendering_device_vulkan.cpp:4748)
[1;31mERROR:
[0;91m Condition "shader_data.size() == 0" is true.
[0;90m at: _compile_variant (servers/rendering/renderer_rd/shader_rd.cpp:287)
[1;31mERROR:
[0;91m Reflection of SPIR-V shader stage 'Compute' failed finding interface variable.
[0;90m at: shader_compile_binary_from_spirv (drivers/vulkan/rendering_device_vulkan.cpp:4748)
[1;31mERROR:
[0;91m Condition "shader_data.size() == 0" is true.
[0;90m at: _compile_variant (servers/rendering/renderer_rd/shader_rd.cpp:287)
[1;31mERROR:
[0;91m Reflection of SPIR-V shader stage 'Compute' failed finding interface variable.
[0;90m at: shader_compile_binary_from_spirv (drivers/vulkan/rendering_device_vulkan.cpp:4748)
[1;31mERROR:
[0;91m Condition "shader_data.size() == 0" is true.
[0;90m at: _compile_variant (servers/rendering/renderer_rd/shader_rd.cpp:287)
[1;31mERROR:
[0;91m Reflection of SPIR-V shader stage 'Compute' failed finding interface variable.
[0;90m at: shader_compile_binary_from_spirv (drivers/vulkan/rendering_device_vulkan.cpp:4748)
[1;31mERROR:
[0;91m Condition "shader_data.size() == 0" is true.
Repeated a few tens of thousands of times. I assume this must be particular to my system or it would have been noticed before the alpha went out, and I didn’t see any other reports, please let me know what more information I can usefully give.
Steps to reproduce
Launch Godot
Minimal reproduction project
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (21 by maintainers)
I’ve found the issue. It’s related to Vulkan < 1.2. I’m working on a solution.
Sorry for the delay in replying to the thread, but just to confirm that the merged PR fixed it for me. Thanks for the quick turn-around.
~won’t work in the defines, so use the full path (/Users/USERNAME/...) instead.What’s the source of MoltenVK you are using? IIRC swizzling is an optional feature and might be disabled at compile time. Try installing Vulkan SDK from https://vulkan.lunarg.com/sdk/home#mac, and compiling Godot with statically linked MVK (build with
use_volk=no VULKAN_SDK_PATH=/path/to/SDK/install/flags).The Godot bug is fixed, but now you’re being bitten by a MoltenVK (rooted in SPIRV-Cross) bug: https://github.com/powervr-graphics/Native_SDK/issues/67
Probably something has changed recently in the Godot shader that now triggers the ill path. I’ll check it
FWIW, I found that simply commenting out the ERR_FAIL_COND_V_MSG “failed finding interface variable” and stopping writable booming from the nullderef on interface_var was enough to get the launcher rendering again on my system on master.
Seems to be when it regressed, at least according to a local bisect (side note - envious of the M1 users in the thread, this would have been much quicker not on my aging Intel laptop 😃 ).
Yeah the docs are a bit outdated, it’s
use_volk=nonow if you want to link MoltenVK statically. Otherwise it’s using Volk (like on other platforms) which will locate MoltenVK if installed system-wide.Edit: Made a PR to update it: https://github.com/godotengine/godot-docs/pull/5898