mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
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: a9c4a861d5 ("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>
This commit is contained in:
parent
3168b8defa
commit
00db976905
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue