cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

justsidney
Journeyman III

vkCreateGraphicsPipeline hangs in driver with specific set of shaders

I have a specific set of shaders that, when thrown at vkCreateGraphicsPipeline, hang somewhere deep in the AMD driver on an RX480 (this problem might also exist on other GPUs, but I haven't tested that yet). This happens with the latest drivers (as of June 15th 2018).

The same code works just fine with a lot of other shaders, so I'm reasonably certain that the pipeline I'm trying to create is in fact valid and not something bogus. I have also tried running it with and without supplying the specialization constants, nothing seems to make a difference. Now the interesting part is that this very same SPIR-V shader, when compiled for OpenGL consumption, _also_ hangs the AMD driver, this time in glLinkProgram. I took a look at the shader input and output stages, but it appears that all locations match up nicely, including the underlying types.

Unfortuantely it's not very easy to get any kind of insight on what exactly the driver is sad about. The shader itself was compiled with glslang and it passes the validation from the SPIRV-Tools, so in theory it should be all good. When I transpile the SPIR-V back to GLSL it actually does work in our OpenGL renderer, which further seems to point towards some mismatched shader interface.

I have attached both the vertex and fragment shaders. Maybe someone with more experience can either take a look at them and point out what is going wrong, or if anybody knows of some good tooling to inspect SPIR-V shaders in some easy way, I'd also love to hear about that.

4 Replies
justsidney
Journeyman III

This was meant to be over in the OpenGL & Vulkan community. It looks like even though this post was approved, I still don't have any user rights here, otherwise I would move it myself. Could a mod please move it to the right community? Thanks

0 Likes

Hi Sidney,

Welcome to AMD DevGurus community. You've been whitelisted now. I'm moving this thread to OpenGL & Vulkan forum.

Regards,

0 Likes

Just FYI:

I see below update about a similar issue reported here: vkCreateGraphicsPipelines crashes with specific SPIRV shaders starting with new driver versions (18....

pchiruma (from AMD) wrote:

Thanks for reporting the issue, we expect to have a public release in August that would contain the fix for this issue.

0 Likes

Hi justsidney, can you attach the simple test project where problem can be reproduced? also, i have some problem with specific shaders which is compiled from HLSL

0 Likes