Khronos public bugtracker – Bug 779
Incorrect draw sequence in oes-vertex-array-object.html resulting in test failure.
Last modified: 2013-01-31 16:08:21 PST
oes-vertex-array-object.html test is failing in browsers which support OES_vertex_array_object extension (Currently only chromium browser supports it I think).
To be specific, this test fails in 'runDrawTests' function after it draws green colored (50,50) rect and fails to verify the color drawn. Below is the snippet of the error,
PASS Draw 0 passed pixel test
PASS Draw 1 passed pixel test
PASS Draw 2 passed pixel test
PASS should be green
FAIL should be green
at (0, 0) expected: 0,255,0,255 was 250,252,0,255
Testing using deleted buffers referenced by VAOs
Created attachment 133 [details]
thanks for the patch.
BTW: We don't generally take patches here. Patches should be done on github
I happy to do that for you but if you want your account/email attached to the patch you might want to do that yourself. If I don't hear from you by tomorrow I'll apply it for you.
As for the patch thanks for catching this. It seems like disableVertexAttribArray call should to go before line 458 so that both calls to wtu.drawIndexedQuad use the value in the attribute.
At the beginning of runDrawTests, test creates setupSimpleTextureProgram program and binds 0 and 1 as position and tex_coord locations. Test then enables these generic vertex attributes in setupQuad.
Near to the end of this function, test creates another quad using
wtu.setupQuad function passing 0 as position location. setupQuad function rebinds the 0 vertex attrib array position to a new position buffer which it creates. Note that vertex attrib array 1 is left unmodified by qtu.setupQuad.
runDrawTests function later tries to bind vertex attrib pos 1 (colorLoc) to [0,1,0,1] color using gl.vertexAttrib4f(colorLoc, 0, 1, 0, 1) call. As per the specification http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf section 2.7, current generic attribute values deﬁne generic attributes for a vertex when a vertex array deﬁning that data is not enabled. Since vertex attrib array is still left enabled, it seems like call to gl.vertexAttrib4f is simply a no-op.
Attached patch tried to fix this bug.
(In reply to comment #2)
> thanks for the patch.
> BTW: We don't generally take patches here. Patches should be done on github
> I happy to do that for you but if you want your account/email attached to
> the patch you might want to do that yourself. If I don't hear from you by
> tomorrow I'll apply it for you.
Sure, I will create an account in github and submit the patch there.
> As for the patch thanks for catching this. It seems like
> disableVertexAttribArray call should to go before line 458 so that both
> calls to wtu.drawIndexedQuad use the value in the attribute.