diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 0bb2abe898d..3b315851b5a 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -3933,7 +3933,6 @@ iris_compiler_init(struct iris_screen *screen) screen->brw = brw_compiler_create(screen, screen->devinfo); screen->brw->shader_debug_log = iris_shader_debug_log; screen->brw->shader_perf_log = iris_shader_perf_log; - screen->brw->supports_shader_constants = true; screen->brw->indirect_ubos_use_sampler = iris_indirect_ubos_use_sampler(screen); } else { screen->elk = elk_compiler_create(screen, screen->devinfo); diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index bd3419b6537..7ee8016e19d 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; - /** - * Whether or not the driver supports NIR shader constants. This controls - * whether nir_opt_large_constants will be run. - */ - bool supports_shader_constants; - /** * Whether indirect UBO loads should use the sampler or go through the * data/constant cache. For the sampler, UBO surface states have to be set diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index a4e4f0585f8..54db8fc96ee 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1050,9 +1050,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, /* This needs to be run after the first optimization pass but before we * lower indirect derefs away */ - if (compiler->supports_shader_constants) { - OPT(nir_opt_large_constants, NULL, 32); - } + OPT(nir_opt_large_constants, NULL, 32); OPT(nir_lower_load_const_to_scalar); diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 299b7bcfe1b..fdbee1b2016 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->supports_shader_constants = true; device->compiler->indirect_ubos_use_sampler = device->info.ver < 12; device->compiler->extended_bindless_surface_offset = device->uses_ex_bso; device->compiler->use_bindless_sampler_offset = false;