gallium/pipebuffer: Use persistent maps for slabs
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 22 Apr 2020 11:27:35 +0000 (13:27 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 13:45:12 +0000 (13:45 +0000)
commit422148de52fc57f9f33e632883400fff49b3ad9d
tree092956707e9df98b6fdc117a6fdb8cc3f8f88d25
parente4e1a0ac1321730bbdeb4aef89ff14281a0b56eb
gallium/pipebuffer: Use persistent maps for slabs

Instead of the ugly practice of relying on the provider caching maps,
introduce and use persistent pipebuffer maps. Providers that can't handle
persistent maps can't use the slab manager.

The only current user is the svga drm winsys which always maps
persistently.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4804>
src/gallium/auxiliary/pipebuffer/pb_buffer.h
src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c
src/gallium/winsys/svga/drm/vmw_buffer.c