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

mesa: Changes to 'upstream-experimental'



 Makefile.am                                                              |    2 
 VERSION                                                                  |    2 
 bin/.cherry-ignore                                                       |    5 
 docs/relnotes/10.0.1.html                                                |  150 ++++++++++
 src/egl/drivers/dri2/platform_wayland.c                                  |   21 +
 src/gallium/drivers/nouveau/nouveau_buffer.c                             |    3 
 src/gallium/drivers/nouveau/nouveau_fence.c                              |   11 
 src/gallium/drivers/nouveau/nouveau_vp3_video.c                          |    7 
 src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c                       |   61 ++--
 src/gallium/drivers/nouveau/nv50/nv50_screen.c                           |    2 
 src/gallium/drivers/nouveau/nv50/nv50_state_validate.c                   |    4 
 src/gallium/drivers/nouveau/nv50/nv50_tex.c                              |    2 
 src/gallium/drivers/nouveau/nv50/nv50_vbo.c                              |    9 
 src/gallium/drivers/nouveau/nv50/nv98_video.c                            |    6 
 src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c |   11 
 src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c                |    4 
 src/gallium/state_trackers/xa/xa_tracker.h                               |    2 
 src/glsl/ast_to_hir.cpp                                                  |    2 
 src/mesa/drivers/dri/common/megadriver_stub.c                            |  126 ++++++++
 src/mesa/drivers/dri/i965/brw_blorp_blit.cpp                             |   15 +
 src/mesa/drivers/dri/i965/brw_blorp_clear.cpp                            |   29 -
 src/mesa/drivers/dri/swrast/swrast.c                                     |    2 
 src/mesa/main/context.c                                                  |    1 
 src/mesa/main/performance_monitor.c                                      |   19 +
 src/mesa/main/performance_monitor.h                                      |    3 
 25 files changed, 413 insertions(+), 86 deletions(-)

New commits:
commit 6f7da0188a73f9aa75c8703d742602b975b10207
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Dec 12 22:16:28 2013 -0800

    docs: Add md5sums for the 10.0.1 release.

diff --git a/docs/relnotes/10.0.1.html b/docs/relnotes/10.0.1.html
index bd32355..b3f900b 100644
--- a/docs/relnotes/10.0.1.html
+++ b/docs/relnotes/10.0.1.html
@@ -31,6 +31,9 @@ because compatibility contexts not supported.
 
 <h2>MD5 checksums</h2>
 <pre>
+0a72ca5b36046a658bf6038326ff32ed  MesaLib-10.0.1.tar.bz2
+01bde35c912e504ba62caf1ef9f7022c  MesaLib-10.0.1.tar.gz
+59a174a11a89e6b1b8ee9c3f7e3c388c  MesaLib-10.0.1.zip
 </pre>
 
 

commit 12484d2582a478b3ef126efe12f24c8e4a4d4db7
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Dec 12 21:34:55 2013 -0800

    Update version for the 10.0.1 release.
    
    It's so nice that this is updated in just a single place now. Thanks, Emil!

diff --git a/VERSION b/VERSION
index a13e7b9..1532420 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.0.0
+10.0.1

commit d573899b932435b0b37a7a33ebcbdc3c8cedd3e1
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Dec 12 21:33:02 2013 -0800

    Makefile: Add bin/test-driver to EXTRA_FILES
    
    I'm not sure why this change is necessary. When I've built previous tar files
    (such as 9.2.4) with the "make tarballs" target, they include the
    bin/test-driver file. But at my first attempt to build the tar files for the
    10.0.1 release this file was not being included and the build failed.

diff --git a/Makefile.am b/Makefile.am
index 600adad..4780510 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,6 +45,7 @@ EXTRA_FILES = \
 	bin/ltmain.sh					\
 	bin/missing					\
 	bin/ylwrap					\
+        bin/test-driver					\
 	src/glsl/glsl_parser.cpp			\
 	src/glsl/glsl_parser.h				\
 	src/glsl/glsl_lexer.cpp				\

commit 142144e7fdb6776500bf9f85da42565d15870771
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Dec 12 21:16:37 2013 -0800

    docs: Add release notes for 10.0.1

