Dear Support Team,
Our OpenGL-based library fails to run correctly on Intel HD 4000. After a lot of debugging, I've managed to isolate a problem that concerns building a custom mip-map-pyramid using shaders.
I've created a small reproduction case for this problem (source code is available at https://github.com/hetcomp/hpmc/blob/iss9/tests/simplemipmapbuildup.cpp ):
First, I create a mipmap'ed texture 2D and create an FBO for each level.
Then, I populate the base level with a GPGPU pass, and then use the following shader to reduce the pyramid:
uniform sampler2D tex; uniform vec2 delta; // = vec2( -0.5/w, 0.5/w ), w is width of prev level void main(){ vec4 sums = vec4( texture2D( tex, gl_TexCoord[0].xy+delta.xx )+ texture2D( tex, gl_TexCoord[0].xy+delta.yx )+ texture2D( tex, gl_TexCoord[0].xy+delta.xy )+ texture2D( tex, gl_TexCoord[0].xy+delta.yy ) ); gl_FragColor = sums; }
using
for(GLsizei k=1; k<=size_l2; k++ ) { glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, k-1 ); glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, k-1 );
to steer which texture level that should be sampled from.
The correct result is
Level 0 [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] Level 1 [0,0,4,4] [1,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [1,0,4,4] [0,0,4,4] [1,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [1,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [1,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [1,0,4,4] [0,0,4,4] [1,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [1,0,4,4] [0,0,4,4] Level 2 [6,0,16,16] [15,0,16,16] [15,0,16,16] [6,0,16,16] [15,0,16,16] [16,0,16,16] [16,0,16,16] [15,0,16,16] [15,0,16,16] [16,0,16,16] [16,0,16,16] [15,0,16,16] [6,0,16,16] [15,0,16,16] [15,0,16,16] [6,0,16,16] Level 3 [52,0,64,64] [52,0,64,64] [52,0,64,64] [52,0,64,64] Level 4 [208,0,256,256]
However, when running the code on an HD 4000, I get the following:
Level 0 [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [1,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] [0,0,1,1] Level 1 [0,0,4,4] [1,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [1,0,4,4] [0,0,4,4] [1,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [1,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [1,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [4,0,4,4] [1,0,4,4] [0,0,4,4] [1,0,4,4] [3,0,4,4] [4,0,4,4] [4,0,4,4] [3,0,4,4] [1,0,4,4] [0,0,4,4] Level 2 [6,0,16,16] [15,0,16,16] [15,0,16,16] [6,0,16,16] [15,0,16,16] [16,0,16,16] [16,0,16,16] [15,0,16,16] [15,0,16,16] [16,0,16,16] [16,0,16,16] [15,0,16,16] [6,0,16,16] [15,0,16,16] [15,0,16,16] [6,0,16,16] Level 3 [16,0,16,16] [13,0,16,16] [13,0,16,16] [10,0,16,16] Level 4 [16,0,16,16]
where level 3 and 4 is wrong.
I tried to repopulate the base level with a fixed value after the first reduction, to see if level 0 was sampled somehow after the first reduction, but this was not the case.
Version of driver etc, is:
Thanks,
cdyk