From: Charmaine Lee Date: Thu, 21 Apr 2016 15:28:26 +0000 (-0700) Subject: svga: mark the texture dirty for write transfer map only X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=686cd3c606536cff3fe6d80f8ebeeca7afa1b37e;p=mesa.git 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 --- diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index ae5122843a6..f176647dcf6 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;