diff --git a/docs/relnotes/10.0.1.html b/docs/relnotes/10.0.1.html
new file mode 100644
index 0000000..bd32355
--- /dev/null
+++ b/docs/relnotes/10.0.1.html
@@ -0,0 +1,147 @@
+<!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 10.0.1 Release Notes / (December 12, 2013)</h1>
+
+<p>
+Mesa 10.0.1 is a bug fix release which fixes bugs found since the 10.0 release.
+</p>
+<p>
+Mesa 10.0.1 implements the OpenGL 3.3 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.3.  OpenGL
+3.3 is <strong>only</strong> available if requested at context creation
+because compatibility contexts not supported.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+</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=64323";>Bug 64323</a> - Severe misrendering in Left 4 Dead 2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=68838";>Bug 68838</a> - GLSL: struct declarations produce a &quot;empty declaration warning&quot; in 9.2</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=69155";>Bug 69155</a> - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70250";>Bug 70250</a> - weston-terminal rendering corrupted with output transform 90 and 270</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=70601";>Bug 70601</a> - [SNB Bisected]Piglit spec/ARB_texture_float/multisample-formats 2 GL_ARB_texture_float fails</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72230";>Bug 72230</a> - Unable to extract MesaLib-10.0.0.tar.{gz,bz2} with bsdtar</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72325";>Bug 72325</a> - [swrast] piglit glean fbo regression</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=72327";>Bug 72327</a> - [swrast] piglit glean pointSprite regression</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-10.0..mesa-10.0.1
+</pre>
+
+<p>Axel Davy (2):</p>
+<ul>
+  <li>egl/wayland: Flush the wl_display at the end of SwapBuffers</li>
+  <li>Enable throttling in SwapBuffers</li>
+</ul>
+
+<p>Chad Versace (2):</p>
+<ul>
+  <li>i965/hsw: Apply non-msrt fast color clear w/a to all HSW GTs</li>
+  <li>i965: Add extra-alignment for non-msrt fast color clear for all hw (v2)</li>
+</ul>
+
+<p>Dave Airlie (1):</p>
+<ul>
+  <li>swrast: fix readback regression since inversion fix</li>
+</ul>
+
+<p>Emil Velikov (1):</p>
+<ul>
+  <li>automake: include only one copy VERSION in tarball</li>
+</ul>
+
+<p>Ian Romanick (3):</p>
+<ul>
+  <li>docs: Add 10.0 release md5sums</li>
+  <li>Remove a057b83 from the pick list</li>
+  <li>glsl: Don't emit empty declaration warning for a struct specifier</li>
+</ul>
+
+<p>Ilia Mirkin (8):</p>
+<ul>
+  <li>mesa: don't leak performance monitors on context destroy</li>
+  <li>nv50: Fix GPU_READING/WRITING bit removal</li>
+  <li>nouveau: avoid leaking fences while waiting</li>
+  <li>nv50: wait on the buf's fence before sticking it into pushbuf</li>
+  <li>nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)</li>
+  <li>nouveau/video: update h264 picparm field names based on usage</li>
+  <li>nouveau/video: update a few more h264 picparm field names</li>
+  <li>nv50: report 15 max inputs for fragment programs</li>
+</ul>
+
+<p>Jordan Justen (1):</p>
+<ul>
+  <li>dri megadriver_stub: add compatibility for older DRI loaders</li>
+</ul>
+
+<p>Kristian Høgsberg (2):</p>
+<ul>
+  <li>egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffers</li>
+  <li>egl/wayland: Send commit after flushing the driver context</li>
+</ul>
+
+<p>Maarten Lankhorst (1):</p>
+<ul>
+  <li>nouveau: Fix compiler warning regression</li>
+</ul>
+
+<p>Paul Berry (1):</p>
+<ul>
+  <li>i965/gen6: Fix multisample resolve blits for luminance/intensity 32F formats.</li>
+</ul>
+
+<p>Thomas Hellstrom (1):</p>
+<ul>
+  <li>st/xa: Bump major version number to 2</li>
+</ul>
+
+<p>Tom Stellard (2):</p>
+<ul>
+  <li>r300/compiler/tests: Fix segfault</li>
+  <li>r300/compiler/tests: Fix line length check in test parser</li>
+</ul>
+
+</div>
+</body>
+</html>

commit a717ae1b2d2d7ea40cb5fc4cb5b396a16355a0c6
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Sun Dec 1 03:44:42 2013 -0500

    nv50: report 15 max inputs for fragment programs
    
    First off, nv50_program only has 16 in/out varyings. However reporting
    16 makes 'm' become 68 in nv50_fp_linkage_validate with the
    varying-packing-simple piglit test. (Subverting the assert makes it
    compile but fail.) With this patch, varying-packing-simple passes.
    
    See: https://bugs.freedesktop.org/show_bug.cgi?id=69155
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit bad8871e524cf518bc5da4ac52c1618a115054a7)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 0ce9e34..6d598b7 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -224,7 +224,7 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader,
    case PIPE_SHADER_CAP_MAX_INPUTS:
       if (shader == PIPE_SHADER_VERTEX)
          return 32;
-      return 0x300 / 16;
+      return 15;
    case PIPE_SHADER_CAP_MAX_CONSTS:
       return 65536 / 16;
    case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:

commit a876ea4b7655e0ae09bf40a5f95dcecb84b5705b
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Dec 10 08:43:03 2013 +0100

    nouveau: Fix compiler warning regression
    
    cfg is now unused, remove it.
    
    Cc: "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 5576ad11ed922fad641e630fbb9b199f6434f528)

