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

mesa: Changes to 'debian-experimental'



 VERSION                                                    |    2 
 bin/get-extra-pick-list.sh                                 |   22 -
 bin/get-fixes-pick-list.sh                                 |   61 +++
 bin/get-pick-list.sh                                       |    7 
 bin/get-typod-pick-list.sh                                 |    7 
 configure.ac                                               |   37 --
 debian/changelog                                           |    6 
 docs/relnotes/17.0.0.html                                  |    3 
 docs/relnotes/17.0.1.html                                  |  220 +++++++++++++
 src/amd/common/ac_nir_to_llvm.c                            |    2 
 src/amd/common/amdgpu_id.h                                 |    2 
 src/amd/vulkan/radv_cmd_buffer.c                           |    1 
 src/amd/vulkan/radv_descriptor_set.c                       |    7 
 src/amd/vulkan/radv_device.c                               |    2 
 src/amd/vulkan/radv_meta_blit2d.c                          |    7 
 src/amd/vulkan/radv_private.h                              |    1 
 src/amd/vulkan/radv_query.c                                |   72 ++--
 src/amd/vulkan/si_cmd_buffer.c                             |   11 
 src/amd/vulkan/winsys/amdgpu/radv_amdgpu_surface.c         |   14 
 src/compiler/Android.glsl.mk                               |    1 
 src/compiler/glsl/ast_to_hir.cpp                           |   17 -
 src/egl/drivers/dri2/platform_android.c                    |    2 
 src/egl/drivers/dri2/platform_wayland.c                    |   21 -
 src/egl/drivers/dri2/platform_x11_dri3.c                   |   20 +
 src/gallium/auxiliary/gallivm/lp_bld_init.c                |    5 
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp              |   41 ++
 src/gallium/auxiliary/tgsi/tgsi_sanity.c                   |    8 
 src/gallium/auxiliary/util/u_index_modify.c                |   87 -----
 src/gallium/auxiliary/util/u_index_modify.h                |   26 -
 src/gallium/auxiliary/util/u_queue.c                       |   79 ++++
 src/gallium/auxiliary/util/u_queue.h                       |    4 
 src/gallium/drivers/etnaviv/etnaviv_context.c              |   10 
 src/gallium/drivers/etnaviv/etnaviv_screen.c               |   10 
 src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp |    2 
 src/gallium/drivers/nouveau/nvc0/nvc0_query.c              |   12 
 src/gallium/drivers/nouveau/nvc0/nve4_compute.c            |    1 
 src/gallium/drivers/nouveau/nvc0/nve4_compute.h            |    7 
 src/gallium/drivers/r300/r300_render_translate.c           |    4 
 src/gallium/drivers/r300/r300_texture.c                    |    5 
 src/gallium/drivers/r600/r600_state_common.c               |    2 
 src/gallium/drivers/radeon/r600_pipe_common.h              |    1 
 src/gallium/drivers/radeonsi/Android.mk                    |    4 
 src/gallium/drivers/radeonsi/si_pipe.h                     |    3 
 src/gallium/drivers/radeonsi/si_shader.c                   |   35 +-
 src/gallium/drivers/radeonsi/si_shader.h                   |    1 
 src/gallium/drivers/radeonsi/si_state.c                    |   17 -
 src/gallium/drivers/radeonsi/si_state_draw.c               |   66 +++
 src/gallium/drivers/radeonsi/si_state_shaders.c            |    9 
 src/gallium/drivers/vc4/vc4_opt_small_immediates.c         |   11 
 src/gallium/drivers/vc4/vc4_program.c                      |    8 
 src/gallium/drivers/vc4/vc4_qir.c                          |    1 
 src/gallium/drivers/vc4/vc4_qir.h                          |    2 
 src/gallium/drivers/vc4/vc4_qpu_emit.c                     |    2 
 src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c              |    6 
 src/glx/g_glxglvnddispatchindices.h                        |    8 
 src/intel/blorp/blorp_clear.c                              |   48 +-
 src/intel/blorp/blorp_genX_exec.h                          |   19 +
 src/intel/genxml/gen6.xml                                  |    2 
 src/intel/genxml/gen7.xml                                  |    2 
 src/intel/genxml/gen75.xml                                 |    2 
 src/intel/vulkan/anv_device.c                              |   14 
 src/intel/vulkan/anv_private.h                             |   13 
 src/intel/vulkan/anv_query.c                               |   25 -
 src/intel/vulkan/anv_wsi.c                                 |   23 -
 src/intel/vulkan/genX_blorp_exec.c                         |   11 
 src/intel/vulkan/genX_cmd_buffer.c                         |   30 +
 src/loader/loader_dri3_helper.c                            |   23 +
 src/loader/loader_dri3_helper.h                            |    2 
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp                   |   29 -
 src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp     |    5 
 src/mesa/drivers/dri/i965/brw_sampler_state.c              |   37 +-
 src/mesa/drivers/dri/i965/brw_state.h                      |    1 
 src/mesa/drivers/dri/i965/genX_blorp_exec.c                |    8 
 src/mesa/main/api_validate.c                               |   45 +-
 src/mesa/state_tracker/st_atom_sampler.c                   |    2 
 75 files changed, 987 insertions(+), 376 deletions(-)

