Mesa (master): svga: mark the texture dirty for write transfer map only
Brian Paul
brianp at kemper.freedesktop.org
Mon Apr 25 19:07:07 UTC 2016
Module: Mesa
Branch: master
Commit: 686cd3c606536cff3fe6d80f8ebeeca7afa1b37e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=686cd3c606536cff3fe6d80f8ebeeca7afa1b37e
Author: Charmaine Lee <charmainel at vmware.com>
Date: Thu Apr 21 08:28:26 2016 -0700
svga: mark the texture dirty for write transfer map only
Instead of unconditionally mark the texture subresource dirty at transfer map,
we'll set the dirty bit for write transfer only.
Tested with lightsmark2008 and glretrace.
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/drivers/svga/svga_resource_texture.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index ae51228..f176647 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -485,8 +485,10 @@ svga_texture_transfer_map(struct pipe_context *pipe,
}
}
}
- /* mark this texture level as dirty */
- svga_set_texture_dirty(tex, st->slice, transfer->level);
+ if (transfer->usage & PIPE_TRANSFER_WRITE) {
+ /* mark this texture level as dirty */
+ svga_set_texture_dirty(tex, st->slice, transfer->level);
+ }
}
st->use_direct_map = use_direct_map;
More information about the mesa-commit
mailing list