samplerCube "stopped working" after driver reinstall on Radeon X550

Hi,

I’m writing a small OpenGL 2.0 application on Windows XP. GPU in my machine is old Radeon X550. In the middle of development, after switching from SDL 1.2 to SDL 2 and refreshing GPU drivers to latest from AMD website (due to some display trashing), I cannot seem to get anything but {0, 0, 0, 0} from textureCube() calls inside fragment shaders.

I made a trivial cubemap shader to test things out but the problem persisted. Oddly enough, prior to driver reinstall, the cubemap lookup was working as expected inside the large shader with 8 more texture samplers. I tested this trivial shader on another Windows 7 machine with GeForce GT525, and it worked fine there.

According to gdebuger the cubemap is properly setup and bound to the right texture unit. The only oddity I could notice is the shader validation warning. Upon setting the samplerCube uniform value, the validation says: “Validation warning! - Sampler value environmentTex has not been set in fragment shader.” Which is strange because querying the said samplerCube variable just before validation returns the right texture unit number.

Here’s the trivial shader version that still gives me only black pixels:


varying vec3 normal;

void main()
{	
	normal = normalize(gl_NormalMatrix * gl_Normal);
	gl_Position = ftransform();
}


varying vec3 normal;
uniform samplerCube environmentTex;

void main(){
	gl_FragColor = textureCube(environmentTex, normalize(normal));
}

Any help is greatly appreciated as I’m pretty much out of ideas here. It looks like some kind of driver issue but I don’t exclude the possibility that I’m unknowingly doing something semi-stupid on the CPU side and it irritates the GPU.

Ok, this is most definitely driver issue. I had to try out half a dozen antique Catalyst versions:

Catalyst 6.5

  • reports: GL version 2.0, GLSL version 1.10
  • samples cubemap properly
  • glGetUniform() always returns 0 and raises INVALID_OPERATION when trying to get sampler binding

Catalyst 7.11

  • reports: GL version 2.0xx, GLSL version 1.10
  • samples cubemap properly
  • glGetUniform() always returns 0 and raises INVALID_OPERATION when trying to get sampler binding

Catalyst 8.1

  • reports: GL version 2.1, GLSL version 1.20
  • samples cubemap properly
  • glGetUniform() returns sampler bindings as expected

Catalyst 9.8

  • reports: GL version 2.1xx, GLSL version 1.20
  • doesn’t sample cubemap properly (or so it seems)
  • glGetUniform() returns sampler bindings as expected

phew! So I decided 8.1 is a keeper :slight_smile: