mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 19:40:10 +01:00
radeonsi: delete si_pm4_delete_state
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8794>
This commit is contained in:
parent
d4b503d0bc
commit
11293d71f2
4 changed files with 15 additions and 18 deletions
|
|
@ -213,7 +213,7 @@ static void si_destroy_context(struct pipe_context *context)
|
|||
if (sctx->cs_preamble_gs_rings)
|
||||
si_pm4_free_state(sctx, sctx->cs_preamble_gs_rings, ~0);
|
||||
for (i = 0; i < ARRAY_SIZE(sctx->vgt_shader_config); i++)
|
||||
si_pm4_delete_state(sctx, vgt_shader_config, sctx->vgt_shader_config[i]);
|
||||
si_pm4_free_state(sctx, sctx->vgt_shader_config[i], SI_STATE_IDX(vgt_shader_config));
|
||||
|
||||
if (sctx->fixed_func_tcs_shader.cso)
|
||||
sctx->b.delete_tcs_state(&sctx->b, sctx->fixed_func_tcs_shader.cso);
|
||||
|
|
|
|||
|
|
@ -673,7 +673,7 @@ static void si_delete_blend_state(struct pipe_context *ctx, void *state)
|
|||
if (sctx->queued.named.blend == state)
|
||||
si_bind_blend_state(ctx, sctx->noop_blend);
|
||||
|
||||
si_pm4_delete_state(sctx, blend, (struct si_state_blend *)state);
|
||||
si_pm4_free_state(sctx, (struct si_pm4_state*)state, SI_STATE_IDX(blend));
|
||||
}
|
||||
|
||||
static void si_set_blend_color(struct pipe_context *ctx, const struct pipe_blend_color *state)
|
||||
|
|
@ -1040,7 +1040,7 @@ static void si_delete_rs_state(struct pipe_context *ctx, void *state)
|
|||
si_bind_rs_state(ctx, sctx->discard_rasterizer_state);
|
||||
|
||||
FREE(rs->pm4_poly_offset);
|
||||
si_pm4_delete_state(sctx, rasterizer, rs);
|
||||
si_pm4_free_state(sctx, &rs->pm4, SI_STATE_IDX(rasterizer));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1265,7 +1265,7 @@ static void si_delete_dsa_state(struct pipe_context *ctx, void *state)
|
|||
if (sctx->queued.named.dsa == state)
|
||||
si_bind_dsa_state(ctx, sctx->noop_dsa);
|
||||
|
||||
si_pm4_delete_state(sctx, dsa, (struct si_state_dsa *)state);
|
||||
si_pm4_free_state(sctx, (struct si_pm4_state*)state, SI_STATE_IDX(dsa));
|
||||
}
|
||||
|
||||
static void *si_create_db_flush_dsa(struct si_context *sctx)
|
||||
|
|
|
|||
|
|
@ -484,9 +484,6 @@ struct si_buffer_resources {
|
|||
(sctx)->dirty_states &= ~SI_STATE_BIT(member); \
|
||||
} while (0)
|
||||
|
||||
#define si_pm4_delete_state(sctx, member, value) \
|
||||
si_pm4_free_state(sctx, (struct si_pm4_state *)(value), SI_STATE_IDX(member))
|
||||
|
||||
/* si_descriptors.c */
|
||||
void si_set_mutable_tex_desc_fields(struct si_screen *sscreen, struct si_texture *tex,
|
||||
const struct legacy_surf_level *base_level_info,
|
||||
|
|
|
|||
|
|
@ -3169,37 +3169,37 @@ static void si_delete_shader(struct si_context *sctx, struct si_shader *shader)
|
|||
case MESA_SHADER_VERTEX:
|
||||
if (shader->key.as_ls) {
|
||||
assert(sctx->chip_class <= GFX8);
|
||||
si_pm4_delete_state(sctx, ls, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(ls));
|
||||
} else if (shader->key.as_es) {
|
||||
assert(sctx->chip_class <= GFX8);
|
||||
si_pm4_delete_state(sctx, es, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(es));
|
||||
} else if (shader->key.as_ngg) {
|
||||
si_pm4_delete_state(sctx, gs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(gs));
|
||||
} else {
|
||||
si_pm4_delete_state(sctx, vs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(vs));
|
||||
}
|
||||
break;
|
||||
case MESA_SHADER_TESS_CTRL:
|
||||
si_pm4_delete_state(sctx, hs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(hs));
|
||||
break;
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
if (shader->key.as_es) {
|
||||
assert(sctx->chip_class <= GFX8);
|
||||
si_pm4_delete_state(sctx, es, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(es));
|
||||
} else if (shader->key.as_ngg) {
|
||||
si_pm4_delete_state(sctx, gs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(gs));
|
||||
} else {
|
||||
si_pm4_delete_state(sctx, vs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(vs));
|
||||
}
|
||||
break;
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
if (shader->is_gs_copy_shader)
|
||||
si_pm4_delete_state(sctx, vs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(vs));
|
||||
else
|
||||
si_pm4_delete_state(sctx, gs, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(gs));
|
||||
break;
|
||||
case MESA_SHADER_FRAGMENT:
|
||||
si_pm4_delete_state(sctx, ps, shader->pm4);
|
||||
si_pm4_free_state(sctx, shader->pm4, SI_STATE_IDX(ps));
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue