svga: Map vertex- index- and constant buffers ansynchronously when reading

Graphics / Mesa 3D Graphics Library / Mesa - Thomas Hellstrom [vmware.com] - 20 June 2019 07:30 EDT

With SWTNL and index translation we're mapping buffers for reading. These buffers are commonly upload_mgr buffers that might already be referenced by another submitted or unsubmitted GPU command. A synchronous map will then trigger a flush and sync, at least on Linux that doesn't distinguish between read- and write referencing. So map these buffers async. If they for some obscure reason happen to be dirty (stream-output, buffer-copy), the resource_buffer code will read-back and sync anyway. For persistent / coherent buffers a corresponding read-back and sync will happen in the kernel fault handler.

Testing: Piglit quick. No regressions.

3b828c4e68b svga: Map vertex- index- and constant buffers ansynchronously when reading
src/gallium/drivers/svga/svga_draw_elements.c | 4 +++-
src/gallium/drivers/svga/svga_swtnl_draw.c | 9 ++++++---
2 files changed, 9 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share