From 686cd3c606536cff3fe6d80f8ebeeca7afa1b37e Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Thu, 21 Apr 2016 08:28:26 -0700 Subject: [PATCH] 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 --- 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 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; -- 2.30.2