Last Comment Bug 536724 - It would seem that firefox is complaining about setting the Active Texture to above 4 in WebGL
: It would seem that firefox is complaining about setting the Active Texture to...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
http://www.paulbrunt.co.uk/webgl/bug/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-25 00:50 PST by Paul Brunt
Modified: 2010-06-21 13:28 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Paul Brunt 2009-12-25 00:50:02 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091224 Minefield/3.7a1pre
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091224 Minefield/3.7a1pre

I'm getting a NS_ERROR_DOM_SYNTAX_ERR when ever I try to set active texture above 4 ie "gl.activeTexture(gl.TEXTURE5)" even though it's well with in the max textures limit.  Had a quick look at the code and I'm not sure but it looks like:
WebGLContext::ActiveTexture(PRUint32 texture)
{
	if (texture < LOCAL_GL_TEXTURE0 || texture >= LOCAL_GL_TEXTURE0+mBound2DTextures.Length())
		return NS_ERROR_DOM_SYNTAX_ERR;

mBound2DTextures.Length() is not reporting the correct value??

Reproducible: Always

Steps to Reproduce:
1.gl.activeTexture(gl.TEXTURE5)
2.
3.
Actual Results:  
NS_ERROR_DOM_SYNTAX_ERR

Expected Results:  
set the active Texture to gl.TEXTURE5
Comment 1 Ilmari Heikkinen 2010-01-03 06:15:37 PST
The problem is that WebGLContext::ValidateGL() in content/canvas/src/WebGLContextGL.cpp:2900 is getting the texture unit count with gl->fGetIntegerv(LOCAL_GL_MAX_TEXTURE_UNITS, &val), but GL_MAX_TEXTURE_UNITS returns the max fixed function texture units.

It should be using LOCAL_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 

http://www.opengl.org/sdk/docs/man/xhtml/glActiveTexture.xml
Comment 2 Benoit Jacob [:bjacob] (mostly away) 2010-06-21 13:28:28 PDT
This is fixed in the current code.

Note You need to log in before you can comment on or make changes to this bug.