diff options
author | Marek Olšák <marek.olsak@amd.com> | 2023-04-06 05:38:00 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-15 19:55:46 +0000 |
commit | db5cf460d7aee0e7b39fe3b990078191b8dc995e (patch) | |
tree | 2307bf7b5048cc9e817105b3c39a50bf3369fc95 | |
parent | 5bbb279e7d6bc844a98621dd27f38f95e826d30d (diff) |
radeonsi: set trivial NIR options for nir_opt_varyings
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26819>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_debug_options.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_get.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_debug_options.h b/src/gallium/drivers/radeonsi/si_debug_options.h index 8ba03d8179b..a26bf768f50 100644 --- a/src/gallium/drivers/radeonsi/si_debug_options.h +++ b/src/gallium/drivers/radeonsi/si_debug_options.h @@ -22,6 +22,7 @@ OPT_BOOL(dcc_msaa, false, "Enable DCC for MSAA") OPT_BOOL(zerovram, false, "Zero all VRAM allocations") OPT_BOOL(clear_lds, false, "Clear LDS at the end of shaders. Might decrease performance.") OPT_BOOL(cache_rb_gl2, false, "Enable GL2 caching for CB and DB.") +OPT_BOOL(optimize_io, true, "Run nir_opt_varyings in the GLSL linker.") #undef OPT_BOOL #undef OPT_INT diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 6ad3ccd6b63..c2fc213d9d7 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -1422,7 +1422,8 @@ void si_init_screen_get_functions(struct si_screen *sscreen) */ options->force_f2f16_rtz = true; options->io_options = nir_io_has_flexible_input_interpolation_except_flat | - nir_io_glsl_lower_derefs; + nir_io_glsl_lower_derefs | + (sscreen->options.optimize_io ? nir_io_glsl_opt_varyings : 0); options->lower_mediump_io = sscreen->info.gfx_level >= GFX8 && sscreen->options.fp16 ? si_lower_mediump_io : NULL; /* HW supports indirect indexing for: | Enabled in driver |