View Full Version : Missing function?

02-09-2010, 08:55 AM
The GLSL spec 1.50 (http://www.opengl.org/registry/doc/GLSLangSpec.1.50.09.pdf) at PDF page 99 / labelled page 93, defined the function

ivec2 textureSize (gsampler2DRect sampler)

According ot the preceeding section, the g is used to mean a prefix of "", "i" or "u". In my case the prefix is "" as it's a float sampler.

However, when I try to use this function in my shader:

uniform sampler2DRect Ytex;
void main(){
ivec2 wh = textureSize(Ytex);

the shader fails to compile with error C1115: unable to find compatible overloaded function "textureSize(sampler2DRect)".

What am I doing wrong?

02-09-2010, 05:11 PM
Do you have a #version 150 line at the top of the file?

02-25-2010, 04:49 AM
Sorry for the delay replaying. Yes, I have #version 150 at the top of the shader source.

In case it makes a difference, I'm using the Linux x86 NVidia 190.53 graphics driver on Red Hat Enterprise Linux 4.6.

02-25-2010, 06:53 AM
Looks like a driver bug...

03-02-2010, 04:21 AM
Posted to NVidia linux driver support forum: http://www.nvnews.net/vbulletin/showthread.php?p=2199028#post2199028