Android.common.mk | 2 SConstruct | 2 bin/get-pick-list.sh | 2 configure.ac | 38 ++- docs/index.html | 6 docs/relnotes.html | 1 docs/relnotes/9.1.5.html | 4 docs/relnotes/9.1.6.html | 168 ++++++++++++++++ src/gallium/auxiliary/Makefile.am | 4 src/gallium/drivers/nv30/nv30_screen.c | 1 src/gallium/drivers/radeonsi/radeonsi_shader.c | 23 ++ src/gallium/drivers/radeonsi/si_state_draw.c | 3 src/gallium/state_trackers/Makefile.am | 2 src/gallium/state_trackers/clover/core/resource.cpp | 2 src/gallium/state_trackers/osmesa/osmesa.c | 5 src/gallium/targets/Makefile.am | 2 src/gallium/targets/osmesa/Makefile.am | 23 -- src/gallium/targets/osmesa/osmesa.pc.in | 12 + src/glsl/ast.h | 10 src/glsl/ast_to_hir.cpp | 124 ++++++++--- src/glsl/ast_type.cpp | 3 src/glsl/glsl_parser.yy | 1 src/glsl/glsl_parser_extras.cpp | 1 src/mapi/glapi/gen/Makefile.am | 8 src/mesa/drivers/dri/i965/brw_fs.cpp | 14 + src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 3 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 10 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 src/mesa/drivers/dri/i965/intel_context.c | 10 src/mesa/drivers/osmesa/Makefile.am | 1 src/mesa/main/context.c | 2 src/mesa/main/errors.c | 15 - src/mesa/main/queryobj.c | 1 src/mesa/main/texcompress.c | 22 -- 35 files changed, 417 insertions(+), 116 deletions(-)
New commits: commit 6fb2032c351e101da2e4a80dcee7b2565d396671 Author: Matt Turner <matts...@gmail.com> Date: Mon Aug 26 14:14:03 2013 -0700 glsl: Disallow uniform block layout qualifiers on non-uniform block vars. Cc: 9.2 <mesa-sta...@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68460 Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d474683..6164f76 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1847,9 +1847,18 @@ is_varying_var(ir_variable *var, _mesa_glsl_parser_targets target) static void validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state, YYLTYPE *loc, - const glsl_type *type) + const glsl_type *type, + ir_variable *var) { - if (!type->is_matrix()) { + if (var && !var->is_in_uniform_block()) { + /* Layout qualifiers may only apply to interface blocks and fields in + * them. + */ + _mesa_glsl_error(loc, state, + "uniform block layout qualifiers row_major and " + "column_major may not be applied to variables " + "outside of uniform blocks"); + } else if (!type->is_matrix()) { /* The OpenGL ES 3.0 conformance tests did not originally allow * matrix layout qualifiers on non-matrices. However, the OpenGL * 4.4 and OpenGL ES 3.0 (revision TBD) specifications were @@ -2287,7 +2296,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, } if (qual->flags.q.row_major || qual->flags.q.column_major) { - validate_matrix_layout_for_type(state, loc, var->type); + validate_matrix_layout_for_type(state, loc, var->type, var); } } @@ -4350,7 +4359,7 @@ ast_process_structure_or_interface_block(exec_list *instructions, "row_major and column_major can only be " "applied to uniform interface blocks"); } else - validate_matrix_layout_for_type(state, &loc, field_type); + validate_matrix_layout_for_type(state, &loc, field_type, NULL); } if (qual->flags.q.uniform && qual->has_interpolation()) { commit c0abf6499f416ff65005cbe5393c4601de5b6633 Author: Kristian Lehmann <em...@zero-io.net> Date: Mon Aug 26 21:19:50 2013 +0200 Fixed and/or order mistake, resulting in compiling llvmpipe without llvm installed Cc: 9.2 <mesa-sta...@lists.freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68544 Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit cec7b5c5bc300d4a415939bc6a913d441c687e47) diff --git a/configure.ac b/configure.ac index d42afba..11a711f 100644 --- a/configure.ac +++ b/configure.ac @@ -1925,8 +1925,8 @@ AM_CONDITIONAL(NEED_GALLIUM_SOFTPIPE_DRIVER, test "x$HAVE_GALLIUM_SVGA" = xyes - "x$HAVE_GALLIUM_I915" = xyes -o \ "x$HAVE_GALLIUM_SOFTPIPE" = xyes) AM_CONDITIONAL(NEED_GALLIUM_LLVMPIPE_DRIVER, test "x$HAVE_GALLIUM_I915" = xyes -o \ - "x$HAVE_GALLIUM_SOFTPIPE" = xyes -a \ - "x$MESA_LLVM" = x1) + "x$HAVE_GALLIUM_SOFTPIPE" = xyes \ + && test "x$MESA_LLVM" = x1) if test "x$enable_gallium_loader" = xyes; then GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/null" commit 1a9bda1f3467fb01c598ed2216064801f5a2cf0f Author: Tom Stellard <thomas.stell...@amd.com> Date: Mon Aug 26 17:52:47 2013 -0700 clover: Don't use PIPE_TRANSFER_UNSYNCHRONIZED for blocking copies CC: "9.2" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Francisco Jerez <curroje...@riseup.net> (cherry picked from commit f3e86d4a68c27f0e86d64a98469a48756c445498) diff --git a/src/gallium/state_trackers/clover/core/resource.cpp b/src/gallium/state_trackers/clover/core/resource.cpp index 6d348e6..3b003e9 100644 --- a/src/gallium/state_trackers/clover/core/resource.cpp +++ b/src/gallium/state_trackers/clover/core/resource.cpp @@ -174,7 +174,7 @@ mapping::mapping(command_queue &q, resource &r, pctx(q.pipe) { unsigned usage = ((flags & CL_MAP_WRITE ? PIPE_TRANSFER_WRITE : 0 ) | (flags & CL_MAP_READ ? PIPE_TRANSFER_READ : 0 ) | - (blocking ? PIPE_TRANSFER_UNSYNCHRONIZED : 0)); + (!blocking ? PIPE_TRANSFER_UNSYNCHRONIZED : 0)); p = pctx->transfer_map(pctx, r.pipe, 0, usage, box(origin + r.offset, region), &pxfer); commit 59781051eb714c3b74616bcba6376cbbea0f8470 Author: Michel Dänzer <michel.daen...@amd.com> Date: Fri Aug 23 14:55:45 2013 +0200 radeonsi: Also set the depth component mask bit for stencil-only exports The stencil values come out wrong without this for some reason. 50 more little piglits. Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit 46fd81e586f0c1a76ab66b9a7558783c481f111e) diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 3d64324..6c89963 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -804,7 +804,10 @@ handle_semantic: args[7] = args[8] = args[6] = LLVMBuildLoad(base->gallivm->builder, out_ptr, ""); - mask |= 0x2; + /* Only setting the stencil component bit (0x2) here + * breaks some stencil piglit tests + */ + mask |= 0x3; if (depth_index < 0) args[5] = args[6]; commit f31a1d9f8d4e0b36f62beb4dcb2ff1207e8cf476 Author: Kenneth Graunke <kenn...@whitecape.org> Date: Fri Aug 23 10:35:34 2013 -0700 mesa: Set query->EverBound in glQueryCounter(). glIsQuery is supposed to return false for names returned by glGenQueries until their first use. BeginQuery is a use, but QueryCounter is also a use. From the ARB_timer_query spec: "A timer query object is created with the command void QueryCounter(uint id, enum target); [...] If <id> is an unused query object name, the name is marked as used [...]" Fixes Piglit's spec/ARB_timer_query/query-lifetime. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> Reviewed-by: Chad Versace <chad.vers...@linux.intel.com> Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit 7950315583244f03a58ac00d7b0516860475914c) diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index b74898c..60356b8 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -485,6 +485,7 @@ _mesa_QueryCounter(GLuint id, GLenum target) q->Target = target; q->Result = 0; q->Ready = GL_FALSE; + q->EverBound = GL_TRUE; if (ctx->Driver.QueryCounter) { ctx->Driver.QueryCounter(ctx, q); commit 3370dfdf3ebd14b0864be680971d006d8df047af Author: Ilia Mirkin <imir...@alum.mit.edu> Date: Mon Aug 19 06:49:45 2013 -0400 nv30: add forgotten PIPE_CAP_CUBE_MAP_ARRAY cap to list Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> Cc: "9.2" <mesa-sta...@lists.freedesktop.org> (cherry picked from commit bac6efe8e33115263fc7f1637671b303ea0b4243) diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c index 3d55d6f..34b0e62 100644 --- a/src/gallium/drivers/nv30/nv30_screen.c +++ b/src/gallium/drivers/nv30/nv30_screen.c @@ -113,6 +113,7 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_TEXTURE_BARRIER: case PIPE_CAP_SEAMLESS_CUBE_MAP: case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: + case PIPE_CAP_CUBE_MAP_ARRAY: case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: case PIPE_CAP_MIXED_COLORBUFFER_FORMATS: commit 21535579068db035b3aa9c58b3142888892969b3 Author: Jon Severinsson <j...@severinsson.net> Date: Fri Aug 23 11:19:01 2013 +0200 gallium/osmesa: Link, not copy, the shared library to the LIB_DIR. Just like all other mesa libraries... CC: "9.2" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit b47bde00790c4d4cef107c8cd33ed17a08415caf) diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am index 25fee6f..8e6aff6 100644 --- a/src/gallium/targets/osmesa/Makefile.am +++ b/src/gallium/targets/osmesa/Makefile.am @@ -75,7 +75,7 @@ all-local: lib@OSMESA_LIB@.la $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium; ln -f .libs/lib@OSMESA_LIB@.so $(top_builddir)/$(LIB_DIR)/gallium/lib@OSMESA_LIB@.so; ln -f .libs/lib@OSMESA_LIB@.so.@OSMESA_VERSION@ $(top_builddir)/$(LIB_DIR)/gallium/lib@OSMESA_LIB@.so.@OSMESA_VERSION@; - cp .libs/lib@OSMESA_LIB@.so.@OSMESA_VERSION@.0.0 $(top_builddir)/$(LIB_DIR)/gallium/ + ln -f .libs/lib@OSMESA_LIB@.so.@OSMESA_VERSION@.0.0 $(top_builddir)/$(LIB_DIR)/gallium/ endif pkgconfigdir = $(libdir)/pkgconfig commit dda7358377947234800fd3324ff2172f81109337 Author: Jon Severinsson <j...@severinsson.net> Date: Fri Aug 23 11:19:00 2013 +0200 gallium/osmesa: Always link with the c++ linker. Just like all other gallium targets... CC: "9.2" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit aeb9c9e4b01af8a70432a961931abde5adf06c42) diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am index de78d8c..25fee6f 100644 --- a/src/gallium/targets/osmesa/Makefile.am +++ b/src/gallium/targets/osmesa/Makefile.am @@ -57,19 +57,12 @@ lib@OSMESA_LIB@_la_LIBADD = \ $(CLOCK_LIB) +nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy.cpp if HAVE_MESA_LLVM -lib@OSMESA_LIB@_la_LINK = $(CXXLINK) $(lib@OSMESA_LIB@_la_LDFLAGS) -# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable -nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy-cpp.cpp - -lib@OSMESA_LIB@_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS) AM_CPPFLAGS += -DGALLIUM_LLVMPIPE lib@OSMESA_LIB@_la_LDFLAGS += $(LLVM_LDFLAGS) -else -lib@OSMESA_LIB@_la_LINK = $(CXXLINK) $(lib@OSMESA_LIB@_la_LDFLAGS) -# Mention a dummy pure C file to trigger generation of the $(LINK) variable -nodist_EXTRA_lib@OSMESA_LIB@_la_SOURCES = dummy-c.c +lib@OSMESA_LIB@_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS) endif commit 3fd1ca7949410ef32995043ff46e1259bd11ca6d Author: Jon Severinsson <j...@severinsson.net> Date: Fri Aug 23 11:18:59 2013 +0200 gallium/osmesa: Make and install an osmesa.pc. As of "2f142d59 build: Add --enable-gallium-osmesa flag." the pkgconfig file from classic osmesa is no longer installed when building gallium osmesa, so copy it to gallium osmesa and install the copy instead. CC: "9.2" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit c8111904304a878a3d5831b453255f04e1ddcf56) diff --git a/configure.ac b/configure.ac index 08aeb91..d42afba 100644 --- a/configure.ac +++ b/configure.ac @@ -2066,6 +2066,7 @@ AC_CONFIG_FILES([Makefile src/gallium/targets/gbm/Makefile src/gallium/targets/opencl/Makefile src/gallium/targets/osmesa/Makefile + src/gallium/targets/osmesa/osmesa.pc src/gallium/targets/pipe-loader/Makefile src/gallium/targets/libgl-xlib/Makefile src/gallium/targets/vdpau-nouveau/Makefile diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am index 38dbeb8..de78d8c 100644 --- a/src/gallium/targets/osmesa/Makefile.am +++ b/src/gallium/targets/osmesa/Makefile.am @@ -85,6 +85,5 @@ all-local: lib@OSMESA_LIB@.la cp .libs/lib@OSMESA_LIB@.so.@OSMESA_VERSION@.0.0 $(top_builddir)/$(LIB_DIR)/gallium/ endif -# XXX fix-up? -#pkgconfigdir = $(libdir)/pkgconfig -#pkgconfig_DATA = osmesa.pc +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = osmesa.pc diff --git a/src/gallium/targets/osmesa/osmesa.pc.in b/src/gallium/targets/osmesa/osmesa.pc.in new file mode 100644 index 0000000..cd77fd7 --- /dev/null +++ b/src/gallium/targets/osmesa/osmesa.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=${prefix} +libdir=@libdir@ +includedir=@includedir@ + +Name: osmesa +Description: Mesa Off-screen Rendering library +Requires: @OSMESA_PC_REQ@ +Version: @OSMESA_VERSION@ +Libs: -L${libdir} -l@OSMESA_LIB@ +Libs.private: @OSMESA_PC_LIB_PRIV@ +Cflags: -I${includedir} commit 4aa9f013d5141c47ee5e91c226605964244fba90 Author: Timothy Arceri <t_arc...@yahoo.com.au> Date: Wed Aug 21 00:18:00 2013 -0600 mesa: Fix assertion error with glDebugMessageControl enums were being converted twice resulting in incorrect values. The extra conversion has been removed and the redundant assert is removed also. Cc: 9.2 <mesa-sta...@lists.freedesktop.org> Signed-off-by: Timothy Arceri <t_arc...@yahoo.com.au> Reviewed-by: Brian Paul <bri...@vmware.com> (cherry picked from commit f0072e3c6b0bd46d8ebf7ac0a2cf1bf63dc370e8) diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 5a0758d..cc93d3b 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -609,11 +609,6 @@ control_app_messages(struct gl_context *ctx, GLenum esource, GLenum etype, enum mesa_debug_type type = gl_enum_to_debug_type(etype); enum mesa_debug_severity severity = gl_enum_to_debug_severity(eseverity); - if (count) - assert(severity == MESA_DEBUG_SEVERITY_COUNT - && type != MESA_DEBUG_TYPE_COUNT - && source != MESA_DEBUG_SOURCE_COUNT); - for (i = 0; i < count; i++) set_message_state(ctx, source, type, ids[i], enabled); @@ -629,9 +624,6 @@ _mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type, GLsizei count, const GLuint *ids, GLboolean enabled) { - enum mesa_debug_source source; - enum mesa_debug_type type; - enum mesa_debug_severity severity; GET_CURRENT_CONTEXT(ctx); if (count < 0) { @@ -651,11 +643,8 @@ _mesa_DebugMessageControlARB(GLenum gl_source, GLenum gl_type, return; } - source = gl_enum_to_debug_source(gl_source); - type = gl_enum_to_debug_type(gl_type); - severity = gl_enum_to_debug_severity(gl_severity); - - control_app_messages(ctx, source, type, severity, count, ids, enabled); + control_app_messages(ctx, gl_source, gl_type, gl_severity, + count, ids, enabled); } void GLAPIENTRY commit 7aefdab219992f804236b93e730037bba6dff6fe Author: Kenneth Graunke <kenn...@whitecape.org> Date: Wed Aug 7 12:56:37 2013 -0700 mesa: Specify a better GL_MAX_SERVER_WAIT_TIMEOUT limit. The previous value of (GLuint64) ~0 has some problems: GL_MAX_SERVER_WAIT_TIMEOUT is supposed to be a GLuint64 value, but has to be queried via GetInteger64v(), which returns a GLint64. This means that some applications are likely to treat it as a signed integer, where ~0 means -1. Negative values are nonsensical and problematic. When interpreted correctly, ~0 translates to about 0.58 million years, which seems rather excessive. This patch changes it to 0x1fff7fffffff, which is about 1.11 years. This is still plenty long, and is the same as both an int64 and uint64. Applications that accidentally store it in a 32-bit int/unsigned also get a non-negative value, which is again the same as both int and unsigned. This value was suggested by Ian Romanick. v2: Add the ULL prefix on the constant (suggested by Ian). Fixes Piglit's spec/!OpenGL 3.2/get-integer-64v. Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> Cc: mesa-sta...@lists.freedesktop.org (cherry picked from commit a27180d0d8666c75befe5c5b26e6d7122b41588b) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index d687fb7..d726d11 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -622,7 +622,7 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxSamples = 0; /* GL_ARB_sync */ - ctx->Const.MaxServerWaitTimeout = (GLuint64) ~0; + ctx->Const.MaxServerWaitTimeout = 0x1fff7fffffffULL; /* GL_ATI_envmap_bumpmap */ ctx->Const.SupportedBumpUnits = SUPPORTED_ATI_BUMP_UNITS; commit fe6526f4398551c62237c37671f2325bbfa02c2e Author: Ian Romanick <ian.d.roman...@intel.com> Date: Thu Aug 22 15:21:55 2013 -0700 mesa: Bump version to 9.2-rc2 Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> diff --git a/Android.common.mk b/Android.common.mk index b5ed472..905d1a9 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -35,7 +35,7 @@ LOCAL_C_INCLUDES += \ # define ANDROID_VERSION (e.g., 4.0.x => 0x0400) LOCAL_CFLAGS += \ - -DPACKAGE_VERSION=\"9.2.0-rc1\" \ + -DPACKAGE_VERSION=\"9.2.0-rc2\" \ -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\" \ -DANDROID_VERSION=0x0$(MESA_ANDROID_MAJOR_VERSION)0$(MESA_ANDROID_MINOR_VERSION) diff --git a/SConstruct b/SConstruct index a75bcb9..622ff36 100644 --- a/SConstruct +++ b/SConstruct @@ -70,7 +70,7 @@ if env['gles']: # Environment setup env.Append(CPPDEFINES = [ - ('PACKAGE_VERSION', '\\"9.2.0-rc1\\"'), + ('PACKAGE_VERSION', '\\"9.2.0-rc2\\"'), ('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'), ]) diff --git a/configure.ac b/configure.ac index 95d9b72..08aeb91 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl Tell the user about autoconf.html in the --help output m4_divert_once([HELP_END], [ See docs/autoconf.html for more details on the options for Mesa.]) -AC_INIT([Mesa], [9.2.0-rc1], +AC_INIT([Mesa], [9.2.0-rc2], [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) AC_CONFIG_AUX_DIR([bin]) AC_CONFIG_MACRO_DIR([m4]) commit 08b192d26a4478d9004cc02a3b657fd9fd6b6521 Author: Ian Romanick <ian.d.roman...@intel.com> Date: Thu Aug 15 11:24:11 2013 -0700 glsl: Give a warning, not an error, for UBO qualifiers on non-matrices. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59648 Reviewed-by: Matt Turner <matts...@gmail.com> Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> (cherry picked from commit dded321f92e4727584a98b71d7aaa15d4f01fb24) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index b712be4..d474683 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1849,11 +1849,17 @@ validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state, YYLTYPE *loc, const glsl_type *type) { - if (!type->is_matrix() && !type->is_record()) { - _mesa_glsl_error(loc, state, - "uniform block layout qualifiers row_major and " - "column_major can only be applied to matrix and " - "structure types"); + if (!type->is_matrix()) { + /* The OpenGL ES 3.0 conformance tests did not originally allow + * matrix layout qualifiers on non-matrices. However, the OpenGL + * 4.4 and OpenGL ES 3.0 (revision TBD) specifications were + * amended to specifically allow these layouts on all types. Emit + * a warning so that people know their code may not be portable. + */ + _mesa_glsl_warning(loc, state, + "uniform block layout qualifiers row_major and " + "column_major applied to non-matrix types may " + "be rejected by older compilers"); } else if (type->is_record()) { /* We allow 'layout(row_major)' on structure types because it's the only * way to get row-major layouts on matrices contained in structures. @@ -1861,7 +1867,7 @@ validate_matrix_layout_for_type(struct _mesa_glsl_parse_state *state, _mesa_glsl_warning(loc, state, "uniform block layout qualifiers row_major and " "column_major applied to structure types is not " - "strictly conformant and my be rejected by other " + "strictly conformant and may be rejected by other " "compilers"); } } commit c1c076dd8dedc508f225428ff7e3df4094ae3611 Author: Matt Turner <matts...@gmail.com> Date: Thu Aug 15 11:14:00 2013 -0700 glsl: Remove ubo_qualifiers_allowed variable. No longer used. Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com> (cherry picked from commit 921ef55a72dd07a6db0f170767d4a278c46d9ae6) diff --git a/src/glsl/ast.h b/src/glsl/ast.h index f25f02b..e129d5d 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -627,12 +627,6 @@ public: * is used to note these cases when no type is specified. */ int invariant; - - /** - * Flag indicating that these declarators are in a uniform block, - * allowing UBO type qualifiers. - */ - bool ubo_qualifiers_allowed; }; diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index fddd3fc..b712be4 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1949,7 +1949,6 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, ir_variable *var, struct _mesa_glsl_parse_state *state, YYLTYPE *loc, - bool ubo_qualifiers_allowed, bool is_parameter) { if (qual->flags.q.invariant) { @@ -2735,7 +2734,7 @@ ast_declarator_list::hir(exec_list *instructions, } apply_type_qualifier_to_variable(& this->type->qualifier, var, state, - & loc, this->ubo_qualifiers_allowed, false); + & loc, false); if (this->type->qualifier.flags.q.invariant) { if ((state->target == vertex_shader) && @@ -3230,7 +3229,7 @@ ast_parameter_declarator::hir(exec_list *instructions, * for function parameters the default mode is 'in'. */ apply_type_qualifier_to_variable(& this->type->qualifier, var, state, & loc, - false, true); + true); /* From page 17 (page 23 of the PDF) of the GLSL 1.20 spec: * diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 76b2495..d60a1e0 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -2251,7 +2251,6 @@ member_declaration: $$ = new(ctx) ast_declarator_list(type); $$->set_location(yylloc); - $$->ubo_qualifiers_allowed = true; $$->declarations.push_degenerate_list_at_head(& $2->link); } diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index d13ddd7..e97461d 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1199,7 +1199,6 @@ ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type) { this->type = type; this->invariant = false; - this->ubo_qualifiers_allowed = false; } void commit 368fc4f3ec56e89a40269f3798457edacd790cd7 Author: Matt Turner <matts...@gmail.com> Date: Thu Aug 15 10:46:46 2013 -0700 glsl: Drop duplicate error messages. This same message is printed in the validate_matrix_layout_for_type function. Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com> (cherry picked from commit 77373e020ecc1b156802a583745dc6ce16e91c9e) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 0532e2f..fddd3fc 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2282,13 +2282,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, } if (qual->flags.q.row_major || qual->flags.q.column_major) { - if (!ubo_qualifiers_allowed) { - _mesa_glsl_error(loc, state, - "uniform block layout qualifiers row_major and " - "column_major can only be applied to uniform block " - "members"); - } else - validate_matrix_layout_for_type(state, loc, var->type); + validate_matrix_layout_for_type(state, loc, var->type); } } @@ -4349,12 +4343,7 @@ ast_process_structure_or_interface_block(exec_list *instructions, if (!qual->flags.q.uniform) { _mesa_glsl_error(&loc, state, "row_major and column_major can only be " - "applied to uniform interface blocks."); - } else if (!field_type->is_matrix() && !field_type->is_record()) { - _mesa_glsl_error(&loc, state, - "uniform block layout qualifiers row_major and " - "column_major can only be applied to matrix and " - "structure types"); + "applied to uniform interface blocks"); } else validate_matrix_layout_for_type(state, &loc, field_type); } commit e14baf425b6bd55198642adccf7a169850c37c86 Author: Matt Turner <matts...@gmail.com> Date: Thu Aug 15 11:05:57 2013 -0700 glsl: Rename ubo_qualifiers_valid to ubo_qualifiers_allowed. The variable means that UBO qualifiers are allowed in a particular context (e.g., not allowed in a struct field declaration), rather than a particular set of UBO qualifiers are valid. Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com> (cherry picked from commit 1a45db97058d63b742993d0fcf0e5df44e2aa1c6) diff --git a/src/glsl/ast.h b/src/glsl/ast.h index a5ee540..f25f02b 100644 --- a/src/glsl/ast.h +++ b/src/glsl/ast.h @@ -632,7 +632,7 @@ public: * Flag indicating that these declarators are in a uniform block, * allowing UBO type qualifiers. */ - bool ubo_qualifiers_valid; + bool ubo_qualifiers_allowed; }; diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index dd93144..0532e2f 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -1949,7 +1949,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, ir_variable *var, struct _mesa_glsl_parse_state *state, YYLTYPE *loc, - bool ubo_qualifiers_valid, + bool ubo_qualifiers_allowed, bool is_parameter) { if (qual->flags.q.invariant) { @@ -2282,7 +2282,7 @@ apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual, } if (qual->flags.q.row_major || qual->flags.q.column_major) { - if (!ubo_qualifiers_valid) { + if (!ubo_qualifiers_allowed) { _mesa_glsl_error(loc, state, "uniform block layout qualifiers row_major and " "column_major can only be applied to uniform block " @@ -2741,7 +2741,7 @@ ast_declarator_list::hir(exec_list *instructions, } apply_type_qualifier_to_variable(& this->type->qualifier, var, state, - & loc, this->ubo_qualifiers_valid, false); + & loc, this->ubo_qualifiers_allowed, false); if (this->type->qualifier.flags.q.invariant) { if ((state->target == vertex_shader) && diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy index 50e8e23..76b2495 100644 --- a/src/glsl/glsl_parser.yy +++ b/src/glsl/glsl_parser.yy @@ -2251,7 +2251,7 @@ member_declaration: $$ = new(ctx) ast_declarator_list(type); $$->set_location(yylloc); - $$->ubo_qualifiers_valid = true; + $$->ubo_qualifiers_allowed = true; $$->declarations.push_degenerate_list_at_head(& $2->link); } diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index c16f71f..d13ddd7 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -1199,7 +1199,7 @@ ast_declarator_list::ast_declarator_list(ast_fully_specified_type *type) { this->type = type; this->invariant = false; - this->ubo_qualifiers_valid = false; + this->ubo_qualifiers_allowed = false; } void commit dce3865306b11df1f92f0b54a34c35ea945ee293 Author: Chad Versace <chad.vers...@linux.intel.com> Date: Tue Aug 20 17:36:24 2013 -0700 i965: Fix misapplication of gles3 srgb workaround Fixes inconsistent failure of gles2conform/GL2Tests/glUniform/glUniform.test under gnome-shell. What follows is a description of the bug and its fix. When intel_update_renderbuffers() allocates a miptree for a winsys renderbuffer, it propagates the renderbuffer's format to become also the miptree's format. If the winsys color buffer format is SARGB, then, in the first call to eglMakeCurrent, intel_gles3_srgb_workaround() changes the renderbuffer's format to ARGB. That is, it changes the format from sRGB to non-sRGB. However, it changes the renderbuffer's format *after* intel_update_renderbuffers() has allocated the renderbuffer's miptree. Therefore, when eglMakeCurrent returns, the miptree format (SARGB) differs from the renderbuffer format (ARGB). If the X server reallocates the color buffer, intel_update_renderbuffers() will create a new miptree for the renderbuffer. The new miptree's format (ARGB) will differ from old miptree's format (SARGB). This mismatch between old and new miptrees causes bugs. Fix the bug by moving intel_gles3_srgb_workaround() to occur *before* intel_update_renderbuffers(). CC: "9.2" <mesa-sta...@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67934 Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> (cherry picked from commit ce8639a766d0c36e676eea6f55135d9dccf1cb90) diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 2e15a55..95fce2f 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -754,11 +754,15 @@ intelMakeCurrent(__DRIcontext * driContextPriv, driContextPriv->dri2.read_stamp = driReadPriv->dri2.stamp - 1; } + /* The sRGB workaround changes the renderbuffer's format. We must change + * the format before the renderbuffer's miptree get's allocated, otherwise + * the formats of the renderbuffer and its miptree will differ. + */ + intel_gles3_srgb_workaround(brw, fb); + intel_gles3_srgb_workaround(brw, readFb); + intel_prepare_render(brw); _mesa_make_current(ctx, fb, readFb); - - intel_gles3_srgb_workaround(brw, ctx->WinSysDrawBuffer); - intel_gles3_srgb_workaround(brw, ctx->WinSysReadBuffer); } else { _mesa_make_current(NULL, NULL, NULL); commit 8efdaedfc2fca8fd179f6e2ee2f46db76fc2129f Author: Michel Dänzer <michel.daen...@amd.com> Date: Wed Aug 21 18:00:35 2013 +0200 radeonsi: Fix y/z/w component values of TGSI_SEMANTIC_FOG pixel shader inputs They are defined as constant 0.0/0.0/1.0. Three more little piglits. Cc: mesa-sta...@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> (cherry picked from commit 237cb074cb0efa50633f35e737122471957747b2) diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index dd9581d..3d64324 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -198,6 +198,8 @@ static void declare_input_fs( struct si_shader *shader = &si_shader_ctx->shader->shader; struct lp_build_context * base = &si_shader_ctx->radeon_bld.soa.bld_base.base; + struct lp_build_context *uint = + &si_shader_ctx->radeon_bld.soa.bld_base.uint_bld; struct gallivm_state * gallivm = base->gallivm; LLVMTypeRef input_type = LLVMFloatTypeInContext(gallivm->context); LLVMValueRef main_fn = si_shader_ctx->radeon_bld.main_fn; @@ -341,6 +343,22 @@ static void declare_input_fs( } shader->ninterp++; + } else if (decl->Semantic.Name == TGSI_SEMANTIC_FOG) { + LLVMValueRef args[4]; + + args[0] = uint->zero; + args[1] = attr_number; + args[2] = params; + args[3] = interp_param; + si_shader_ctx->radeon_bld.inputs[radeon_llvm_reg_index_soa(input_index, 0)] = + build_intrinsic(base->gallivm->builder, intr_name, + input_type, args, args[3] ? 4 : 3, + LLVMReadNoneAttribute | LLVMNoUnwindAttribute); + si_shader_ctx->radeon_bld.inputs[radeon_llvm_reg_index_soa(input_index, 1)] = + si_shader_ctx->radeon_bld.inputs[radeon_llvm_reg_index_soa(input_index, 2)] = + lp_build_const_float(gallivm, 0.0f); + si_shader_ctx->radeon_bld.inputs[radeon_llvm_reg_index_soa(input_index, 3)] = + lp_build_const_float(gallivm, 1.0f); } else { for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) { LLVMValueRef args[4]; commit c47804d28654858225cec5c482aa0f4ee278c3f3 Author: Matt Turner <matts...@gmail.com> Date: Tue Aug 20 14:16:17 2013 -0700 build: Add --enable-gallium-osmesa flag. The Gallium implementation is apparently not ready for regular consumption, so as much as I hate adding more build-time options, here's another. Acked-by: Brian Paul <bri...@vmware.com> (cherry picked from commit 2f142d596f6d950499d5e25d26e011a675c9670c) diff --git a/configure.ac b/configure.ac index bd5c71d..95d9b72 100644 --- a/configure.ac +++ b/configure.ac @@ -579,6 +579,11 @@ AC_ARG_ENABLE([osmesa], [enable OSMesa library @<:@default=disabled@:>@])], [enable_osmesa="$enableval"], [enable_osmesa=no]) +AC_ARG_ENABLE([gallium-osmesa], + [AS_HELP_STRING([--enable-gallium-osmesa], + [enable Gallium implementation of the OSMesa library @<:@default=disabled@:>@])], + [enable_gallium_osmesa="$enableval"], + [enable_gallium_osmesa=no]) AC_ARG_ENABLE([egl], [AS_HELP_STRING([--disable-egl], [disable EGL library @<:@default=enabled@:>@])], @@ -769,7 +774,13 @@ if test "x$enable_dri" = xyes; then GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS" fi -if test "x$enable_osmesa" = xyes; then +if test "x$enable_gallium_osmesa" = xyes; then + if test -z "$with_gallium_drivers"; then + AC_MSG_ERROR([Cannot enable gallium_osmesa without Gallium]) + fi + if test "x$enable_osmesa" = xyes; then + AC_MSG_ERROR([Cannot enable both classic and Gallium OSMesa implementations]) + fi GALLIUM_STATE_TRACKERS_DIRS="osmesa $GALLIUM_STATE_TRACKERS_DIRS" GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa" fi @@ -1135,7 +1146,7 @@ x16|x32) ;; esac -if test "x$enable_osmesa" = xyes; then +if test "x$enable_osmesa" = xyes -o "x$enable_gallium_osmesa" = xyes; then # only link libraries with osmesa if shared if test "$enable_static" = no; then OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS" @@ -1962,9 +1973,11 @@ AC_SUBST([ELF_LIB]) AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \ "x$enable_xlib_glx" = xyes -o \ - "x$enable_osmesa" = xyes) + "x$enable_osmesa" = xyes -o \ + "x$enable_gallium_osmesa" = xyes) AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes) AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes) +AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes) AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1) AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1) @@ -2151,11 +2164,17 @@ echo " OpenVG: $enable_openvg" dnl Driver info echo "" -if test "x$enable_osmesa" != xno; then +case "x$enable_osmesa$enable_gallium_osmesa" in +xnoyes) + echo " OSMesa: lib$OSMESA_LIB (Gallium)" + ;; +xyesno) echo " OSMesa: lib$OSMESA_LIB" -else + ;; +xnono) echo " OSMesa: no" -fi + ;; +esac if test "x$enable_dri" != xno; then # cleanup the drivers var diff --git a/src/gallium/state_trackers/Makefile.am b/src/gallium/state_trackers/Makefile.am index c788f9a..5774598 100644 --- a/src/gallium/state_trackers/Makefile.am +++ b/src/gallium/state_trackers/Makefile.am @@ -25,7 +25,7 @@ if HAVE_X11_DRIVER SUBDIRS += glx endif -if HAVE_OSMESA +if HAVE_GALLIUM_OSMESA SUBDIRS += osmesa endif diff --git a/src/gallium/targets/Makefile.am b/src/gallium/targets/Makefile.am index ff09821..6bffc01 100644 --- a/src/gallium/targets/Makefile.am +++ b/src/gallium/targets/Makefile.am @@ -26,7 +26,7 @@ if HAVE_X11_DRIVER SUBDIRS += libgl-xlib endif -if HAVE_OSMESA +if HAVE_GALLIUM_OSMESA SUBDIRS += osmesa endif commit 5114ac3f87fc691e6c4302046f760302384a3b2c Author: Matt Turner <matts...@gmail.com> -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1vekpm-0005ms...@vasks.debian.org