svga: use upload buffer for upload texture.
authorCharmaine Lee <charmainel@vmware.com>
Tue, 6 Sep 2016 18:29:41 +0000 (11:29 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 17 Sep 2016 16:24:13 +0000 (10:24 -0600)
commitf1b3374d28577ca0b84ce1fbab171c39a637d3df
treec2d708dd1ac83d3390962b5dc8c9f7d85af4ec60
parenta9c4a861d5d6bb88c9e6c375403c3985187fd453
svga: use upload buffer for upload texture.

With this patch, when running with vgpu10, instead of mapping directly to the
guest backed memory for texture update, we'll use the texture upload buffer
and use the transfer from buffer command to update the host side texture memory.

This optimization yields about 20% performance improvement with
Lightsmark2008 and about 40% with Tropics.

Tested with Lightsmark2008, Tropics, Heaven, MTT piglit, glretrace, conform.

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