Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
21199 Discussions

Intel UHD 730 throws segmentation fault on a fragment shader

KlotenSchweiz
Beginner
210 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
3 Replies
NormanS_Intel
Moderator
83 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
70 Views

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

0 Kudos
KlotenSchweiz
Beginner
17 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
Reply