intel/brw: Delete compiler->supports_shader_constants

True for all drivers using this compiler.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27872>
This commit is contained in:
Kenneth Graunke 2024-02-28 05:09:54 -08:00 committed by Marge Bot
parent 485b2bca17
commit 5fbba530cf
4 changed files with 1 additions and 11 deletions

View file

@ -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);

View file

@ -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

View file

@ -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);

View file

@ -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;