Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
543 Discussions

Null VkPipeline returned by vkCreateGraphicsPipelines

maxime-modulopi
Beginner
5,566 Views

OS: Windows 11 64-bit

GPU: Arc A770

Driver: 32.0.101.6460

 

Problem:

I have a shader in two versions: one written in Slang, one written in GLSL.

I use slangc to compile the Slang shader and glslang to compile the GLSL shader to SPIR-V.

Both versions work on Nvidia hardware.

Both versions were succesfully validated with spirv-val.

 

When calling vkCreateGraphicsPipelines with the Slang shader, the return value is VK_SUCCESS but the value written to pPipelines[0] is VK_NULL_HANDLE, which is invalid.

The GLSL shader works as expected.

 

I have attached both versions of the compiled shader along with their source codes.

0 Kudos
9 Replies
JeanetteC_Intel
Moderator
5,489 Views

Hello maxime-modulopi,


Thank you for posting in Intel Communities.

 

I'll check on this internally and will post an update once it's available.

 

 

Best regards,

JeanetteC.

Intel® Customer Support Technician


0 Kudos
JeanetteC_Intel
Moderator
5,442 Views

Hello maxime-modulopi,

 

Good day.

 

I just need to ask if you are a developer and if you are working on software that utilizes Vulkan graphics API functions? If so, may I ask about the specific application or software you are developing so we can investigate this matter further.

 

I will wait for your reply.

 

 

Best regards,

JeanetteC.

Intel® Customer Support Technician


0 Kudos
maxime-modulopi
Beginner
5,422 Views

Hello JeanetteC,

 

I am writing a new rendering library on top of Vulkan to replace our old OpenGL renderer. I also wrote a handful of sample programs that use this new library to test its functionality.

Some of these samples use shaders, initially written in GLSL.

I am looking to replace all GLSL shaders with Slang shaders as it is a much better and modern language. As such, I recently wrote a Slang version of our samples shaders.

As of now, the Slang shaders neither work on AMD GPUs nor on Intel GPUs (GLSL shaders work everywhere).

I don't know whether the SPIR-V code generated by slangc is invalid (even though it passes spirv-val) or if the issue is on the driver side.

 

Since I didn't include them in the initial post, here is the exact commands used to compile the GLSL and Slang shaders:

glslang.exe -o shader.vert.spv --depfile shader.vert.d --auto-map-locations --target-env vulkan1.3 --quiet shader.vert

slangc.exe shader.slang -o shader.slang.spv -depfile shader.slang.d -fvk-use-scalar-layout -fvk-use-entrypoint-name -target spirv -profile glsl_460+spirv_1_6 -warnings-disable 39001 -O3 -g0

0 Kudos
JeanetteC_Intel
Moderator
5,385 Views

Hello maxime-modulopi,

 

Good day.

 

Thank you for sharing the additional information on this query. I'll proceed on checking internally and will post an update once it's available.

 

 

Best regards,

JeanetteC.

Intel® Customer Support Technician


0 Kudos
JeanetteC_Intel
Moderator
5,327 Views

Hello maxime-modulopi,


Please be advised that this type of bug report should go to the Intel Developer Forum. https://community.intel.com/t5/Developing-Games-on-Intel/bd-p/developing-games-graphics

One of our developers will provide assistance there.


I'll route this to the correct forum.



Sincerely,

JeanetteC.

Intel Customer Support Technician


0 Kudos
karen_intel
Moderator
5,204 Views

Hi @maxime-modulopi hello again!

I'll be assisting you on this one too

I'll run some tests in our systems and if I get any questions I'll get back to you

 

Karen

0 Kudos
Enator18
Beginner
4,430 Views

Did this issue ever get resolved? I am having a very very similar issue with intel systems, and after some testing, I seem to have narrowed down the issue to be caused by accessing values from buffer device addresses. When I comment out everything from the shader it works, but when I specifically add an access to a value at a buffer device address, that is when the issue arises. It presents in the exact same way you described here, vkCreateGraphicsPipeline returns VK_SUCCESS but gives a nullptr for the pipeline, and there are no validation errors. And the issue only happens when compiling directly from spirv from slang. If I compile from slang to glsl to spirv, the issue does not appear. The issue does not appear on AMD gpus and I have not tested on nvidia gpus.

System Info:
OS: Windows 11 64-bit
GPU: 13th Gen Intel(R) Core(TM) i5-13420H Integrated Graphics
Driver: 32.0.101.6556

I have also attached the slang source file, and the spirv file compiled directly by slangc, and the one compiled to glsl by slangc and then compiled to spirv by glslc.

EDIT: After looking through both spirv files start to finish, the only instruction that the slang compiled one uses that the glsl doesn't is OpPtrAccessChain

0 Kudos
maxime-modulopi
Beginner
3,838 Views

Hi @karen_intel,

 

Any update on this?

0 Kudos
Enator18
Beginner
3,754 Views

Hello,
I have not found a solution to this, but I have investigated the root cause and have found much more detailed information about when the issue occurs or not. I have laid out all of the info that I have found in this report on the github intel graphics forum: https://github.com/IGCIT/Intel-GPU-Community-Issue-Tracker-IGCIT/issues/1144

I am also still awaiting a response from intel on this one.

0 Kudos
Reply