Mesa (main): zink: add a suballocator

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 17 13:32:17 UTC 2021


Module: Mesa
Branch: main
Commit: 40fdb3212c3ded2150faf952dc2b669991bfbf94
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=40fdb3212c3ded2150faf952dc2b669991bfbf94

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu May 13 07:33:44 2021 -0400

zink: add a suballocator

this is an aux/pipebuffer implementation borrowing heavily from the
one in radeonsi. it currently has the following limitations, which
will be resolved in a followup series:
* 32bit address space still explodes
* swapchain images still have separate memory handling

performance in games like Tomb Raider has been observed to increase by
over 1000%

SQUASHED: simplify get_memory_type_index()

now that the heaps are enumerated, this can be reduced to a simple
array index with a fallback

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12146>

---

 src/gallium/drivers/zink/meson.build     |    1 +
 src/gallium/drivers/zink/zink_bo.c       | 1014 ++++++++++++++++++++++++++++++
 src/gallium/drivers/zink/zink_bo.h       |  270 ++++++++
 src/gallium/drivers/zink/zink_context.c  |   70 +--
 src/gallium/drivers/zink/zink_resource.c |  168 ++---
 src/gallium/drivers/zink/zink_resource.h |   83 ++-
 src/gallium/drivers/zink/zink_screen.c   |   44 +-
 src/gallium/drivers/zink/zink_screen.h   |   25 +-
 8 files changed, 1425 insertions(+), 250 deletions(-)

Diff:   http://cgit.freedesktop.org/mesa/mesa/diff/?id=40fdb3212c3ded2150faf952dc2b669991bfbf94


More information about the mesa-commit mailing list