[Mesa-dev] [PATCH 1/2] mesa: Set the "Integer" field of gl_client_array properly.
Eric Anholt
eric at anholt.net
Tue Nov 1 09:45:41 PDT 2011
On Mon, 31 Oct 2011 17:44:45 -0700, Paul Berry <stereotype441 at gmail.com> wrote:
> 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.
> ---
> src/mesa/main/arrayobj.c | 1 +
> src/mesa/main/varray.c | 1 +
> src/mesa/vbo/vbo_split_copy.c | 1 +
> 3 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
> index 78f56ab..1283940 100644
> --- a/src/mesa/main/arrayobj.c
> +++ b/src/mesa/main/arrayobj.c
> @@ -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 */
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index 13b3405..f1a57c1 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -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;
>
> diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
> index 40906e3..4dcf71e 100644
> --- a/src/mesa/vbo/vbo_split_copy.c
> +++ b/src/mesa/vbo/vbo_split_copy.c
> @@ -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! */
Reviewed-by: Eric Anholt <eric at anholt.net> (and next patch)
I thought this one had missed a couple of array init functions (found by
git grep _ElementSize), but in every case the array in question had been
memset to 0 previously.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111101/df4f2237/attachment-0001.pgp>
More information about the mesa-dev
mailing list