Closed Bug 775754 Opened 13 years ago Closed 13 years ago

incorrect webgl attribute locations

Categories

(Firefox :: Untriaged, defect)

14 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 775753

People

(Reporter: billconan, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 Steps to reproduce: Go to this webpage: http://www.eveonline.com/universe/spaceships with default firefox settings. A spaceship is visible. And then go to the about:config page, change webgl.prefer-native-gl to true and check the same webpage again. The spaceship should be gone (become a little dot.) Actual results: The spaceship is gone when opengl is the renderer. Expected results: The behavior should be consistent between opengl renderer and directx renderer. But the spaceship is not visible with opengl.
Hello, I'm an OpenGL engineer from NVIDIA. We recently found that the EVE online spaceship viewer can't work properly on Windows and Linux with both firefox and chrome, if set OpenGL as the renderer. But things can work on Mac firefox and chrome. here is eve spaceship viewer: http://www.eveonline.com/universe/spaceships If use the Dx renderer, a spaceship should be visible. But if set OpenGL as the renderer, the spaceship will be gone. (It actually won't be gone, but become a very small dot.) We suspected this is our driver bug. But after debugging, it looks like the driver is rendering wrong geometry data. It renders the surface binormals as the geometry. Because binormal data is ranging from -1 to 1, the spaceship shows as a little dot. The reason is that, under windows or linux, webGL can't get the correct shader attribute locations. Here is how the EVE viewer queries for attribute locations: var p = device.gl.getProgramParameter(l.shaderProgram, device.gl.ACTIVE_ATTRIBUTES); for(var f = 0; f < p; ++f) { var q = device.gl.getActiveAttrib(l.shaderProgram, f); console.log("attribute"+f+" is "+q.name); ... } It prints this: attribute0 is a_Binormal attribute1 is a_Normal attribute2 is a_Position attribute3 is a_Tangent attribute4 is a_TexCoord However, inside our driver, the correct attribute locations should be this: a_Position 0 a_Normal 1 a_Tangent 2 a_Binormal 3 a_TexCoord 4 The spaceship viewer treats attribute 0 as binormal, but really it should be the geometry data. The same javascript prints different log on Mac firefox: attribute0 is a_Position attribute1 is a_Tangent attribute2 is a_Binormal attribute3 is a_TexCoord attribute4 is a_Normal This matches our driver's attribute locations. It looks like, under windows and Linux, the WebGL renderer lists the attributes in their alphabetical order, rather than based on their location IDs. So it put a_Binormal at first. To repro this bug: Go to this webpage: http://www.eveonline.com/universe/spaceships with default firefox settings. A spaceship is visible. And then go to the about:config page, change webgl.prefer-native-gl to true and check the same webpage again. The spaceship should be gone (become a little dot.) I'm not sure how webgl renderer is implemented inside chrome and firefox. Since this is a bug found with both chrome and firefox, I first filed this to ANGLE. But they said this could also be a bug inside the browser. So I file it here.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.