From 982ac918afe6a1c02d5cf735d7b6c56443a048cc Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 7 Feb 2014 23:28:38 +0100 Subject: xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014 Update to openssl1.0.1f xserver commit 83e38eb73fd8c852513aac2da2975b4c01070ec2 libxcb commit d7eb0bdf3b5b11ee9f40ee5e73df8fc0bdfa59f3 xkeyboard-config commit 7596672b96315465df8d8d691e3a567a52f70743 libX11 commit aacf95dacc7c598e7297894580d4d655593813b2 xkbcomp commit 31b90ee4ffc774e0da540277907fc5540c0b012c libxtrans commit 3f0de269abe59353acbd7a5587d68ce0da91db67 fontconfig commit e310d2fac2d874d5aa76c609df70cc7b871c0b6d mesa commit dd2229d4c68ed78a50104637aef904f8ab6d7dd3 --- mesalib/src/mesa/main/bufferobj.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'mesalib/src/mesa/main/bufferobj.c') diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index 93367590a..ca55ef969 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -80,7 +80,7 @@ get_buffer_target(struct gl_context *ctx, GLenum target) case GL_ARRAY_BUFFER_ARB: return &ctx->Array.ArrayBufferObj; case GL_ELEMENT_ARRAY_BUFFER_ARB: - return &ctx->Array.ArrayObj->ElementArrayBufferObj; + return &ctx->Array.VAO->IndexBufferObj; case GL_PIXEL_PACK_BUFFER_EXT: return &ctx->Pack.BufferObj; case GL_PIXEL_UNPACK_BUFFER_EXT: @@ -295,18 +295,18 @@ buffer_object_subdata_range_good(struct gl_context * ctx, GLenum target, * \param format Format of the supplied data. * \param type Type of the supplied data. * \param caller Name of calling function for recording errors. - * \return If internalformat, format and type are legal the gl_format + * \return If internalformat, format and type are legal the mesa_format * corresponding to internalformat, otherwise MESA_FORMAT_NONE. * * \sa glClearBufferData and glClearBufferSubData */ -static gl_format +static mesa_format validate_clear_buffer_format(struct gl_context *ctx, GLenum internalformat, GLenum format, GLenum type, const char *caller) { - gl_format mesaFormat; + mesa_format mesaFormat; GLenum errorFormatType; mesaFormat = _mesa_validate_texbuffer_format(ctx, internalformat); @@ -360,7 +360,7 @@ validate_clear_buffer_format(struct gl_context *ctx, */ static bool convert_clear_buffer_data(struct gl_context *ctx, - gl_format internalformat, + mesa_format internalformat, GLubyte *clearValue, GLenum format, GLenum type, const GLvoid *data, const char *caller) { @@ -407,7 +407,7 @@ _mesa_delete_buffer_object(struct gl_context *ctx, { (void) ctx; - free(bufObj->Data); + _mesa_align_free(bufObj->Data); /* assign strange values here to help w/ debugging */ bufObj->RefCount = -1000; @@ -451,8 +451,8 @@ _mesa_reference_buffer_object_(struct gl_context *ctx, #if 0 /* unfortunately, these tests are invalid during context tear-down */ ASSERT(ctx->Array.ArrayBufferObj != bufObj); - ASSERT(ctx->Array.ArrayObj->ElementArrayBufferObj != bufObj); - ASSERT(ctx->Array.ArrayObj->Vertex.BufferObj != bufObj); + ASSERT(ctx->Array.VAO->IndexBufferObj != bufObj); + ASSERT(ctx->Array.VAO->Vertex.BufferObj != bufObj); #endif ASSERT(ctx->Driver.DeleteBuffer); @@ -560,9 +560,12 @@ _mesa_buffer_data( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, { void * new_data; - (void) ctx; (void) target; + (void) target; + + if (bufObj->Data) + _mesa_align_free( bufObj->Data ); - new_data = _mesa_realloc( bufObj->Data, bufObj->Size, size ); + new_data = _mesa_align_malloc( size, ctx->Const.MinMapBufferAlignment ); if (new_data) { bufObj->Data = (GLubyte *) new_data; bufObj->Size = size; @@ -1079,7 +1082,7 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) for (i = 0; i < n; i++) { struct gl_buffer_object *bufObj = _mesa_lookup_bufferobj(ctx, ids[i]); if (bufObj) { - struct gl_array_object *arrayObj = ctx->Array.ArrayObj; + struct gl_vertex_array_object *vao = ctx->Array.VAO; GLuint j; ASSERT(bufObj->Name == ids[i] || bufObj == &DummyBufferObject); @@ -1092,14 +1095,14 @@ _mesa_DeleteBuffers(GLsizei n, const GLuint *ids) } /* unbind any vertex pointers bound to this buffer */ - for (j = 0; j < Elements(arrayObj->VertexBinding); j++) { - unbind(ctx, &arrayObj->VertexBinding[j].BufferObj, bufObj); + for (j = 0; j < Elements(vao->VertexBinding); j++) { + unbind(ctx, &vao->VertexBinding[j].BufferObj, bufObj); } if (ctx->Array.ArrayBufferObj == bufObj) { _mesa_BindBuffer( GL_ARRAY_BUFFER_ARB, 0 ); } - if (arrayObj->ElementArrayBufferObj == bufObj) { + if (vao->IndexBufferObj == bufObj) { _mesa_BindBuffer( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 ); } @@ -1365,7 +1368,7 @@ _mesa_ClearBufferData(GLenum target, GLenum internalformat, GLenum format, { GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object* bufObj; - gl_format mesaFormat; + mesa_format mesaFormat; GLubyte clearValue[MAX_PIXEL_BYTES]; GLsizeiptr clearValueSize; @@ -1420,7 +1423,7 @@ _mesa_ClearBufferSubData(GLenum target, GLenum internalformat, { GET_CURRENT_CONTEXT(ctx); struct gl_buffer_object* bufObj; - gl_format mesaFormat; + mesa_format mesaFormat; GLubyte clearValue[MAX_PIXEL_BYTES]; GLsizeiptr clearValueSize; -- cgit v1.2.3