Bug 27266

Summary: Cubosphere: undefined function 'texture2D' / incompatible types in assignment
Product: Mesa Reporter: Sven Arvidsson <sa>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
URL: http://sourceforge.net/projects/cubosphere/
Whiteboard:
i915 platform: i915 features:
Attachments: distglossbump.frag

Description Sven Arvidsson 2010-03-23 10:44:54 UTC
Created attachment 34371 [details]
distglossbump.frag

When the game Cubosphere is run with shaders turned on, the following errors occurs:

 Error: problem compiling shader: Error: undefined function 'texture2D' 
 Error: incompatible types in assignment

It seems to happen in the shader distglossbump.frag, which is attached.

I'm not sure if this is a bug in the shader or not, but it seems to run fine in Windows on ATI hardware.
Comment 1 Brian Paul 2010-03-23 15:15:23 UTC
The problem is this line:

  vec4 base = texture2D(base, uv);

base was previously declared as sampler2D.  We're getting the scoping wrong with the initializer.  Perhaps you could suggest to the game's authors to rename 'vec4 base' to something else.  I won't have time to fix the compiler for a while.
Comment 2 Sven Arvidsson 2010-08-17 10:24:37 UTC
The glsl2 merge seems to have solved this.

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.