PDA

View Full Version : gl_ModelViewMatrixInverse not defined in new nvidia drivers



zed
10-24-2005, 01:25 PM
im getting this warning anytime i use gl_ModelViewMatrixInverse (nearly every shader thus heaps)
Vertex info
-----------
(30) : warning C7506: OpenGL does not define the global variable gl_ModelViewMatrixInverse

whats up?
its part of the spec, at least was added in glsl 1.10 which is a year old at least

spasi
10-25-2005, 02:39 AM
I'm getting this warning (obviously a bug) too and I'm also getting similar warnings whenever I use half types (useful).

Unfortunately, the GLSL implementation in NV's 8x.xx drivers is rather buggy. I currently have two problems:

1. They've apparently switched to compiling the shaders before linking. Before 8x.xx, the driver was just concatenating the shader sources and compiled the whole thing when the program was linked. Now I'm having problems when I share shader "components" between programs. When a shader is already used in a program and I try to link a new one that uses the same shader, I'm getting this:


(0) : error C9999: symbol "@TMP2" already in tableThe workaround I currently use is to recompile the shader and use that shader object in the new program.

2. There's a problem with half types. Before 8x.xx everything was fine, but now it seems that the compiler fails to recognize how to handle them and outputs dozens of "implicit cast" warnings. For example, when I do this (a and b are both half):


half m = max(a, b);three warnings are generated, two for casting a and b to float and one for casting the result to half. The output assembly is correctly using the corresponding half type instructions for such statements, but the info logs are messy to say the least.