svga: Update the backing resource only if needed
authorCharmaine Lee <charmainel@vmware.com>
Tue, 25 Apr 2017 20:31:04 +0000 (14:31 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Apr 2017 17:37:59 +0000 (11:37 -0600)
commit7f2f695d4d6447bdaf70acda3cdae8aa43b6df3a
tree1e037f8581795cb39f844657880e2d1edbd1ab1a
parentc6576461f5920971d7df74dcd821ac0e257fc352
svga: Update the backing resource only if needed

This patch adds a timestamp in svga_surface structure to keep track
of when the backing surface is last sync with the original resource.
This helps to avoid unnecessary surface copy from the original
resource to the backing surface if the original resource has not
since been modified.

This reduces the amount of surface copy with CinebenchR15.

Tested with CinebenchR15, mtt glretrace.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/svga_surface.c
src/gallium/drivers/svga/svga_surface.h