New commits:
commit 23f07a3fa3b8af79f697eeae9f788f5cd30cb8e5
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Mon Mar 6 14:02:22 2017 +0200

    update the changelog

diff --git a/debian/changelog b/debian/changelog
index 3d4b9b2..b622b0f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mesa (17.0.1-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Mon, 06 Mar 2017 13:59:38 +0200
+
 mesa (17.0.0-1) experimental; urgency=medium
 
   * New upstream release.

commit 8fee1d348cc3d91a88319c0d72689acabaa2bf47
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Mar 4 15:44:59 2017 +0000

    docs: add release notes for 17.0.1
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/docs/relnotes/17.0.1.html b/docs/relnotes/17.0.1.html
new file mode 100644
index 0000000..48772ee
--- /dev/null
+++ b/docs/relnotes/17.0.1.html
@@ -0,0 +1,220 @@
+<!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 17.0.1 Release Notes / March 4, 2017</h1>
+
+<p>
+Mesa 17.0.1 is a bug fix release which fixes bugs found since the 17.0.0 release.
+</p>
+<p>
+Mesa 17.0.1 implements the OpenGL 4.5 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 4.5.  OpenGL
+4.5 is <strong>only</strong> available if requested at context creation
+because compatibility contexts are not supported.
+</p>
+
+
+<h2>SHA256 checksums</h2>
+<pre>
+TBD
+</pre>
+
+
+<h2>New features</h2>
+<p>None</p>
+
+
+<h2>Bug fixes</h2>
+
+<ul>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=98869";>Bug 98869</a> - Electronic Super Joy graphic artefacts (regression,bisected)</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99532";>Bug 99532</a> - Compute shader doesn't give right result under some circumstances</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99677";>Bug 99677</a> - heap-use-after-free in glsl</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99692";>Bug 99692</a> - [radv] Mostly broken on Hawaii PRO/CIK ASICs</li>
+
+<li><a href="https://bugs.freedesktop.org/show_bug.cgi?id=99850";>Bug 99850</a> - Tessellation bug on Carrizo</li>
+
+</ul>
+
+
+<h2>Changes</h2>
+
+<p>Bas Nieuwenhuizen (4):</p>
+<ul>
+  <li>radv: Never try to create more than max_sets descriptor sets.</li>
+  <li>radv: Reset emitted compute pipeline when calling secondary cmd buffer.</li>
+  <li>radv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.</li>
+  <li>radv: Use correct size for availability flag.</li>
+</ul>
+
+<p>Ben Crocker (3):</p>
+<ul>
+  <li>gallivm: Reenable PPC VSX (v3)</li>
+  <li>gallivm: Improve debug output (V2)</li>
+  <li>gallivm: Override getHostCPUName() "generic" w/ "pwr8" (v4)</li>
+</ul>
+
+<p>Brendan King (1):</p>
+<ul>
+  <li>egl/dri3: implement query surface hook</li>
+</ul>
+
+<p>Christian Gmeiner (2):</p>
+<ul>
+  <li>etnaviv: move pctx initialisation to avoid a null dereference</li>
+  <li>etnaviv: remove number of pixel pipes validation</li>
+</ul>
+
+<p>Connor Abbott (1):</p>
+<ul>
+  <li>anv: fix Get*MemoryRequirements for !LLC</li>
+</ul>
+
+<p>Daniel Stone (1):</p>
+<ul>
+  <li>egl/wayland: Don't use DRM format codes for SHM</li>
+</ul>
+
+<p>Dave Airlie (6):</p>
+<ul>
+  <li>tgsi: fix memory leak in tgsi sanity check</li>
+  <li>radv: change base aligmment for allocated memory.</li>
+  <li>radv: fix cik macroModeIndex.</li>
+  <li>radv: adopt some init config workarounds from radeonsi.</li>
+  <li>radv: fix depth format in blit2d.</li>
+  <li>radv: fix txs for sampler buffers</li>
+</ul>
+
+<p>Emil Velikov (8):</p>
+<ul>
+  <li>docs: add sha256 checksums for 17.0.0</li>
+  <li>bin/get-extra-pick-list: use git merge-base to get the branchpoint</li>
+  <li>bin/get-extra-pick-list: rework to use already_picked list</li>
+  <li>bin/get-typod-pick-list.sh: limit `git grep ...' to only as needed</li>
+  <li>bin/get-pick-list.sh: limit `git grep ...' only as needed</li>
+  <li>bin/get-pick-list.sh: remove ancient way of nominating patches</li>
+  <li>bin/get-fixes-pick-list.sh: add new script</li>
+  <li>Update version to 17.0.1</li>
+</ul>
+
+<p>Eric Anholt (1):</p>
+<ul>
+  <li>vc4: Avoid emitting small immediates for UBO indirect load address guards.</li>
+</ul>
+
+<p>Grazvydas Ignotas (3):</p>
+<ul>
+  <li>r300g: only allow byteswapped formats on big endian</li>
+  <li>gallium/u_queue: fix a crash with atexit handlers</li>
+  <li>gallium/u_queue: set num_threads correctly if not all threads start</li>
+</ul>
+
+<p>Hans de Goede (1):</p>
+<ul>
+  <li>glx/glvnd: Fix GLXdispatchIndex sorting</li>
+</ul>
+
+<p>Ilia Mirkin (4):</p>
+<ul>
+  <li>gm107/ir: fix address offset bitfield for ATOMS</li>
+  <li>nvc0: set the render condition in the compute object</li>
+  <li>st/mesa: don't pass compare mode for stencil-sampled textures</li>
+  <li>nvc0: disable linked tsc mode in compute launch descriptor</li>
+</ul>
+
+<p>Jason Ekstrand (10):</p>
+<ul>
+  <li>i965/sampler_state: Clamp min/max LOD to 14 on gen7+</li>
+  <li>i965/sampler_state: Pass texObj into update_sampler_state</li>
+  <li>i965/sampler_state: Set the "Base Mip Level" field on Sandy Bridge</li>
+  <li>intel/blorp: Swizzle clear colors on the CPU</li>
+  <li>i965/fs: Fix the inline nir_op_pack_double optimization</li>
+  <li>anv: Add an invalidate_range helper</li>
+  <li>anv/query: clflush the bo map on non-LLC platforms</li>
+  <li>genxml: Make MI_STORE_DATA_IMM more consistent</li>
+  <li>anv/query: Perform CmdResetQueryPool on the GPU</li>
+  <li>intel/blorp: Explicitly flush all allocated state</li>
+</ul>
+
+<p>Jose Maria Casanova Crespo (1):</p>
+<ul>
+  <li>glsl: non-last member unsized array on SSBO must fail compilation on GLSL ES 3.1</li>
+</ul>
+
+<p>Kenneth Graunke (1):</p>
+<ul>
+  <li>mesa: Do (TCS &amp;&amp; !TES) draw time validation in ES as well.</li>
+</ul>
+
+<p>Leo Liu (1):</p>
+<ul>
+  <li>configure.ac: check require_basic_egl only if egl enabled</li>
+</ul>
+
+<p>Lionel Landwerlin (2):</p>
+<ul>
+  <li>anv: wsi: report presentation error per image request</li>
+  <li>i965/fs: fix uninitialized memory access</li>
+</ul>
+
+<p>Marek Olšák (6):</p>
+<ul>
+  <li>radeonsi: fix UNSIGNED_BYTE index buffer fallback with non-zero start (v2)</li>
+  <li>gallium/util: remove unused u_index_modify helpers</li>
+  <li>gallium/u_index_modify: don't add PIPE_TRANSFER_UNSYNCHRONIZED unconditionally</li>
+  <li>gallium/u_queue: fix random crashes when the app calls exit()</li>
+  <li>radeonsi: fix broken tessellation on Carrizo and Stoney</li>
+  <li>amd/common: fix ASICREV_IS_POLARIS11_M for Polaris12</li>
+</ul>
+
+<p>Mauro Rossi (2):</p>
+<ul>
+  <li>android: radeonsi: fix sid_table.h generated header include path</li>
+  <li>android: glsl: build shader cache sources</li>
+</ul>
+
+<p>Michel Dänzer (1):</p>
+<ul>
+  <li>configure.ac: Drop LLVM compiler flags more radically</li>
+</ul>
+
+<p>Nicolai Hähnle (3):</p>
+<ul>
+  <li>winsys/amdgpu: reduce max_alloc_size based on GTT limits</li>
+  <li>radeonsi: handle MultiDrawIndirect in si_get_draw_start_count</li>
+  <li>radeonsi: fix UINT/SINT clamping for 10-bit formats on &lt;= CIK</li>
+</ul>
+
+<p>Samuel Iglesias Gonsálvez (1):</p>
+<ul>
+  <li>glsl: fix heap-use-after-free in ast_declarator_list::hir()</li>
+</ul>
+
+<p>Tapani Pälli (1):</p>
+<ul>
+  <li>android: fix droid_create_image_from_prime_fd_yuv for YV12</li>
+</ul>
+
+
+</div>
+</body>
+</html>

commit e895bc61584e95627a7fa2b94d8032b18a7d1c1a
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Mar 4 15:32:34 2017 +0000

    Update version to 17.0.1
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/VERSION b/VERSION
index aac5898..3e17df0 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-17.0.0
+17.0.1

commit cc545ebeabab6d076bfbac159573d29e3cff6ab9
Author: Daniel Stone <daniels@collabora.com>
Date:   Mon Feb 13 14:06:10 2017 +0000

    egl/wayland: Don't use DRM format codes for SHM
    
    The wl_drm interface (akin to X11's DRI2) uses the standard set of DRM
    FourCC format codes. wl_shm copies this, except for ARGB8888/XRGB8888,
    which use their own definitions.
    
    Make sure we only use wl_shm format codes when we're working with
    wl_shm. Otherwise, using swrast with 32bpp formats would fail with an
    error.
    
    Cc: mesa-stable@lists.freedesktop.org
    Signed-off-by: Daniel Stone <daniels@collabora.com> (v1)
    Fixes: cb5e799448 ("egl/wayland: unify dri2_wl_create_surface implementations")
    
    v2: [Emil Velikov: move to dri2_wl_create_window_surface]
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com> (IRC)
    (cherry picked from commit a1727aa75ed252cd19c296ccf83cb595be971744)

diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 37360c7..a3380f2 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -148,12 +148,21 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
    if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
       goto cleanup_surf;
 
-   if (conf->RedSize == 5)
-      dri2_surf->format = WL_DRM_FORMAT_RGB565;
-   else if (conf->AlphaSize == 0)
-      dri2_surf->format = WL_DRM_FORMAT_XRGB8888;
-   else
-      dri2_surf->format = WL_DRM_FORMAT_ARGB8888;
+   if (dri2_dpy->dri2) {
+      if (conf->RedSize == 5)
+         dri2_surf->format = WL_DRM_FORMAT_RGB565;
+      else if (conf->AlphaSize == 0)
+         dri2_surf->format = WL_DRM_FORMAT_XRGB8888;
+      else
+         dri2_surf->format = WL_DRM_FORMAT_ARGB8888;
+   } else {
+      if (conf->RedSize == 5)
+         dri2_surf->format = WL_SHM_FORMAT_RGB565;
+      else if (conf->AlphaSize == 0)
+         dri2_surf->format = WL_SHM_FORMAT_XRGB8888;
+      else
+         dri2_surf->format = WL_SHM_FORMAT_ARGB8888;
+   }
 
    if (!window) {
       _eglError(EGL_BAD_NATIVE_WINDOW, "dri2_create_surface");

commit 9ab1704f42bbaca8c43af51fbc08532ab62c1026
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 9 13:00:03 2017 +0900

    configure.ac: Drop LLVM compiler flags more radically
    
    Drop all -m*, -W*, -O*, -g* and -f* flags, with the exception of
    -fno-rtti, which must be used if it's part of the llvm-config --cxxflags
    output. We don't want LLVM to dictate the flags we use, and it can even
    cause build failures, e.g. if LLVM and Mesa are built with different
    compilers.
    
    While we're at it, eat any whitespace preceding dropped flags as well.
    
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 0f53404565b9ef9da9d7022b5732463acd496742)
    Nominated-by: Marek Olšák <marek.olsak@amd.com>
    Bugzilla: https://bugs.freedesktop.org/100028

diff --git a/configure.ac b/configure.ac
index 399166a..bdcf14d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -943,27 +943,18 @@ llvm_add_target() {
 # $1 is the llvm-config command with arguments.
 strip_unwanted_llvm_flags() {
     # Use \> (marks the end of the word)
-    echo `$1` | sed \
-        -e 's/-march=\S*//g' \
-        -e 's/-mtune=\S*//g' \
-        -e 's/-mcpu=\S*//g' \
-        -e 's/-DNDEBUG\>//g' \
-        -e 's/-D_GNU_SOURCE\>//g' \
-        -e 's/-pedantic\>//g' \
-        -e 's/-Wcovered-switch-default\>//g' \
-        -e 's/-O.\>//g' \
-        -e 's/-g\>//g' \
-        -e 's/-Wall\>//g' \
-        -e 's/-Wcast-qual\>//g' \
-        -e 's/-Woverloaded-virtual\>//g' \
-        -e 's/-fcolor-diagnostics\>//g' \
-        -e 's/-fdata-sections\>//g' \
-        -e 's/-ffunction-sections\>//g' \
-        -e 's/-fno-exceptions\>//g' \
-        -e 's/-fomit-frame-pointer\>//g' \
-        -e 's/-fvisibility-inlines-hidden\>//g' \
-        -e 's/-fPIC\>//g' \
-        -e 's/-fstack-protector-strong\>//g'
+    echo " `$1`" | sed \
+        -e 's/\s\+-m\S*//g' \
+        -e 's/\s\+-DNDEBUG\>//g' \
+        -e 's/\s\+-D_GNU_SOURCE\>//g' \
+        -e 's/\s\+-pedantic\>//g' \
+        -e 's/\s\+-W\S*//g' \
+        -e 's/\s\+-O\S*//g' \
+        -e 's/\s\+-g\S*//g' \
+        -e 's/-fno-rtti\>/-Fno-rtti/g' \
+        -e 's/\s\+-f\S*//g' \
+        -e 's/-Fno-rtti\>/-fno-rtti/g' \
+        -e 's/^ //'
 }
 
 llvm_set_environment_variables() {

commit cfdda1939779782d36e144fa9a1d30e97163199e
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Sun Feb 26 02:44:07 2017 +0200

    gallium/u_queue: set num_threads correctly if not all threads start
    
    If i-th thread could not be created it means we have i threads,
    not i+1, because we start from 0.
    
    Fixes: 404d0d5 "gallium/u_queue: add an option to have multiple worker threads"
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Signed-off-by: Marek Olšák <marek.olsak@amd.com>
    (cherry picked from commit 7f268cf12b39d1de8ff38cf5beea50298cf841c2)

diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index d0b1378..643c92b 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -215,7 +215,7 @@ util_queue_init(struct util_queue *queue,
             goto fail;
          } else {
             /* at least one thread created, so use it */
-            queue->num_threads = i+1;
+            queue->num_threads = i;
             break;
          }
       }

commit 6b8c9e115e9921fe9c4ea5a8c0dc0a9f0adf39c2
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Sun Feb 26 02:44:06 2017 +0200

    gallium/u_queue: fix a crash with atexit handlers
    
    Commit 4aea8fe ("gallium/u_queue: fix random crashes when the app calls
    exit()") added a atexit handler which calls
    util_queue_killall_and_wait() for each queue to stop the threads.
    However the app is also free to use atexit handlers to clean up things,
    leading to util_queue_destroy() call which will also call
    util_queue_killall_and_wait() for the same queue again, causing threads
    being joined twice, and that is undefined. This happens with libglut,
    for example. A simple fix is to just set num_threads to 0 as there are
    no more valid threads after util_queue_killall_and_wait() returns.
    
    Fixes: 4aea8fe "gallium/u_queue: fix random crashes when the app calls exit()"
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Signed-off-by: Marek Olšák <marek.olsak@amd.com>
    (cherry picked from commit 993612193575f5f218af52c4ed7525e15083548e)

diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index 7ecee41..d0b1378 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -251,6 +251,7 @@ util_queue_killall_and_wait(struct util_queue *queue)
 
    for (i = 0; i < queue->num_threads; i++)
       pipe_thread_wait(queue->threads[i]);
+   queue->num_threads = 0;
 }
 
 void

commit 21e3f2f24c45e76d66c520173ced26158ef079fc
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Feb 28 16:26:55 2017 +1000

    radv: fix txs for sampler buffers
    
    I messed this up when I wrote it, this fixes:
    dEQP-VK.memory.pipeline_barrier.*uniform_texel_buffer.*
    
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Cc: "17.0" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit e66be3d3bb40160c7b7d57c596e4a25da168f1e6)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 4d29099..fc84f9b 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3234,7 +3234,7 @@ static void visit_tex(struct nir_to_llvm_context *ctx, nir_tex_instr *instr)
 	}
 
 	if (instr->op == nir_texop_txs && instr->sampler_dim == GLSL_SAMPLER_DIM_BUF) {
-		result = get_buffer_size(ctx, res_ptr, false);
+		result = get_buffer_size(ctx, res_ptr, true);
 		goto write_result;
 	}
 

commit bc07622467cf382c3d5c0e673f2b183e8093d231
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Tue Feb 28 20:06:48 2017 +0100

    amd/common: fix ASICREV_IS_POLARIS11_M for Polaris12
    
    Cc: 17.0 <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 8c838730d070cbf4da035593b374e3c5566cf944)

