On Sat, Jan 21, 2012 at 08:14:18AM -0700, Brian Paul wrote: > On 01/20/2012 07:59 PM, Ian Romanick wrote: > >From: Ian Romanick<ian.d.roman...@intel.com> > > > >There are more differences between Apple and ARB than just the Gen > >requirement. > > > >NOTE: This is a candidate for release branches. > > > >Signed-off-by: Ian Romanick<ian.d.roman...@intel.com> > >--- > > src/mesa/main/arrayobj.c | 1 + > > src/mesa/main/mtypes.h | 5 +++++ > > 2 files changed, 6 insertions(+), 0 deletions(-) > > > >diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c > >index 3287745..0e74777 100644 > >--- a/src/mesa/main/arrayobj.c > >+++ b/src/mesa/main/arrayobj.c > >@@ -372,6 +372,7 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, > >GLboolean genRequired) > > _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindVertexArrayAPPLE"); > > return; > > } > >+ newObj->arb_semantics = genRequired; > > save_array_object(ctx, newObj); > > } > > } > > The existing gl_array_object::VBOonly field is set for array objects > that are created with the ARB glGenVertexArrays() function. You're > setting the new arb_semantics field at bind time. > > Do we want to combine those fields into one flag that's set at Gen > time, not Bind time?
We may want to combine the fields. I pick Bind as the time to pick the semantic because the "Interactions with APPLE_vertex_array_object" section of the ARB_vao spec says: "The first bind call, either BindVertexArray or BindVertexArrayAPPLE, determines the semantic of the object." I think that means the Gen functions could share an entry point. > The genRequired param to bind_vertex_array() is/was really just used > to implement an error check. > > > >diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h > >index 2ff6085..a89d586 100644 > >--- a/src/mesa/main/mtypes.h > >+++ b/src/mesa/main/mtypes.h > >@@ -1629,6 +1629,11 @@ struct gl_array_object > > GLuint _MaxElement; > > > > struct gl_buffer_object *ElementArrayBufferObj; > >+ > >+ /** > >+ * Does this VAO follow the Apple or ARB semantics? > >+ */ > >+ GLboolean arb_semantics; > > }; > > To be consistent with other field names, this should be capitalized > as ARBsemantics. Okay.
pgpdImp0RzhMd.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev