Last Comment Bug 882890 - WebGL : vertex attribute array 0 should be disable by default
: WebGL : vertex attribute array 0 should be disable by default
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Canvas: WebGL (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla24
Assigned To: Guillaume Abadie
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-13 13:33 PDT by Guillaume Abadie
Modified: 2013-06-24 02:44 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1014 bytes, patch)
2013-06-13 14:31 PDT, Guillaume Abadie
jacob.benoit.1: review+
Details | Diff | Splinter Review
patch for landing (1.11 KB, patch)
2013-06-17 07:29 PDT, Guillaume Abadie
jacob.benoit.1: review+
ryanvm: checkin+
Details | Diff | Splinter Review

Description Guillaume Abadie 2013-06-13 13:33:46 PDT
vertex attribute array 0 should be disable by default
Comment 1 Guillaume Abadie 2013-06-13 14:31:43 PDT
Created attachment 762323 [details] [diff] [review]
patch

patch fixing the issue and get passing a WebGL conformance test 1.0.2
Comment 2 Jeff Gilbert [:jgilbert] 2013-06-13 15:37:34 PDT
Comment on attachment 762323 [details] [diff] [review]
patch

Review of attachment 762323 [details] [diff] [review]:
-----------------------------------------------------------------

This doesn't fix what you say it fixes. Rather, it just pretends that the GL state is set properly. Is there a reason we can't just use the driver's value?
Comment 3 Guillaume Abadie 2013-06-13 15:54:39 PDT
Actually it fix it :

In the WebGL conformance test https://www.khronos.org/registry/webgl/conformance-suites/1.0.2/conformance/state/gl-get-calls.html , it fix the only one FAIL remaining "context.getVertexAttrib(ii, context.VERTEX_ATTRIB_ARRAY_ENABLED) should be false. Was true.". This test just check if all vertex attribute are disable right after the WebGL context creation.

Actually, desktop OpenGL driver don't draw anything when the vertex attribute 0 is disable. But WebGL specifications authorize to draw with the vertex attribute 0 disabled. Therefor the WebGL layer always enable it, and fake the disable action of it. But this fake technique has been forgotten in that function. So this patch fix it, passing and the conformance test. That why this patch is very tiny.
Comment 4 Jeff Gilbert [:jgilbert] 2013-06-13 16:00:40 PDT
Alright, please leave a comment there saying as much.
Comment 5 Benoit Jacob [:bjacob] (mostly away) 2013-06-13 22:00:29 PDT
(In reply to Jeff Gilbert [:jgilbert] from comment #2)
> Comment on attachment 762323 [details] [diff] [review]
> patch
> 
> Review of attachment 762323 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> This doesn't fix what you say it fixes. Rather, it just pretends that the GL
> state is set properly. Is there a reason we can't just use the driver's
> value?

The OpenGL value is different from the WebGL one because of vertex attrib 0 on desktop GL.
Comment 6 Guillaume Abadie 2013-06-17 07:29:59 PDT
Created attachment 763547 [details] [diff] [review]
patch for landing

enhancing the patch comment for landing
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-06-23 17:43:48 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/9b5816c7fa6e
Comment 8 Ryan VanderMeulen [:RyanVM] 2013-06-23 17:45:42 PDT
Comment on attachment 763547 [details] [diff] [review]
patch for landing

Please just use checkin-needed in the future :)
Comment 9 Phil Ringnalda (:philor) 2013-06-23 22:55:44 PDT
https://hg.mozilla.org/mozilla-central/rev/9b5816c7fa6e

Note You need to log in before you can comment on or make changes to this bug.