Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 03-02-10, 06:21 AM   #1
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default OpenGL shader function missing 190.53?

I originally posted this problem in the OpenGL forum as I thought it was a mistake on my end. However, it's suggested that it's a driver bug.

http://www.opengl.org/discussion_boa...79&#Post271879


The GLSL spec 1.50 ( http://www.opengl.org/registry/doc/G...ec.1.50.09.pdf ) at PDF page 99 / labelled page 93, defines the function

Code:
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:

Code:
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)".
acidd_uk is offline   Reply With Quote
Old 03-02-10, 09:52 AM   #2
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: OpenGL shader function missing 190.53?

Please try the latest release, 195.36.08. If the problem still occurs with that driver, please generate and attach an nvidia-bug-report.log.gz file. A simple test case that demonstrates the problem would also be helpful.
AaronP is offline   Reply With Quote
Old 03-02-10, 11:15 AM   #3
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default Re: OpenGL shader function missing 190.53?

Thanks for the reply Aaron. I am using a Quadro FX3500. Searching on the normal driver website, it offers me 190.53 (the one I'm using). The same goes if I tell it it's a Geforce card. I tried the advanced driver search for beta drivers and the latest it offered me is 195.30. Where can I find the driver you're referring to?
acidd_uk is offline   Reply With Quote
Old 03-02-10, 11:41 AM   #4
mooninite
Registered User
 
Join Date: May 2006
Posts: 477
Default Re: OpenGL shader function missing 190.53?

Quote:
Originally Posted by acidd_uk View Post
Where can I find the driver you're reffering to?
A sticky at the very top of the forum.

http://www.nvnews.net/vbulletin/showthread.php?t=122606
mooninite is offline   Reply With Quote
Old 03-03-10, 07:11 AM   #5
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default Re: OpenGL shader function missing 190.53?

Doh, thanks.
acidd_uk is offline   Reply With Quote
Old 03-03-10, 09:34 AM   #6
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default Re: OpenGL shader function missing 190.53?

Ok, tested with 195.38.08 but I get the same shader program compile failure:

Code:
C1115: unable to find compatible overloaded function "textureSize(sampler2DRect)"
log will follow...
acidd_uk is offline   Reply With Quote
Old 03-04-10, 04:09 AM   #7
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default Re: OpenGL shader function missing 190.53?

Ok here's my log, and a little test program that demonstrates the problem, along with a build/run script that might make it a little easier to compile.
Attached Files
File Type: zip nvidia-shader-bug.zip (32.9 KB, 102 views)
acidd_uk is offline   Reply With Quote
Old 03-10-10, 07:18 PM   #8
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: OpenGL shader function missing 190.53?

Sorry for the slow reply. I took a look at your test case and the problem appears to be that you're using a Quadro FX 3500, which only supports GLSL 1.20. To get GLSL 1.50, you need a newer GPU.
AaronP is offline   Reply With Quote

Old 03-11-10, 04:26 AM   #9
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default Re: OpenGL shader function missing 190.53?

Ok thanks Aaron. But then why does it compile ok with the #version 150 directive? I might expect it to fail to compile with an error that it's not supported? Otherwise, how can I tell if it's supported at runtime (e.g. to fall back to an alternative shader)?
acidd_uk is offline   Reply With Quote
Old 03-11-10, 02:52 PM   #10
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: OpenGL shader function missing 190.53?

I don't understand. Your test case does have #version 150 set and it still fails for me on a pre-G80 GPU.

You can determine the GLSL version at shader compile time by using the __VERSION__ preprocessor macro or in OpenGL by querying the GL_SHADING_LANGUAGE_VERSION string.

The spec does say that
Quote:
Any number representing a version of the language a compiler does not support will cause an error to be generated.
and the driver appears not to be doing that. I'll file a bug.
AaronP is offline   Reply With Quote
Old 03-12-10, 04:23 AM   #11
acidd_uk
Registered User
 
Join Date: Dec 2003
Posts: 14
Default Re: OpenGL shader function missing 190.53?

Thanks Aaron, sorry I didn't explain that last part very well, but essentially yes, if the compiler doesn't support GLSL1.5 then I'd expect it to fail immediately that it encounters the #version 150 directive. I hadn't read that part of the spec, but that's what I'd expect it to say!

Thanks for all your help with this - in case anyone else experiences a similar problem, I have worked around it in the interim by passing the texture size into the shader as a unifom vec2i.
acidd_uk is offline   Reply With Quote
Old 05-14-10, 01:11 PM   #12
jasonsewall
Registered User
 
Join Date: Feb 2007
Posts: 3
Default Re: OpenGL shader function missing 190.53?

Has anyone has this problem recently?

I'm using the 195.36.24 driver on a g80 on a Fedora 11 64-bit box.

GL_SHADER_VERSION reports 1.5, but when I define #version 1.50 in my fragment shader, and try to get the textureSize() of a sampler2DMS, I get

"error C1115: unable to find compatible overloaded function "textureSize(sampler2DMS)"

in fact, in the same shader when I try to fetch from the same sampler, I get:

"error C1115: unable to find compatible overloaded function "texelFetch(sampler2DMS, ivec2, int)"

When I have earlier #versions set, I get warnings about the sampler2DMS feature not being available, but the shader works...

Little help? Is this a known issue, or should I take a harder look at what I am doing?

Jason
jasonsewall is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:38 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.