Bug 40315

Summary: Vertex attributes enabled as arrays but not bound to buffers must generate INVALID_OPERATION
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: WebGLAssignee: Zhenyao Mo <zmo>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, commit-queue, dglazkov, oliver, zmo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch none

Description Kenneth Russell 2010-06-08 11:47:40 PDT
Per recent WebGL specification changes, if a vertex attribute is enabled as an array but has not been bound to a buffer object by a pair of calls to bindBuffer / vertexAttribPointer, calls to drawArrays and drawElements must generate an INVALID_OPERATION error.
Comment 1 Zhenyao Mo 2010-06-10 10:47:51 PDT
Created attachment 58386 [details]
patch
Comment 2 Kenneth Russell 2010-06-10 17:23:26 PDT
Comment on attachment 58386 [details]
patch

Looks good.
Comment 3 Dimitri Glazkov (Google) 2010-06-10 21:33:08 PDT
Comment on attachment 58386 [details]
patch

ok, with a clean-up suggestion:

WebCore/html/canvas/WebGLRenderingContext.cpp:2936
 +      m_vertexAttribState[indx].bufferBinding = m_boundArrayBuffer;
Typically, we try not to abbreviate names.
Comment 4 WebKit Commit Bot 2010-06-11 05:16:29 PDT
Comment on attachment 58386 [details]
patch

Clearing flags on attachment: 58386

Committed r61006: <http://trac.webkit.org/changeset/61006>
Comment 5 WebKit Commit Bot 2010-06-11 05:16:35 PDT
All reviewed patches have been landed.  Closing bug.