From 86e217e7dfb0e5360840ebe9a6bfc02014ed6479 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 17 Feb 2025 15:38:17 -0600 Subject: [PATCH] nvk: Implement descriptorBufferPushDescriptors The only thing we really need to do here is to make sure we don't try to use the EDB path for push descriptors since those aren't really descriptor buffers. Backport-to: 25.0 Part-of: --- src/nouveau/vulkan/nvk_nir_lower_descriptors.c | 6 ++++-- src/nouveau/vulkan/nvk_physical_device.c | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nouveau/vulkan/nvk_nir_lower_descriptors.c b/src/nouveau/vulkan/nvk_nir_lower_descriptors.c index e4dd7eaf4b2..b952b23a4c7 100644 --- a/src/nouveau/vulkan/nvk_nir_lower_descriptors.c +++ b/src/nouveau/vulkan/nvk_nir_lower_descriptors.c @@ -964,8 +964,10 @@ is_edb_buffer_view(nir_deref_instr *deref, nir_variable *var = nir_deref_instr_get_variable(deref); uint8_t set = var->data.descriptor_set; - return ctx->set_layouts[set]->flags & - VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT; + return (ctx->set_layouts[set]->flags & + VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT) && + !(ctx->set_layouts[set]->flags & + VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT); } static nir_def * diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index afedf4d64fe..ae716b1a56f 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -552,7 +552,7 @@ nvk_get_device_features(const struct nv_device_info *info, .descriptorBuffer = true, .descriptorBufferCaptureReplay = true, .descriptorBufferImageLayoutIgnored = true, - .descriptorBufferPushDescriptors = false, + .descriptorBufferPushDescriptors = true, /* VK_EXT_device_generated_commands */ .deviceGeneratedCommands = true, @@ -984,7 +984,7 @@ nvk_get_device_properties(const struct nvk_instance *instance, /* VK_EXT_descriptor_buffer */ .combinedImageSamplerDescriptorSingleArray = true, - .bufferlessPushDescriptors = false, + .bufferlessPushDescriptors = true, .allowSamplerImageViewPostSubmitCreation = false, .descriptorBufferOffsetAlignment = nvk_min_cbuf_alignment(info), .maxDescriptorBufferBindings = 32,