diff --git a/src/amd/common/amdgpu_id.h b/src/amd/common/amdgpu_id.h
index 1683a5a..1ecae1a 100644
--- a/src/amd/common/amdgpu_id.h
+++ b/src/amd/common/amdgpu_id.h
@@ -157,7 +157,7 @@ enum {
 #define ASICREV_IS_POLARIS10_P(eChipRev)\
 	((eChipRev >= VI_POLARIS10_P_A0) && (eChipRev < VI_POLARIS11_M_A0))
 #define ASICREV_IS_POLARIS11_M(eChipRev)   \
-	(eChipRev >= VI_POLARIS11_M_A0)
+	(eChipRev >= VI_POLARIS11_M_A0 && eChipRev < VI_POLARIS12_V_A0)
 #define ASICREV_IS_POLARIS12_V(eChipRev)\
 	(eChipRev >= VI_POLARIS12_V_A0)
 

commit 5aa38832f0549fc45db88e344e234bb23482190d
Author: Brendan King <Brendan.King@imgtec.com>
Date:   Fri Feb 17 15:12:21 2017 +0000

    egl/dri3: implement query surface hook
    
    This is a DRI3 version of a change made for DRI2
    (4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"),
    that fixed failures in dEQP-EGL.functional.resize.surface_size.grow
    and dEQP-EGL.functional.resize.surface_size.shrink.
    
    Cc: Tapani Pälli <tapani.palli@intel.com>
    Cc: Mark Janes <mark.a.janes@intel.com>
    Cc: Chad Versace <chadversary@chromium.org>
    Signed-off-by: Brendan King <Brendan.King@imgtec.com>
    Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
    Cc: "17.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 884f65e1856733697a894c86f94803343cfa9a21)

diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index c474714..c4a5443 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -419,6 +419,25 @@ dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
    return loader_dri3_query_buffer_age(&dri3_surf->loader_drawable);
 }
 
+static EGLBoolean
+dri3_query_surface(_EGLDriver *drv, _EGLDisplay *dpy,
+                   _EGLSurface *surf, EGLint attribute,
+                   EGLint *value)
+{
+   struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf);
+
+   switch (attribute) {
+   case EGL_WIDTH:
+   case EGL_HEIGHT:
+      loader_dri3_update_drawable_geometry(&dri3_surf->loader_drawable);
+      break;
+   default:
+      break;
+   }
+
+   return _eglQuerySurface(drv, dpy, surf, attribute, value);
+}
+
 static __DRIdrawable *
 dri3_get_dri_drawable(_EGLSurface *surf)
 {
@@ -441,6 +460,7 @@ struct dri2_egl_display_vtbl dri3_x11_display_vtbl = {
    .post_sub_buffer = dri2_fallback_post_sub_buffer,
    .copy_buffers = dri3_copy_buffers,
    .query_buffer_age = dri3_query_buffer_age,
+   .query_surface = dri3_query_surface,
    .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
    .get_sync_values = dri3_get_sync_values,
    .get_dri_drawable = dri3_get_dri_drawable,
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 6e5d1b8..493a7f5 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1408,3 +1408,26 @@ loader_dri3_get_buffers(__DRIdrawable *driDrawable,
 
    return true;
 }
+
+/** loader_dri3_update_drawable_geometry
+ *
+ * Get the current drawable geometry.
+ */
+void
+loader_dri3_update_drawable_geometry(struct loader_dri3_drawable *draw)
+{
+   xcb_get_geometry_cookie_t geom_cookie;
+   xcb_get_geometry_reply_t *geom_reply;
+
+   geom_cookie = xcb_get_geometry(draw->conn, draw->drawable);
+
+   geom_reply = xcb_get_geometry_reply(draw->conn, geom_cookie, NULL);
+
+   if (geom_reply) {
+      draw->width = geom_reply->width;
+      draw->height = geom_reply->height;
+      draw->vtable->set_drawable_size(draw, draw->width, draw->height);
+
+      free(geom_reply);
+   }
+}
diff --git a/src/loader/loader_dri3_helper.h b/src/loader/loader_dri3_helper.h
index 1d1f15e..a865e46 100644
--- a/src/loader/loader_dri3_helper.h
+++ b/src/loader/loader_dri3_helper.h
@@ -239,4 +239,6 @@ loader_dri3_get_buffers(__DRIdrawable *driDrawable,
                         uint32_t buffer_mask,
                         struct __DRIimageList *buffers);
 
+void
+loader_dri3_update_drawable_geometry(struct loader_dri3_drawable *draw);
 #endif

commit 2e46d4121e5742d0e854f3b4249023ded41ea359
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Feb 27 16:59:06 2017 +1000

    radv: fix depth format in blit2d.
    
    For blitting we need to use the depth or stencil format, never
    the combined.
    
    This fixes:
    dEQP-VK.texture.shadow.2d.nearest.less_or_equal_d32_sfloat_s8_uint
    and a few others.
    
    Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
    Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 800b82ea1315d68fccd8b1f218d614d26e7b6478)

diff --git a/src/amd/vulkan/radv_meta_blit2d.c b/src/amd/vulkan/radv_meta_blit2d.c
index 6b622e7..225b4b2 100644
--- a/src/amd/vulkan/radv_meta_blit2d.c
+++ b/src/amd/vulkan/radv_meta_blit2d.c
@@ -26,6 +26,7 @@
 
 #include "radv_meta.h"
 #include "nir/nir_builder.h"
+#include "vk_format.h"
 
 enum blit2d_dst_type {
 	/* We can bind this destination as a "normal" render target and render
@@ -283,8 +284,10 @@ radv_meta_blit2d_normal_dst(struct radv_cmd_buffer *cmd_buffer,
 
 	for (unsigned r = 0; r < num_rects; ++r) {
 		VkFormat depth_format = 0;
-		if (dst->aspect_mask != VK_IMAGE_ASPECT_COLOR_BIT)
-			depth_format = dst->image->vk_format;
+		if (dst->aspect_mask == VK_IMAGE_ASPECT_STENCIL_BIT)
+			depth_format = vk_format_stencil_only(dst->image->vk_format);
+		else if (dst->aspect_mask == VK_IMAGE_ASPECT_DEPTH_BIT)
+			depth_format = vk_format_depth_only(dst->image->vk_format);
 		struct blit2d_src_temps src_temps;
 		blit2d_bind_src(cmd_buffer, src_img, src_buf, &src_temps, src_type, depth_format);
 

commit d735682eb8bbcedbabeacfcd2bd3592653eba979
Author: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date:   Sun Feb 26 22:36:10 2017 +0100

    radv: Use correct size for availability flag.
    
    Per spec, VK_QUERY_RESULT_64_BIT specifies the integer size and the
    availability flag is an integer. We apparently handled this correctly
    already for the copy to buffer case.
    
    Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 43d833ae97daa73a2422b5696b587a7b46750e07)

diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index a2d0889..288bd43 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -205,8 +205,11 @@ VkResult radv_GetQueryPoolResults(
 		}
 
 		if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) {
-			*(uint32_t*)dest = available;
-			dest += 4;
+			if (flags & VK_QUERY_RESULT_64_BIT) {
+				*(uint64_t*)dest = available;
+			} else {
+				*(uint32_t*)dest = available;
+			}
 		}
 	}
 

commit 95b09980e921b2c327553988160550767c639cc7
Author: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date:   Sun Feb 26 22:26:30 2017 +0100

    radv: Only use PKT3_OCCLUSION_QUERY when it doesn't hang.
    
    PKT3_OCCLUSION_QUERY hangs when used in a nested IB. This only
    calls it when in a primary command buffer and we change
    GetQueryPoolResults to not need it. CmdCopyQueryPoolResults
    still needs it so we break that behavior for secondary command buffers.
    However, that would hang already and using an unitialized value is
    better than a hang.
    
    Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 8ea34a98c06af4e3ce00ea665ee07480bcbd199f)

diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index a29a05d..a2d0889 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -131,6 +131,7 @@ VkResult radv_GetQueryPoolResults(
 	VkDeviceSize                                stride,
 	VkQueryResultFlags                          flags)
 {
+	RADV_FROM_HANDLE(radv_device, device, _device);
 	RADV_FROM_HANDLE(radv_query_pool, pool, queryPool);
 	char *data = pData;
 	VkResult result = VK_SUCCESS;
@@ -141,23 +142,20 @@ VkResult radv_GetQueryPoolResults(
 		char *src = pool->ptr + query * pool->stride;
 		uint32_t available;
 
-		if (flags & VK_QUERY_RESULT_WAIT_BIT) {
-			while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query))
-				;
-		}
+		switch (pool->type) {
+		case VK_QUERY_TYPE_TIMESTAMP: {
+			if (flags & VK_QUERY_RESULT_WAIT_BIT) {
+				while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query))
+					;
+			}
 
-		if (!*(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query) &&
-		    !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
-			if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT)
-				*(uint32_t*)dest = 0;
-			result = VK_NOT_READY;
-			continue;
+			available = *(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query);
+			if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
+				result = VK_NOT_READY;
+				break;
 
-		}
+			}
 
-		available = *(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query);
-		switch (pool->type) {
-		case VK_QUERY_TYPE_TIMESTAMP:
 			if (flags & VK_QUERY_RESULT_64_BIT) {
 				*(uint64_t*)dest = *(uint64_t*)src;
 				dest += 8;
@@ -166,8 +164,32 @@ VkResult radv_GetQueryPoolResults(
 				dest += 4;
 			}
 			break;
+		}
 		case VK_QUERY_TYPE_OCCLUSION: {
-			uint64_t result = *(uint64_t*)(src + pool->stride - 16);
+			volatile uint64_t const *src64 = (volatile uint64_t const *)src;
+			uint64_t result = 0;
+			int db_count = get_max_db(device);
+			available = 1;
+
+			for (int i = 0; i < db_count; ++i) {
+				uint64_t start, end;
+				do {
+					start = src64[2 * i];
+					end = src64[2 * i + 1];
+				} while ((!(start & (1ull << 63)) || !(end & (1ull << 63))) && (flags & VK_QUERY_RESULT_WAIT_BIT));
+
+				if (!(start & (1ull << 63)) || !(end & (1ull << 63)))
+					available = 0;
+				else {
+					result += end - start;
+				}
+			}
+
+			if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
+				result = VK_NOT_READY;
+				break;
+
+			}
 
 			if (flags & VK_QUERY_RESULT_64_BIT) {
 				*(uint64_t*)dest = result;
@@ -357,11 +379,14 @@ void radv_CmdEndQuery(
 		radeon_emit(cs, va + 8);
 		radeon_emit(cs, (va + 8) >> 32);
 
-		radeon_emit(cs, PKT3(PKT3_OCCLUSION_QUERY, 3, 0));
-		radeon_emit(cs, va);
-		radeon_emit(cs, va >> 32);
-		radeon_emit(cs, va + pool->stride - 16);
-		radeon_emit(cs, (va + pool->stride - 16) >> 32);
+		/* hangs for VK_COMMAND_BUFFER_LEVEL_SECONDARY. */
+		if (cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY) {
+			radeon_emit(cs, PKT3(PKT3_OCCLUSION_QUERY, 3, 0));
+			radeon_emit(cs, va);
+			radeon_emit(cs, va >> 32);
+			radeon_emit(cs, va + pool->stride - 16);
+			radeon_emit(cs, (va + pool->stride - 16) >> 32);
+		}
 
 		break;
 	default:

commit 3169c9818bcaeb9e38fad8eaf5ec6772816d7f91
Author: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Date:   Sun Feb 26 20:01:26 2017 +0100

    radv: Reset emitted compute pipeline when calling secondary cmd buffer.
    
    Otherwise if the new compute pipeline is the same as the last used
    pipeline before the call, we don't emit it again.
    
    Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit bb878db7eb94e48476a920d66174a45da2585e19)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index d47db9a..7ff052f 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -1827,6 +1827,7 @@ void radv_CmdExecuteCommands(
 	/* if we execute secondary we need to re-emit out pipelines */
 	if (commandBufferCount) {
 		primary->state.emitted_pipeline = NULL;
+		primary->state.emitted_compute_pipeline = NULL;
 		primary->state.dirty |= RADV_CMD_DIRTY_PIPELINE;
 		primary->state.dirty |= RADV_CMD_DIRTY_DYNAMIC_ALL;
 	}

commit 03982603f0c56bc57df04663c977c4b474263ff4
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Wed Feb 22 19:56:26 2017 +0100

    radeonsi: fix broken tessellation on Carrizo and Stoney
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99850
    
    Cc: 13.0 17.0 <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 35915af6c9ab4bdc0f1f8584ca346602405bd7e4)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 76e748f..caf20e5 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -2213,7 +2213,9 @@ static bool si_update_spi_tmpring_size(struct si_context *sctx)
 
 static void si_init_tess_factor_ring(struct si_context *sctx)
 {
-	bool double_offchip_buffers = sctx->b.chip_class >= CIK;
+	bool double_offchip_buffers = sctx->b.chip_class >= CIK &&
+				      sctx->b.family != CHIP_CARRIZO &&
+				      sctx->b.family != CHIP_STONEY;
 	unsigned max_offchip_buffers_per_se = double_offchip_buffers ? 128 : 64;
 	unsigned max_offchip_buffers = max_offchip_buffers_per_se *
 				       sctx->screen->b.info.max_se;

commit 0a8df0685e7a9d6db3a1765a9de701565c759493
Author: Leo Liu <leo.liu@amd.com>
Date:   Thu Feb 23 13:37:58 2017 -0500

    configure.ac: check require_basic_egl only if egl enabled
    
    Otherwise the configuration fails when building independant libs
    like vdpau, vaapi or omx
    
    Fixes: 1ac40173c2a ("configure.ac: simplify EGL requirements for
    drivers dependent on EGL")
    
    Signed-off-by: Leo Liu <leo.liu@amd.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    Cc: "17.0" <mesa-stable@lists.freedesktop.org>
    (cherry picked from commit 5398d006de3d2bd668e3fc4b80a3de0c101a3e43)
    [Emil Velikov: resolve trivial conflicts]
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    
    Conflicts:
    	configure.ac

diff --git a/configure.ac b/configure.ac
index 8448736..399166a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2328,7 +2328,9 @@ if test -n "$with_gallium_drivers"; then
             PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
             require_libdrm "radeonsi"
             radeon_gallium_llvm_check $LLVM_REQUIRED_RADEONSI "radeonsi"
-            require_basic_egl "radeonsi"
+            if test "x$enable_egl" = xyes; then
+                require_basic_egl "radeonsi"
+            fi
             ;;
         xnouveau)
             HAVE_GALLIUM_NOUVEAU=yes

commit b75c0bf73a9f7944fef4f983419b0daf875456f9
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Sat Feb 11 01:01:40 2017 +0200

    r300g: only allow byteswapped formats on big endian
    
    They cause regressions on little endian.
    
    Fixes: 172bfdaa9e ("r300g: add support for PIPE_FORMAT_x8R8G8B8_*")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98869
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Signed-off-by: Marek Olšák <marek.olsak@amd.com>
    (cherry picked from commit 66d1cb587ac7b24fb04f26d30e686c3991fc8885)

diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index fbac07a..929c3fe 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -47,6 +47,11 @@
  */
 static enum pipe_format r300_unbyteswap_array_format(enum pipe_format format)
 {
+    /* FIXME: Disabled on little endian because of a reported regression:


Reply to: