From 6bea7caddb8e7cd305c7927dbd03442061bd3a05 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 30 May 2025 23:47:52 -0400 Subject: [PATCH] nvk/lower_descriptors: Drop buffer_address_to_ldcx_handle() It's a remnant of older bindless cbuf attempts and is never called. Part-of: --- .../vulkan/nvk_nir_lower_descriptors.c | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/nouveau/vulkan/nvk_nir_lower_descriptors.c b/src/nouveau/vulkan/nvk_nir_lower_descriptors.c index c2fbaf59003..c6074849f8e 100644 --- a/src/nouveau/vulkan/nvk_nir_lower_descriptors.c +++ b/src/nouveau/vulkan/nvk_nir_lower_descriptors.c @@ -711,29 +711,6 @@ is_idx_intrin(nir_intrinsic_instr *intrin) return intrin->intrinsic == nir_intrinsic_vulkan_resource_index; } -static nir_def * -buffer_address_to_ldcx_handle(nir_builder *b, nir_def *addr) -{ - nir_def *base_addr = nir_pack_64_2x32(b, nir_channels(b, addr, 0x3)); - nir_def *size = nir_channel(b, addr, 2); - nir_def *offset = nir_channel(b, addr, 3); - - nir_def *addr16 = nir_ushr_imm(b, base_addr, 4); - nir_def *addr16_lo = nir_unpack_64_2x32_split_x(b, addr16); - nir_def *addr16_hi = nir_unpack_64_2x32_split_y(b, addr16); - - /* If we assume the top bis of the address are 0 as well as the bottom two - * bits of the size. (We can trust it since it's a descriptor) then - * - * ((size >> 4) << 13) | addr - * - * is just an imad. - */ - nir_def *handle_hi = nir_imad(b, size, nir_imm_int(b, 1 << 9), addr16_hi); - - return nir_vec3(b, addr16_lo, handle_hi, offset); -} - static nir_def * load_descriptor_for_idx_intrin(nir_builder *b, nir_intrinsic_instr *intrin, const struct lower_descriptors_ctx *ctx)