Bug 29230 - Need to ensure that incorrect parameters and types are never sent to OpenGL from WebGL
Summary: Need to ensure that incorrect parameters and types are never sent to OpenGL f...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Chris Marrin
URL:
Keywords:
Depends on: 38145 40175 41095 41574
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-12 20:49 PDT by Chris Marrin
Modified: 2020-07-31 15:11 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Marrin 2009-09-12 20:49:29 PDT
Passing badly typed uniform or vertex data to OpenGL can cause some drivers to crash. We need to do sufficient checks to prevent that from happening. For instance, passing a vertexAttribPointer as UNSIGNED_BYTE with 3 values when the value is actually FLOAT with 2 values will crash some hardware and not others. likewise, passing UNSIGNED_BYTE with 3 values to a vertexAttrib of type vec4 will crash some hardware.
Comment 1 Ilmari Heikkinen 2009-09-14 03:39:21 PDT
These tests written against the Firefox GL canvas might be helpful: http://github.com/kig/canvas3d-tests
Comment 2 Zhenyao Mo 2010-07-03 18:46:24 PDT
I think after all the dependency patches land, the only thing left unchecked is vertexArreibPointer()'s "type".  GL_FIXED is a valid enum for type in GLES2, but it's not supported in GL.  I think we should add in the spec that FIXED is not allowed in WebGL.
Comment 3 Kenneth Russell 2010-07-07 18:21:00 PDT
The WebGL spec has been updated to explicitly state that the GL_FIXED data type is not supported.
Comment 4 Brent Fulgham 2014-01-09 20:39:09 PST
Dean - I think we can close this based on the specification change.
Comment 5 Kenneth Russell 2020-07-31 15:11:26 PDT
Closing this old bug. WebKit's ANGLE backend, which is a conformant ES 2.0 / 3.0 implementation, has conclusively fixed this.