It would seem that firefox is complaining about setting the Active Texture to above 4 in WebGL

RESOLVED FIXED

Status

()

Firefox
General
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: Paul Brunt, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

8 years ago
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

8 years ago
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
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is fixed in the current code.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.