PDA

View Full Version : Nvidia 162.65 Compiler Error



PickleWorld
02-15-2008, 06:22 AM
So I have a set of shaders (vertex and fragment) that have worked (on both Nvidia and ATI) for a couple years that now produce the following compiler error with the Nvidia 162.65 driver (same card/machine it work on before, just a new driver)...


(2) : warning C7050: "color-0171.w" might be used before being initialized
Internal error: assembly compile error for fragment shader at offset 15254:
-- error message --
line 327, column 13: error: variable not valid as a source register

Anyone seen this before with this driver?

It looks as though it thinks I am using an uninitialized variable but that is not the case as far as I can tell by looking at my code.

-NiCo-
02-15-2008, 06:25 AM
Posting the shaders would probably help ;)

N.

PickleWorld
02-15-2008, 06:38 AM
It might.. but unfortunately I don't own them, my company does and I signed away my first born child in my IP agreement.

I was hoping someone had seen this error before and could point me in the right direction.

What is color-0171.w for instance? (I sure did not name one of my variables that)

PickleWorld
02-18-2008, 11:44 AM
So after an hour or so of just commenting out lines and recompiling I narrowed down the line of code causing the error:


float x = gl_FragColor.r;

What gives? That has to be a bug no? Why is gl_FragColor.r not a valid source register? The funny thing is, if I comment out that line my shader runs even though the very next line is:


float inten = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;

Anyone ever seen anything like this?

CatDog
02-18-2008, 12:10 PM
Maybe because of the "x", as it is used as vector component name also?

CatDog

PickleWorld
02-18-2008, 12:15 PM
Nope, changing the variable name does not help. I tried that one. Keep in mind, this shader works on the same card with a different driver. It also works on other cards with the same driver... it has to be a bug.

-NiCo-
02-18-2008, 12:25 PM
I've encountered this problem too. It'll probably work with:



vec4 tmp = gl_FragColor;
float x = tmp.r;


N.

PickleWorld
02-19-2008, 07:19 AM
Gave that a try, still no luck.

-NiCo-
02-19-2008, 07:32 AM
Well, looks like an ugly bug... one would expect better from Quadro drivers :(

N.

PickleWorld
02-19-2008, 11:52 AM
Well, driver 169.61 fixed the issue so I am not going to worry about it. Thanks anyway guys :)