Core GL profiles require default VAO.

RESOLVED FIXED in Firefox 40

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: kamidphish, Assigned: kamidphish)

Tracking

unspecified
mozilla40
Points:
---

Firefox Tracking Flags

(firefox40 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 8595155 [details] [diff] [review]
OpenGL core context deprecated default VAO. r=jgilbert

Create a VAO and attach it to the default object.
Attachment #8595155 - Flags: review?(jgilbert)
Comment on attachment 8595155 [details] [diff] [review]
OpenGL core context deprecated default VAO. r=jgilbert

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

::: dom/canvas/WebGLContextValidate.cpp
@@ +1949,5 @@
>      mDefaultVertexArray->mAttribs.SetLength(mGLMaxVertexAttribs);
>      mBoundVertexArray = mDefaultVertexArray;
>  
> +    // Core profiles don't provide a default VBO. (Well this appears to be the
> +    // behaviour exhibited on Mac OSX OpenGL core contexts.)

I believe this is correct. Could you find the spec reference for this, though?
Attachment #8595155 - Flags: review?(jgilbert) → review+
(In reply to Jeff Gilbert [:jgilbert] from comment #2)
> I believe this is correct. Could you find the spec reference for this,
> though?

After much hunting I found it in GL Spec 4.0.0: (https://www.opengl.org/registry/doc/glspec40.core.20100311.pdf) in Section E.2.2 "Removed Features", pg 397:

> Client vertex and index arrays - all vertex array attribute and element array
> index pointers must refer  to buffer objects. ***The default vertex array object
> (the name zero) is also deprecated.*** Calling VertexAttribPointer when no
> buffer object or no vertex array object is bound will generate an INVALID_OPERATION
> error, as will calling any array drawing command when no vertex array object is
> bound.

So, I update the patch to only do this for version >= 4, or should we just create a VAO unconditionally for GL core profiles?
Flags: needinfo?(jgilbert)
(In reply to Dan Glastonbury :djg :kamidphish from comment #3)
> (In reply to Jeff Gilbert [:jgilbert] from comment #2)
> > I believe this is correct. Could you find the spec reference for this,
> > though?
> 
> After much hunting I found it in GL Spec 4.0.0:
> (https://www.opengl.org/registry/doc/glspec40.core.20100311.pdf) in Section
> E.2.2 "Removed Features", pg 397:
> 
> > Client vertex and index arrays - all vertex array attribute and element array
> > index pointers must refer  to buffer objects. ***The default vertex array object
> > (the name zero) is also deprecated.*** Calling VertexAttribPointer when no
> > buffer object or no vertex array object is bound will generate an INVALID_OPERATION
> > error, as will calling any array drawing command when no vertex array object is
> > bound.
> 
> So, I update the patch to only do this for version >= 4, or should we just
> create a VAO unconditionally for GL core profiles?

Unconditional is probably better.
Flags: needinfo?(jgilbert)
https://hg.mozilla.org/mozilla-central/rev/3510be31aea4
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.