diff --git a/src/gallium/drivers/nouveau/nv50/nv98_video.c b/src/gallium/drivers/nouveau/nv50/nv98_video.c
index f748c81..20ea547 100644
--- a/src/gallium/drivers/nouveau/nv50/nv98_video.c
+++ b/src/gallium/drivers/nouveau/nv50/nv98_video.c
@@ -64,10 +64,6 @@ nv98_create_decoder(struct pipe_context *context,
    struct nouveau_vp3_decoder *dec;
    struct nouveau_pushbuf **push;
    struct nv04_fifo nv04_data = {.vram = 0xbeef0201, .gart = 0xbeef0202};
-   union nouveau_bo_config cfg;
-
-   cfg.nv50.tile_mode = 0x20;
-   cfg.nv50.memtype = 0x70;
 
    int ret, i;
    uint32_t codec = 1, ppp_codec = 3;

commit d7a71b7181e13332e6f27e0d8d810b84d14a130c
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Dec 5 13:30:17 2013 +1000

    swrast: fix readback regression since inversion fix
    
    This readback from the frontbuffer with swrast was broken, that bug
    just made it more obviously broken, this fixes it by inverting the
    sub image gets. Also fixes a few other piglits.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72327
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72325
    
    (for 9.2 the patches this depends on were asked to be backported separately
     in an email).
    Cc: "9.2" "10.0" mesa-stable@lists.fedoraproject.org
    Reviewed-by: Brian Paul <brianp@vmware.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    
    (cherry picked from commit 0b16042377a6981ff9bba92387889524a3547b3f)

diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 73dc5c4..0e1c530 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -402,7 +402,7 @@ swrast_map_renderbuffer(struct gl_context *ctx,
       stride = w * cpp;
       xrb->Base.Buffer = malloc(h * stride);
 
-      sPriv->swrast_loader->getImage(dPriv, x, y, w, h,
+      sPriv->swrast_loader->getImage(dPriv, x, rb->Height - y - h, w, h,
 				     (char *) xrb->Base.Buffer,
 				     dPriv->loaderPrivate);
 

commit 2776a496d4fa28f7d5039eb7f8d79c047a6e7d9f
Author: Axel Davy <axel.davy@ens.fr>
Date:   Tue Dec 3 17:04:10 2013 +0100

    Enable throttling in SwapBuffers
    
    flush_with_flags, when available, allows the driver to throttle.
    Using this suppress input lag issues that can be observed in heavy
    rendering situations on non-intel cards.
    
    Signed-off-by: Axel Davy <axel.davy@ens.fr>
    Cc: "10.0" mesa-stable@lists.freedesktop.org
    (cherry picked from commit afcce46fd505da51883000249ef29dd69f1d7791)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 82be48f..43e8f4b 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -557,6 +557,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
+   struct dri2_egl_context *dri2_ctx;
+   _EGLContext *ctx;
    int i, ret = 0;
 
    while (dri2_surf->frame_callback && ret != -1)
@@ -610,7 +612,17 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
       }
    }
 
-   (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
+   if (dri2_dpy->flush->base.version >= 4) {
+      ctx = _eglGetCurrentContext();
+      dri2_ctx = dri2_egl_context(ctx);
+      (*dri2_dpy->flush->flush_with_flags)(dri2_ctx->dri_context,
+                                           dri2_surf->dri_drawable,
+                                           __DRI2_FLUSH_DRAWABLE,
+                                           __DRI2_THROTTLE_SWAPBUFFER);
+   } else {
+      (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
+   }
+
    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
 
    wl_surface_commit(dri2_surf->wl_win->surface);

commit 1919ec6ba43a8fb229495e2ebb87789fb11ffb8c
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Dec 4 12:08:35 2013 -0800

    egl/wayland: Send commit after flushing the driver context
    
    This typically won't make a difference, since we only send the requests at
    wl_display_flush() time.  There might be a small race
    with another thread calling wl_display_flush() after our commit request,
    but before we flush the DRI driver.  Moving the commit below the DRI
    driver flush call looks more natural and eliminates the small race.
    
    Cc: "10.0" mesa-stable@lists.freedesktop.org
    (cherry picked from commit 33eb5eabeec0c17e81b6bb11be703701e4025d4e)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index d28fb72..82be48f 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -610,11 +610,10 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
       }
    }
 
-   wl_surface_commit(dri2_surf->wl_win->surface);
-
    (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
 
+   wl_surface_commit(dri2_surf->wl_win->surface);
    wl_display_flush(dri2_dpy->wl_dpy);
 
    return EGL_TRUE;

commit 188c60143b1e77e62ec8404e8ecde2472fe9b80f
Author: Axel Davy <axel.davy@ens.fr>
Date:   Tue Dec 3 17:38:09 2013 +0100

    egl/wayland: Flush the wl_display at the end of SwapBuffers
    
    We would like the compositor to receive the commited buffer
    as soon as possible, so it has the time to treat it, and
    release old ones. We shouldn't rely on the client
    to flush the queue for us.
    
    Signed-off-by: Axel Davy <axel.davy@ens.fr>
    Cc: "10.0" mesa-stable@lists.freedesktop.org
    (cherry picked from commit 402bf6e8d098b64390277b229f7fae769e4449e5)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 3c301b6..d28fb72 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -615,6 +615,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
    (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);
 
+   wl_display_flush(dri2_dpy->wl_dpy);
+
    return EGL_TRUE;
 }
 

commit d0f606ffbde369aae3acf8c943ef38002ae14e62
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Wed Dec 4 16:13:35 2013 -0800

    egl/wayland: Damage INT32_MAX x INT32_MAX region for eglSwapBuffers
    
    If we're not using EGL_EXT_swap_buffers_with_damage, we have to
    damage the full extent.  EGL operates on buffer coordinates, but
    wl_surface.damage takes surface coordinates.  EGL doesn't know the
    buffer transformation (rotated or scaled) and can't post accurate
    damage in surface coordinates.  The damage event however is clipped to
    the surface extents so we can just damage the maximum rectangle.
    
    In case of EGL_EXT_swap_buffers_with_damage, the application knows
    the buffer transform and is expected to pass in rectangles in
    surface space.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70250
    Cc: "10.0" mesa-stable@lists.freedesktop.org
    Tested-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
    (cherry picked from commit bce64c6c83122b1f4a684cc7890c7a61d2f9ffd7)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index f9065bb..3c301b6 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -598,8 +598,8 @@ dri2_swap_buffers_with_damage(_EGLDriver *drv,
    dri2_surf->dy = 0;
 
    if (n_rects == 0) {
-      wl_surface_damage(dri2_surf->wl_win->surface, 0, 0,
-                        dri2_surf->base.Width, dri2_surf->base.Height);
+      wl_surface_damage(dri2_surf->wl_win->surface,
+                        0, 0, INT32_MAX, INT32_MAX);
    } else {
       for (i = 0; i < n_rects; i++) {
          const int *rect = &rects[i * 4];

commit fdede182756e01690df62cece8a022c437274201
Author: Jordan Justen <jordan.l.justen@intel.com>
Date:   Fri Dec 6 02:21:17 2013 -0800

    dri megadriver_stub: add compatibility for older DRI loaders
    
    To help the transition period when DRI loaders are being updated
    to support the newer __driDriverExtensions_foo mechanism,
    we populate __driDriverExtensions with the extensions returned
    by __driDriverExtensions_foo during a library contructor
    function.
    
    We find the driver foo's name by using the dladdr function
    which gives the path of the dynamic library's name that
    was being loaded.
    
    Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Cc: "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 4859d492b25cba61f43bb883d878d6388be742be)

diff --git a/src/mesa/drivers/dri/common/megadriver_stub.c b/src/mesa/drivers/dri/common/megadriver_stub.c
index 6bf5d73..a821770 100644
--- a/src/mesa/drivers/dri/common/megadriver_stub.c
+++ b/src/mesa/drivers/dri/common/megadriver_stub.c
@@ -23,6 +23,132 @@
 
 #include <stdio.h>
 #include "dri_util.h"
+#include <dlfcn.h>
+#include "main/macros.h"
+
+/* We need GNU extensions to dlfcn.h in order to provide backward
+ * compatibility for the older DRI driver loader mechanism. (dladdr,
+ * Dl_info, and RTLD_DEFAULT are only defined when _GNU_SOURCE is
+ * defined.)
+ */
+#ifdef _GNU_SOURCE
+
+#define MEGADRIVER_STUB_MAX_EXTENSIONS 10
+#define LIB_PATH_SUFFIX "_dri.so"
+#define LIB_PATH_SUFFIX_LENGTH (sizeof(LIB_PATH_SUFFIX)-1)
+
+/* This is the table of extensions that the loader will dlsym() for.
+ *
+ * Initially it is empty for the megadriver stub, but the library
+ * constructor may initialize it based on the name of the library that
+ * is being loaded.
+ */
+PUBLIC const __DRIextension *
+__driDriverExtensions[MEGADRIVER_STUB_MAX_EXTENSIONS] = {
+   NULL
+};
+
+/**
+ * This is a constructor function for the megadriver dynamic library.
+ *
+ * When the driver is dlopen'ed, this function will run. It will
+ * search for the name of the foo_dri.so file that was opened using
+ * the dladdr function.
+ *
+ * After finding foo's name, it will call __driDriverGetExtensions_foo
+ * and use the return to update __driDriverExtensions to enable
+ * compatibility with older DRI driver loaders.
+ */
+__attribute__((constructor)) static void
+megadriver_stub_init(void)
+{
+   Dl_info info;
+   char *driver_name;
+   size_t name_len;
+   char *get_extensions_name;
+   const __DRIextension **(*get_extensions)(void);
+   const __DRIextension **extensions;
+   int i;
+
+   /* Call dladdr on __driDriverExtensions. We are really
+    * interested in the returned info.dli_fname so we can
+    * figure out the path name of the library being loaded.
+    */
+   i = dladdr((void*) __driDriverExtensions, &info);
+   if (i == 0)
+      return;
+
+   /* Search for the last '/' character in the path. */
+   driver_name = strrchr(info.dli_fname, '/');
+   if (driver_name != NULL) {
+      /* Skip '/' character */
+      driver_name++;
+   } else {
+      /* Try using the start of the path */
+      driver_name = (char*) info.dli_fname;
+   }
+
+   /* Make sure the path ends with _dri.so */
+   name_len = strlen(driver_name);
+   i = name_len - LIB_PATH_SUFFIX_LENGTH;
+   if (i < 0 || strcmp(driver_name + i, LIB_PATH_SUFFIX) != 0)
+      return;
+
+   /* Duplicate the string so we can modify it.
+    * So far we've been using info.dli_fname.
+    */
+   driver_name = strdup(driver_name);
+   if (!driver_name)
+      return;
+
+   /* The path ends with _dri.so. Chop this part of the
+    * string off. Then we'll have the driver's final name.
+    */
+   driver_name[i] = '\0';
+
+   i = asprintf(&get_extensions_name, "%s_%s",
+                __DRI_DRIVER_GET_EXTENSIONS, driver_name);
+   free(driver_name);
+   if (i == -1)
+      return;
+
+   /* dlsym to get the driver's get extensions function. We
+    * don't have the dlopen handle, so we have to use
+    * RTLD_DEFAULT. It seems unlikely that the symbol will
+    * be found in another library, but this isn't optimal.
+    */
+   get_extensions = dlsym(RTLD_DEFAULT, get_extensions_name);
+   free(get_extensions_name);
+   if (!get_extensions)
+      return;
+
+   /* Use the newer DRI loader entrypoint to find extensions.
+    * We will then expose these extensions via the older
+    * __driDriverExtensions symbol.
+    */
+   extensions = get_extensions();
+
+   /* Copy the extensions into the __driDriverExtensions array
+    * we declared.
+    */
+   for (i = 0; i < ARRAY_SIZE(__driDriverExtensions); i++) {
+      __driDriverExtensions[i] = extensions[i];
+      if (extensions[i] == NULL)
+         break;
+   }
+
+   /* If the driver had more extensions than we reserved, then
+    * bail out.
+    */
+   if (i == ARRAY_SIZE(__driDriverExtensions)) {
+      __driDriverExtensions[0] = NULL;
+      fprintf(stderr, "Megadriver stub did not reserve enough extension "
+              "slots.\n");
+      return;
+   }
+}
+
+#endif /* _GNU_SOURCE */
 
 static const
 __DRIconfig **stub_error_init_screen(__DRIscreen *psp)

commit 4cbd4246315314cbd6e9c93013f93363a1a376cb
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Mon Dec 2 21:04:58 2013 -0500

    r300/compiler/tests: Fix line length check in test parser
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    
    CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 9a5ce0c4c971a8511574e10dd3ef37eebbe65ce7)

diff --git a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
index af7b3ce..b4e30d8 100644
--- a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
+++ b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
@@ -542,6 +542,7 @@ unsigned load_program(
 	char **string_store;
 	unsigned i = 0;
 
+	memset(line, 0, sizeof(line));
 	snprintf(path, MAX_PATH_LENGTH, "compiler/tests/%s", filename);
 	file = fopen(path, "r");
 	if (!file) {
@@ -552,7 +553,8 @@ unsigned load_program(
 	count = &test->num_input_lines;
 
 	while (fgets(line, MAX_LINE_LENGTH, file)){
-		if (line[MAX_LINE_LENGTH - 2] == '\n') {
+		char last_char = line[MAX_LINE_LENGTH - 1];
+		if (last_char && last_char != '\n') {
 			fprintf(stderr, "Error line cannot be longer than 100 "
 				"characters:\n%s\n", line);
 			return 0;

commit 331a8a35864c2aae808ed49ae3dfe3d58a49db6e
Author: Tom Stellard <thomas.stellard@amd.com>
Date:   Mon Dec 2 21:04:42 2013 -0500

    r300/compiler/tests: Fix segfault
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    
    CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 1896431f7933e727a0f75c0e0a2da4c580a04a72)

diff --git a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
index 511596c..5306b08 100644
--- a/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
+++ b/src/gallium/drivers/r300/compiler/tests/radeon_compiler_regalloc_tests.c
@@ -79,14 +79,13 @@ static void test_runner_rc_regalloc(
 
 static void tex_1d_swizzle(struct test_result *result)
 {
-	struct radeon_compiler c;
+	struct r300_fragment_program_compiler c;
 
-	init_compiler(&c, RC_FRAGMENT_PROGRAM, 0, 0);
-	struct r300_fragment_program_compiler *cc =
-		(struct r300_fragment_program_compiler*)&c;
-	cc->AllocateHwInputs = dummy_allocate_hw_inputs;
+	memset(&c, 0, sizeof(c));
+	init_compiler(&c.Base, RC_FRAGMENT_PROGRAM, 0, 0);
+	c.AllocateHwInputs = dummy_allocate_hw_inputs;
 
-	test_runner_rc_regalloc(result, &c, "regalloc_tex_1d_swizzle.test");
+	test_runner_rc_regalloc(result, &c.Base, "regalloc_tex_1d_swizzle.test");
 }
 
 unsigned radeon_compiler_regalloc_run_tests()

commit f528981f1a9534c5aaf1256b380170700bf8b70f
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Sat Dec 7 12:59:25 2013 -0500

    nouveau/video: update a few more h264 picparm field names
    
    Based on comments by Benjamin Morris <bmorris@nvidia.com> in
    http://lists.freedesktop.org/archives/nouveau/2013-December/015328.html
    
    This adds setting of is_long_term, and updates a few field names we were
    unclear about.
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 2cd2b9705e722d94091ce8ff6ff56a44dd8d5cc6)

diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
index ad4a586..1130d10 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
@@ -114,7 +114,7 @@ struct h264_picparm_vp { // 700..a00
 	uint32_t stride1, stride2; // 04 08
 	uint32_t ofs[6]; // 0c..24 in-image offset
 
-	uint32_t u24; // nfi ac8 ?
+	uint32_t tmp_stride;
 	uint32_t bucket_size; // 28 bucket size
 	uint32_t inter_ring_data_size; // 2c
 
@@ -125,10 +125,10 @@ struct h264_picparm_vp { // 700..a00
 	unsigned is_reference : 1; // 4
 	unsigned interlace : 1; // 5 field_pic_flag
 	unsigned bottom_field_flag : 1; // 6
-	unsigned f7 : 1; // 7 0x80: nfi yet
+	unsigned second_field : 1; // 7 0x80: nfi yet
 
 	signed log2_max_frame_num_minus4 : 4; // 31 0..3
-	unsigned u31_45 : 2; // 31 4..5
+	unsigned chroma_format_idc : 2; // 31 4..5
 	unsigned pic_order_cnt_type : 2; // 31 6..7
 	signed pic_init_qp_minus26 : 6; // 32 0..5
 	signed chroma_qp_index_offset : 5; // 32 6..10
@@ -148,11 +148,11 @@ struct h264_picparm_vp { // 700..a00
 		unsigned tmp_idx : 5; // 00 7..11
 		unsigned top_is_reference : 1; // 00 12
 		unsigned bottom_is_reference : 1; // 00 13
-		unsigned unk14 : 1; // 00 14 skipped?
+		unsigned is_long_term : 1; // 00 14
 		unsigned notseenyet : 1; // 00 15 pad?
 		unsigned field_pic_flag : 1; // 00 16
-		unsigned unk17 : 4; // 00 17..20
-		unsigned unk21 : 4; // 00 21..24
+		unsigned top_field_marking : 4; // 00 17..20
+		unsigned bottom_field_marking : 4; // 00 21..24
 		unsigned pad : 7; // 00 d25..31
 
 		uint32_t field_order_cnt[2]; // 04,08
@@ -333,8 +333,8 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
    nouveau_vp3_ycbcr_offsets(dec, &h->ofs[1], &h->ofs[3], &h->ofs[4]);
    h->ofs[5] = h->ofs[3];
    h->ofs[0] = h->ofs[2] = 0;
-   h->u24 = dec->tmp_stride >> 8;
-   assert(h->u24);
+   h->tmp_stride = dec->tmp_stride >> 8;
+   assert(h->tmp_stride);
    nouveau_vp3_inter_sizes(dec, 1, &ring, &h->bucket_size, &h->inter_ring_data_size);
 
    h->u220 = 0;
@@ -345,9 +345,9 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
    h->is_reference = d->is_reference;
    h->interlace = d->field_pic_flag;
    h->bottom_field_flag = d->bottom_field_flag;
-   h->f7 = 0; // TODO: figure out when set..
+   h->second_field = 0; // TODO: figure out when set..
    h->log2_max_frame_num_minus4 = d->pps->sps->log2_max_frame_num_minus4;
-   h->u31_45 = 1;
+   h->chroma_format_idc = 1;
 
    h->pic_order_cnt_type = d->pps->sps->pic_order_cnt_type;
    h->pic_init_qp_minus26 = d->pps->pic_init_qp_minus26;
@@ -377,15 +377,16 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
          h->refs[j].top_is_reference = d->top_is_reference[i];
          h->refs[j].bottom_is_reference = d->bottom_is_reference[i];
       }
-      h->refs[j].unk14 = 0;
+      h->refs[j].is_long_term = d->is_long_term[i];
       h->refs[j].notseenyet = 0;
       h->refs[j].field_pic_flag = dec->refs[refs[j]->valid_ref].field_pic_flag;
-      h->refs[j].unk17 = dec->refs[refs[j]->valid_ref].decoded_top &&
-                         d->top_is_reference[i];
-      h->refs[j].unk21 = dec->refs[refs[j]->valid_ref].decoded_bottom &&
-                         d->bottom_is_reference[i];
+      h->refs[j].top_field_marking =
+         dec->refs[refs[j]->valid_ref].decoded_top && d->top_is_reference[i] ?
+         1 + d->is_long_term[i] : 0;
+      h->refs[j].bottom_field_marking =
+         dec->refs[refs[j]->valid_ref].decoded_bottom && d->bottom_is_reference[i] ?
+         1 + d->is_long_term[i] : 0;
       h->refs[j].pad = 0;
-      assert(!d->is_long_term[i]);
       j++;
    }
    for (; i < 16; ++i)

commit d5f1a270eff1d91051c554dff68f4a40dbdd0478
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Sat Dec 7 12:00:47 2013 -0500

    nouveau/video: update h264 picparm field names based on usage
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Cc: "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 78525dae8ae4daf785e89ba8a334e4ec3be8a334)

diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
index a0f5332..ad4a586 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video_vp.c
@@ -118,10 +118,10 @@ struct h264_picparm_vp { // 700..a00
 	uint32_t bucket_size; // 28 bucket size
 	uint32_t inter_ring_data_size; // 2c
 
-	unsigned f0 : 1; // 0 0x01: into 640 shifted by 3, 540 shifted by 5, half size something?
-	unsigned f1 : 1; // 1 0x02: into vuc ofs 56
+	unsigned mb_adaptive_frame_field_flag : 1; // 0
+	unsigned direct_8x8_inference_flag : 1; // 1 0x02: into vuc ofs 56
 	unsigned weighted_pred_flag : 1; // 2 0x04
-	unsigned f3 : 1; // 3 0x08: into vuc ofs 68
+	unsigned constrained_intra_pred_flag : 1; // 3 0x08: into vuc ofs 68
 	unsigned is_reference : 1; // 4
 	unsigned interlace : 1; // 5 field_pic_flag
 	unsigned bottom_field_flag : 1; // 6
@@ -144,15 +144,13 @@ struct h264_picparm_vp { // 700..a00
 	uint32_t field_order_cnt[2]; // 38, 3c
 
 	struct { // 40
-		// 0x00223102
-		// nfi (needs: top_is_reference, bottom_is_reference, is_long_term, maybe some other state that was saved..
 		unsigned fifo_idx : 7; // 00 0..6
 		unsigned tmp_idx : 5; // 00 7..11
-		unsigned unk12 : 1; // 00 12 not seen yet, but set, maybe top_is_reference
-		unsigned unk13 : 1; // 00 13 not seen yet, but set, maybe bottom_is_reference?
+		unsigned top_is_reference : 1; // 00 12
+		unsigned bottom_is_reference : 1; // 00 13
 		unsigned unk14 : 1; // 00 14 skipped?
 		unsigned notseenyet : 1; // 00 15 pad?
-		unsigned unk16 : 1; // 00 16
+		unsigned field_pic_flag : 1; // 00 16
 		unsigned unk17 : 4; // 00 17..20
 		unsigned unk21 : 4; // 00 21..24
 		unsigned pad : 7; // 00 d25..31
@@ -340,10 +338,10 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
    nouveau_vp3_inter_sizes(dec, 1, &ring, &h->bucket_size, &h->inter_ring_data_size);
 
    h->u220 = 0;
-   h->f0 = d->pps->sps->mb_adaptive_frame_field_flag;
-   h->f1 = d->pps->sps->direct_8x8_inference_flag;
+   h->mb_adaptive_frame_field_flag = d->pps->sps->mb_adaptive_frame_field_flag;
+   h->direct_8x8_inference_flag = d->pps->sps->direct_8x8_inference_flag;
    h->weighted_pred_flag = d->pps->weighted_pred_flag;
-   h->f3 = d->pps->constrained_intra_pred_flag;
+   h->constrained_intra_pred_flag = d->pps->constrained_intra_pred_flag;
    h->is_reference = d->is_reference;
    h->interlace = d->field_pic_flag;
    h->bottom_field_flag = d->bottom_field_flag;
@@ -376,12 +374,12 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
       h->refs[j].field_order_cnt[1] = d->field_order_cnt_list[i][1];
       h->refs[j].frame_idx = d->frame_num_list[i];
       if (!dec->refs[refs[j]->valid_ref].field_pic_flag) {
-         h->refs[j].unk12 = d->top_is_reference[i];
-         h->refs[j].unk13 = d->bottom_is_reference[i];
+         h->refs[j].top_is_reference = d->top_is_reference[i];
+         h->refs[j].bottom_is_reference = d->bottom_is_reference[i];
       }
       h->refs[j].unk14 = 0;
       h->refs[j].notseenyet = 0;
-      h->refs[j].unk16 = dec->refs[refs[j]->valid_ref].field_pic_flag;
+      h->refs[j].field_pic_flag = dec->refs[refs[j]->valid_ref].field_pic_flag;
       h->refs[j].unk17 = dec->refs[refs[j]->valid_ref].decoded_top &&
                          d->top_is_reference[i];
       h->refs[j].unk21 = dec->refs[refs[j]->valid_ref].decoded_bottom &&
@@ -395,7 +393,7 @@ nouveau_vp3_fill_picparm_h264_vp(struct nouveau_vp3_decoder *dec,
    assert(d->num_ref_frames <= dec->base.max_references);
 
    for (; i < d->num_ref_frames; ++i)
-      h->refs[j].unk16 = d->field_pic_flag;
+      h->refs[j].field_pic_flag = d->field_pic_flag;
    *(struct h264_picparm_vp *)map = *h;
 
    return 0x1113;

commit f4f1159716bc3157736435ff5223e3c3e41992e7
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Fri Dec 6 23:30:04 2013 -0500

    nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)
    
    Create the ref_bo without any storage type flags set for now. The issue
    probably arises from our use of the additional buffer space at the end
    of the ref_bo. It should probably be split up in the future.
    
    Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Tested-by: Martin Peres <martin.peres@labri.fr>
    Cc: "10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit e01ba9d6b049d5eee8c125e3ec43b4539c26e4d7)

diff --git a/src/gallium/drivers/nouveau/nouveau_vp3_video.c b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
index 07ce016..ff00b37 100644
--- a/src/gallium/drivers/nouveau/nouveau_vp3_video.c
+++ b/src/gallium/drivers/nouveau/nouveau_vp3_video.c
@@ -362,12 +362,7 @@ nouveau_vp3_screen_get_video_param(struct pipe_screen *pscreen,
    enum pipe_video_format codec = u_reduce_video_profile(profile);
    switch (param) {
    case PIPE_VIDEO_CAP_SUPPORTED:
-      /* For now, h264 and mpeg4 don't work on pre-nvc0. */
-      if (chipset < 0xc0)
-         return codec == PIPE_VIDEO_FORMAT_MPEG12 ||
-            codec == PIPE_VIDEO_FORMAT_VC1;
-      /* In the general case, this should work, once the pre-nvc0 problems are
-       * resolved. */
+      /* VP3 does not support MPEG4, VP4+ do. */
       return profile >= PIPE_VIDEO_PROFILE_MPEG1 && (
             !vp3 || codec != PIPE_VIDEO_FORMAT_MPEG4);
    case PIPE_VIDEO_CAP_NPOT_TEXTURES:
diff --git a/src/gallium/drivers/nouveau/nv50/nv98_video.c b/src/gallium/drivers/nouveau/nv50/nv98_video.c
index 069481d..f748c81 100644
--- a/src/gallium/drivers/nouveau/nv50/nv98_video.c
+++ b/src/gallium/drivers/nouveau/nv50/nv98_video.c
@@ -200,7 +200,7 @@ nv98_create_decoder(struct pipe_context *context,
    dec->ref_stride = mb(templ->width)*16 * (mb_half(templ->height)*32 + nouveau_vp3_video_align(templ->height)/2);
    ret = nouveau_bo_new(screen->device, NOUVEAU_BO_VRAM, 0,
                         dec->ref_stride * (templ->max_references+2) + tmp_size,
-                        &cfg, &dec->ref_bo);
+                        NULL, &dec->ref_bo);
    if (ret)
       goto fail;
 

commit b531dcaec45a9c7a9fbbf8410dbc7008823e5ebc
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Wed Nov 27 11:22:27 2013 -0800

    glsl: Don't emit empty declaration warning for a struct specifier
    
    The intention is that things like
    
       int;
    
    will generate a warning.  However, we were also accidentally emitting
    the same warning for things like
    
      struct Foo { int x; };
    
    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68838
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Cc: Aras Pranckevicius <aras@unity3d.com>
    Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 758658850bd5ba64bf2e8c04516ea1292aedcfc3)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 0128047..48c621f 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2934,7 +2934,7 @@ ast_declarator_list::hir(exec_list *instructions,
                                precision_names[this->type->qualifier.precision],
                                type_name);
          }
-      } else {
+      } else if (this->type->specifier->structure == NULL) {
          _mesa_glsl_warning(&loc, state, "empty declaration");
       }
    }

commit b160fea306b1f922d7699bf1c91f39e0a2797734
Author: Ilia Mirkin <imirkin@alum.mit.edu>
Date:   Thu Nov 28 16:23:15 2013 -0500

    nv50: wait on the buf's fence before sticking it into pushbuf
    


Reply to: