panvk: Add support for KHR_push_descriptor

Most of the panvk_descriptor_set logic can be re-used, we just need
to provide intermediate helpers that can be used for both the push set
and regular set population logic (which implies passing our own storage
for the SW descriptor UBO instead of assuming it's always backed by a
BO).

Once this is done, we add temporary storage to the panvk_cmd_buffer
object, and populate the push sets at draw time.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28178>
This commit is contained in:
Boris Brezillon
2024-01-10 15:49:40 +01:00
committed by Marge Bot
parent 160dd5bf2b
commit 21775a459f
7 changed files with 384 additions and 116 deletions

View File

@@ -91,6 +91,7 @@ enum panvk_dynamic_state_bits {
struct panvk_descriptor_state {
uint32_t dirty;
const struct panvk_descriptor_set *sets[MAX_SETS];
struct panvk_push_descriptor_set *push_sets[MAX_SETS];
struct panvk_sysvals sysvals;
struct {
struct panvk_buffer_desc ubos[MAX_DYNAMIC_UNIFORM_BUFFERS];