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
507 Discussions

Intel UHD 730 throws segmentation fault on a fragment shader

KlotenSchweiz
Beginner
681 Views

Intel GPU driver throws a segmentation fault when executing a Vulkan shader program containing nested loops. The fragment shader snippet is as follows:

 

float f;
uint g = 1u;
const int t = -40000;
for (int i = t; i > t - 4; i -= 2) {
f = float(input1); // input1 is set to 1 during runtime
for (int j = 0; j < input2; j += 2) { // input2 is set to 2 during runtime
g = g == 0u ? uint(f) : uint(f) / g;
}
}
float l = float(g);
fragColor = vec4(l);


When tweaking the constant variable t to a different value, or changing the outer loop from decrementing to incrementing, the shader executes without any issues. The shader can be compiled without any warning or errors by the `glslangValidator` tool, and does not contain any undefined behavior. However, when it is executed on the Intel GPU, the GPU throws a segmentation fault.

 

Steps to reproduce:

I made a minimal Vulkan cpp code that simply loads and runs the fragment shader above. The full source code, including both the cpp code and fragment shader, and a detailed README describing system environments and reproduction steps, can be found here. It should take less than a minute to reproduce the issue.

0 Kudos
6 Replies
NormanS_Intel
Moderator
554 Views

Hello KlotenSchweiz,


Thank you for posting in the community!


I noticed that you have created two threads regarding this inquiry. To better assist you, could you please clarify whether you are a developer of an application or game or an end user? We have a separate forum specifically for developers. Your clarification will help us direct you to the appropriate resources.


Best regards,

Norman S.

Intel Customer Support Engineer


0 Kudos
KlotenSchweiz
Beginner
541 Views

Thanks! I am a graphics application developer who is using graphics shaders to get the desired visual effects.

0 Kudos
KlotenSchweiz
Beginner
488 Views

@NormanS_Intel Thanks for your response. It seems this might be related to the Intel driver. Could you please move this thread to the developer forum for further investigation? Many users playing my game on Intel are experiencing constant crashes, while those with AMD and NVIDIA GPUs aren't having this issue. I would really appreciate your help in resolving this. Thank you!

0 Kudos
JeanetteC_Intel
Moderator
436 Views

Hello KlotenSchweiz,

 

Thank you for letting me know.

 

I am moving this to the "Developing Games on Intel Graphics" Forum for you.

 

 

Best regards,

Jeanette C.

Intel Customer Support Technician

 

0 Kudos
karen_intel
Moderator
407 Views

Hey @KlotenSchweiz hello again
Debug in progress! Will be back soon

 

Karen

0 Kudos
KlotenSchweiz
Beginner
386 Views

@karen_intel @JeanetteC_Intel Thank you a lot for your help! I am looking forward to seeing my shaders working on the Intel GPU.

0 Kudos
Reply