cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Wilczek
Journeyman III

gl_TextureMatrix[x] is initialized with zeros on desktop ATI/AMD GPUs only

Hi,

In vertex shaders in case of ATI/AMD desktop (only) GPUs the gl_TextureMatrix[index] is initialized with zeros resulting all texture coordinates to be 0.
That means the following lines will always return (0,0,) texture coordinates:
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;
gl_TexCoord[2] = gl_TextureMatrix[2] * gl_MultiTexCoord2;

However, the above mentioned lines give back correct texture coordinates on mobility ATI/AMD Radeon GPUs and on all nVidia GPUs. (Correct results: Mobility Radeon X1100 series, Mobility Radeon X1400 series, Mobility Radeon HD4570, fails on for sure: Desktop HD5xxx Series, Desktop HD 4850 with any drivers, and works with all nVidia GPUs from desktop FX5200 till the latest nV GPUs + on nV mobile solutions too).

In the code I set up the texture matrix for every texture (using glActiveTexture...(...); glMatrixMode(GL_TEXTURE); glLoadIdentity(); Other texture transformations; ).

In case you would like to debug/have a look at the shaders + binary, I can send a link to a zip file.

My questions:
1. why does it work with Mobility ATI/AMD GPUs and on all nV GPUs?
2. why do I get zero texture matrices in case of Desktop ATI/AMD GPUs and not on Mobility ATI/AMD GPUs?

Thank you and best regards,
Wilczek

0 Likes
6 Replies
nou
Exemplar

to my knowledge all matrix in OpenGL should be set identity from the start. so this look like a bug in the driver. as a workaround you can try set your own uniform matrix.

0 Likes

It's strange that the behaviors are different on Mobility Radeon HD4570 and Desktop HD 4850, we need to verify the problem first.
It's better to send your program to me by frank.li@amd.com. And please tell me which driver you are using now.

Thanks
Frank

0 Likes

one possible idea: were you running the same version of opengl in each case ?

(version number and compatibility/core) ?

Pierre B.

 

0 Likes

Hi Frank,

Thank you for the reply.
Checking the available log files + test results I could collect the following pieces of information:
Tested cards resulting correct rendering:
Mobility Radeon X1100 Series, Driver version: 8.283.0.0, Driver date: 2006.08.08 (limited rendering, 1 light only, shaders run in software)
Mobility Radeon X1400 Series, sorry, the machine is not available at the moment, so I cannot give the driver version
Mobility Radeon HD4570, OpenGL driver version: 6.14.10.8787, querying from OpenGL: "Version: 2.1.8787"

On the following cards the above mentioned multiplications result in 0, 0 texture coordinates:
(desktop) Radeon HD4850, Catalyst 9.12, querying from OpenGL: "Version: 3.2.9232", also Catalyst 10.1 was tested
(desktop) Radeon HD4870, Catalyst 10.1, querying from OpenGL: "Version: 3.2.9252 Compatibility Profile Context"
(desktop) Radeon HD5570, using Catalyst 10.5 and 10.8

Since the demo package is around 50 MB large I would rather give you a link to the zip file:
http://www.nyisztorkaroly.org/download/FzEngine4__R6013_Demo_Std_Only.zip

You can find the shader in question in the following folder:
base/glprogs/glsl/ati/high
the name is 20_bumpandlight.vert

Thank you and best regards,
Zoltán / Wilczek

0 Likes

The problem exists in Cat10.6 but doesn't in Cat10.9 in my local machine. As you also tried it on 10.8 and found the problem still exists. So I guess that it should be fixed in Cat10.9.

0 Likes

Hi Frank,

I can confirm that my program runs fine using Catalyst 10.9 (tested on HD3850). Thank you for the help.

Best regards,
Wilczek

0 Likes