From 485b2bca17101b41dfd596dc653d32b1f5acfb02 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 28 Feb 2024 05:06:06 -0800 Subject: [PATCH] intel/brw: Delete constant_buffer_0_is_relative This was only for old kernels on old hardware. Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_compiler.h | 6 ------ src/intel/compiler/brw_nir_analyze_ubo_ranges.c | 3 +-- src/intel/vulkan/anv_device.c | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index e485b580bbe..bd3419b6537 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -79,12 +79,6 @@ struct brw_compiler { */ bool precise_trig; - /** - * Is 3DSTATE_CONSTANT_*'s Constant Buffer 0 relative to Dynamic State - * Base Address? (If not, it's a normal GPU address.) - */ - bool constant_buffer_0_is_relative; - /** * Whether or not the driver supports NIR shader constants. This controls * whether nir_opt_large_constants will be run. diff --git a/src/intel/compiler/brw_nir_analyze_ubo_ranges.c b/src/intel/compiler/brw_nir_analyze_ubo_ranges.c index ab7c8323c85..ff444cd63e4 100644 --- a/src/intel/compiler/brw_nir_analyze_ubo_ranges.c +++ b/src/intel/compiler/brw_nir_analyze_ubo_ranges.c @@ -300,8 +300,7 @@ brw_nir_analyze_ubo_ranges(const struct brw_compiler *compiler, * unfortunately can't truncate it here, because we don't know what * the backend is planning to do with regular uniforms. */ - const int max_ubos = (compiler->constant_buffer_0_is_relative ? 3 : 4) - - state.uses_regular_uniforms; + const int max_ubos = 4 - state.uses_regular_uniforms; nr_entries = MIN2(nr_entries, max_ubos); for (int i = 0; i < nr_entries; i++) { diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 8650120fa84..299b7bcfe1b 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2418,7 +2418,6 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, } device->compiler->shader_debug_log = compiler_debug_log; device->compiler->shader_perf_log = compiler_perf_log; - device->compiler->constant_buffer_0_is_relative = false; device->compiler->supports_shader_constants = true; device->compiler->indirect_ubos_use_sampler = device->info.ver < 12; device->compiler->extended_bindless_surface_offset = device->uses_ex_bso;