Nvidia 162.65 Compiler Error

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.

Posting the shaders would probably help :wink:

N.

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)

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?

Maybe because of the “x”, as it is used as vector component name also?

CatDog

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.

I’ve encountered this problem too. It’ll probably work with:


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

N.

Gave that a try, still no luck.

Well, looks like an ugly bug… one would expect better from Quadro drivers :frowning:

N.

Well, driver 169.61 fixed the issue so I am not going to worry about it. Thanks anyway guys :slight_smile:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.