[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'debian-unstable'



 Makefile.am                                                |    2 
 bin/.cherry-ignore                                         |    9 
 configure.ac                                               |    2 
 debian/changelog                                           |    6 
 docs/relnotes-9.1.4.html                                   |    4 
 docs/relnotes-9.1.5.html                                   |  138 +++++++++++++
 src/egl/drivers/dri2/platform_wayland.c                    |    9 
 src/gallium/drivers/r600/evergreen_state.c                 |   10 
 src/gallium/drivers/r600/r600_state.c                      |   10 
 src/gallium/drivers/svga/svga_tgsi_insn.c                  |    6 
 src/gallium/state_trackers/dri/sw/drisw.c                  |    5 
 src/gallium/state_trackers/glx/xlib/xm_api.c               |   11 -
 src/glsl/ast_to_hir.cpp                                    |   18 +
 src/glsl/builtin_variables.cpp                             |    2 
 src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag |    6 
 src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl |    3 
 src/glsl/link_uniforms.cpp                                 |   14 +
 src/mesa/drivers/dri/i965/brw_draw_upload.c                |   18 +
 src/mesa/drivers/dri/i965/brw_fs_emit.cpp                  |    4 
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp               |    3 
 src/mesa/drivers/dri/i965/brw_wm.c                         |    8 
 src/mesa/drivers/dri/i965/brw_wm.h                         |    2 
 src/mesa/drivers/dri/swrast/swrast.c                       |    1 
 src/mesa/main/mtypes.h                                     |   15 +
 src/mesa/main/shaderobj.c                                  |    1 
 src/mesa/main/uniform_query.cpp                            |    2 
 src/mesa/main/uniforms.c                                   |    2 
 src/mesa/main/uniforms.h                                   |   14 -
 src/mesa/main/version.h                                    |    2 
 src/mesa/program/prog_execute.c                            |    6 
 src/mesa/program/register_allocate.c                       |   46 +++-
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp                 |    2 
 32 files changed, 332 insertions(+), 49 deletions(-)

New commits:
commit d71640913c8c107220faa2aafb655cd1ad26c3f0
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Thu Jul 18 18:33:09 2013 +0200

    New upstream release.

diff --git a/debian/changelog b/debian/changelog
index 0127bf3..c2c4742 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mesa (9.1.5-1) UNRELEASED; urgency=low
+
+  * New upstream release. 
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Thu, 18 Jul 2013 18:32:24 +0200
+
 mesa (9.1.4-1) unstable; urgency=low
 
   [ Julien Cristau ]

commit 42146f777b9aa89c3d2c01f2a5cde05749534508
Author: Carl Worth <cworth@cworth.org>
Date:   Wed Jul 17 16:37:59 2013 -0700

    docs: Add release notes for 9.1.5 release

diff --git a/docs/relnotes-9.1.5.html b/docs/relnotes-9.1.5.html
new file mode 100644
index 0000000..4739437
--- /dev/null
+++ b/docs/relnotes-9.1.5.html
@@ -0,0 +1,138 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
+<html lang="en">
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>Mesa Release Notes</title>
+  <link rel="stylesheet" type="text/css" href="mesa.css">
+</head>
+<body>
+
+<div class="header">
+  <h1>The Mesa 3D Graphics Library</h1>
+</div>
+
+<iframe src="contents.html"></iframe>
+<div class="content">
+
+<h1>Mesa 9.1.5 Release Notes / July 17, 2013</h1>
+
+<p>
+Mesa 9.1.5 is a bug fix release which fixes bugs found since the 9.1.4 release.
+</p>
+<p>
+Mesa 9.1 implements the OpenGL 3.1 API, but the version reported by
+glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) /
+glGetIntegerv(GL_MINOR_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 3.1.  OpenGL
+3.1 is <strong>only</strong> available if requested at context creation
+because GL_ARB_compatibility is not supported.
+</p>
+
+<h2>MD5 checksums</h2>
+<pre>
+TBD
+</pre>
+
+<h2>New features</h2>
+<p>None.</p>
+
+<h2>Bug fixes</h2>
+
+<p>This list is likely incomplete.</p>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=58384";>Bug 58384</a> - [i965 Bisected]Oglc max_values(advanced.fragmentProgram.GL_MAX_PROGRAM_ENV_PARAMETERS_ARB) segfault</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=62647";>Bug 62647</a> - Wrong rendering of Dota 2 on Wine (apitrace attached) - Intel IVB HD4000</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=63674";>Bug 63674</a> - [IVB]frozen at the first frame when run Unigine-heaven 4.0</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=65910";>Bug 65910</a> - Killing weston-launch causes segv in desktop-shell</li>
+
+</ul>
+
+<h2>Changes</h2>
+<p>The full set of changes can be viewed by using the following GIT command:</p>
+
+<pre>
+  git log mesa-9.1.4..mesa-9.1.5
+</pre>
+
+<p>Anuj Phogat (1):</p>
+<ul>
+  <li>mesa: Return ZeroVec/dummyReg instead of NULL pointer</li>
+</ul>
+
+<p>Brian Paul (1):</p>
+<ul>
+  <li>svga: check for NaN shader immediates</li>
+</ul>
+
+<p>Carl Worth (3):</p>
+<ul>
+  <li>cherry-ignore: Ignore previously backported patch</li>
+  <li>cherry-ignore: Drop two patches which we've decided not to include</li>
+  <li>mesa: Bump version to 9.1.5</li>
+</ul>
+
+<p>Chris Forbes (1):</p>
+<ul>
+  <li>i965: fix alpha test for MRT</li>
+</ul>
+
+<p>Christoph Bumiller (1):</p>
+<ul>
+  <li>r600g: x/y coordinates must be divided by block dim in dma blit</li>
+</ul>
+
+<p>Eric Anholt (1):</p>
+<ul>
+  <li>ra: Fix register spilling.</li>
+</ul>
+
+<p>Ian Romanick (6):</p>
+<ul>
+  <li>docs: Add 9.1.4 release md5sums</li>
+  <li>glsl: Add a gl_shader_program parameter to _mesa_uniform_{merge,split}_location_offset</li>
+  <li>glsl: Add gl_shader_program::UniformLocationBaseScale</li>
+  <li>glsl: Generate smaller values for uniform locations</li>
+  <li>i965: Be more careful with the interleaved user array upload optimization</li>
+  <li>glsl: Move all var decls to the front of the IR list in reverse order</li>
+</ul>
+
+<p>Kenneth Graunke (1):</p>
+<ul>
+  <li>glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.</li>
+</ul>
+
+<p>Kristian Høgsberg (1):</p>
+<ul>
+  <li>wayland: Handle global_remove event as well</li>
+</ul>
+
+<p>Matt Turner (1):</p>
+<ul>
+  <li>register_allocate: Fix the type of best_benefit.</li>
+</ul>
+
+<p>Paul Berry (1):</p>
+<ul>
+  <li>glsl ES: Fix magnitude of gl_MaxVertexUniformVectors.</li>
+</ul>
+
+<p>Richard Sandiford (3):</p>
+<ul>
+  <li>st/xlib Fix XIMage bytes-per-pixel calculation</li>
+  <li>st/xlib: Fix XImage stride calculation</li>
+  <li>st/dri/sw: Fix pitch calculation in drisw_update_tex_buffer</li>
+</ul>
+
+<p>Vinson Lee (1):</p>
+<ul>
+  <li>swrast: Fix memory leak.</li>
+</ul>
+
+</div>
+</body>
+</html>

commit 4c4535988b30b0fb9ab2c253c24c1ad058be6f61
Author: Carl Worth <cworth@cworth.org>
Date:   Wed Jul 17 16:28:16 2013 -0700

    mesa: Bump version to 9.1.5

diff --git a/Makefile.am b/Makefile.am
index 99d74fa..9c03dd8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,7 @@ check-local:
 
 # Rules for making release tarballs
 
-PACKAGE_VERSION=9.1.4
+PACKAGE_VERSION=9.1.5
 PACKAGE_DIR = Mesa-$(PACKAGE_VERSION)
 PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION)
 
diff --git a/configure.ac b/configure.ac
index 71b0366..d0f78a0 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.1.4],
+AC_INIT([Mesa], [9.1.5],
     [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
 AC_CONFIG_AUX_DIR([bin])
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 7c8e42f..a069798 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -35,7 +35,7 @@ struct gl_context;
 #define MESA_MAJOR 9
 #define MESA_MINOR 1
 #define MESA_PATCH 4
-#define MESA_VERSION_STRING "9.1.4"
+#define MESA_VERSION_STRING "9.1.5"
 
 /* To make version comparison easy */
 #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

commit e292c4656af6a8b3cd6bfc584cf09b2d0cee9917
Author: Paul Berry <stereotype441@gmail.com>
Date:   Sun Jul 7 11:47:22 2013 -0700

    glsl ES: Fix magnitude of gl_MaxVertexUniformVectors.
    
    Previously, we set it equal to MaxVertexUniformComponents.  It should
    be MaxVertexUniformComponents / 4.
    
    NOTE: This is a candidate for the stable branches.
    
    Cc: mesa-stable@lists.freedesktop.org
    
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    (cherry picked from commit 8f51d68f8c2020ad35b442c4af693ad7a5e5dd0d)

diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 6a17ade..e453de4 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -527,7 +527,7 @@ generate_common_ES_uniforms(exec_list *instructions,
    add_builtin_constant(instructions, symtab, "gl_MaxVertexAttribs",
 			state->Const.MaxVertexAttribs);
    add_builtin_constant(instructions, symtab, "gl_MaxVertexUniformVectors",
-			state->Const.MaxVertexUniformComponents);
+			state->Const.MaxVertexUniformComponents / 4);
    add_builtin_constant(instructions, symtab, "gl_MaxVertexTextureImageUnits",
 			state->Const.MaxVertexTextureImageUnits);
    add_builtin_constant(instructions, symtab, "gl_MaxCombinedTextureImageUnits",

commit 8bb40f7b2bf03bef0b98c00663e0871699c6dcf9
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Jul 15 11:38:00 2013 -0700

    cherry-ignore: Drop two patches which we've decided not to include
    
    Matt agreed that his patch isn't a valid candidate, (since it is possible it
    could cause a previously-working program to stop working).
    
    Martin attempted a backport of his patch, (which didn't trivially
    cherry-pick), and found that it failed to fix the expected piglit failure.

diff --git a/bin/.cherry-ignore b/bin/.cherry-ignore
index 27893e7..15a8e95 100644
--- a/bin/.cherry-ignore
+++ b/bin/.cherry-ignore
@@ -33,3 +33,9 @@ dca5fc14358a8b267b3854c39c976a822885898f i965/fs: Improve performance of varying
 
 # Already cherry-picked as commit bf8053a2dbac1500586d6d387cd88c30aad63a60
 6b676e66343356d5096260c2bc1601014c808cb0 i965,i915: Return early if miptree allocation fails
+
+# Has potential to break previously-working (though technically incorrect) programs
+fcaa48d9cc8937e0ceb59dfd22ef5b6e6fd1a273 glsl: Disallow return with a void argument from void functions.
+
+# Rejected at author's request (attempted backport did not fix piglit test)
+4c3ed795662974a1c2ad2326fc74bef608a34f31 r600g: Workaround for a harware bug with nested loops on Cayman

commit 083f5f08485845246356b15059d84ca2813a4221
Author: Carl Worth <cworth@cworth.org>
Date:   Fri Jul 12 18:29:13 2013 -0700

    cherry-ignore: Ignore previously backported patch
    
    Chad was diligent and already applied this patch to the stable branch, (but
    without the "cherry-picked from" since he did a backport to a different file,
    not a cherry-pick, so get-pick-list.sh wasn't clever enough to notice).

diff --git a/bin/.cherry-ignore b/bin/.cherry-ignore
index 6f63354..27893e7 100644
--- a/bin/.cherry-ignore
+++ b/bin/.cherry-ignore
@@ -30,3 +30,6 @@ dca5fc14358a8b267b3854c39c976a822885898f i965/fs: Improve performance of varying
 
 # Already cherry-picked, but squashed with the commit that broke what this fixed
 4405ff4055685841c9d9545da52c7edc8708b14b i965: Fix haswell_upload_cut_index when there's no index buffer.
+
+# Already cherry-picked as commit bf8053a2dbac1500586d6d387cd88c30aad63a60
+6b676e66343356d5096260c2bc1601014c808cb0 i965,i915: Return early if miptree allocation fails

commit f4cf23e35081205f25e78f90437ead15cbec7792
Author: Christoph Bumiller <christoph.bumiller@speed.at>
Date:   Fri Jul 5 20:55:36 2013 +0200

    r600g: x/y coordinates must be divided by block dim in dma blit
    
    Note: this is a candidate for the 9.1 branch.
    
    Reviewed-by: Marek Olšák <maraeo@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 9974593dfbf87e95a4c396772b82c302d663d1f8)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 804c037..8cf9781 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -3644,6 +3644,7 @@ boolean evergreen_dma_blit(struct pipe_context *ctx,
 	struct r600_texture *rdst = (struct r600_texture*)dst;
 	unsigned dst_pitch, src_pitch, bpp, dst_mode, src_mode, copy_height;
 	unsigned src_w, dst_w;
+	unsigned src_x, src_y;
 
 	if (rctx->rings.dma.cs == NULL) {
 		return FALSE;
@@ -3652,6 +3653,11 @@ boolean evergreen_dma_blit(struct pipe_context *ctx,
 		return FALSE;
 	}
 
+	src_x = util_format_get_nblocksx(src->format, src_box->x);
+	dst_x = util_format_get_nblocksx(src->format, dst_x);
+	src_y = util_format_get_nblocksy(src->format, src_box->y);
+	dst_y = util_format_get_nblocksy(src->format, dst_y);
+
 	bpp = rdst->surface.bpe;
 	dst_pitch = rdst->surface.level[dst_level].pitch_bytes;
 	src_pitch = rsrc->surface.level[src_level].pitch_bytes;
@@ -3696,7 +3702,7 @@ boolean evergreen_dma_blit(struct pipe_context *ctx,
 		 */
 		src_offset= rsrc->surface.level[src_level].offset;
 		src_offset += rsrc->surface.level[src_level].slice_size * src_box->z;
-		src_offset += src_box->y * src_pitch + src_box->x * bpp;
+		src_offset += src_y * src_pitch + src_x * bpp;
 		dst_offset = rdst->surface.level[dst_level].offset;
 		dst_offset += rdst->surface.level[dst_level].slice_size * dst_z;
 		dst_offset += dst_y * dst_pitch + dst_x * bpp;
@@ -3704,7 +3710,7 @@ boolean evergreen_dma_blit(struct pipe_context *ctx,
 					src_box->height * src_pitch);
 	} else {
 		evergreen_dma_copy_tile(rctx, dst, dst_level, dst_x, dst_y, dst_z,
-					src, src_level, src_box->x, src_box->y, src_box->z,
+					src, src_level, src_x, src_y, src_box->z,
 					copy_height, dst_pitch, bpp);
 	}
 	return TRUE;
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 70232fd..8ce8b82 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -3110,6 +3110,7 @@ boolean r600_dma_blit(struct pipe_context *ctx,
 	struct r600_texture *rdst = (struct r600_texture*)dst;
 	unsigned dst_pitch, src_pitch, bpp, dst_mode, src_mode, copy_height;
 	unsigned src_w, dst_w;
+	unsigned src_x, src_y;
 
 	if (rctx->rings.dma.cs == NULL) {
 		return FALSE;
@@ -3118,6 +3119,11 @@ boolean r600_dma_blit(struct pipe_context *ctx,
 		return FALSE;
 	}
 
+	src_x = util_format_get_nblocksx(src->format, src_box->x);
+	dst_x = util_format_get_nblocksx(src->format, dst_x);
+	src_y = util_format_get_nblocksy(src->format, src_box->y);
+	dst_y = util_format_get_nblocksy(src->format, dst_y);
+
 	bpp = rdst->surface.bpe;
 	dst_pitch = rdst->surface.level[dst_level].pitch_bytes;
 	src_pitch = rsrc->surface.level[src_level].pitch_bytes;
@@ -3150,7 +3156,7 @@ boolean r600_dma_blit(struct pipe_context *ctx,
 		 */
 		src_offset= rsrc->surface.level[src_level].offset;
 		src_offset += rsrc->surface.level[src_level].slice_size * src_box->z;
-		src_offset += src_box->y * src_pitch + src_box->x * bpp;
+		src_offset += src_y * src_pitch + src_x * bpp;
 		dst_offset = rdst->surface.level[dst_level].offset;
 		dst_offset += rdst->surface.level[dst_level].slice_size * dst_z;
 		dst_offset += dst_y * dst_pitch + dst_x * bpp;
@@ -3162,7 +3168,7 @@ boolean r600_dma_blit(struct pipe_context *ctx,
 		r600_dma_copy(rctx, dst, src, dst_offset, src_offset, size);
 	} else {
 		return r600_dma_copy_tile(rctx, dst, dst_level, dst_x, dst_y, dst_z,
-					src, src_level, src_box->x, src_box->y, src_box->z,
+					src, src_level, src_x, src_y, src_box->z,
 					copy_height, dst_pitch, bpp);
 	}
 	return TRUE;

commit 6a2df5a0302c0ae5ad86e3164d1227fc079d7110
Author: Chris Forbes <chrisf@ijw.co.nz>
Date:   Mon Jul 1 23:30:55 2013 +1200

    i965: fix alpha test for MRT
    
    Include src0 alpha in the RT write message when using MRT, so it is used
    for the alpha test instead of the normal per-RT alpha value.
    
    Fixes broken rendering in Dota2 under Wine [FDO #62647].
    
    No Piglit regressions on Ivybridge.
    
    V2: reuse (and simplify) existing sample_alpha_to_coverage flag in
    the FS key, rather than adding another redundant one.
    
    Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
    Reviewd-by: Paul Berry <stereotype441@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62647
    NOTE: This is a candidate for the stable branches.
    (cherry picked from commit 1415a1884c59aff37d0f1a53447ef389dd9f9b39)
    
    Conflicts (resolved by Carl Worth <cworth@cworth.org>):
    	src/mesa/drivers/dri/i965/brw_wm.c

diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
index aa3a616..b163e18 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp
@@ -134,9 +134,7 @@ fs_generator::generate_fb_write(fs_inst *inst)
 		 retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD));
 	 brw_set_compression_control(p, BRW_COMPRESSION_NONE);
 
-         if (inst->target > 0 &&
-	     c->key.nr_color_regions > 1 &&
-	     c->key.sample_alpha_to_coverage) {
+         if (inst->target > 0 && c->key.replicate_alpha) {
             /* Set "Source0 Alpha Present to RenderTarget" bit in message
              * header.
              */
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 004be6d..3df4966 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -2127,8 +2127,7 @@ fs_visitor::emit_fb_writes()
    if (header_present) {
       src0_alpha_to_render_target = intel->gen >= 6 &&
 				    !do_dual_src &&
-				    c->key.nr_color_regions > 1 &&
-				    c->key.sample_alpha_to_coverage;
+                                    c->key.replicate_alpha;
       /* m2, m3 header */
       nr += 2;
    }
diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c
index 4b04465..e68cbd4 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.c
+++ b/src/mesa/drivers/dri/i965/brw_wm.c
@@ -272,7 +272,7 @@ brw_wm_debug_recompile(struct brw_context *brw,
    found |= key_debug("depth statistics", old_key->stats_wm, key->stats_wm);
    found |= key_debug("flat shading", old_key->flat_shade, key->flat_shade);
    found |= key_debug("number of color buffers", old_key->nr_color_regions, key->nr_color_regions);
-   found |= key_debug("sample alpha to coverage", old_key->sample_alpha_to_coverage, key->sample_alpha_to_coverage);
+   found |= key_debug("MRT alpha test or alpha-to-coverage", old_key->replicate_alpha, key->replicate_alpha);
    found |= key_debug("rendering to FBO", old_key->render_to_fbo, key->render_to_fbo);
    found |= key_debug("fragment color clamping", old_key->clamp_fragment_color, key->clamp_fragment_color);
    found |= key_debug("line smoothing", old_key->line_aa, key->line_aa);
@@ -460,8 +460,10 @@ static void brw_wm_populate_key( struct brw_context *brw,
 
    /* _NEW_BUFFERS */
    key->nr_color_regions = ctx->DrawBuffer->_NumColorDrawBuffers;
-  /* _NEW_MULTISAMPLE */
-   key->sample_alpha_to_coverage = ctx->Multisample.SampleAlphaToCoverage;
+
+   /* _NEW_MULTISAMPLE, _NEW_COLOR, _NEW_BUFFERS */
+   key->replicate_alpha = ctx->DrawBuffer->_NumColorDrawBuffers > 1 &&
+      (ctx->Multisample.SampleAlphaToCoverage || ctx->Color.AlphaEnabled);
 
    /* CACHE_NEW_VS_PROG */
    if (intel->gen < 6)
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h
index a4ac3f1..5389fda 100644
--- a/src/mesa/drivers/dri/i965/brw_wm.h
+++ b/src/mesa/drivers/dri/i965/brw_wm.h
@@ -62,7 +62,7 @@ struct brw_wm_prog_key {
    GLuint stats_wm:1;
    GLuint flat_shade:1;
    GLuint nr_color_regions:5;
-   GLuint sample_alpha_to_coverage:1;
+   GLuint replicate_alpha:1;
    GLuint render_to_fbo:1;
    GLuint clamp_fragment_color:1;
    GLuint line_aa:2;

commit 330203c267761590d22e75710677b6f0b9cfbd09
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Fri Jun 28 13:46:44 2013 -0700

    glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.
    
    This patch adds texture() for isamplerCubeArray and usamplerCubeArray,
    which were entirely missing.
    
    It also makes texture() with a LOD bias fragment shader specific.  The
    main GLSL specification explicitly says that texturing with LOD bias
    should not be allowed for vertex shaders.
    
    Affects Piglit's ARB_texture_cube_map_array/compiler/tex_bias-01.vert.
    which tries to use bias in a vertex shader.  Currently, it expects this
    to pass (so this patch regresses the test), but I've sent a patch to
    reverse the expected behavior (so this patch would fix the updated test):
    http://lists.freedesktop.org/archives/piglit/2013-June/006123.html
    
    NOTE: This is a candidate for stable branches.
    
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Paul Berry <stereotype441@gmail.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 15ca0ca1b6779bcf2d2603153035d3f971c24666)

diff --git a/src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag
new file mode 100644
index 0000000..0d9f4f6
--- /dev/null
+++ b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag
@@ -0,0 +1,6 @@
+#version 130
+#extension GL_ARB_texture_cube_map_array : enable
+
+ vec4 texture( samplerCubeArray sampler, vec4 coord, float bias);
+ivec4 texture(isamplerCubeArray sampler, vec4 coord, float bias);
+uvec4 texture(usamplerCubeArray sampler, vec4 coord, float bias);
diff --git a/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl
index 0f53212..73659b3 100644
--- a/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl
+++ b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl
@@ -7,7 +7,8 @@ ivec3 textureSize(usamplerCubeArray sampler, int lod);
 ivec3 textureSize(samplerCubeArrayShadow sampler, int lod);
 
  vec4 texture( samplerCubeArray sampler, vec4 coord);
- vec4 texture( samplerCubeArray sampler, vec4 coord, float bias);
+ivec4 texture(isamplerCubeArray sampler, vec4 coord);
+uvec4 texture(usamplerCubeArray sampler, vec4 coord);
 float texture( samplerCubeArrayShadow sampler, vec4 P, float compare);
 
  vec4 textureGrad( samplerCubeArray sampler, vec4 P, vec3 dPdx, vec3 dPdy);

commit cc01cfe073f865c16a0ed2333f1f76bde5a8a94a
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Thu Jun 27 16:12:07 2013 -0700

    mesa: Return ZeroVec/dummyReg instead of NULL pointer
    
    Assertions are not sufficient to check for null pointers as they don't
    show up in release builds. So, return ZeroVec/dummyReg instead of NULL
    pointer in get_{src,dst}_register_pointer(). This should calm down the
    warnings from static analysis tool.
    
    Note: This is a candidate for the 9.1 branch.
    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Brian Paul <brianp@vmware.com>
    (cherry picked from commit ee723ffabb4c76f4c1924436af145f5eca1012fc)

diff --git a/src/mesa/program/prog_execute.c b/src/mesa/program/prog_execute.c
index fe2359b..031b8b2 100644
--- a/src/mesa/program/prog_execute.c
+++ b/src/mesa/program/prog_execute.c
@@ -145,7 +145,7 @@ get_src_register_pointer(const struct prog_src_register *source,
       _mesa_problem(NULL,
          "Invalid src register file %d in get_src_register_pointer()",
          source->File);
-      return NULL;
+      return ZeroVec;
    }
 }
 
@@ -184,7 +184,7 @@ get_dst_register_pointer(const struct prog_dst_register *dest,
       _mesa_problem(NULL,
          "Invalid dest register file %d in get_dst_register_pointer()",
          dest->File);
-      return NULL;
+      return dummyReg;
    }
 }
 
@@ -199,7 +199,6 @@ fetch_vector4(const struct prog_src_register *source,
               const struct gl_program_machine *machine, GLfloat result[4])
 {
    const GLfloat *src = get_src_register_pointer(source, machine);
-   ASSERT(src);
 
    if (source->Swizzle == SWIZZLE_NOOP) {
       /* no swizzling */
@@ -333,7 +332,6 @@ fetch_vector1(const struct prog_src_register *source,
               const struct gl_program_machine *machine, GLfloat result[4])
 {
    const GLfloat *src = get_src_register_pointer(source, machine);
-   ASSERT(src);
 
    result[0] = src[GET_SWZ(source->Swizzle, 0)];
 

commit e8af0576a5cf3cb0bf49d02449042489291c5b2c
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Fri Jun 7 17:05:22 2013 -0700

    glsl: Move all var decls to the front of the IR list in reverse order
    
    This has the (intended!) side effect that vertex shader inputs and
    fragment shader outputs will appear in the IR in the same order that
    they appeared in the shader code.  This results in the locations being
    assigned in the declared order.  Many (arguably buggy) applications
    depend on this behavior, and it matches what nearly all other drivers
    do.
    
    Fixes the (new) piglit test attrib-assignments.
    
    NOTE: This is a candidate for stable release branches (and requires the
    previous commit to prevent a regression in OpenGL ES 2.0 conformance
    test stencil_plane_operation).
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
    (cherry picked from commit c170c901d0f5384e5ab8b79b827663fa28439b0b)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index c5197d5..b40ce41 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -94,6 +94,24 @@ _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state)
    detect_conflicting_assignments(state, instructions);
 
    state->toplevel_ir = NULL;
+
+   /* Move all of the variable declarations to the front of the IR list, and
+    * reverse the order.  This has the (intended!) side effect that vertex
+    * shader inputs and fragment shader outputs will appear in the IR in the
+    * same order that they appeared in the shader code.  This results in the
+    * locations being assigned in the declared order.  Many (arguably buggy)
+    * applications depend on this behavior, and it matches what nearly all
+    * other drivers do.
+    */
+   foreach_list_safe(node, instructions) {
+      ir_variable *const var = ((ir_instruction *) node)->as_variable();
+
+      if (var == NULL)
+         continue;
+
+      var->remove();
+      instructions->push_head(var);
+   }
 }
 
 

commit ba1d24f06ad4cfc3c984cad8bd278bf297d1ed6a
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Jun 20 05:43:32 2013 -0700

    i965: Be more careful with the interleaved user array upload optimization
    
    The checks to determine when the data can be uploaded in an interleaved
    fashion can be tricked by certain data layouts.  For example,
    
        float data[...];
    
        glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 16, &data[0]);
        glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 16, &data[4]);
        glDrawArrays(GL_POINTS, 0, 1);
    
    will hit the interleaved path with an incorrect size (16 bytes instead
    of 32 bytes).  As a result, the data for attribute 1 never gets
    uploaded.  The single element draw case is the only sensible case I can
    think of for non-interleaved-that-looks-like-interleaved data, but there
    may be others as well.
    
    To fix this, make sure that the end of the element in the array being
    checked is within the stride "window."  Previously the code would check
    that the begining of the element was within the window.
    
    NOTE: This is a candidate for stable branches.
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Acked-by: Kenneth Graunke <kenneth@whitecape.org>
    (cherry picked from commit 329cd6a9b145d5b3b5a2acca1b6c2019d01c9355)

diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 35836c7..92caedd 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -506,8 +506,24 @@ static void brw_prepare_vertices(struct brw_context *brw)
 	    ptr = glarray->Ptr;
 	 }
 	 else if (interleaved != glarray->StrideB ||
-		  (uintptr_t)(glarray->Ptr - ptr) > interleaved)
+                  glarray->Ptr < ptr ||
+                  (uintptr_t)(glarray->Ptr - ptr) + glarray->_ElementSize > interleaved)
 	 {
+            /* If our stride is different from the first attribute's stride,
+             * or if the first attribute's stride didn't cover our element,
+             * disable the interleaved upload optimization.  The second case
+             * can most commonly occur in cases where there is a single vertex
+             * and, for example, the data is stored on the application's
+             * stack.
+             *
+             * NOTE: This will also disable the optimization in cases where
+             * the data is in a different order than the array indices.
+             * Something like:
+             *
+             *     float data[...];
+             *     glVertexAttribPointer(0, 4, GL_FLOAT, 32, &data[4]);
+             *     glVertexAttribPointer(1, 4, GL_FLOAT, 32, &data[0]);
+             */
 	    interleaved = 0;
 	 }
 

commit d3ab091433393a2823a68bc97ff7437e8b64d7ef
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jun 6 13:21:21 2013 -0700

    ra: Fix register spilling.
    
    Commit 551c991606e543c3a264a762026f11348b37947e tried to avoid spilling
    registers that were trivially colorable.  But since we do optimistic
    coloring, the top of the stack also contains nodes that are not trivially
    colorable, so we need to consider them for spilling (since they are some
    of our best candidates).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58384
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63674
    NOTE: This is a candidate for the 9.1 branch.
    (cherry picked from commit da00782ed81776473270028cda262c913d737438)

diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index d5acc9f..22b5578 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -152,6 +152,16 @@ struct ra_graph {
 
    unsigned int *stack;
    unsigned int stack_count;
+
+   /**
+    * Tracks the start of the set of optimistically-colored registers in the
+    * stack.
+    *
+    * Along with any registers not in the stack (if one called ra_simplify()
+    * and didn't do optimistic coloring), these need to be considered for
+    * spilling.
+    */
+   unsigned int stack_optimistic_start;
 };
 
 /**
@@ -468,6 +478,7 @@ ra_optimistic_color(struct ra_graph *g)
 {
    unsigned int i;
 
+   g->stack_optimistic_start = g->stack_count;
    for (i = 0; i < g->count; i++) {
       if (g->nodes[i].in_stack || g->nodes[i].reg != NO_REG)
 	 continue;
@@ -546,8 +557,16 @@ ra_get_best_spill_node(struct ra_graph *g)
 {
    unsigned int best_node = -1;
    float best_benefit = 0.0;
-   unsigned int n;
+   unsigned int n, i;
 
+   /* For any registers not in the stack to be colored, consider them for
+    * spilling.  This will mostly collect nodes that were being optimistally
+    * colored as part of ra_allocate_no_spills() if we didn't successfully
+    * optimistically color.
+    *
+    * It also includes nodes not trivially colorable by ra_simplify() if it
+    * was used directly instead of as part of ra_allocate_no_spills().
+    */
    for (n = 0; n < g->count; n++) {
       float cost = g->nodes[n].spill_cost;
       float benefit;
@@ -555,10 +574,6 @@ ra_get_best_spill_node(struct ra_graph *g)
       if (cost <= 0.0)
 	 continue;
 
-      /* Only consider registers for spilling if they are still in the
-       * interference graph (those on the stack have already been proven to be
-       * allocatable without spilling).
-       */
       if (g->nodes[n].in_stack)
          continue;
 
@@ -570,6 +585,25 @@ ra_get_best_spill_node(struct ra_graph *g)
       }
    }
 
+   /* Also consider spilling any nodes that were set up to be optimistically
+    * colored that we couldn't manage to color in ra_select().
+    */
+   for (i = g->stack_optimistic_start; i < g->stack_count; i++) {
+      n = g->stack[i];
+      float cost = g->nodes[n].spill_cost;
+      float benefit;
+
+      if (cost <= 0.0)
+         continue;
+
+      benefit = ra_get_spill_benefit(g, n);
+
+      if (benefit / cost > best_benefit) {
+         best_benefit = benefit / cost;
+         best_node = n;
+      }
+   }
+
    return best_node;
 }
 

commit ff4f5c340f15bb68287f62dbc5b5245dac3acc43
Author: Matt Turner <mattst88@gmail.com>
Date:   Tue Apr 2 13:38:07 2013 -0700

    register_allocate: Fix the type of best_benefit.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    (cherry picked from commit 2e177bc8a5585d4b0234b1b680617bfd2ae6ddf8)

diff --git a/src/mesa/program/register_allocate.c b/src/mesa/program/register_allocate.c
index 88793db..d5acc9f 100644
--- a/src/mesa/program/register_allocate.c
+++ b/src/mesa/program/register_allocate.c
@@ -545,7 +545,7 @@ int
 ra_get_best_spill_node(struct ra_graph *g)
 {
    unsigned int best_node = -1;
-   unsigned int best_benefit = 0.0;
+   float best_benefit = 0.0;
    unsigned int n;
 
    for (n = 0; n < g->count; n++) {

commit 26f802d0635fc247bbc3ebf6f7e9bf126b6b5e69
Author: Brian Paul <brianp@vmware.com>
Date:   Wed Jan 30 17:44:25 2013 -0700

    svga: check for NaN shader immediates
    
    The svga device doesn't handle them.  Replace with zeros.
    Fixes several piglit tests, such as "glsl-const-builtin-inversesqrt".
    
    Reviewed-by: Reviewed-by: José Fonseca <jfonseca@vmware.com>
    (cherry picked from commit 3cb491534493a52e9a88cb88d31727569afb8167)

diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c
index 36ed008..d439e5b 100644
--- a/src/gallium/drivers/svga/svga_tgsi_insn.c
+++ b/src/gallium/drivers/svga/svga_tgsi_insn.c
@@ -2716,8 +2716,10 @@ static boolean svga_emit_immediate( struct svga_shader_emitter *emit,
    unsigned i;
 
    assert(1 <= imm->Immediate.NrTokens && imm->Immediate.NrTokens <= 5);
-   for (i = 0; i < imm->Immediate.NrTokens - 1; i++)
-      value[i] = imm->u[i].Float;
+   for (i = 0; i < imm->Immediate.NrTokens - 1; i++) {
+      float f = imm->u[i].Float;
+      value[i] = util_is_inf_or_nan(f) ? 0.0f : f;
+   }
 
    for ( ; i < 4; i++ )
       value[i] = id[i];

commit cda92f5191cd2ed4782dbdd41143d520857861c9
Author: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Date:   Tue Jun 18 16:41:43 2013 +0100

    st/dri/sw: Fix pitch calculation in drisw_update_tex_buffer
    
    swrastGetImage rounds the pitch up to 4 bytes for compatibility reasons
    that are explained in drisw_glx.c:bytes_per_line, so drisw_update_tex_buffer
    must do the same.
    
    Fixes window skew seen while running firefox over vnc on a 16-bit screen.
    
    NOTE: This is a candidate for the stable branches.
    
    [ajax: fixed typo in comment]
    
    Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
    Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
    (cherry picked from commit 5a0556f061d9db00dd7637433d393beead3b3d85)

diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c
index 7a5f797..41f66d5 100644
--- a/src/gallium/state_trackers/dri/sw/drisw.c
+++ b/src/gallium/state_trackers/dri/sw/drisw.c
@@ -265,8 +265,9 @@ drisw_update_tex_buffer(struct dri_drawable *drawable,
    /* Copy the Drawable content to the mapped texture buffer */
    get_image(dPriv, x, y, w, h, map);
 
-   /* The pipe transfer has a pitch rounded up to the nearest 64 pixels. */
-   ximage_stride = w * cpp;
+   /* The pipe transfer has a pitch rounded up to the nearest 64 pixels.
+      get_image() has a pitch rounded up to 4 bytes.  */
+   ximage_stride = ((w * cpp) + 3) & -4;
    for (line = h-1; line; --line) {
       memmove(&map[line * transfer->stride],
               &map[line * ximage_stride],

commit 5412ae63dca1b1a6c43fccb5bafe56a0cd9c9a88
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Tue Jun 18 16:53:46 2013 -0400

    wayland: Handle global_remove event as well
    
    We need to set up a handler for the global_remove event that gets sent
    out when a global gets removed.  Without the handler we end up calling
    a NULL pointer.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=65910
    
    NOTE: This is a candidate for the stable branches.
    
    Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
    (cherry picked from commit 712269d6744a8849d1d0cf01fa0132d969b79ed4)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 99d8729..e106dc2 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -643,8 +643,15 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t name,
    }
 }
 
+static void
+registry_handle_global_remove(void *data, struct wl_registry *registry,
+			      uint32_t name)
+{
+}
+
 static const struct wl_registry_listener registry_listener = {
-	registry_handle_global
+   registry_handle_global,
+   registry_handle_global_remove
 };
 
 EGLBoolean

commit 8ed60f7f7fb060ccf939328bb03c9714b207236f
Author: Richard Sandiford <r.sandiford@uk.ibm.com>
Date:   Mon Jun 17 12:13:25 2013 -0400

    st/xlib: Fix XImage stride calculation
    
    Fixes window skew seen while running gnome on a 16-bit screen over vnc.
    
    NOTE: This is a candidate for stable release branches.
    
    Reviewed-by: Brian Paul <brianp@vmware.com>
    Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
    (cherry picked from commit c132c2978b02da7140462a633605a0127dfcceb4)

diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index 4f99e23..9bfd372 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -1366,7 +1366,7 @@ XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
       enum pipe_format internal_format = res->format;


Reply to: