From 514e0809a42027e2178bf0eccd526a08da60f399 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 11 Mar 2013 09:17:45 +0100 Subject: fontconfig libX11 mesa pixman xserver xkeyboard-config git update 11 Mar 2013 xserver commit 5047810a4c20fab444b8c6eb146c55dcdb0d4219 xkeyboard-config commit 2ed85c1e936f7cd4a9540ace5c12b9fec60ee1fb libX11 commit 3996543c1b2919e97d61a5d70fe1ebd7cd76fc83 pixman commit aaae3d8eefa069098e9014822817ca1429fdea46 fontconfig commit bdf1581e3de5528f397f19bfd4ca9caaf9e7fe4a mesa commit b21a9d46e4be0c666327569f07b9cddeb4d42d38 --- mesalib/configure.ac | 55 +++++++++++------------ mesalib/docs/viewperf.html | 29 ++++++++++++ mesalib/src/gallium/auxiliary/util/u_cpu_detect.c | 2 +- mesalib/src/mapi/glapi/gen/Makefile.am | 14 +++--- mesalib/src/mesa/main/get.c | 12 ++++- mesalib/src/mesa/main/glformats.c | 2 +- mesalib/src/mesa/main/samplerobj.c | 12 ++++- mesalib/src/mesa/main/samplerobj.h | 2 + mesalib/src/mesa/main/teximage.c | 2 +- mesalib/src/mesa/vbo/vbo_save_draw.c | 2 +- 10 files changed, 91 insertions(+), 41 deletions(-) (limited to 'mesalib') diff --git a/mesalib/configure.ac b/mesalib/configure.ac index ea56a044d..320486910 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -1062,26 +1062,24 @@ if test "x$enable_dri" = xyes; then DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` # Check for expat - if test "x$enable_dri" = xyes; then - EXPAT_INCLUDES="" - EXPAT_LIB=-lexpat - AC_ARG_WITH([expat], - [AS_HELP_STRING([--with-expat=DIR], - [expat install directory])],[ - EXPAT_INCLUDES="-I$withval/include" - CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" - LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR" - EXPAT_LIB="-L$withval/$LIB_DIR -lexpat" - ]) - AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])]) - save_LIBS="$LIBS" - AC_CHECK_LIB([expat],[XML_ParserCreate],[], - [AC_MSG_ERROR([Expat required for DRI.])]) - LIBS="$save_LIBS" - fi - - # if we are building any dri driver other than swrast or using the dri state tracker ... - if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast -a "x$enable_dri" = xyes; then + EXPAT_INCLUDES="" + EXPAT_LIB=-lexpat + AC_ARG_WITH([expat], + [AS_HELP_STRING([--with-expat=DIR], + [expat install directory])],[ + EXPAT_INCLUDES="-I$withval/include" + CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" + LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR" + EXPAT_LIB="-L$withval/$LIB_DIR -lexpat" + ]) + AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])]) + save_LIBS="$LIBS" + AC_CHECK_LIB([expat],[XML_ParserCreate],[], + [AC_MSG_ERROR([Expat required for DRI.])]) + LIBS="$save_LIBS" + + # If we are building any DRI driver other than swrast. + if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then # ... libdrm is required if test "x$have_libdrm" != xyes; then AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED]) @@ -1149,14 +1147,6 @@ case $DRI_DIRS in ;; esac -AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes) -AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes) -AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes) -AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes) -AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes) -AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes) -AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes) - dnl dnl OSMesa configuration dnl @@ -1755,6 +1745,7 @@ gallium_check_st() { fi if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2" + HAVE_COMMON_DRI=yes fi if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3" @@ -1996,6 +1987,14 @@ for driver in $GALLIUM_DRIVERS_DIRS; do esac done +AM_CONDITIONAL(HAVE_I915_DRI, test x$HAVE_I915_DRI = xyes) +AM_CONDITIONAL(HAVE_I965_DRI, test x$HAVE_I965_DRI = xyes) +AM_CONDITIONAL(HAVE_NOUVEAU_DRI, test x$HAVE_NOUVEAU_DRI = xyes) +AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes) +AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes) +AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes) +AM_CONDITIONAL(HAVE_COMMON_DRI, test x$HAVE_COMMON_DRI = xyes) + AM_CONDITIONAL(HAVE_GALAHAD_GALLIUM, test x$HAVE_GALAHAD_GALLIUM = xyes) AM_CONDITIONAL(HAVE_IDENTITY_GALLIUM, test x$HAVE_IDENTITY_GALLIUM = xyes) AM_CONDITIONAL(HAVE_NOOP_GALLIUM, test x$HAVE_NOOP_GALLIUM = xyes) diff --git a/mesalib/docs/viewperf.html b/mesalib/docs/viewperf.html index ab2fd67ef..3bbe1978a 100644 --- a/mesalib/docs/viewperf.html +++ b/mesalib/docs/viewperf.html @@ -203,6 +203,35 @@ This causes the object in question to be drawn in a strange orientation and with a semi-random color (between white and black) since GL_FOG is enabled.

+ +

Proe-05 test 1

+ +

+This uses depth testing but there's two problems: +

    +
  1. The glXChooseFBConfig() call doesn't request a depth buffer +
  2. The test never calls glClear(GL_DEPTH_BUFFER_BIT) to initialize the depth buffer +
+

+If the chosen visual does not have a depth buffer, you'll see the wireframe +car model but it won't be rendered correctly. +

+If (by luck) the chosen visual has a depth buffer, its initial contents +will be undefined so you may or may not see parts of the model. +

+Interestingly, with NVIDIA's driver most visuals happen to have a depth buffer +and apparently the contents are initialized to 1.0 by default so this test +just happens to work with their drivers. +

+ +

+Finally, even if a depth buffer was requested and the glClear(GL_COLOR_BUFFER_BIT) +calls were changed to glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) +the problem still wouldn't be fixed because GL_DEPTH_WRITEMASK=GL_FALSE when +glClear is called so clearing the depth buffer would be a no-op anyway. +

+ + diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c index d7f0be40e..03280515b 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c @@ -270,7 +270,7 @@ util_cpu_detect(void) util_cpu_caps.x86_cpu_type = 8 + ((regs2[0] >> 20) & 255); /* use extended family (P4, IA64) */ /* general feature flags */ - util_cpu_caps.has_tsc = (regs2[3] >> 8) & 1; /* 0x0000010 */ + util_cpu_caps.has_tsc = (regs2[3] >> 4) & 1; /* 0x0000010 */ util_cpu_caps.has_mmx = (regs2[3] >> 23) & 1; /* 0x0800000 */ util_cpu_caps.has_sse = (regs2[3] >> 25) & 1; /* 0x2000000 */ util_cpu_caps.has_sse2 = (regs2[3] >> 26) & 1; /* 0x4000000 */ diff --git a/mesalib/src/mapi/glapi/gen/Makefile.am b/mesalib/src/mapi/glapi/gen/Makefile.am index 4d51bbca6..36e47e21e 100644 --- a/mesalib/src/mapi/glapi/gen/Makefile.am +++ b/mesalib/src/mapi/glapi/gen/Makefile.am @@ -246,19 +246,19 @@ $(MESA_GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX) ###################################################################### $(XORG_GLX_DIR)/indirect_dispatch.c: glX_proto_recv.py $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -f $(srcdir)/gl_API.xml -m dispatch_c \ + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ $(XORG_GLX_DIR)/indirect_dispatch_swap.c: glX_proto_recv.py $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -f $(srcdir)/gl_API.xml -m dispatch_c -s \ + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m dispatch_c -s \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ $(XORG_GLX_DIR)/indirect_dispatch.h: glX_proto_recv.py gl_and_glX_API.xml $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -m dispatch_h -f $(srcdir)/gl_and_glX_API.xml -s \ + $(PYTHON_GEN) $< -m dispatch_h -f $(srcdir)/gl_and_glX_API.xml -s \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ $(XORG_GLX_DIR)/indirect_size_get.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -f $(srcdir)/gl_API.xml -m size_h \ + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m size_h \ --only-get -h '_INDIRECT_SIZE_GET_H_' \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ @@ -267,14 +267,14 @@ $(XORG_GLX_DIR)/indirect_size_get.c: glX_proto_size.py $(COMMON_GLX) | $(INDENT) $(INDENT_FLAGS) > $@ $(XORG_GLX_DIR)/indirect_reqsize.h: glX_proto_size.py $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -f $(srcdir)/gl_API.xml -m reqsize_h \ + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m reqsize_h \ --only-get -h '_INDIRECT_SIZE_GET_H_' \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ $(XORG_GLX_DIR)/indirect_reqsize.c: glX_proto_size.py $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -f $(srcdir)/gl_API.xml -m reqsize_c \ + $(PYTHON_GEN) $< -f $(srcdir)/gl_API.xml -m reqsize_c \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ $(XORG_GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX) - $(PYTHON_GEN) $(PYTHON_FLAGS) $< -f $(srcdir)/gl_and_glX_API.xml \ + $(PYTHON_GEN) $< -f $(srcdir)/gl_and_glX_API.xml \ | $(INDENT) $(XORG_INDENT_FLAGS) > $@ diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 2399f9c9d..582ef3198 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -34,6 +34,7 @@ #include "state.h" #include "texcompress.h" #include "framebuffer.h" +#include "samplerobj.h" /* This is a table driven implemetation of the glGet*v() functions. * The basic idea is that most getters just look up an int somewhere @@ -827,7 +828,16 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu { struct gl_sampler_object *samp = ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler; - v->value_int = samp ? samp->Name : 0; + + /* + * The sampler object may have been deleted on another context, + * so we try to lookup the sampler object before returning its Name. + */ + if (samp && _mesa_lookup_samplerobj(ctx, samp->Name)) { + v->value_int = samp->Name; + } else { + v->value_int = 0; + } } break; /* GL_ARB_uniform_buffer_object */ diff --git a/mesalib/src/mesa/main/glformats.c b/mesalib/src/mesa/main/glformats.c index 8728540cf..c1e16587a 100644 --- a/mesalib/src/mesa/main/glformats.c +++ b/mesalib/src/mesa/main/glformats.c @@ -917,7 +917,7 @@ _mesa_is_compressed_format(struct gl_context *ctx, GLenum format) case GL_COMPRESSED_SIGNED_RG11_EAC: case GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: case GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: - return _mesa_is_gles3(ctx); + return _mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility; case GL_PALETTE4_RGB8_OES: case GL_PALETTE4_RGBA8_OES: case GL_PALETTE4_R5_G6_B5_OES: diff --git a/mesalib/src/mesa/main/samplerobj.c b/mesalib/src/mesa/main/samplerobj.c index 319a444d7..5cff32936 100644 --- a/mesalib/src/mesa/main/samplerobj.c +++ b/mesalib/src/mesa/main/samplerobj.c @@ -40,7 +40,7 @@ #include "main/samplerobj.h" -static struct gl_sampler_object * +struct gl_sampler_object * _mesa_lookup_samplerobj(struct gl_context *ctx, GLuint name) { if (name == 0) @@ -206,9 +206,19 @@ _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers) for (i = 0; i < count; i++) { if (samplers[i]) { + GLuint j; struct gl_sampler_object *sampObj = _mesa_lookup_samplerobj(ctx, samplers[i]); + if (sampObj) { + /* If the sampler is currently bound, unbind it. */ + for (j = 0; j < ctx->Const.MaxCombinedTextureImageUnits; j++) { + if (ctx->Texture.Unit[j].Sampler == sampObj) { + FLUSH_VERTICES(ctx, _NEW_TEXTURE); + _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[j].Sampler, NULL); + } + } + /* The ID is immediately freed for re-use */ _mesa_HashRemove(ctx->Shared->SamplerObjects, samplers[i]); /* But the object exists until its reference count goes to zero */ diff --git a/mesalib/src/mesa/main/samplerobj.h b/mesalib/src/mesa/main/samplerobj.h index 311425701..69e389949 100644 --- a/mesalib/src/mesa/main/samplerobj.h +++ b/mesalib/src/mesa/main/samplerobj.h @@ -62,6 +62,8 @@ _mesa_reference_sampler_object(struct gl_context *ctx, _mesa_reference_sampler_object_(ctx, ptr, samp); } +extern struct gl_sampler_object * +_mesa_lookup_samplerobj(struct gl_context *ctx, GLuint name); extern struct gl_sampler_object * _mesa_new_sampler_object(struct gl_context *ctx, GLuint name); diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 9d4a17052..7d996da47 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -520,7 +520,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } - if (_mesa_is_gles3(ctx)) { + if (_mesa_is_gles3(ctx) || ctx->Extensions.ARB_ES3_compatibility) { switch (internalFormat) { case GL_COMPRESSED_RGB8_ETC2: case GL_COMPRESSED_SRGB8_ETC2: diff --git a/mesalib/src/mesa/vbo/vbo_save_draw.c b/mesalib/src/mesa/vbo/vbo_save_draw.c index efb386e5c..f5b5c411d 100644 --- a/mesalib/src/mesa/vbo/vbo_save_draw.c +++ b/mesalib/src/mesa/vbo/vbo_save_draw.c @@ -253,7 +253,7 @@ vbo_save_playback_vertex_list(struct gl_context *ctx, void *data) struct vbo_save_context *save = &vbo_context(ctx)->save; GLboolean remap_vertex_store = GL_FALSE; - if (save->vertex_store->buffer) { + if (save->vertex_store && save->vertex_store->buffer) { /* The vertex store is currently mapped but we're about to replay * a display list. This can happen when a nested display list is * being build with GL_COMPILE_AND_EXECUTE. -- cgit v1.2.3