diff --git a/src/gallium/drivers/crocus/crocus_context.h b/src/gallium/drivers/crocus/crocus_context.h index 06a0ff0f2fa..38366896183 100644 --- a/src/gallium/drivers/crocus/crocus_context.h +++ b/src/gallium/drivers/crocus/crocus_context.h @@ -318,9 +318,6 @@ struct crocus_uncompiled_shader { /** Have any shader variants been compiled yet? */ bool compiled_once; - /** Should we use ALT mode for math? Useful for ARB programs. */ - bool use_alt_mode; - bool needs_edge_flag; /** Constant data scraped from the shader by nir_opt_large_constants */ diff --git a/src/gallium/drivers/crocus/crocus_program.c b/src/gallium/drivers/crocus/crocus_program.c index b4a4ce61ede..14001b10b59 100644 --- a/src/gallium/drivers/crocus/crocus_program.c +++ b/src/gallium/drivers/crocus/crocus_program.c @@ -1200,7 +1200,7 @@ crocus_compile_vs(struct crocus_context *ice, nir_shader_gather_info(nir, impl); } - prog_data->use_alt_mode = ish->use_alt_mode; + prog_data->use_alt_mode = nir->info.is_arb_asm; crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values, &num_system_values, &num_cbufs); @@ -1829,7 +1829,7 @@ crocus_compile_fs(struct crocus_context *ice, nir_shader *nir = nir_shader_clone(mem_ctx, ish->nir); - prog_data->use_alt_mode = ish->use_alt_mode; + prog_data->use_alt_mode = nir->info.is_arb_asm; crocus_setup_uniforms(compiler, mem_ctx, nir, prog_data, &system_values, &num_system_values, &num_cbufs); @@ -2695,10 +2695,6 @@ crocus_create_uncompiled_shader(struct pipe_context *ctx, update_so_info(&ish->stream_output, nir->info.outputs_written); } - /* Save this now before potentially dropping nir->info.name */ - if (nir->info.name && strncmp(nir->info.name, "ARB", 3) == 0) - ish->use_alt_mode = true; - if (screen->disk_cache) { /* Serialize the NIR to a binary blob that we can hash for the disk * cache. Drop unnecessary information (like variable names) diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index d45c49c5ae0..f98987cf4dc 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -403,9 +403,6 @@ struct iris_uncompiled_shader { /** Have any shader variants been compiled yet? */ bool compiled_once; - /** Should we use ALT mode for math? Useful for ARB programs. */ - bool use_alt_mode; - bool needs_edge_flag; /* Whether shader uses atomic operations. */ diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 1071ac86c3d..b53bdd6d694 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -1279,7 +1279,7 @@ iris_compile_vs(struct iris_screen *screen, nir_shader_gather_info(nir, impl); } - prog_data->use_alt_mode = ish->use_alt_mode; + prog_data->use_alt_mode = nir->info.is_arb_asm; iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, 0, &system_values, &num_system_values, &num_cbufs); @@ -1898,7 +1898,7 @@ iris_compile_fs(struct iris_screen *screen, nir_shader *nir = nir_shader_clone(mem_ctx, ish->nir); const struct iris_fs_prog_key *const key = &shader->key.fs; - prog_data->use_alt_mode = ish->use_alt_mode; + prog_data->use_alt_mode = nir->info.is_arb_asm; iris_setup_uniforms(compiler, mem_ctx, nir, prog_data, 0, &system_values, &num_system_values, &num_cbufs); @@ -2408,10 +2408,6 @@ iris_create_uncompiled_shader(struct iris_screen *screen, update_so_info(&ish->stream_output, nir->info.outputs_written); } - /* Save this now before potentially dropping nir->info.name */ - if (nir->info.name && strncmp(nir->info.name, "ARB", 3) == 0) - ish->use_alt_mode = true; - if (screen->disk_cache) { /* Serialize the NIR to a binary blob that we can hash for the disk * cache. Drop unnecessary information (like variable names)