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

vkCreateGraphicsPipelines() returns -13 (VK_ERROR_UNKNOWN) #34

Open
martin-ejdestig opened this issue Nov 24, 2024 · 1 comment
Open

Comments

@martin-ejdestig
Copy link

martin-ejdestig commented Nov 24, 2024

GPU: AMD Radeon RX 6700 XT
Driver Version: 24.10.1
OS: Windows 10 (Build 19045)
Vulkan SDK: 1.3.296.0

When passing vkCreateGraphicsPipelines() SPIR-V generated from GLSL code with glslc -O it returns -13 (VK_ERROR_UNKNOWN). If -O is omitted when invoking glslc with same GLSL source code, no error is returned.

Problems started occuring in commit where GL_EXT_buffer_reference and GL_EXT_scalar_block_layout are used in GLSL vertex shader to read vertex data from a buffer instead of passing it through vertex attrributes.

I have this problem with multiple pipelines. Attaching SPIR-V assembler for simplest one I could find.

SPIR-V assembler for vertex and fragment shader generated with -O (does not work):
frag_O.s.txt
vert_O.s.txt

SPIR-V assembler for vertex and fragment shader generated without -O (works):
frag.s.txt
vert.s.txt

Comparing fragment shader assembler (frag.s.txt and frag_O.s.txt), only difference I can see is OpSource, two OpSourceExtension and a OpName. For vertex shader assembler (vert.s.txt and vert_O.s.txt), diff is larger.

I have not had time to extract relevant source code where vkCreateGraphicsPipelines() is called, but can do so as well if you want to know what is in VkGraphicsPipelineCreateInfo. Can try to provide a standalone example but do not have time to do this at the moment (and it will probably be a while). Hopefully SPIR-V assembler and description here is enough.

There are no problems running the SPIR-V generated with glslc -O on Intel and Nvidia GPU:s I have available for testing. Can still be a glslc bug but I do not see what is wrong in the generated SPIR-V.

@martin-ejdestig
Copy link
Author

Ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant