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

GLSL link error when using gl_ClipDistance

Olivier_L_
Beginner
1,402 Views
Hi,

I have the following problem: I write a simple GLSL program with only a vertex shader which writes into gl_ClipDistance:

#version 130

uniform vec4 clipPlane;

out float gl_ClipDistance[1];

void main()
{
 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
 gl_ClipDistance[0] = dot(gl_ModelViewMatrix * gl_Vertex, clipPlane);

 gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;

 gl_FrontColor = gl_Color;
 gl_BackColor = gl_Color;
}

It compiles without error, but linkage fails with the error "Out of resource error".

When I remove the line writing to gl_ClipDistance, there is no error any more.

There is also no error if a fragment shader is part of the program.

So the link error only occurs when mixing a programmable vertex shader with the fixed functionality for fragments.

The same error also occurs when using gl_ClipVertex.

Thanks in advance.

Edit:

* Device: Intel HD Graphics 530

* Driver: 21.20.16.4590

 

0 Kudos
1 Reply
Michael_C_Intel2
Employee
1,402 Views

Is it happening with the latest driver release?  

If so then I need the following template filled out so an issue con be properly reported. Also if you have a binary the exhibits this behavior it would be most helpful. 

System Setup Information:
-----------------------------------------

System Used: (Manufacturer/Model)
CPU SKU: (i3, i5, Pentium, Celeron, etc.)
GPU SKU: (HD4400, HD5100, etc.)
Processor Line: (Y-Series, U-Series, etc.)
System BIOS Version:
CMOS settings:
Graphics Driver Version:
GOP/VBIOS Version:
Operating System:
OS Version:
API:
Occurs on non-Intel GPUs?:

Steps to Reproduce:
-------------------------------
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

Expected Results:
-------------------------------

Actual Results:
-------------------------------

Additional Information:
-------------------------------

0 Kudos
Reply