-
-
Notifications
You must be signed in to change notification settings - Fork 23.4k
Description
Tested versions
- master [99f5a3d] but probably much older
System information
Godot v4.5.dev (99f5a3d) - Ubuntu 24.04.2 LTS 24.04 on X11 - X11 display driver, Multi-window, 2 monitors - Vulkan (Mobile) - dedicated AMD Radeon RX 6800 XT (RADV NAVI21) - AMD Ryzen 9 5900X 12-Core Processor (24 threads)
Issue description
Launching with --generate-spirv-debug-info
will cause a crash on RADV and the following validation error:
ERROR: VALIDATION - Message Id Number: 706474367 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-01379
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: NonSemantic.Shader.DebugInfo.100 DebugTypePointer: expected operand Base Type must be a result id of DebugTypeBasic
%35 = OpExtInst %void %1 DebugTypePointer %32 %uint_7 %uint_0
The Vulkan spec states: If pCode is a pointer to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: 706474367 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-01379
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: NonSemantic.Shader.DebugInfo.100 DebugTypePointer: expected operand Base Type must be a result id of DebugTypeBasic
%35 = OpExtInst %void %1 DebugTypePointer %32 %uint_7 %uint_0
The Vulkan spec states: If pCode is a pointer to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: 706474367 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-01379
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: NonSemantic.Shader.DebugInfo.100 DebugTypePointer: expected operand Base Type must be a result id of DebugTypeBasic
%35 = OpExtInst %void %1 DebugTypePointer %32 %uint_7 %uint_0
The Vulkan spec states: If pCode is a pointer to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: 706474367 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-01379
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: NonSemantic.Shader.DebugInfo.100 DebugTypePointer: expected operand Base Type must be a result id of DebugTypeBasic
%35 = OpExtInst %void %1 DebugTypePointer %32 %uint_7 %uint_0
The Vulkan spec states: If pCode is a pointer to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: 706474367 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-01379
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: NonSemantic.Shader.DebugInfo.100 DebugTypePointer: expected operand Base Type must be a result id of DebugTypeBasic
%35 = OpExtInst %void %1 DebugTypePointer %32 %uint_7 %uint_0
The Vulkan spec states: If pCode is a pointer to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: 706474367 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-01379
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01379 ] | MessageID = 0x2a1bf17f | SPIR-V module not valid: NonSemantic.Shader.DebugInfo.100 DebugTypePointer: expected operand Base Type must be a result id of DebugTypeBasic
%35 = OpExtInst %void %1 DebugTypePointer %32 %uint_7 %uint_0
The Vulkan spec states: If pCode is a pointer to GLSL code, it must be valid GLSL code written to the GL_KHR_vulkan_glsl GLSL extension specification (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-01379)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: -60244330 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-08742
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08742 ] | MessageID = 0xfc68be96 | vkCreateShaderModule(): The SPIR-V Extension (SPV_KHR_non_semantic_info) was declared, but one of the following requirements is required (VK_VERSION_1_3 OR VK_KHR_shader_non_semantic_info). The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08742)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: -60244330 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-08742
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08742 ] | MessageID = 0xfc68be96 | vkCreateShaderModule(): The SPIR-V Extension (SPV_KHR_non_semantic_info) was declared, but one of the following requirements is required (VK_VERSION_1_3 OR VK_KHR_shader_non_semantic_info). The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08742)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
ERROR: VALIDATION - Message Id Number: -60244330 | Message Id Name: VUID-VkShaderModuleCreateInfo-pCode-08742
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08742 ] | MessageID = 0xfc68be96 | vkCreateShaderModule(): The SPIR-V Extension (SPV_KHR_non_semantic_info) was declared, but one of the following requirements is required (VK_VERSION_1_3 OR VK_KHR_shader_non_semantic_info). The Vulkan spec states: If pCode is a pointer to SPIR-V code, and pCode declares any of the SPIR-V extensions listed in the SPIR-V Environment appendix, one of the corresponding requirements must be satisfied (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08742)
at: _debug_messenger_callback (drivers/vulkan/rendering_context_driver_vulkan.cpp:642)
The error apparently comes from trying to compile Compute Shader canvas_sdf.glsl
but possibly more are affected.
The problem can be workarounded by unsetting emitNonSemanticShaderDebugInfo & emitNonSemanticShaderDebugSource:
if (Engine::get_singleton()->is_generate_spirv_debug_info_enabled()) {
spvOptions.generateDebugInfo = true;
// spvOptions.emitNonSemanticShaderDebugInfo = true; --> Commented out!
// spvOptions.emitNonSemanticShaderDebugSource = true; --> Commented out!
}
Don't forget to delete the files under ProjectFolder/.godot/shader_cache
so that GLSL gets compiled into valid SPIR-V. Otherwise the cache will keep using the old invalid SPIR-V.
This is likely a bug in glslang. Maybe it's already fixed in upstream.
Update: It looks like it's a known problem KhronosGroup/glslang#3189
Steps to reproduce
- Launch with
--generate-spirv-debug-info
(Vulkan backend)
Minimal reproduction project (MRP)
N / A
Metadata
Metadata
Assignees
Labels
Type
Projects
Status