svga: fix vertex buffer references in the hw state

Graphics / Mesa 3D Graphics Library / Mesa - Charmaine Lee [vmware.com] - 23 June 2016 08:31 UTC

This patch fixes three issues with vertex buffer references: (1) Instead of copy the vertex buffer resource handles to the hw state in the context structure, use pipe_resource_reference to properly reference the vertex buffer resources in the context.

(2) Make sure to unbind those unused vertex buffer resources.

(3) Force to rebind the vertex buffer resources at the first draw of each command buffer to make sure the vertex buffer resources are paged in.

2b81e31 svga: fix vertex buffer references in the hw state
src/gallium/drivers/svga/svga_context.c | 5 ++
src/gallium/drivers/svga/svga_context.h | 4 +-
src/gallium/drivers/svga/svga_draw.c | 79 ++++++++++++++++++---------
src/gallium/drivers/svga/svga_pipe_vertex.c | 3 +
4 files changed, 64 insertions(+), 27 deletions(-)

Upstream: cgit.freedesktop.org


  • Share