diff options
author | Thomas Hellstrom <[email protected]> | 2019-10-03 12:26:39 +0200 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-10-25 09:06:25 -0700 |
commit | dacfad708f118a48af07599999d0c0967c530f02 (patch) | |
tree | ccb9eac0b7443e393ba6f3575919202c382f43f1 /src | |
parent | 340849f311eea4d0d17267da9f1f6a153695f19f (diff) |
svga: Fix banded DMA upload unmap
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Charmaine Lee <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
(cherry picked from commit 00db976905b7fcd615ccee0c13dcbf9dfe29f5ec)
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_texture.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |