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)

Most upvoted comments

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.

spvSwizzleConstants

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.

➜ godot (fc6ac4a155) ✗ git bisect bad
fc6ac4a155c45181d0a3528a4891c5a12e412d1f is the first bad commit
commit fc6ac4a155c45181d0a3528a4891c5a12e412d1f
Author: Pedro J. Estébanez <pedrojrulez@gmail.com>
Date:   Mon Jun 27 21:14:23 2022 +0200

    Consider uniform writability part of the interface of the set

 drivers/vulkan/rendering_device_vulkan.cpp         | 31 ++++++++++++++++++++--
 drivers/vulkan/rendering_device_vulkan.h           |  6 ++++-
 .../renderer_rd/renderer_scene_render_rd.cpp       | 15 ++++++++---
 .../renderer_rd/renderer_scene_render_rd.h         |  1 +
 .../shaders/volumetric_fog_process.glsl            |  1 -
 5 files changed, 46 insertions(+), 8 deletions(-)

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 😃 ).

(Although a quick search suggests that although the docs say use_static_mvk is a thing, it seems not to be)

Yeah the docs are a bit outdated, it’s use_volk=no now 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