svga: minimize surface flush

Graphics / Mesa 3D Graphics Library / Mesa - Charmaine Lee [vmware.com] - 25 April 2016 13:59 UTC

Currently, we always do a surface flush when we try to establish a synchronized write transfer map. But if the subresource has not been modified, we can skip the surface flush. In other words, we only need to do a surface flush if the to-be-mapped subresource has been modified in this command buffer.

With this patch, lightsmark2008 shows about 15% performance improvement.

d7a6c1a svga: minimize surface flush
src/gallium/drivers/svga/svga_resource_texture.c | 71 +++++++++++++++++-----
src/gallium/drivers/svga/svga_resource_texture.h | 29 +++++++++
2 files changed, 85 insertions(+), 15 deletions(-)

Upstream: cgit.freedesktop.org


  • Share