svga: fix index/vertex buffer surface reference at draw
authorCharmaine Lee <charmainel@vmware.com>
Mon, 16 May 2016 22:12:57 +0000 (15:12 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 23 Jun 2016 13:31:20 +0000 (07:31 -0600)
commitd4a77254cb491c8e4a90ecefb0c9ae430bb0278a
tree995199f9827a90a2594a96154e783936d7dafcbb
parent2b81e31d4488ada643560a640aa4c0f6372e9ca7
svga: fix index/vertex buffer surface reference at draw

Currently with the SetVertexBuffers optimization, we avoid emitting
redundant DXSetVertexBuffers commands. However, these buffers surfaces
will still need to be referenced, otherwise, in the case of linux,
the subsequent surface discard map will map to the existing mob instead
of a new one, causing rendering artifacts.

With this patch, we'll call resource_rebind() to reference the resources
even if we are avoiding the actual set command. This fixes the
rendering artifacts in the window title area running with unity in
Ubuntu 14.04

Tested with piglit, glretrace.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
src/gallium/drivers/svga/svga_draw.c