Android.common.mk | 14 + VERSION | 2 configure.ac | 49 ++++-- debian/changelog | 26 +++ debian/control | 2 debian/git-cleanup.sh | 75 ---------- debian/patches/configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch | 52 ------ debian/patches/series | 1 debian/rules | 10 - src/amd/Android.common.mk | 2 src/amd/common/ac_nir_to_llvm.c | 46 ++++-- src/amd/vulkan/Makefile.am | 4 src/amd/vulkan/radv_cmd_buffer.c | 4 src/compiler/glsl/link_uniforms.cpp | 2 src/compiler/spirv/spirv_to_nir.c | 54 +++++-- src/compiler/spirv/vtn_variables.c | 6 src/egl/Makefile.am | 2 src/gallium/Android.common.mk | 2 src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 1 src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 + src/gallium/drivers/etnaviv/etnaviv_compiler.c | 39 ++++- src/gallium/drivers/etnaviv/etnaviv_emit.c | 17 ++ src/gallium/drivers/etnaviv/etnaviv_internal.h | 19 ++ src/gallium/drivers/etnaviv/etnaviv_resource.c | 5 src/gallium/drivers/etnaviv/etnaviv_screen.c | 9 - src/gallium/drivers/etnaviv/etnaviv_state.c | 38 ++--- src/gallium/drivers/freedreno/Makefile.am | 1 src/gallium/drivers/r600/r600_shader.c | 2 src/gallium/drivers/radeonsi/si_descriptors.c | 11 - src/gallium/drivers/radeonsi/si_state.c | 6 src/gallium/state_trackers/clover/Makefile.am | 2 src/gallium/state_trackers/dri/Makefile.am | 2 src/gallium/state_trackers/va/picture.c | 11 + src/gallium/state_trackers/va/va_private.h | 1 src/gallium/state_trackers/vdpau/output.c | 7 src/gallium/state_trackers/vdpau/presentation.c | 6 src/gallium/state_trackers/vdpau/vdpau_private.h | 1 src/gallium/targets/d3dadapter9/Makefile.am | 2 src/glx/Makefile.am | 4 src/glx/apple/Makefile.am | 4 src/glx/windows/Makefile.am | 2 src/intel/blorp/blorp_clear.c | 23 +++ src/intel/isl/isl_format.c | 5 src/intel/vulkan/Makefile.am | 8 - src/intel/vulkan/anv_cmd_buffer.c | 5 src/intel/vulkan/anv_descriptor_set.c | 8 - src/intel/vulkan/anv_nir_lower_input_attachments.c | 5 src/intel/vulkan/genX_cmd_buffer.c | 19 +- src/loader/Makefile.am | 2 src/mapi/Makefile.am | 4 src/mesa/drivers/dri/i915/Makefile.am | 2 src/mesa/drivers/dri/i965/Makefile.am | 7 src/mesa/drivers/dri/i965/brw_blorp.c | 2 src/mesa/drivers/dri/i965/brw_context.c | 3 src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 src/mesa/drivers/dri/i965/brw_program.c | 43 +++++ src/mesa/drivers/dri/i965/gen8_depth_state.c | 12 + src/mesa/drivers/dri/i965/genX_blorp_exec.c | 4 src/mesa/drivers/dri/i965/intel_blit.c | 24 +-- src/mesa/drivers/dri/i965/intel_blit.h | 4 src/mesa/drivers/dri/i965/intel_screen.c | 1 src/mesa/drivers/dri/r200/Makefile.am | 2 src/mesa/drivers/dri/radeon/Makefile.am | 2 src/mesa/drivers/dri/swrast/Makefile.am | 2 src/mesa/drivers/osmesa/Makefile.am | 2 src/mesa/main/extensions_table.h | 2 src/mesa/main/shaderapi.c | 4 src/mesa/main/tests/Makefile.am | 2 src/mesa/state_tracker/st_context.c | 13 - src/vulkan/wsi/wsi_common_wayland.c | 27 ++- src/vulkan/wsi/wsi_common_x11.c | 3 71 files changed, 486 insertions(+), 313 deletions(-)
New commits: commit d8da88454db0c8d295182aa9e57bd75c6d9d7524 Author: Andreas Boll <[email protected]> Date: Mon Feb 6 19:05:41 2017 +0100 Upload to experimental. diff --git a/debian/changelog b/debian/changelog index 34c2f65..232018c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium +mesa (17.0.0~rc3-1) experimental; urgency=medium [ Timo Aaltonen ] * Drop libgles1. @@ -18,7 +18,7 @@ mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium * Enable building etnaviv and imx on armhf (Closes: #852614). - Bump libdrm-dev build-dep to 2.4.74-2~. - -- Timo Aaltonen <[email protected]> Thu, 02 Feb 2017 12:02:07 +0200 + -- Andreas Boll <[email protected]> Mon, 06 Feb 2017 19:05:30 +0100 mesa (17.0.0~rc2-1) experimental; urgency=medium commit f026e46027eca3c22338fee834ea7d144f0260e2 Author: Andreas Boll <[email protected]> Date: Mon Feb 6 16:58:11 2017 +0100 Enable building etnaviv and imx on armhf (Closes: #852614). Bump libdrm-dev build-dep to 2.4.74-2~. diff --git a/debian/changelog b/debian/changelog index f63e4fb..bdd2be1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium * Update list of unwanted vulkan headers. * Drop unused git-cleanup.sh script. Replaced with usage of --extend- diff-ignore some time ago. + * Enable building etnaviv and imx on armhf (Closes: #852614). + - Bump libdrm-dev build-dep to 2.4.74-2~. -- Timo Aaltonen <[email protected]> Thu, 02 Feb 2017 12:02:07 +0200 diff --git a/debian/control b/debian/control index c9d2541..aa7a93c 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Build-Depends: dh-autoreconf, quilt (>= 0.40), pkg-config, - libdrm-dev (>= 2.4.74) [!hurd-any], + libdrm-dev (>= 2.4.74-2~) [!hurd-any], libx11-dev, x11proto-gl-dev (>= 1.4.14), libxxf86vm-dev, diff --git a/debian/rules b/debian/rules index d5f6566..0f9030f 100755 --- a/debian/rules +++ b/debian/rules @@ -51,6 +51,11 @@ else GALLIUM_DRIVERS += vc4 endif + # etnaviv kernel support is currently only available on armhf + ifneq (,$(filter $(DEB_HOST_ARCH), armhf)) + GALLIUM_DRIVERS += etnaviv imx + endif + # svga needs xa state tracker confflags_GALLIUM += --enable-xa commit 1858f663ffd2352ec367cdc41358300d6a8d5735 Author: Andreas Boll <[email protected]> Date: Mon Feb 6 16:36:55 2017 +0100 Drop unused git-cleanup.sh script. Replaced with usage of --extend-diff-ignore some time ago. diff --git a/debian/changelog b/debian/changelog index 6eb1f5c..f63e4fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,8 @@ mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium * Cherry-pick 045f38a (vulkan: Don't install vk_platform.h or vulkan.h). * Update list of unwanted vulkan headers. + * Drop unused git-cleanup.sh script. Replaced with usage of --extend- + diff-ignore some time ago. -- Timo Aaltonen <[email protected]> Thu, 02 Feb 2017 12:02:07 +0200 diff --git a/debian/git-cleanup.sh b/debian/git-cleanup.sh deleted file mode 100755 index c699b89..0000000 --- a/debian/git-cleanup.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh -# © 2011 Cyril Brulebois <[email protected]> -set -e - -### First phase, files known to make dpkg-source unhappy. - -# List broken symlinks: -symlinks=$(find -type l) - -# Symlinks vs. directories: -dirs_vs_symlinks='' - -# Modified binaries: -binaries=' -src/gallium/state_trackers/d3d1x/progs/bin/d3d10tri.exe -src/gallium/state_trackers/d3d1x/progs/bin/d3d11gears.exe -src/gallium/state_trackers/d3d1x/progs/bin/d3d11spikysphere.exe -src/gallium/state_trackers/d3d1x/progs/bin/d3d11tex.exe -src/gallium/state_trackers/d3d1x/progs/bin/d3d11tri.exe -src/gallium/state_trackers/python/tests/regress/fragment-shader/frag-abs.png -docs/gears.png -' - -case $1 in - "") clean=0; echo "I: No parameter given, listing only (-f to remove).";; - "-f") clean=1; echo "I: Removing files.";; - *) clean=0; echo "I: Unknown parameter given, listing only (-f to remove).";; -esac - -# Readibility: -echo - -for x in $symlinks $dirs_vs_symlinks $binaries; do - # Do not fail if the file went away already, only warn: - if [ -e $x -o -L $x ]; then - if [ $clean = 1 ]; then - git rm $x - else - echo "I: Would remove $x" - fi - else - echo "W: Unable to remove non-existing: $x" - fi -done - -### Second phase, kill all files in git not in the tarball -version=$(dpkg-parsechangelog|awk '/Version: / {print $2}'|sed 's/-.*$//') -tarball="../mesa_$version.orig.tar.gz" -if [ ! -f $tarball ]; then - echo "E: Missing tarball ($tarball), you could use: uscan --download-current --rename" - exit 1 -fi - -# Be lazy for now, temporary files would be better: -one=1 -two=2 - -# Strip one directory, Mesa-$version/ is the top-level: -tar tfz $tarball | sed 's,[^/]*/,,' | sort > $two -# List all files known to git, except those under debian/: -git ls-files | grep -v ^debian/ | sort > $one - -for x in $(diff -u $one $two|tail -n +3|grep ^-|sed 's/^-//'); do - if [ -e $x -o -L $x ]; then - if [ $clean = 1 ]; then - git rm $x - else - echo "I: Would remove $x" - fi - else - echo "W: Unable to remove non-existing: $x (maybe gone during 1st phase)" - fi -done - -rm $one $two commit c5da784a635a758988fdd9d0d9590273d9cfd605 Author: Andreas Boll <[email protected]> Date: Mon Feb 6 16:15:17 2017 +0100 Update list of unwanted vulkan headers. diff --git a/debian/changelog b/debian/changelog index 6083a4d..6eb1f5c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium upstream. * Cherry-pick 045f38a (vulkan: Don't install vk_platform.h or vulkan.h). + * Update list of unwanted vulkan headers. -- Timo Aaltonen <[email protected]> Thu, 02 Feb 2017 12:02:07 +0200 diff --git a/debian/rules b/debian/rules index 50664b6..d5f6566 100755 --- a/debian/rules +++ b/debian/rules @@ -187,11 +187,8 @@ override_dh_install: # Remove vulkan headers only where they get installed in tmp # We ship those headers via src:vulkan / libvulkan-dev - ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 arm64 armhf ppc64el x32)) - set -e; for file in vk_platform.h vulkan.h; do rm debian/tmp/usr/include/vulkan/$$file; done - ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32)) + ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 x32)) rm debian/tmp/usr/include/vulkan/vulkan_intel.h - endif rmdir debian/tmp/usr/include/vulkan endif commit a5861723150cbc67158f21f11a93b45ecc789a0b Author: Andreas Boll <[email protected]> Date: Mon Feb 6 16:14:26 2017 +0100 Document the cherry-pick in debian/changelog diff --git a/debian/changelog b/debian/changelog index 90e1d49..6083a4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium * Explicitly disable LLVM on some arches. Should fix FTBFS on x32. * Drop configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch, upstream. + * Cherry-pick 045f38a (vulkan: Don't install vk_platform.h or + vulkan.h). -- Timo Aaltonen <[email protected]> Thu, 02 Feb 2017 12:02:07 +0200 commit 0861741f908073cdfca64723e2e7a27e3dc8a03f Author: Matt Turner <[email protected]> Date: Mon Jan 23 16:48:01 2017 -0800 vulkan: Don't install vk_platform.h or vulkan.h. These files belong to the vulkan loader. Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 045f38a50759bb225cb179703bc7050f6de752b1) diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am index fba3d66..95f276e 100644 --- a/src/intel/vulkan/Makefile.am +++ b/src/intel/vulkan/Makefile.am @@ -23,9 +23,11 @@ include Makefile.sources vulkan_includedir = $(includedir)/vulkan -vulkan_include_HEADERS = \ +noinst_HEADERS = \ $(top_srcdir)/include/vulkan/vk_platform.h \ - $(top_srcdir)/include/vulkan/vulkan.h \ + $(top_srcdir)/include/vulkan/vulkan.h + +vulkan_include_HEADERS = \ $(top_srcdir)/include/vulkan/vulkan_intel.h lib_LTLIBRARIES = libvulkan_intel.la @@ -189,7 +191,7 @@ libvulkan_test_la_LIBADD = $(VULKAN_LIB_DEPS) include $(top_srcdir)/install-lib-links.mk -noinst_HEADERS = \ +noinst_HEADERS += \ tests/state_pool_test_helper.h LDADD = \ commit b19890a1020572e098835f4563f0a391f02f7f5a Author: Andreas Boll <[email protected]> Date: Mon Feb 6 16:05:28 2017 +0100 Drop configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch, upstream. diff --git a/debian/changelog b/debian/changelog index 1a5ce08..90e1d49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium * Drop transitional package libegl1-mesa-drivers. * Remove Breaks/Replaces from pre-jessie. * Explicitly disable LLVM on some arches. Should fix FTBFS on x32. + * Drop configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch, + upstream. -- Timo Aaltonen <[email protected]> Thu, 02 Feb 2017 12:02:07 +0200 diff --git a/debian/patches/configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch b/debian/patches/configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch deleted file mode 100644 index dd286c4..0000000 --- a/debian/patches/configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Andreas Boll <[email protected]> -Date: Tue, 24 Jan 2017 16:44:12 +0100 -Subject: [PATCH] configure.ac: Require LLVM for r300 only on x86 and x86_64 - -b3119a3 introduced a strict LLVM requirement for r300 on all -architectures and thus configure fails on architectures where LLVM is -not available or buggy. - -r300 doesn't strictly require LLVM, but for performance reasons we -highly recommend LLVM usage. So require it at least on x86 and x86_64 -architectures as we have done before b3119a3. - -Fixes: b3119a3 ("configure.ac: Check gallium LLVM version in gallium_require_llvm") -Cc: 17.0 <[email protected]> -Signed-off-by: Andreas Boll <[email protected]> ---- - configure.ac | 15 ++++++++++++++- - 1 file changed, 14 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index de8af87..7410a50 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -2213,6 +2213,19 @@ gallium_require_llvm() { - } - - dnl -+dnl r300 doesn't strictly require LLVM, but for performance reasons we -+dnl highly recommend LLVM usage. So require it at least on x86 and x86_64 -+dnl architectures. -+dnl -+r300_require_llvm() { -+ case "$host" in *gnux32) return;; esac -+ case "$host_cpu" in -+ i*86|x86_64|amd64) gallium_require_llvm $1 -+ ;; -+ esac -+} -+ -+dnl - dnl DRM is needed by X, Wayland, and offscreen rendering. - dnl Surfaceless is an alternative for the last one. - dnl -@@ -2298,7 +2311,7 @@ if test -n "$with_gallium_drivers"; then - HAVE_GALLIUM_R300=yes - PKG_CHECK_MODULES([RADEON], [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED]) - require_libdrm "r300" -- gallium_require_llvm "r300" -+ r300_require_llvm "r300" - ;; - xr600) - HAVE_GALLIUM_R600=yes diff --git a/debian/patches/series b/debian/patches/series index 3ea8e9a..9f0749f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 07_gallium-fix-build-failure-on-powerpcspe.diff -configure.ac-Require-LLVM-for-r300-only-on-x86-and-x.patch commit 98040f12b654e79f080ccec013694ada1eeffeb6 Author: Andreas Boll <[email protected]> Date: Mon Feb 6 16:03:31 2017 +0100 Bump changelog diff --git a/debian/changelog b/debian/changelog index ce736b8..1a5ce08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ -mesa (17.0.0~rc2-2) UNRELEASED; urgency=medium +mesa (17.0.0~rc3-1) UNRELEASED; urgency=medium [ Timo Aaltonen ] * Drop libgles1. [ Andreas Boll ] + * New upstream release candidate. * Drop transitional package libegl1-mesa-drivers. * Remove Breaks/Replaces from pre-jessie. * Explicitly disable LLVM on some arches. Should fix FTBFS on x32. commit 07571cd8ccf8c19fe79e16055208059fe729d298 Author: Emil Velikov <[email protected]> Date: Mon Feb 6 13:18:13 2017 +0000 Update version to 17.0.0-rc3 Signed-off-by: Emil Velikov <[email protected]> diff --git a/VERSION b/VERSION index 032c50c..0b34163 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -17.0.0-rc2 +17.0.0-rc3 commit 2fc362f14711981e98c920f2f278ad91bad89982 Author: Lucas Stach <[email protected]> Date: Mon Nov 21 11:54:25 2016 +0100 etnaviv: force vertex buffers through the MMU This fixes a vertex data corruption issue if some of the vertex streams go through the MMU and some don't. Signed-off-by: Lucas Stach <[email protected]> Tested-by: Philipp Zabel <[email protected]> Acked-by: Christian Gmeiner <[email protected]> (cherry picked from commit e158b7497103f145a9236a70183e07c37a9e13f7) Nominated-by: Christian Gmeiner <[email protected]> diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index aefe65b..94a8a73 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -201,7 +201,10 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, size = setup_miptree(rsc, paddingX, paddingY, msaa_xscale, msaa_yscale); - struct etna_bo *bo = etna_bo_new(screen->dev, size, DRM_ETNA_GEM_CACHE_WC); + uint32_t flags = DRM_ETNA_GEM_CACHE_WC; + if (templat->bind & PIPE_BIND_VERTEX_BUFFER) + flags |= DRM_ETNA_GEM_FORCE_MMU; + struct etna_bo *bo = etna_bo_new(screen->dev, size, flags); if (unlikely(bo == NULL)) { BUG("Problem allocating video memory for resource"); return NULL; commit 89b51c7e432268d8f5b5b4ae1870332ac4a3f202 Author: Christian König <[email protected]> Date: Thu Jan 19 13:44:34 2017 +0100 st/va: make sure that we call begin_frame() only once v2 This fixes "st/va: delay calling begin_frame until we have all parameters". v2: call begin frame after decoder (re)creation as well. Signed-off-by: Christian König <[email protected]> Reviewed-by: Nayan Deshmukh <[email protected]> Tested-by: Andy Furniss <[email protected]> (cherry picked from commit 1338d912f52b69f76ef75d1ad313893db77d4da8) diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index dc7121c..82584ea 100644 --- a/src/gallium/state_trackers/va/picture.c +++ b/src/gallium/state_trackers/va/picture.c @@ -81,7 +81,7 @@ vlVaBeginPicture(VADriverContextP ctx, VAContextID context_id, VASurfaceID rende } if (context->decoder->entrypoint != PIPE_VIDEO_ENTRYPOINT_ENCODE) - context->decoder->begin_frame(context->decoder, context->target, &context->desc.base); + context->needs_begin_frame = true; return VA_STATUS_SUCCESS; } @@ -178,6 +178,8 @@ handlePictureParameterBuffer(vlVaDriver *drv, vlVaContext *context, vlVaBuffer * if (!context->decoder) return VA_STATUS_ERROR_ALLOCATION_FAILED; + + context->needs_begin_frame = true; } return vaStatus; @@ -308,8 +310,11 @@ handleVASliceDataBufferType(vlVaContext *context, vlVaBuffer *buf) sizes[num_buffers] = buf->size; ++num_buffers; - context->decoder->begin_frame(context->decoder, context->target, - &context->desc.base); + if (context->needs_begin_frame) { + context->decoder->begin_frame(context->decoder, context->target, + &context->desc.base); + context->needs_begin_frame = false; + } context->decoder->decode_bitstream(context->decoder, context->target, &context->desc.base, num_buffers, (const void * const*)buffers, sizes); } diff --git a/src/gallium/state_trackers/va/va_private.h b/src/gallium/state_trackers/va/va_private.h index 8faec10..0877236 100644 --- a/src/gallium/state_trackers/va/va_private.h +++ b/src/gallium/state_trackers/va/va_private.h @@ -261,6 +261,7 @@ typedef struct { int target_id; bool first_single_submitted; int gop_coeff; + bool needs_begin_frame; } vlVaContext; typedef struct { commit ac2337ee3836e9817c24c44cae520dedfa1ebeb2 Author: Nayan Deshmukh <[email protected]> Date: Thu Jan 19 14:59:28 2017 +0530 st/vdpau: only send buffers with B8G8R8A8 format to X PresentPixmap only works if the pixmap depth matches with the window depth, otherwise it returns a BadMatch protocol error. Even if the depths match, the result won't look correctly if the VDPAU RGB component order doesn't match the X11 one so we only allow the X11 format. For other buffers we copy them to a buffer which is send to X. v2: only send buffers with format VDP_RGBA_FORMAT_B8G8R8A8 v3: reword commit message v4: add comment explaining the code Signed-off-by: Nayan Deshmukh <[email protected]> Reviewed-by: Christian König <[email protected]> (cherry picked from commit 31908d6a4a3309f4cd4b953d6eecdf41595b1299) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99637 Nominated-by: Nayan Deshmukh <[email protected]> Nominated-by: Michel Dänzer <[email protected]> (IRC) diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 98a8011..8b26f7a 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -75,6 +75,13 @@ vlVdpOutputSurfaceCreate(VdpDevice device, memset(&res_tmpl, 0, sizeof(res_tmpl)); + /* + * The output won't look correctly when this buffer is send to X, + * if the VDPAU RGB component order doesn't match the X11 one so + * we only allow the X11 format + */ + vlsurface->send_to_X = rgba_format == VDP_RGBA_FORMAT_B8G8R8A8; + res_tmpl.target = PIPE_TEXTURE_2D; res_tmpl.format = VdpFormatRGBAToPipe(rgba_format); res_tmpl.width0 = width; diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c index d479369..78cafc8 100644 --- a/src/gallium/state_trackers/vdpau/presentation.c +++ b/src/gallium/state_trackers/vdpau/presentation.c @@ -231,7 +231,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, vscreen = pq->device->vscreen; pipe_mutex_lock(pq->device->mutex); - if (vscreen->set_back_texture_from_output) + if (vscreen->set_back_texture_from_output && surf->send_to_X) vscreen->set_back_texture_from_output(vscreen, surf->surface->texture, clip_width, clip_height); tex = vscreen->texture_from_drawable(vscreen, (void *)pq->drawable); if (!tex) { @@ -239,7 +239,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, return VDP_STATUS_INVALID_HANDLE; } - if (!vscreen->set_back_texture_from_output) { + if (!vscreen->set_back_texture_from_output || !surf->send_to_X) { dirty_area = vscreen->get_dirty_area(vscreen); memset(&surf_templ, 0, sizeof(surf_templ)); @@ -289,7 +289,7 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue, framenum++; } - if (!vscreen->set_back_texture_from_output) { + if (!vscreen->set_back_texture_from_output || !surf->send_to_X) { pipe_resource_reference(&tex, NULL); pipe_surface_reference(&surf_draw, NULL); } diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h index 490a0bd..8356608 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -415,6 +415,7 @@ typedef struct struct pipe_fence_handle *fence; struct vl_compositor_state cstate; struct u_rect dirty_area; + bool send_to_X; } vlVdpOutputSurface; typedef struct commit 77ec080710aa7f38c02f0d4a62f0a8780cfcc61e Author: Mauro Rossi <[email protected]> Date: Mon Jan 30 20:57:30 2017 +0100 android: fix llvm, elf dependencies for M, N releases These changes set the correct llvm version and elf include path which differ for Marshmallow and Nougat Cc: "17.0" <[email protected]> Reviewed-by: Emil Velikov <[email protected]> (cherry picked from commit 9c45bb731c97d1f02f83b872c67b2c1b04ec3a41) [Emil Velikov: resolve trivial conflicts] Signed-off-by: Emil Velikov <[email protected]> Conflicts: Android.common.mk diff --git a/Android.common.mk b/Android.common.mk index a75d4e7..f53750c 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -78,10 +78,22 @@ endif ifeq ($(MESA_ENABLE_LLVM),true) LOCAL_CFLAGS += \ - -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \ -D__STDC_CONSTANT_MACROS \ -D__STDC_FORMAT_MACROS \ -D__STDC_LIMIT_MACROS + + ifeq ($(MESA_ANDROID_MAJOR_VERSION),5) + LOCAL_CFLAGS += -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 + ELF_INCLUDES := external/elfutils/0.153/libelf + endif + ifeq ($(MESA_ANDROID_MAJOR_VERSION),6) + LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_PATCH=0 + ELF_INCLUDES := external/elfutils/src/libelf + endif + ifeq ($(MESA_ANDROID_MAJOR_VERSION),7) + LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_PATCH=0 + ELF_INCLUDES := external/elfutils/libelf + endif endif ifneq ($(LOCAL_IS_HOST_MODULE),true) diff --git a/src/amd/Android.common.mk b/src/amd/Android.common.mk index dfa7e59..faace71 100644 --- a/src/amd/Android.common.mk +++ b/src/amd/Android.common.mk @@ -55,7 +55,7 @@ LOCAL_C_INCLUDES := \ external/llvm/include \ external/llvm/device/include \ external/libcxx/include \ - external/elfutils/$(if $(filter 5,$(MESA_ANDROID_MAJOR_VERSION)),0.153/,$(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)),src/))libelf + $(ELF_INCLUDES) LOCAL_STATIC_LIBRARIES := libLLVMCore diff --git a/src/gallium/Android.common.mk b/src/gallium/Android.common.mk index 7c6c7ac..8559b5b 100644 --- a/src/gallium/Android.common.mk +++ b/src/gallium/Android.common.mk @@ -34,7 +34,7 @@ LOCAL_C_INCLUDES += \ external/llvm/include \ external/llvm/device/include \ external/libcxx/include \ - external/elfutils/$(if $(filter true,$(MESA_LOLLIPOP_BUILD)),0.153/)libelf + $(ELF_INCLUDES) endif include $(MESA_COMMON_MK) commit eadbc95d642cac6feb7f5e5abe136dfd36ff76ac Author: Jason Ekstrand <[email protected]> Date: Mon Jan 30 19:53:17 2017 -0800 anv: Improve flushing around STATE_BASE_ADDRESS It is not clear from the docs exactly how pipelined STATE_BASE_ADDRESS actually is. We know from experimentation that we need to flush the render cache prior to emitting STATE_BASE_ADDRESS and invalidate the texture cache afterwards. The only thing the PRM says is that, on gen8+ we're supposed to invalidate the state cache after STATE_BASE_ADDRESS but experimentation has indicated that doing so does nothing whatsoever. Since we don't really know, let's do just a bit more flushing in the hopes that this won't be a problem again. In particular: 1) Do a CS stall before we emit STATE_BASE_ADDRESS since we don't really know whether or not it's pipelined. 2) Do a data cache flush in case what runs before STATE_BASE_ADDRESS is a compute shader. 3) Invalidate the state and constant caches after STATE_BASE_ADDRESS because the state may be getting cached there (we don't really know). Reported-by: Mark Janes <[email protected]> Tested-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit 92128590bc78bcbbfb19144c7004b31d6405bbcb) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index d0e76e3d..0ad7cd5 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -63,7 +63,9 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) * clear depth, reset state base address, and then go render stuff. */ anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) { + pc.DCFlushEnable = true; pc.RenderTargetCacheFlushEnable = true; + pc.CommandStreamerStallEnable = true; } anv_batch_emit(&cmd_buffer->batch, GENX(STATE_BASE_ADDRESS), sba) { @@ -145,6 +147,8 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) */ anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) { pc.TextureCacheInvalidationEnable = true; + pc.ConstantCacheInvalidationEnable = true; + pc.StateCacheInvalidationEnable = true; } } commit 69ec90ad24a16087eac29fc076f0dff636fba62d Author: Jason Ekstrand <[email protected]> Date: Tue Jan 31 15:06:56 2017 -0800 anv: Flush render cache before STATE_BASE_ADDRESS on gen7 We had no good reason for *not* doing this on gen7 before but we didn't know it was needed. Recently, when trying update to Vulkan CTS version 1.0.2 in our CI system, Mark discovered GPU hangs on Haswell that appear to be STATE_BASE_ADDRESS related. This commit fixes them. Reported-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit f1f9794118008bcdc13d93ee709022d21cc4156d) diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index d93d377..d0e76e3d 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -55,8 +55,6 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) { struct anv_device *device = cmd_buffer->device; -/* XXX: Do we need this on more than just BDW? */ -#if (GEN_GEN >= 8) /* Emit a render target cache flush. * * This isn't documented anywhere in the PRM. However, it seems to be @@ -67,7 +65,6 @@ genX(cmd_buffer_emit_state_base_address)(struct anv_cmd_buffer *cmd_buffer) anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) { pc.RenderTargetCacheFlushEnable = true; } -#endif anv_batch_emit(&cmd_buffer->batch, GENX(STATE_BASE_ADDRESS), sba) { sba.GeneralStateBaseAddress = (struct anv_address) { NULL, 0 }; commit 7abecef5c3c27253af32083134aa964f114b96c1 Author: Jason Ekstrand <[email protected]> Date: Fri Jan 27 12:31:40 2017 -0800 isl/formats: Only advertise sampling for A4B4G4R4 on Broadwell This causes hangs on Broadwell if you try to render to it. I have no idea how we managed to not hit this earlier. Tested-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit 4871930451215fd8673f7e213a88aa48e5ecaad3) diff --git a/src/intel/isl/isl_format.c b/src/intel/isl/isl_format.c index c8daece..bc157d5 100644 --- a/src/intel/isl/isl_format.c +++ b/src/intel/isl/isl_format.c @@ -218,9 +218,10 @@ static const struct surface_format_info format_info[] = { SF(50, 50, x, x, x, x, x, x, x, x, P8A8_UNORM_PALETTE1) SF( x, x, x, x, x, x, x, x, x, x, A1B5G5R5_UNORM) /* According to the PRM, A4B4G4R4_UNORM isn't supported until Sky Lake - * but empirical testing indicates that it works just fine on Broadwell. + * but empirical testing indicates that at least sampling works just fine + * on Broadwell. */ - SF(80, 80, x, x, 80, x, x, x, x, x, A4B4G4R4_UNORM) + SF(80, 80, x, x, 90, x, x, x, x, x, A4B4G4R4_UNORM) SF(90, x, x, x, x, x, x, x, x, x, L8A8_UINT) SF(90, x, x, x, x, x, x, x, x, x, L8A8_SINT) SF( Y, Y, x, 45, Y, Y, Y, x, x, x, R8_UNORM) commit 5d470a68e67281e12ac6b82e593476fb50fb1b29 Author: Jason Ekstrand <[email protected]> Date: Fri Jan 27 12:32:05 2017 -0800 intel/blorp: Handle clearing of A4B4G4R4 on all platforms Tested-by: Mark Janes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "13.0 17.0" <[email protected]> (cherry picked from commit a0348b5a0b679a78b3f49d41f980dec6066cc541) diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index afc505d..8ea22ac 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -349,6 +349,29 @@ blorp_clear(struct blorp_batch *batch, if (format == ISL_FORMAT_R9G9B9E5_SHAREDEXP) { clear_color.u32[0] = float3_to_rgb9e5(clear_color.f32); format = ISL_FORMAT_R32_UINT; + } else if (format == ISL_FORMAT_A4B4G4R4_UNORM) { + /* Broadwell and earlier cannot render to this format so we need to work + * around it by swapping the colors around and using B4G4R4A4 instead. + */ + + /* First, we apply the swizzle. */ + union isl_color_value old; + assert((unsigned)(swizzle.r - ISL_CHANNEL_SELECT_RED) < 4); + assert((unsigned)(swizzle.g - ISL_CHANNEL_SELECT_RED) < 4); + assert((unsigned)(swizzle.b - ISL_CHANNEL_SELECT_RED) < 4); + assert((unsigned)(swizzle.a - ISL_CHANNEL_SELECT_RED) < 4); + old.u32[swizzle.r - ISL_CHANNEL_SELECT_RED] = clear_color.u32[0]; + old.u32[swizzle.g - ISL_CHANNEL_SELECT_RED] = clear_color.u32[1]; + old.u32[swizzle.b - ISL_CHANNEL_SELECT_RED] = clear_color.u32[2]; + old.u32[swizzle.a - ISL_CHANNEL_SELECT_RED] = clear_color.u32[3]; + swizzle = ISL_SWIZZLE_IDENTITY; + + /* Now we re-order for the new format */ + clear_color.u32[0] = old.u32[1]; + clear_color.u32[1] = old.u32[2]; + clear_color.u32[2] = old.u32[3]; + clear_color.u32[3] = old.u32[0]; + format = ISL_FORMAT_B4G4R4A4_UNORM; } memcpy(¶ms.wm_inputs.clear_color, clear_color.f32, sizeof(float) * 4); commit 3df060d9530b5f0cbfe9894dff12cb1c61b831b1 Author: Wladimir J. van der Laan <[email protected]> Date: Fri Nov 25 06:42:43 2016 +0000 etnaviv: Set SE.CLIP registers, add margins for scissor/clip registers This fixes rendering of full-screen quads (and other screen-filling geometry, e.g. ioquake3 walls up-close) on gc3000. It should be a no-op on other hardware. - It looks like SE_CLIP registers were not set at all. I'm amazed that rendering worked without them. Emit them to avoid issues on gc3000. - Define constants ETNA_SE_SCISSOR_MARGIN_RIGHT (0x1119) ETNA_SE_SCISSOR_MARGIN_BOTTOM (0x1111) ETNA_SE_CLIP_MARGIN_RIGHT (0xffff) ETNA_SE_CLIP_MARGIN_BOTTOM (0xffff) These demarcate the margin (fixp16) between the computed sizes and the value sent to the chip. I have set these to the numbers used by the Vivante driver for gc2000. I am not sure whether any old hardware was relying on the old numbers, or whether those were just a guess. But if so, these need to be moved to the _specs structure. CC: <[email protected]> Signed-off-by: Wladimir J. van der Laan <[email protected]> Acked-by: Christian Gmeiner <[email protected]> (cherry picked from commit 56314f5bafdfeb514adf8401c52f216bd430bbb2) diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c index 7eeeda5..8394474 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_emit.c +++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c @@ -491,6 +491,23 @@ etna_emit_state(struct etna_context *ctx) /*00C14*/ EMIT_STATE(SE_DEPTH_BIAS, rasterizer->SE_DEPTH_BIAS); /*00C18*/ EMIT_STATE(SE_CONFIG, rasterizer->SE_CONFIG); } + if (unlikely(dirty & (ETNA_DIRTY_SCISSOR | ETNA_DIRTY_FRAMEBUFFER | + ETNA_DIRTY_RASTERIZER | ETNA_DIRTY_VIEWPORT))) { + struct etna_rasterizer_state *rasterizer = etna_rasterizer_state(ctx->rasterizer); + + uint32_t clip_right = + MIN2(ctx->framebuffer.SE_CLIP_RIGHT, ctx->viewport.SE_CLIP_RIGHT); + uint32_t clip_bottom = + MIN2(ctx->framebuffer.SE_CLIP_BOTTOM, ctx->viewport.SE_CLIP_BOTTOM); + + if (rasterizer->scissor) { + clip_right = MIN2(ctx->scissor.SE_CLIP_RIGHT, clip_right); + clip_bottom = MIN2(ctx->scissor.SE_CLIP_BOTTOM, clip_bottom); + } + + /*00C20*/ EMIT_STATE_FIXP(SE_CLIP_RIGHT, clip_right); + /*00C24*/ EMIT_STATE_FIXP(SE_CLIP_BOTTOM, clip_bottom); + } if (unlikely(dirty & (ETNA_DIRTY_SHADER))) { /*00E00*/ EMIT_STATE(RA_CONTROL, ctx->shader_state.RA_CONTROL); } diff --git a/src/gallium/drivers/etnaviv/etnaviv_internal.h b/src/gallium/drivers/etnaviv/etnaviv_internal.h index 983321a..2f09d55 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_internal.h +++ b/src/gallium/drivers/etnaviv/etnaviv_internal.h @@ -47,6 +47,17 @@ /* PE render targets must be aligned to 64 bytes */ #define ETNA_PE_ALIGNMENT (64) +/* These demarcate the margin (fixp16) between the computed sizes and the + value sent to the chip. These have been set to the numbers used by the + Vivante driver on gc2000. They used to be -1 for scissor right and bottom. I + am not sure whether older hardware was relying on these or they were just a + guess. But if so, these need to be moved to the _specs structure. +*/ +#define ETNA_SE_SCISSOR_MARGIN_RIGHT (0x1119) +#define ETNA_SE_SCISSOR_MARGIN_BOTTOM (0x1111) +#define ETNA_SE_CLIP_MARGIN_RIGHT (0xffff) +#define ETNA_SE_CLIP_MARGIN_BOTTOM (0xffff) + /* GPU chip 3D specs */ struct etna_specs { /* supports SUPERTILE (64x64) tiling? */ @@ -128,6 +139,8 @@ struct compiled_scissor_state { uint32_t SE_SCISSOR_TOP; uint32_t SE_SCISSOR_RIGHT; uint32_t SE_SCISSOR_BOTTOM; + uint32_t SE_CLIP_RIGHT; + uint32_t SE_CLIP_BOTTOM; }; /* Compiled pipe_viewport_state */ @@ -142,6 +155,8 @@ struct compiled_viewport_state { uint32_t SE_SCISSOR_TOP; uint32_t SE_SCISSOR_RIGHT; uint32_t SE_SCISSOR_BOTTOM; + uint32_t SE_CLIP_RIGHT; + uint32_t SE_CLIP_BOTTOM; uint32_t PE_DEPTH_NEAR; uint32_t PE_DEPTH_FAR; }; @@ -164,6 +179,8 @@ struct compiled_framebuffer_state { uint32_t SE_SCISSOR_TOP; uint32_t SE_SCISSOR_RIGHT; uint32_t SE_SCISSOR_BOTTOM;

