Closed Bug 812164 Opened 12 years ago Closed 9 years ago

WebGL: Cannot access shaders array element via getUniformLocation

Categories

(Core :: Graphics: CanvasWebGL, defect)

16 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: arrakaij, Unassigned)

References

()

Details

Attachments

(1 file)

Attached file Fragment Shader source
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0
Build ID: 20121010223843

Steps to reproduce:

Programming WebGL application with attached shaders.
Fragment shader uses multiple light sources. single light is an struct, multiple lights is an array[MAX_LIGHTS] of this struct
The shader works with no errors. On Windows Systems (7x64,8x64,XPx32) i can assign any element of lights array via e.g. gl.getUniformLocation(shader,"lights[0].location") and so on.
however, on Linux systems (2x up-to-date Ubuntu 12.10x64 tested) i can only assign index 0, index 1 fails, giving null as return value.
Anyway, the program works, displaying only the first assigned light

Hardware, as its GL:
AMD 4Core 3,2Ghz, 16G Ram, 2xRadeon 5800 (Windows 8x64: works, Ubuntu 12.10x64: does not)
Intel i7-2620M 2Core 2.7Ghz, 8G Ram, IntelHD (+Nvidia) (Win7x64: works, Ubuntu 12.10x64: does not)

Code ( http//trinity.digitalinsanity.de/bugs/lodge1/ for complete js, offending line @ lodge.js/lodge.js:722 ):

[...]
this.gl.linkProgram(program);
this.gl.useProgram(program);
console.log(this.gl.getUniformLocation(program,"lights[0].active"));
console.log(this.gl.getUniformLocation(program,"lights[1].active")); 


Actual results:

On Linux machines, the above code displays:
XrayWrapper [Object WebGLUniformLocation { }
null


Expected results:

Like on Windows Machines Output should be:
XrayWrapper [Object WebGLUniformLocation { }
XrayWrapper [Object WebGLUniformLocation { }
The clickable testcase URL is: http://trinity.digitalinsanity.de/bugs/lodge1/
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
The URI in comment 1 no longer exists.  Is this still an issue on Firefox 39?  What about Firefox 40 beta?
I am closing this bug as incomplete due to the state of inactivity and the lack of a reproducible test case. Please reopen this bug if it is still reproducible in the current Firefox release and provide a reproducible test case. Thank you.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: