diff --git a/src/gallium/auxiliary/draw/draw_vs_llvm.c b/src/gallium/auxiliary/draw/draw_vs_llvm.c index e4ea36fbdeb..bd71979bded 100644 --- a/src/gallium/auxiliary/draw/draw_vs_llvm.c +++ b/src/gallium/auxiliary/draw/draw_vs_llvm.c @@ -94,7 +94,7 @@ draw_create_vs_llvm(struct draw_context *draw, if (state->type == PIPE_SHADER_IR_NIR) { vs->base.state.ir.nir = state->ir.nir; - nir_shader *nir = (nir_shader *)state->ir.nir; + nir_shader *nir = state->ir.nir; if (!nir->options->lower_uniforms_to_ubo) NIR_PASS_V(state->ir.nir, nir_lower_uniforms_to_ubo, false, false); nir_tgsi_scan_shader(state->ir.nir, &vs->base.info, true); diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index b258068713a..2703eb0bdae 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -4106,7 +4106,7 @@ pipe_shader_state_to_tgsi_tokens(struct pipe_screen *screen, const struct pipe_shader_state *cso) { if (cso->type == PIPE_SHADER_IR_NIR) { - return nir_to_tgsi((nir_shader *)cso->ir.nir, screen); + return nir_to_tgsi(cso->ir.nir, screen); } else { assert(cso->type == PIPE_SHADER_IR_TGSI); /* we need to keep a local copy of the tokens */ diff --git a/src/gallium/auxiliary/util/u_live_shader_cache.c b/src/gallium/auxiliary/util/u_live_shader_cache.c index 6cc78310f23..b1052941f75 100644 --- a/src/gallium/auxiliary/util/u_live_shader_cache.c +++ b/src/gallium/auxiliary/util/u_live_shader_cache.c @@ -91,7 +91,7 @@ util_live_shader_cache_get(struct pipe_context *ctx, nir_serialize(&blob, state->ir.nir, true); ir_binary = blob.data; ir_size = blob.size; - stage = pipe_shader_type_from_mesa(((nir_shader*)state->ir.nir)->info.stage); + stage = pipe_shader_type_from_mesa(state->ir.nir->info.stage); } else { assert(0); return NULL; diff --git a/src/gallium/drivers/radeonsi/si_shader_info.c b/src/gallium/drivers/radeonsi/si_shader_info.c index 51bded80de2..8232b6f22eb 100644 --- a/src/gallium/drivers/radeonsi/si_shader_info.c +++ b/src/gallium/drivers/radeonsi/si_shader_info.c @@ -604,7 +604,7 @@ void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, info->writes_position = nir->info.outputs_written & VARYING_BIT_POS; } - nir_function_impl *impl = nir_shader_get_entrypoint((nir_shader*)nir); + nir_function_impl *impl = nir_shader_get_entrypoint(nir); nir_foreach_block (block, impl) { nir_foreach_instr (instr, block) scan_instruction(nir, info, instr, colors_lowered); @@ -666,7 +666,7 @@ void si_nir_scan_shader(struct si_screen *sscreen, struct nir_shader *nir, } info->uses_vmem_load_other |= info->uses_indirect_descriptor; - info->has_divergent_loop = nir_has_divergent_loop((nir_shader*)nir); + info->has_divergent_loop = nir_has_divergent_loop(nir); if (nir->info.stage == MESA_SHADER_VERTEX) { info->num_vs_inputs = diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 0be057a3678..c86d9ea87a1 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -3614,7 +3614,7 @@ static void *si_create_shader_selector(struct pipe_context *ctx, sel->nir = tgsi_to_nir(state->tokens, ctx->screen, true); } else { assert(state->type == PIPE_SHADER_IR_NIR); - sel->nir = (nir_shader*)state->ir.nir; + sel->nir = state->ir.nir; } si_nir_scan_shader(sscreen, sel->nir, &sel->info, false); diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 18b32cbd755..d51ad08cd4f 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -783,7 +783,7 @@ st_create_common_variant(struct st_context *st, state.type = PIPE_SHADER_IR_NIR; state.report_compile_error = report_compile_error; state.ir.nir = get_nir_shader(st, prog, key->is_draw_shader); - const nir_shader_compiler_options *options = ((nir_shader *)state.ir.nir)->options; + const nir_shader_compiler_options *options = state.ir.nir->options; if (key->clamp_color) { NIR_PASS(_, state.ir.nir, nir_lower_clamp_color_outputs);