summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharmaine Lee <charmainel@vmware.com>2016-04-21 08:28:26 -0700
committerBrian Paul <brianp@vmware.com>2016-04-25 12:59:29 -0600
commit686cd3c606536cff3fe6d80f8ebeeca7afa1b37e (patch)
tree873f25caad745942f19565ed0829f857a461afb4 /src
parent676931640fe6c97f6a5702196c39f8de36b22a64 (diff)
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@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c6
1 files 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;