This patch implements the attribute validation strategy described in https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html#6.2 The fixes allow us to pass gl-enable-vertex-attrib.html.
Created attachment 450211 [details] [diff] [review] patch Erm, *this* fixes the above.
Just one compile error: in GetActiveAttrib, you need: + WebGLProgram *prog; and there are a couple of new warnings in ValidateBuffers(): WebGLContextValidate.cpp /home/bjacob/mozilla-central/content/canvas/src/WebGLContextValidate.cpp: In member function ‘PRBool mozilla::WebGLContext::ValidateBuffers(PRUint32)’: /home/bjacob/mozilla-central/content/canvas/src/WebGLContextValidate.cpp:89: warning: comparison between signed and unsigned integer expressions /home/bjacob/mozilla-central/content/canvas/src/WebGLContextValidate.cpp:91: warning: comparison between signed and unsigned integer expressions corresponding to this code: NS_ASSERTION(currentProgram == mCurrentProgram->GLName(), "WebGL: current program doesn't agree with GL state"); if (currentProgram != mCurrentProgram->GLName()) return PR_FALSE;
Ah whoops, looks like I forgot to qrefresh after I fixed those. http://hg.mozilla.org/mozilla-central/rev/7b15545cf9aa