mesa: Set the "Integer" field of gl_client_array properly.
authorPaul Berry <stereotype441@gmail.com>
Tue, 1 Nov 2011 00:29:17 +0000 (17:29 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 2 Nov 2011 16:29:35 +0000 (09:29 -0700)
This patch ensures that gl_client_array::Integer is properly set to
GL_TRUE for vertex attributes specified using glVertexAttribIPointer,
and to GL_FALSE for vertex attributes specified using
glVertexAttribPointer, so that the vertex attributes can be
interpreted properly by driver back-ends.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/arrayobj.c
src/mesa/main/varray.c
src/mesa/vbo/vbo_split_copy.c

index 78f56ab..1283940 100644 (file)
@@ -208,6 +208,7 @@ init_array(struct gl_context *ctx,
    array->Ptr = NULL;
    array->Enabled = GL_FALSE;
    array->Normalized = GL_FALSE;
+   array->Integer = GL_FALSE;
    array->_ElementSize = size * _mesa_sizeof_type(type);
 #if FEATURE_ARB_vertex_buffer_object
    /* Vertex array buffers */
index 13b3405..f1a57c1 100644 (file)
@@ -212,6 +212,7 @@ update_array(struct gl_context *ctx,
    array->Stride = stride;
    array->StrideB = stride ? stride : elementSize;
    array->Normalized = normalized;
+   array->Integer = integer;
    array->Ptr = (const GLubyte *) ptr;
    array->_ElementSize = elementSize;
 
index 40906e3..4dcf71e 100644 (file)
@@ -518,6 +518,7 @@ replay_init( struct copy_context *copy )
       dst->Ptr = copy->dstbuf + offset;
       dst->Enabled = GL_TRUE;
       dst->Normalized = src->Normalized; 
+      dst->Integer = src->Integer;
       dst->BufferObj = ctx->Shared->NullBufferObj;
       dst->_ElementSize = src->_ElementSize;
       dst->_MaxElement = copy->dstbuf_size; /* may be less! */