[Mesa-dev] [PATCH] mesa: attach ElementArrayBufferObj to vertex array object

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Nov 23 01:25:30 PST 2011

On Tue, Nov 22, 2011 at 11:16:26AM -0700, Brian Paul wrote:
> On 11/22/2011 01:38 AM, Yuanhan Liu wrote:
> >This would make ElementArrayBufferObj data per vertex array object. I did't
> >find something to support this at the spec page[0]. But I did find
> >something that somehow support this at opengl wiki page[1].
> >
> >NOTE: with my test, both NV and ATI's closed source opengl
> >implementation would attach the Elelemnt array buffer to vao.
> >
> >This would fix most of(3 left) intel oglc vao test fail
> >
> >[0]: http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt
> >[1]: http://www.opengl.org/wiki/Vertex_Array_Object
> Back when I implemented Apple's VAO it wasn't clear to me if the
> array element binding was per-VAO or per-context.  The original spec
> wasn't explicit about it.  But I just checked the GL 3.0 spec it
> lists GL_ELEMENT_ARRAY_BUFFER as per-VAO state.  

Yeah, I found that, too.(well, I checked it before, seems that I missed it)

> A test program on
> NVIDIA's driver confirms it.
> Regarding your patch, I think we could remove the existing
> gl_array_attrib::ElementArrayBufferObj field and reference
> gl_array_object::ElementArrayBufferObj everywhere.

Agreed. An updated patch sent.
> Note that even if we don't support GL_ARB/APPLE_vertex_array_object
> that we still have/use the default VAO so there's shouldn't be a
> problem if the VAO extensions aren't enabled.
> The fix for this would probably also be a candidate for the 7.11 branch.
> We should have a piglit test for this too.
I also sent out a pligilt test patch, too.

Yuanhan Liu

More information about the mesa-dev mailing list