GLSL bug on ATI hardware

9.11, 9.12

This bug was not present in driver 9.10.

GPUs affected (known):
ATI Radeon 3870
ATI Radeon 4890
ATI Radeon 5770
ATI Radeon 5870

Operating Systems affected (known):
Windows 7 64-bit (other versions of Windows are unknown)

The command textureCube() in a fragment shader causes the fragment to be discarded.

When the program “MyGame.exe” is run a spinning cube will appear on a blue background.

Now open the file “skybox.frag” and uncomment line 15:

color=textureCube(texture0,cubecoord) * fragcolor;

Run “MyGame.exe” again and no background pixels will be drawn, as if every fragment in the skybox is being discarded.

This shader worked correctly on previous driver versions. No compile or linking errors are encountered, or they would be shown in the log file and the application would end.


Hi JoshKlint,

Sorry it took a while to get back to you. Our shader compiler team looked into this and it will be fixed in Catalyst 10.1 which should be released in a few days.



I also have compilation and linking errors when using nvidia GLSL codes on my Ati Radeon 5870 with Catalyst version 9.12 on a x64 windows7 system.
Can Ati make the glsl compiler accept nvidia based code, the same way as nvidia accepts ati based code?

hi Aaaloha,

we typically see two types of compilation issues when applications which were developped on nvidia’s hardware are run on amd’s hardware:

  • real bug in the amd compiler (i.e. incorrect compilation of legal code)
  • non compliant shader which actually compiles incorrectly on nvidia’s compiler, but is rejected correctly by amd compiler (the spec explicitely says that the shader is not legal)

when seeing the first type of issue, we recomment that you contact us directly.

when seeing the second type of issues, we recommend that:

  • you raise that issue to us, so that we become aware of the silent extension of the nvidia’s compiler
  • you contact nvidia to inform them of the issue and ask them to fix the compiler to be compliant

Unfortunately, applications have currently to be tested on both platforms to guarantee portability of shader compilation.

Can Ati make the glsl compiler accept nvidia based code, the same way as nvidia accepts ati based code?

There’s not supposed to be such a thing as “NVidia code”. ATI tends to follow the OpenGL spec more closely, whereas NVidia tends to ignore a lot of errors. For this reason, I recommend developing on ATI hardware, because NVidia cards will fail to notify you of many mistakes in your code.