From 62aaa0d0b7675d3532d280bdc1221bacca63f7f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 15 Aug 2020 00:50:27 -0400 Subject: [PATCH] radeonsi: remove unused si_shader_context::type Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_compute_prim_discard.c | 3 --- src/gallium/drivers/radeonsi/si_shader.c | 4 ---- src/gallium/drivers/radeonsi/si_shader_internal.h | 1 - src/gallium/drivers/radeonsi/si_shader_llvm_gs.c | 2 -- 4 files changed, 10 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c index c8c8f1159db..dd764b8dee1 100644 --- a/src/gallium/drivers/radeonsi/si_compute_prim_discard.c +++ b/src/gallium/drivers/radeonsi/si_compute_prim_discard.c @@ -346,12 +346,9 @@ void si_build_prim_discard_compute_shader(struct si_shader_context *ctx) ac_add_arg(&ctx->args, AC_ARG_VGPR, 1, AC_ARG_INT, ¶m_local_id); /* Create the compute shader function. */ - unsigned old_type = ctx->type; gl_shader_stage old_stage = ctx->stage; - ctx->type = PIPE_SHADER_COMPUTE; ctx->stage = MESA_SHADER_COMPUTE; si_llvm_create_func(ctx, "prim_discard_cs", NULL, 0, THREADGROUP_SIZE); - ctx->type = old_type; ctx->stage = old_stage; if (VERTEX_COUNTER_GDS_MODE == 2) { diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 5a21a3cbb80..77865fca49c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1333,7 +1333,6 @@ static bool si_build_main_function(struct si_shader_context *ctx, struct si_shad const struct si_shader_info *info = &sel->info; ctx->shader = shader; - ctx->type = sel->type; ctx->stage = sel->info.stage; ctx->num_const_buffers = util_last_bit(info->const_buffers_declared); @@ -1725,7 +1724,6 @@ static bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_com /* Reset the shader context. */ ctx.shader = shader; - ctx.type = PIPE_SHADER_TESS_CTRL; ctx.stage = MESA_SHADER_TESS_CTRL; si_build_wrapper_function(&ctx, parts + !vs_needs_prolog, 4 - !vs_needs_prolog, @@ -1790,7 +1788,6 @@ static bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_com /* Reset the shader context. */ ctx.shader = shader; - ctx.type = PIPE_SHADER_GEOMETRY; ctx.stage = MESA_SHADER_GEOMETRY; /* Prepare the array of shader parts. */ @@ -1998,7 +1995,6 @@ si_get_shader_part(struct si_screen *sscreen, struct si_shader_part **list, shader.key.opt.ngg_culling & SI_NGG_CULL_GS_FAST_LAUNCH_ALL, shader.key.opt.vs_as_prim_discard_cs)); ctx.shader = &shader; - ctx.type = tgsi_processor_to_shader_stage(stage); ctx.stage = stage; build(&ctx, key); diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index 025a94680ae..86ea04df644 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -49,7 +49,6 @@ struct si_shader_context { struct si_shader *shader; struct si_screen *screen; - unsigned type; /* PIPE_SHADER_* specifies the type of shader. */ gl_shader_stage stage; /* For clamping the non-constant index in resource indexing: */ diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c index f9cfbbba7bc..da6115a55ea 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c @@ -477,7 +477,6 @@ struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen, si_get_wave_size(sscreen, MESA_SHADER_VERTEX, false, false, false, false)); ctx.shader = shader; - ctx.type = PIPE_SHADER_VERTEX; ctx.stage = MESA_SHADER_VERTEX; builder = ctx.ac.builder; @@ -564,7 +563,6 @@ struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen, LLVMBuildRetVoid(ctx.ac.builder); - ctx.type = PIPE_SHADER_GEOMETRY; /* override for shader dumping */ ctx.stage = MESA_SHADER_GEOMETRY; /* override for shader dumping */ si_llvm_optimize_module(&ctx); -- 2.30.2