From c37bcd43fcdebeedd1938da82baedd0fde9f9f37 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 30 May 2025 22:44:48 -0400 Subject: [PATCH] nvk: Claim shaderUniformBufferArrayNonUniformIndexingNative "Native" is relative for UBOs. On the one hand, we don't loop in the shader for non-uniform UBO access ever. On the other hand, uniformity does affect UBOs on Turing since we can only use bindless UBOs if the handle (and therefore the loaded descriptor) are uniform. But if it's non-uniform, we fall back to ld.constant which is pretty fast. On Volta and earlier where we don't have bindless UBOs, we use ld.uniform or ld.ci which are just as fast uniform as non. On all hardware, non-constant UBO indexing prevents cbuf promotion so that's always slower no matter what. The moral of the story is that "native" non-uniform for UBOs is a nonsense anyway and we should just set NonUniformIndexingNative so we don't scare apps into doing something silly. The proprietary driver claims native non-uniform UBOs as well. Reviewed-by: Mel Henning Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 2ccdb0fc305..0d2fdb146c3 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -887,7 +887,7 @@ nvk_get_device_properties(const struct nvk_instance *instance, .shaderRoundingModeRTZFloat32 = true, .shaderRoundingModeRTZFloat64 = true, .maxUpdateAfterBindDescriptorsInAllPools = UINT32_MAX, - .shaderUniformBufferArrayNonUniformIndexingNative = false, + .shaderUniformBufferArrayNonUniformIndexingNative = true, .shaderSampledImageArrayNonUniformIndexingNative = info->cls_eng3d >= TURING_A, .shaderStorageBufferArrayNonUniformIndexingNative = true, .shaderStorageImageArrayNonUniformIndexingNative = info->cls_eng3d >= TURING_A,