Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling shaders with debug info on spirv_1_0 profile produces validation error #5640

Open
Beyley opened this issue Nov 22, 2024 · 2 comments
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang

Comments

@Beyley
Copy link

Beyley commented Nov 22, 2024

VUID-VkShaderModuleCreateInfo-pCode-08742(ERROR / SPEC): msgNum: -60244330 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08742 ] | MessageID = 0xfc68be96 | vkCreateShaderModule():  SPIR-V Extension SPV_KHR_non_semantic_info was declared, but one of the following requirements is required (1.3.0 (0x00403000) 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://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08742)
    Objects: 0
VUID-VkShaderModuleCreateInfo-pCode-08742(ERROR / SPEC): msgNum: -60244330 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08742 ] | MessageID = 0xfc68be96 | vkCreateShaderModule():  SPIR-V Extension SPV_KHR_non_semantic_info was declared, but one of the following requirements is required (1.3.0 (0x00403000) 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://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08742)
    Objects: 0

Other than that, the shader does work perfectly, even though spirv_1_0 through slang's direct SPIRV output is not officially supported at the moment.

Passing -g0 fixes the problem. Perhaps there should be a dedicated warning/note that KHR_shader_non_semantic_info is required vulkan-side when compiling with debug info? I'm attempting to use Slang with SDL_gpu, which always uses Vulkan 1.0 and does not define that extension.

@cheneym2
Copy link
Collaborator

Thank you for the suggestion. It's possible to add another warning along the same lines as the general warning about spirv_1_0 that would help point users to specify "-g0" in case their implementation does not support the "SPV_KHR_non_semantic_info".

For reference, the general warning about spirv_1_0 I'm referring to is this one:

(0): warning 50011: Slang's SPIR-V backend only supports SPIR-V version 1.3 and later. Use -emit-spirv-via-glsl option to produce SPIR-V 1.0 through 1.2.

@csyonghe
Copy link
Collaborator

It seems like we should emit a warning when -g and spirv < 1.3 is specified, and then remove the -g option.

@bmillsNV bmillsNV added this to the Q1 2025 (Winter) milestone Nov 26, 2024
@bmillsNV bmillsNV added the goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:quality & productivity Quality issues and issues that impact our productivity coding day to day inside slang
Projects
None yet
Development

No branches or pull requests

4 participants