mesa: add storage_count field to GLvector4f. Useful for debugging.
authorBrian Paul <brianp@vmware.com>
Wed, 6 May 2009 21:09:18 +0000 (15:09 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 7 May 2009 16:12:33 +0000 (10:12 -0600)
src/mesa/math/m_vector.c
src/mesa/math/m_vector.h

index dd631376d070f64ad72c7f4e03dfc7a842b94a8b..06364217277adf73bf6bf94c8ed03153499d58af 100644 (file)
@@ -102,6 +102,7 @@ _mesa_vector4f_alloc( GLvector4f *v, GLuint flags, GLuint count,
    v->stride = 4 * sizeof(GLfloat);
    v->size = 2;
    v->storage = ALIGN_MALLOC( count * 4 * sizeof(GLfloat), alignment );
+   v->storage_count = count;
    v->start = (GLfloat *) v->storage;
    v->data = (GLfloat (*)[4]) v->storage;
    v->count = 0;
index 9112a2b5d568ef7079a750a2878a21af2f122d7a..fcf618a7403cc31aac06fa5a27f3a8cfb76275ca 100644 (file)
@@ -67,6 +67,7 @@ typedef struct {
    GLuint size;                /**< 2-4 for vertices and 1-4 for texcoords */
    GLuint flags;       /**< which columns are dirty */
    void *storage;      /**< self-allocated storage */
+   GLuint storage_count; /**< storage size in elements */
 } GLvector4f;