nir: remove deprecated nir_io_dont_optimize
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35999>
This commit is contained in:
@@ -1470,7 +1470,9 @@ gl_nir_lower_optimize_varyings(const struct gl_constants *consts,
|
||||
unsigned num_shaders = 0;
|
||||
unsigned max_ubos = UINT_MAX;
|
||||
unsigned max_uniform_comps = UINT_MAX;
|
||||
bool optimize_io = !debug_get_bool_option("MESA_GLSL_DISABLE_IO_OPT", false);
|
||||
|
||||
if (debug_get_bool_option("MESA_GLSL_DISABLE_IO_OPT", false))
|
||||
return;
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
struct gl_linked_shader *shader = prog->_LinkedShaders[i];
|
||||
@@ -1488,16 +1490,12 @@ gl_nir_lower_optimize_varyings(const struct gl_constants *consts,
|
||||
consts->Program[i].MaxUniformComponents);
|
||||
max_ubos = MIN2(max_ubos, consts->Program[i].MaxUniformBlocks);
|
||||
num_shaders++;
|
||||
optimize_io &= !(nir->options->io_options & nir_io_dont_optimize);
|
||||
}
|
||||
|
||||
/* Lower IO derefs to load and store intrinsics. */
|
||||
for (unsigned i = 0; i < num_shaders; i++)
|
||||
nir_lower_io_passes(shaders[i], true);
|
||||
|
||||
if (!optimize_io)
|
||||
return;
|
||||
|
||||
/* There is nothing to optimize for only 1 shader. */
|
||||
if (num_shaders == 1) {
|
||||
nir_shader *nir = shaders[0];
|
||||
|
||||
@@ -195,14 +195,6 @@ typedef enum {
|
||||
*/
|
||||
nir_io_has_intrinsics = BITFIELD_BIT(16),
|
||||
|
||||
/**
|
||||
* Don't run nir_opt_varyings and nir_opt_vectorize_io.
|
||||
*
|
||||
* This option is deprecated and is a hack. DO NOT USE.
|
||||
* Use MESA_GLSL_DISABLE_IO_OPT=1 instead.
|
||||
*/
|
||||
nir_io_dont_optimize = BITFIELD_BIT(17),
|
||||
|
||||
/**
|
||||
* Whether clip and cull distance arrays should be separate. If this is not
|
||||
* set, cull distances will be moved into VARYING_SLOT_CLIP_DISTn after clip
|
||||
@@ -210,7 +202,7 @@ typedef enum {
|
||||
* of the first cull distance. nir_lower_clip_cull_distance_array_vars does
|
||||
* that.
|
||||
*/
|
||||
nir_io_separate_clip_cull_distance_arrays = BITFIELD_BIT(18),
|
||||
nir_io_separate_clip_cull_distance_arrays = BITFIELD_BIT(17),
|
||||
} nir_io_options;
|
||||
|
||||
typedef enum {
|
||||
|
||||
Reference in New Issue
Block a user