As Thomas suggested, we'll first try to map directly to a GB surface. If it is blocked, then we'll use texture upload buffer. Also if a texture is already "rendered to", that is, the GB surface is already out of sync, then we'll use the texture upload buffer to avoid syncing the GB surface.
Tested with Lightsmark2008, Tropics, MTT piglit, glretrace.
3dfb424 svga: fix texture upload path condition
src/gallium/drivers/svga/svga_resource_texture.c | 90 ++++++++++++++--------
1 file changed, 60 insertions(+), 30 deletions(-)
Upstream: cgit.freedesktop.org