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

Geometry Shader Bug

hzapp
Beginner
452 Views

I have an ongoing problem with the Intel shader compiler for Intel HD Graphics cards (most of the ones I have tested).

The issue is related to utilizing a geometry shader, in which I will receive this message:

'The fragment shader uses varying uv, but previous shader does not write to it.  Out of resource error.'

This is a bug, pure and simple, easily described as the fact that the shader compiler does not properly see that there is a geometry shader in the pipeline.

I can elaborate more if the above post is does not provide enough information, but it is actually quite simple:

 

My vertex shader uses:

out vData

{

vec2 pos;

} vertex;

 

My geometry shader uses:

in vData

{

vec2 pos;

}vertex[];

 

out gData

{

vec2  uv;

}frag;

 

And my fragment shader uses:

in gData

{

vec2  uv;

}frag;

 

This is easy to diagnose:

A vertex -> fragment pipeline does not write 'varying uv', but the geometry shader is the true 'previous shader', so this is a bug and therefore Intel HD Graphics does not meet the criterion for OpenGL support.

(It is bad form and likely illegal to claim OpenGL support when the conformant requirements are not met)

 

FYI:  Nvidia and AMD have no issues whatsoever compiling the same shaders.

 

Thanks!

0 Kudos
1 Reply
hzapp
Beginner
452 Views

This problem can be resolved by changing the order in which the shaders are submitted for compilation.  Only the Intel driver seems to complain about this order.  Here is a viable workaround; ensure that the compilation order is 1) Vertex 2) Geometry 3) Fragment prior to the glUseProgram() command.

0 Kudos
Reply