Bug 17079

Summary: glGetUniformLocation doesn't work for sampler types
Product: Mesa Reporter: Neil Roberts <nroberts>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Add sampler types to sizeof_glsl_type
Test case

Description Neil Roberts 2008-08-11 09:34:49 UTC
Created attachment 18220 [details] [review]
Add sampler types to sizeof_glsl_type

If you use glGetUniformLocation on a sampler type uniform then you get a warning about an invalid type. It calls a function called sizeof_glsl_type which seems to be missing handlers for the sampler types. In older git revisions this function would return zero and you would get a floating point exception.
Comment 1 Neil Roberts 2008-08-11 09:37:56 UTC
Created attachment 18221 [details]
Test case

Test case calling glGetUniformLocation on a sampler2D uniform. Under Mesa 7.0.3 it causes a floating point exception but under git master it just prints a warning.
Comment 2 Brian Paul 2008-08-11 14:11:56 UTC
Fixed in git.  Thanks.
Comment 3 Adam Jackson 2009-08-24 12:30:47 UTC
Mass version move, cvs -> git

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.