This commit is contained in:
Peter Robinson 2017-06-19 16:21:37 +01:00
parent 355bee1f82
commit 9a28d63085
4 changed files with 6 additions and 115 deletions

View File

@ -1,51 +0,0 @@
From 245912b684b862d47cde10052b137d76a55d0bd3 Mon Sep 17 00:00:00 2001
From: Lyude <lyude@redhat.com>
Date: Fri, 2 Jun 2017 20:45:36 -0400
Subject: [PATCH] nvc0: disable BGRA8 images on Fermi
BGRA8 image stores on Fermi don't work, which results in breaking
PBO downloads, such that they always return 0x0. Discovered this
through a glamor bug, and confirmed it does indeed break a good number
of piglit tests such as spec/arb_pixel_buffer_object/pbo-read-argb8888
Fixes: 8e7893eb53213 ("nvc0: add support for BGRA8 images")
Signed-off-by: Lyude <lyude@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index c636926994..f6c5c72797 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -87,11 +87,20 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
bindings &= ~(PIPE_BIND_LINEAR |
PIPE_BIND_SHARED);
- if (bindings & PIPE_BIND_SHADER_IMAGE && sample_count > 1 &&
- nouveau_screen(pscreen)->class_3d >= GM107_3D_CLASS) {
- /* MS images are currently unsupported on Maxwell because they have to
- * be handled explicitly. */
- return false;
+ if (bindings & PIPE_BIND_SHADER_IMAGE) {
+ if (sample_count > 1 &&
+ nouveau_screen(pscreen)->class_3d >= GM107_3D_CLASS) {
+ /* MS images are currently unsupported on Maxwell because they have to
+ * be handled explicitly. */
+ return false;
+ }
+
+ if (format == PIPE_FORMAT_B8G8R8A8_UNORM &&
+ nouveau_screen(pscreen)->class_3d < NVE4_3D_CLASS) {
+ /* This should work on Fermi, but for currently unknown reasons it
+ * does not and results in breaking reads from pbos. */
+ return false;
+ }
}
return (( nvc0_format_table[format].usage |
--
2.13.0

View File

@ -203,66 +203,6 @@ index 103b53c1c3..1341e1ea23 100644
static void
--
2.13.0
From cab5996c2637c31a78a0196e42ec6de9eb61f270 Mon Sep 17 00:00:00 2001
From: Lucas Stach <l.stach@pengutronix.de>
Date: Thu, 18 May 2017 15:39:58 +0200
Subject: [PATCH 0941/1430] etnaviv: always do cpu_fini in transfer_unmap
The cpu_fini() call pushes the buffer back into the GPU domain, which needs
to be done for all buffers, not just the ones with CPU written content. The
etnaviv kernel driver currently doesn't validate this, but may start to do
so at a later point in time. If there is a temporary resource the fini needs
to happen before the RS uses this one as the source for the upload.
Also remove an invalid comment about flushing CPU caches, cpu_fini takes
care of everything involved in this.
Fixes: c9e8b49b885 ("etnaviv: gallium driver for Vivante GPUs")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-By: Wladimir J. van der Laan <laanwj@gmail.com>
---
src/gallium/drivers/etnaviv/etnaviv_transfer.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_transfer.c b/src/gallium/drivers/etnaviv/etnaviv_transfer.c
index 1a5aa7fc04..4809b04ff9 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_transfer.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_transfer.c
@@ -70,6 +70,9 @@ etna_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
if (rsc->texture && !etna_resource_newer(rsc, etna_resource(rsc->texture)))
rsc = etna_resource(rsc->texture); /* switch to using the texture resource */
+ if (trans->rsc)
+ etna_bo_cpu_fini(etna_resource(trans->rsc)->bo);
+
if (ptrans->usage & PIPE_TRANSFER_WRITE) {
if (trans->rsc) {
/* We have a temporary resource due to either tile status or
@@ -105,15 +108,15 @@ etna_transfer_unmap(struct pipe_context *pctx, struct pipe_transfer *ptrans)
}
rsc->seqno++;
- etna_bo_cpu_fini(rsc->bo);
if (rsc->base.bind & PIPE_BIND_SAMPLER_VIEW) {
- /* XXX do we need to flush the CPU cache too or start a write barrier
- * to make sure the GPU sees it? */
ctx->dirty |= ETNA_DIRTY_TEXTURE_CACHES;
}
}
+ if (!trans->rsc)
+ etna_bo_cpu_fini(rsc->bo);
+
pipe_resource_reference(&trans->rsc, NULL);
pipe_resource_reference(&ptrans->resource, NULL);
slab_free(&ctx->transfer_pool, trans);
--
2.13.0
From a276c32a08bd41ceb8fd9b604ba9ac8229d59b64 Mon Sep 17 00:00:00 2001
From: Lucas Stach <l.stach@pengutronix.de>
Date: Thu, 18 May 2017 15:37:02 +0200

View File

@ -58,8 +58,8 @@
Name: mesa
Summary: Mesa graphics libraries
Version: 17.1.2
Release: 2%{?rctag:.%{rctag}}%{?dist}
Version: 17.1.3
Release: 1%{?rctag:.%{rctag}}%{?dist}
License: MIT
URL: http://www.mesa3d.org
@ -85,7 +85,6 @@ Patch13: glvnd-fix-gl-dot-pc.patch
Patch14: 0001-Fix-linkage-against-shared-glapi.patch
# backport from upstream
Patch50: 0001-nvc0-disable-BGRA8-images-on-Fermi.patch
Patch51: mesa-7.1.2-etnaviv-upstream-fixes.patch
Patch52: mesa-7.1.2-etnaviv-fixes.patch
@ -687,6 +686,9 @@ popd
%endif
%changelog
* Mon Jun 19 2017 Peter Robinson <pbrobinson@fedoraproject.org> 7.1.3-1
- Update to 17.1.3
* Wed Jun 14 2017 Peter Robinson <pbrobinson@fedoraproject.org> 7.1.2-2
- Some etnaviv fixes

View File

@ -1 +1 @@
SHA512 (mesa-17.1.2.tar.xz) = 9df5e1a0336948a6ba338a9a8499b286543bc079f61f1cf85f6ecf98e05fab9a237777cde0d1e3f2153df9b07515cb8c1a08531d43f053783991ecdd32380d3b
SHA512 (mesa-17.1.3.tar.xz) = b487d4f3d7717f379e7aaf66958bbef886fbae219e6e0333123c4623dc7db84109aca8cf07be08c0b79a74bdb198c704073fd549c6e85aa952ed3c97da1a8a94