From fbe40720e008f7f01c4f62cb0f4d53bb41dace0a Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 17 Nov 2022 14:49:56 -0800 Subject: [PATCH] intel/compiler: Remove redundant argument from brw_nir_create_passthrough_tcs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marcin Ślusarz Part-of: --- src/gallium/drivers/crocus/crocus_program.c | 4 +--- src/gallium/drivers/iris/iris_program.c | 4 +--- src/intel/compiler/brw_nir.c | 3 ++- src/intel/compiler/brw_nir.h | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/crocus/crocus_program.c b/src/gallium/drivers/crocus/crocus_program.c index ef886f6..66f3f1f 100644 --- a/src/gallium/drivers/crocus/crocus_program.c +++ b/src/gallium/drivers/crocus/crocus_program.c @@ -1399,8 +1399,6 @@ crocus_compile_tcs(struct crocus_context *ice, { struct crocus_screen *screen = (struct crocus_screen *)ice->ctx.screen; const struct brw_compiler *compiler = screen->compiler; - const struct nir_shader_compiler_options *options = - compiler->nir_options[MESA_SHADER_TESS_CTRL]; void *mem_ctx = ralloc_context(NULL); struct brw_tcs_prog_data *tcs_prog_data = rzalloc(mem_ctx, struct brw_tcs_prog_data); @@ -1427,7 +1425,7 @@ crocus_compile_tcs(struct crocus_context *ice, if (can_push_ubo(devinfo)) brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); } else { - nir = brw_nir_create_passthrough_tcs(mem_ctx, compiler, options, key); + nir = brw_nir_create_passthrough_tcs(mem_ctx, compiler, key); /* Reserve space for passing the default tess levels as constants. */ num_cbufs = 1; diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index e4acde2..30c2d3d 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -1503,8 +1503,6 @@ iris_compile_tcs(struct iris_screen *screen, struct iris_compiled_shader *shader) { const struct brw_compiler *compiler = screen->compiler; - const struct nir_shader_compiler_options *options = - compiler->nir_options[MESA_SHADER_TESS_CTRL]; void *mem_ctx = ralloc_context(NULL); struct brw_tcs_prog_data *tcs_prog_data = rzalloc(mem_ctx, struct brw_tcs_prog_data); @@ -1532,7 +1530,7 @@ iris_compile_tcs(struct iris_screen *screen, brw_nir_analyze_ubo_ranges(compiler, nir, NULL, prog_data->ubo_ranges); } else { nir = - brw_nir_create_passthrough_tcs(mem_ctx, compiler, options, &brw_key); + brw_nir_create_passthrough_tcs(mem_ctx, compiler, &brw_key); /* Reserve space for passing the default tess levels as constants. */ num_cbufs = 1; diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 1ab004b6..81057e3 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1698,9 +1698,10 @@ brw_type_for_nir_type(const struct intel_device_info *devinfo, nir_shader * brw_nir_create_passthrough_tcs(void *mem_ctx, const struct brw_compiler *compiler, - const nir_shader_compiler_options *options, const struct brw_tcs_prog_key *key) { + const nir_shader_compiler_options *options = + compiler->nir_options[MESA_SHADER_TESS_CTRL]; nir_builder b = nir_builder_init_simple_shader(MESA_SHADER_TESS_CTRL, options, "passthrough TCS"); ralloc_steal(mem_ctx, b.shader); diff --git a/src/intel/compiler/brw_nir.h b/src/intel/compiler/brw_nir.h index 91fa820..b1e07d1 100644 --- a/src/intel/compiler/brw_nir.h +++ b/src/intel/compiler/brw_nir.h @@ -185,7 +185,6 @@ void brw_nir_optimize(nir_shader *nir, nir_shader *brw_nir_create_passthrough_tcs(void *mem_ctx, const struct brw_compiler *compiler, - const nir_shader_compiler_options *options, const struct brw_tcs_prog_key *key); #define BRW_NIR_FRAG_OUTPUT_INDEX_SHIFT 0 -- 2.7.4