diff options
author | marha <marha@users.sourceforge.net> | 2013-11-13 08:07:38 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-13 08:07:38 +0100 |
commit | 8fbb807d1029b012d2f45cb0f3ea0c6a6ebded6d (patch) | |
tree | 064121d82e7edce83e6d4809d6e4a92b1a3e84d6 /mesalib | |
parent | 4bdf8409331f44417c3622bc5ec0e42c0e68afb6 (diff) | |
download | vcxsrv-8fbb807d1029b012d2f45cb0f3ea0c6a6ebded6d.tar.gz vcxsrv-8fbb807d1029b012d2f45cb0f3ea0c6a6ebded6d.tar.bz2 vcxsrv-8fbb807d1029b012d2f45cb0f3ea0c6a6ebded6d.zip |
mesa xserver pixman git update 9 nov 2013
xserver commit 4a251f5883b042cd902c192060a0be2b11148f2b
pixman commit 8487dfbcd056eff066939dc253fcf361b391592a
mesa commit e0489531455623aa21aa565b2c890362d8437f23
Diffstat (limited to 'mesalib')
-rw-r--r-- | mesalib/include/GL/internal/dri_interface.h | 12 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 5 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/dri/common/dri_util.c | 1 | ||||
-rw-r--r-- | mesalib/src/mesa/main/arrayobj.c | 29 | ||||
-rw-r--r-- | mesalib/src/mesa/main/mtypes.h | 6 | ||||
-rw-r--r-- | mesalib/src/mesa/main/varray.c | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/main/varray.h | 15 |
7 files changed, 42 insertions, 36 deletions
diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h index ed4325764..b012570ae 100644 --- a/mesalib/include/GL/internal/dri_interface.h +++ b/mesalib/include/GL/internal/dri_interface.h @@ -783,12 +783,6 @@ typedef __DRIdrawable * void *loaderPrivate); typedef __DRIcontext * -(*__DRIcreateNewContextFunc)(__DRIscreen *screen, - const __DRIconfig *config, - __DRIcontext *shared, - void *loaderPrivate); - -typedef __DRIcontext * (*__DRIcreateContextAttribsFunc)(__DRIscreen *screen, int api, const __DRIconfig *config, @@ -949,7 +943,10 @@ struct __DRIdri2ExtensionRec { void *loaderPrivate); __DRIcreateNewDrawableFunc createNewDrawable; - __DRIcreateNewContextFunc createNewContext; + __DRIcontext *(*createNewContext)(__DRIscreen *screen, + const __DRIconfig *config, + __DRIcontext *shared, + void *loaderPrivate); /* Since version 2 */ __DRIgetAPIMaskFunc getAPIMask; @@ -1405,7 +1402,6 @@ struct __DRIimageDriverExtensionRec { /* Common DRI functions, shared with DRI2 */ __DRIcreateNewScreen2Func createNewScreen2; __DRIcreateNewDrawableFunc createNewDrawable; - __DRIcreateNewContextFunc createNewContext; __DRIcreateContextAttribsFunc createContextAttribs; __DRIgetAPIMaskFunc getAPIMask; }; diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index aa50dde73..99b02baad 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -1515,6 +1515,9 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx, sizeof(struct vertex), OFFSET(x)); _mesa_VertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(struct vertex), OFFSET(s)); + + _mesa_EnableVertexAttribArray(0); + _mesa_EnableVertexAttribArray(1); } /* Generate a relevant fragment shader program for the texture target */ @@ -1591,8 +1594,6 @@ setup_glsl_blit_framebuffer(struct gl_context *ctx, _mesa_DeleteObjectARB(vs); _mesa_BindAttribLocation(ShaderProg, 0, "position"); _mesa_BindAttribLocation(ShaderProg, 1, "texcoords"); - _mesa_EnableVertexAttribArray(0); - _mesa_EnableVertexAttribArray(1); link_program_with_debug(ctx, ShaderProg); ralloc_free(mem_ctx); if (texture_2d) diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c index 86cf24cb8..44e47f94f 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c @@ -868,7 +868,6 @@ const __DRIimageDriverExtension driImageDriverExtension = { .createNewScreen2 = driCreateNewScreen2, .createNewDrawable = driCreateNewDrawable, - .createNewContext = driCreateNewContext, .getAPIMask = driGetAPIMask, .createContextAttribs = driCreateContextAttribs, }; diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c index dbf8fdc73..fdcf172ea 100644 --- a/mesalib/src/mesa/main/arrayobj.c +++ b/mesalib/src/mesa/main/arrayobj.c @@ -53,7 +53,7 @@ /** * Look up the array object for the given ID. - * + * * \returns * Either a pointer to the array object with the specified ID or \c NULL for * a non-existent ID. The spec defines ID 0 as being technically @@ -91,7 +91,7 @@ unbind_array_object_vbos(struct gl_context *ctx, struct gl_array_object *obj) /** * Allocate and initialize a new vertex array object. - * + * * This function is intended to be called via * \c dd_function_table::NewArrayObject. */ @@ -107,7 +107,7 @@ _mesa_new_array_object( struct gl_context *ctx, GLuint name ) /** * Delete an array object. - * + * * This function is intended to be called via * \c dd_function_table::DeleteArrayObject. */ @@ -298,18 +298,18 @@ static GLuint compute_max_element(struct gl_array_object *arrayObj, GLbitfield64 enabled) { GLuint min = ~((GLuint)0); - + while (enabled) { struct gl_client_array *client_array; GLint attrib = ffsll(enabled) - 1; enabled ^= BITFIELD64_BIT(attrib); - + client_array = &arrayObj->_VertexAttrib[attrib]; assert(client_array->Enabled); _mesa_update_array_max_element(client_array); min = MIN2(min, client_array->_MaxElement); } - + return min; } @@ -340,7 +340,8 @@ _mesa_update_array_object_max_element(struct gl_context *ctx, * or a gl_vertex_buffer_binding has changed. */ void -_mesa_update_array_object_client_arrays(struct gl_context *ctx, struct gl_array_object *arrayObj) +_mesa_update_array_object_client_arrays(struct gl_context *ctx, + struct gl_array_object *arrayObj) { GLbitfield64 arrays = arrayObj->NewArrays; @@ -356,7 +357,8 @@ _mesa_update_array_object_client_arrays(struct gl_context *ctx, struct gl_array_ buffer_binding = &arrayObj->VertexBinding[attrib_array->VertexBinding]; client_array = &arrayObj->_VertexAttrib[attrib]; - _mesa_update_client_array(ctx, client_array, attrib_array, buffer_binding); + _mesa_update_client_array(ctx, client_array, attrib_array, + buffer_binding); } } @@ -396,7 +398,8 @@ bind_vertex_array(struct gl_context *ctx, GLuint id, GLboolean genRequired) newObj = _mesa_lookup_arrayobj(ctx, id); if (!newObj) { if (genRequired) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindVertexArray(non-gen name)"); + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindVertexArray(non-gen name)"); return; } @@ -463,7 +466,7 @@ _mesa_BindVertexArrayAPPLE( GLuint id ) /** * Delete a set of array objects. - * + * * \param n Number of array objects to delete. * \param ids Array of \c n array object IDs. */ @@ -511,7 +514,7 @@ _mesa_DeleteVertexArrays(GLsizei n, const GLuint *ids) * \param arrays Array of \c n locations to store the IDs. * \param vboOnly Will arrays have to reside in VBOs? */ -static void +static void gen_vertex_arrays(struct gl_context *ctx, GLsizei n, GLuint *arrays) { GLuint first; @@ -570,9 +573,9 @@ _mesa_GenVertexArraysAPPLE(GLsizei n, GLuint *arrays) /** * Determine if ID is the name of an array object. - * + * * \param id ID of the potential array object. - * \return \c GL_TRUE if \c id is the name of a array object, + * \return \c GL_TRUE if \c id is the name of a array object, * \c GL_FALSE otherwise. */ GLboolean GLAPIENTRY diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index ae96e2326..41ffdb765 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -1502,6 +1502,12 @@ struct gl_vertex_attrib_array GLuint VertexBinding; /**< Vertex buffer binding */ }; + +/** + * This describes the buffer object used for a vertex array (or + * multiple vertex arrays). If BufferObj points to the default/null + * buffer object, then the vertex array lives in user memory and not a VBO. + */ struct gl_vertex_buffer_binding { GLintptr Offset; /**< User-specified offset */ diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c index d17d698d3..0f38270d5 100644 --- a/mesalib/src/mesa/main/varray.c +++ b/mesalib/src/mesa/main/varray.c @@ -390,11 +390,6 @@ update_array(struct gl_context *ctx, return; } - if (!update_array_format(ctx, func, attrib, legalTypesMask, sizeMin, sizeMax, - size, type, normalized, integer, 0)) { - return; - } - if (stride < 0) { _mesa_error( ctx, GL_INVALID_VALUE, "%s(stride=%d)", func, stride ); return; @@ -418,6 +413,11 @@ update_array(struct gl_context *ctx, return; } + if (!update_array_format(ctx, func, attrib, legalTypesMask, sizeMin, + sizeMax, size, type, normalized, integer, 0)) { + return; + } + /* Reset the vertex attrib binding */ vertex_attrib_binding(ctx, attrib, attrib); diff --git a/mesalib/src/mesa/main/varray.h b/mesalib/src/mesa/main/varray.h index 8a9487c6e..3b9f39a61 100644 --- a/mesalib/src/mesa/main/varray.h +++ b/mesalib/src/mesa/main/varray.h @@ -73,12 +73,13 @@ _mesa_update_array_max_element(struct gl_client_array *array) * a vertex buffer. */ static inline const GLubyte * -_mesa_vertex_attrib_address(struct gl_vertex_attrib_array *array, - struct gl_vertex_buffer_binding *binding) +_mesa_vertex_attrib_address(const struct gl_vertex_attrib_array *array, + const struct gl_vertex_buffer_binding *binding) { - return (binding->BufferObj->Name == 0 ? - array->Ptr : - (const GLubyte *)(binding->Offset + array->RelativeOffset)); + if (_mesa_is_bufferobj(binding->BufferObj)) + return (const GLubyte *) (binding->Offset + array->RelativeOffset); + else + return array->Ptr; } /** @@ -88,8 +89,8 @@ _mesa_vertex_attrib_address(struct gl_vertex_attrib_array *array, static inline void _mesa_update_client_array(struct gl_context *ctx, struct gl_client_array *dst, - struct gl_vertex_attrib_array *src, - struct gl_vertex_buffer_binding *binding) + const struct gl_vertex_attrib_array *src, + const struct gl_vertex_buffer_binding *binding) { dst->Size = src->Size; dst->Type = src->Type; |