[Mesa-dev] [PATCH 1/2] mesa: Track the API used to create a VAO

Ian Romanick idr at freedesktop.org
Fri Jan 20 18:59:53 PST 2012


From: Ian Romanick <ian.d.romanick at 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.romanick at 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);
       }
    }
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;
 };
 
 
-- 
1.7.6.4



More information about the mesa-dev mailing list