Mesa (master): svga: Avoid discard DMA uploads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 29 11:18:23 UTC 2020
Module: Mesa
Branch: master
Commit: 8830e9f0cac2df7c8a1ae09086f27d8eb9bc80bd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8830e9f0cac2df7c8a1ae09086f27d8eb9bc80bd
Author: Thomas Hellstrom <thellstrom at vmware.com>
Date: Tue Jan 28 12:49:30 2020 +0100
svga: Avoid discard DMA uploads
Newer versions of the device code will make discard DMA uploads
sub-optimal. Disable them for guest-backed aware code, where we previously
had them conditionally enabled.
Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Reviewed-by: Charmaine Lee <charmainel at vmware.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3614>
---
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 31ac6a9b730..b57d2d7ee95 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -531,7 +531,7 @@ svga_texture_transfer_map(struct pipe_context *pipe,
struct svga_transfer *st;
struct svga_winsys_surface *surf = tex->handle;
boolean use_direct_map = svga_have_gb_objects(svga) &&
- !svga_have_gb_dma(svga);
+ (!svga_have_gb_dma(svga) || (usage & PIPE_TRANSFER_WRITE));
void *map = NULL;
int64_t begin = svga_get_time(svga);
More information about the mesa-commit
mailing list