[prev in list] [next in list] [prev in thread] [next in thread]
List: mesa3d-dev
Subject: [Mesa-dev] [PATCH 1/2] svga: Fix banded DMA upload unmap
From: Thomas Hellström (VMware) <thomas_os () shipmail ! org>
Date: 2019-10-09 12:41:40
Message-ID: 20191009124141.22016-1-thomas_os () shipmail ! org
[Download RAW message or body]
From: Thomas Hellstrom <thellstrom@vmware.com>
Even with banded DMA uploads, st->hwbuf is always non-NULL, but when we've
allocated a software buffer to hold the full upload, unmapping of the
hardware buffer has already been done before
svga_texture_transfer_unmap_dma(), and the code was performing an unmap of
an already mapped buffer.
Fix this by testing for software buffer not present.
Fixes: a9c4a861d5d ("svga: refactor svga_texture_transfer_map/unmap functions")
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
---
src/gallium/drivers/svga/svga_resource_texture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c \
b/src/gallium/drivers/svga/svga_resource_texture.c index b04542d711a..f1d16563efb \
100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -758,7 +758,7 @@ svga_texture_transfer_unmap_dma(struct svga_context *svga,
{
struct svga_winsys_screen *sws = svga_screen(svga->pipe.screen)->sws;
- if (st->hwbuf)
+ if (!st->swbuf)
sws->buffer_unmap(sws, st->hwbuf);
if (st->base.usage & PIPE_TRANSFER_WRITE) {
--
2.21.0
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic