From 9480392b8817f8bfa79cbc694ff039a73fc0a57f Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 12 Oct 2014 13:48:53 +0200 Subject: plink fontconfig libxcb xserver mesa pixman git update 12 Oct 2014 plink 10285 xserver commit 61a292adf45405641de1c522a04c148e0a152acd libxcb commit 382d306d6c44a9ece5551c210a932773b5cb94a5 libxcb/xcb-proto commit dc0c544fe044ddeb4917bba0c2fed66c70e6db43 xkeyboard-config commit 73aa90ce32967747c84a1b5fe32cee329bc3bbcf libX11 commit 6101b967b641355dd863fd1ce52c6a7d58bcbe68 libXdmcp commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f libXext commit efdcbb7634501e1117d422636a0a75d7ea84b16b libfontenc commit 0037a42107b952c9d903719615747e760e4e7247 libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909 libXau commit 1e4635be11154dd8262f37b379511bd627defa2a xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 pixman commit a8669137b9b95b5a6f78c880a51c016a1dd439b4 xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 glproto commit bd3d751e1eb17efb39f65093271bb4ac071aa9e0 mkfontscale commit 47908fd7a0d061fdcd21e3498da4e223ca9136d9 xwininfo commit 017b3736489985999d8dcf4d9e473e1fd6dd3647 libXft commit 214f9b5306d833e2787c75fe41dfdc9228fcb738 libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63 libxtrans commit 7cbad9fe2e61cd9d5caeaf361826a6f4bd320f03 fontconfig commit e7121de237a1873c3241a5b8451e7d00a3d41524 mesa commit 2286edce16e4f78500ccda77da99c30185d9c58f --- mesalib/src/mesa/main/api_validate.c | 5 ++--- mesalib/src/mesa/main/context.c | 38 ++++++++++++++++++++++++++++++++++-- mesalib/src/mesa/main/texgetimage.c | 9 +++++++-- mesalib/src/mesa/main/teximage.c | 2 +- mesalib/src/mesa/main/varray.c | 6 +++--- 5 files changed, 49 insertions(+), 11 deletions(-) (limited to 'mesalib/src/mesa/main') diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index 51a3d1f01..9b80600de 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -112,9 +112,8 @@ check_valid_to_render(struct gl_context *ctx, const char *function) switch (ctx->API) { case API_OPENGLES2: - /* For ES2, we can draw if any vertex array is enabled (and we - * should always have a vertex program/shader). */ - if (ctx->Array.VAO->_Enabled == 0x0 || !ctx->VertexProgram._Current) + /* For ES2, we can draw if we have a vertex program/shader). */ + if (!ctx->VertexProgram._Current) return GL_FALSE; break; diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index 0edd66d6f..5a8f7184a 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -891,10 +891,24 @@ _mesa_generic_nop(void) /** - * Allocate and initialize a new dispatch table. + * Special no-op glFlush, see below. + */ +#if defined(_WIN32) +static void GLAPIENTRY +nop_glFlush(void) +{ + /* don't record an error like we do in _mesa_generic_nop() */ +} +#endif + + +/** + * Allocate and initialize a new dispatch table. All the dispatch + * function pointers will point at the _mesa_generic_nop() function + * which raises GL_INVALID_OPERATION. */ struct _glapi_table * -_mesa_alloc_dispatch_table() +_mesa_alloc_dispatch_table(void) { /* Find the larger of Mesa's dispatch table and libGL's dispatch table. * In practice, this'll be the same for stand-alone Mesa. But for DRI @@ -911,6 +925,26 @@ _mesa_alloc_dispatch_table() for (i = 0; i < numEntries; i++) { entry[i] = (_glapi_proc) _mesa_generic_nop; } + +#if defined(_WIN32) + /* This is a special case for Windows in the event that + * wglGetProcAddress is called between glBegin/End(). + * + * The MS opengl32.dll library apparently calls glFlush from + * wglGetProcAddress(). If we're inside glBegin/End(), glFlush + * will dispatch to _mesa_generic_nop() and we'll generate a + * GL_INVALID_OPERATION error. + * + * The specific case which hits this is piglit's primitive-restart + * test which calls glPrimitiveRestartNV() inside glBegin/End. The + * first time we call glPrimitiveRestartNV() Piglit's API dispatch + * code will try to resolve the function by calling wglGetProcAddress. + * This raises GL_INVALID_OPERATION and an assert(glGetError()==0) + * will fail causing the test to fail. By suppressing the error, the + * assertion passes and the test continues. + */ + SET_Flush(table, nop_glFlush); +#endif } return table; } diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c index 2c54e4a35..cb5f7936c 100644 --- a/mesalib/src/mesa/main/texgetimage.c +++ b/mesalib/src/mesa/main/texgetimage.c @@ -78,8 +78,8 @@ get_tex_depth(struct gl_context *ctx, GLuint dimensions, struct gl_texture_image *texImage) { const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; + GLint height = texImage->Height; + GLint depth = texImage->Depth; GLint img, row; GLfloat *depthRow = malloc(width * sizeof(GLfloat)); @@ -88,6 +88,11 @@ get_tex_depth(struct gl_context *ctx, GLuint dimensions, return; } + if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) { + depth = height; + height = 1; + } + for (img = 0; img < depth; img++) { GLubyte *srcMap; GLint srcRowStride; diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 647d28ab3..c0298af8e 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -2449,7 +2449,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions, /* level check */ if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(level=%d)", + _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%uD(level=%d)", dimensions, level); return GL_TRUE; } diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c index 09bf52c42..96c2b26f7 100644 --- a/mesalib/src/mesa/main/varray.c +++ b/mesalib/src/mesa/main/varray.c @@ -1907,10 +1907,10 @@ static void print_array(const char *name, GLint index, const struct gl_client_array *array) { if (index >= 0) - printf(" %s[%d]: ", name, index); + fprintf(stderr, " %s[%d]: ", name, index); else - printf(" %s: ", name); - printf("Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %lu)\n", + fprintf(stderr, " %s: ", name); + fprintf(stderr, "Ptr=%p, Type=0x%x, Size=%d, ElemSize=%u, Stride=%d, Buffer=%u(Size %lu)\n", array->Ptr, array->Type, array->Size, array->_ElementSize, array->StrideB, array->BufferObj->Name, (unsigned long) array->BufferObj->Size); -- cgit v1.2.3