nvk: Add support for contiguous heaps to nvk_heap
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:12:06 +0000 (20:12 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:03 +0000 (21:32 +0000)
commit55be10648d892b4135d2c26f7a4a770d4d4472dd
treecaeed5cde812f410260bf05e916cdcfe05e2220a
parentdc8fd9050cbdbb29e60baffd5355d438f38fa67c
nvk: Add support for contiguous heaps to nvk_heap

This is required for shader heaps pre-Volta because they use a single
64-bit base address and 32-bit offsets for individual shaders.  In this
case, the addresses returned from the heap are relative to the base.
The BO for the heap can be retrieved via nvk_heap_get_contiguous_bo_ref
which returns an actual reference so it's safe to call from the queue
submit path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
src/nouveau/vulkan/nvk_device.c
src/nouveau/vulkan/nvk_heap.c
src/nouveau/vulkan/nvk_heap.h