mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 05:58:05 +02:00
radeonsi: don't use si_get_vs_state in most places
It's incorrect because si_get_vs_state returns gs_copy_shader for legacy GS. It was harmless, but let's use si_get_vs, which is simpler. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8548>
This commit is contained in:
parent
4088b6f293
commit
f1e34f125d
3 changed files with 11 additions and 11 deletions
|
|
@ -727,7 +727,7 @@ static void si_emit_clip_state(struct si_context *sctx)
|
|||
|
||||
static void si_emit_clip_regs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *vs = si_get_vs_state(sctx);
|
||||
struct si_shader *vs = si_get_vs(sctx)->current;
|
||||
struct si_shader_selector *vs_sel = vs->selector;
|
||||
struct si_shader_info *info = &vs_sel->info;
|
||||
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
|
||||
|
|
|
|||
|
|
@ -762,7 +762,7 @@ static void si_emit_rasterizer_prim_state(struct si_context *sctx)
|
|||
sctx->context_roll = true;
|
||||
|
||||
if (NGG) {
|
||||
struct si_shader *hw_vs = si_get_vs_state(sctx);
|
||||
struct si_shader *hw_vs = si_get_vs(sctx)->current;
|
||||
|
||||
if (hw_vs->uses_vs_state_provoking_vertex) {
|
||||
unsigned vtx_index = rs->flatshade_first ? 0 : gs_out_prim;
|
||||
|
|
@ -873,7 +873,7 @@ static void gfx10_emit_ge_cntl(struct si_context *sctx, unsigned num_patches)
|
|||
S_03096C_VERT_GRP_SIZE(0) |
|
||||
S_03096C_BREAK_WAVE_AT_EOI(key.u.tess_uses_prim_id);
|
||||
} else {
|
||||
ge_cntl = si_get_vs_state(sctx)->ge_cntl;
|
||||
ge_cntl = si_get_vs(sctx)->current->ge_cntl;
|
||||
}
|
||||
} else {
|
||||
unsigned primgroup_size;
|
||||
|
|
|
|||
|
|
@ -2984,7 +2984,7 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
|
|||
{
|
||||
struct si_context *sctx = (struct si_context *)ctx;
|
||||
struct si_shader_selector *old_hw_vs = si_get_vs(sctx)->cso;
|
||||
struct si_shader *old_hw_vs_variant = si_get_vs_state(sctx);
|
||||
struct si_shader *old_hw_vs_variant = si_get_vs(sctx)->current;
|
||||
struct si_shader_selector *sel = state;
|
||||
|
||||
if (sctx->vs_shader.cso == sel)
|
||||
|
|
@ -3003,7 +3003,7 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
|
|||
si_update_vs_viewport_state(sctx);
|
||||
si_update_streamout_state(sctx);
|
||||
si_update_clip_regs(sctx, old_hw_vs, old_hw_vs_variant, si_get_vs(sctx)->cso,
|
||||
si_get_vs_state(sctx));
|
||||
si_get_vs(sctx)->current);
|
||||
}
|
||||
|
||||
static void si_update_tess_uses_prim_id(struct si_context *sctx)
|
||||
|
|
@ -3058,7 +3058,7 @@ static void si_bind_gs_shader(struct pipe_context *ctx, void *state)
|
|||
{
|
||||
struct si_context *sctx = (struct si_context *)ctx;
|
||||
struct si_shader_selector *old_hw_vs = si_get_vs(sctx)->cso;
|
||||
struct si_shader *old_hw_vs_variant = si_get_vs_state(sctx);
|
||||
struct si_shader *old_hw_vs_variant = si_get_vs(sctx)->current;
|
||||
struct si_shader_selector *sel = state;
|
||||
bool enable_changed = !!sctx->gs_shader.cso != !!sel;
|
||||
bool ngg_changed;
|
||||
|
|
@ -3084,7 +3084,7 @@ static void si_bind_gs_shader(struct pipe_context *ctx, void *state)
|
|||
si_update_vs_viewport_state(sctx);
|
||||
si_update_streamout_state(sctx);
|
||||
si_update_clip_regs(sctx, old_hw_vs, old_hw_vs_variant, si_get_vs(sctx)->cso,
|
||||
si_get_vs_state(sctx));
|
||||
si_get_vs(sctx)->current);
|
||||
}
|
||||
|
||||
static void si_bind_tcs_shader(struct pipe_context *ctx, void *state)
|
||||
|
|
@ -3110,7 +3110,7 @@ static void si_bind_tes_shader(struct pipe_context *ctx, void *state)
|
|||
{
|
||||
struct si_context *sctx = (struct si_context *)ctx;
|
||||
struct si_shader_selector *old_hw_vs = si_get_vs(sctx)->cso;
|
||||
struct si_shader *old_hw_vs_variant = si_get_vs_state(sctx);
|
||||
struct si_shader *old_hw_vs_variant = si_get_vs(sctx)->current;
|
||||
struct si_shader_selector *sel = state;
|
||||
bool enable_changed = !!sctx->tes_shader.cso != !!sel;
|
||||
|
||||
|
|
@ -3134,7 +3134,7 @@ static void si_bind_tes_shader(struct pipe_context *ctx, void *state)
|
|||
si_update_vs_viewport_state(sctx);
|
||||
si_update_streamout_state(sctx);
|
||||
si_update_clip_regs(sctx, old_hw_vs, old_hw_vs_variant, si_get_vs(sctx)->cso,
|
||||
si_get_vs_state(sctx));
|
||||
si_get_vs(sctx)->current);
|
||||
}
|
||||
|
||||
static void si_bind_ps_shader(struct pipe_context *ctx, void *state)
|
||||
|
|
@ -3906,7 +3906,7 @@ bool si_update_shaders(struct si_context *sctx)
|
|||
struct pipe_context *ctx = (struct pipe_context *)sctx;
|
||||
struct si_compiler_ctx_state compiler_state;
|
||||
struct si_state_rasterizer *rs = sctx->queued.named.rasterizer;
|
||||
struct si_shader *old_vs = si_get_vs_state(sctx);
|
||||
struct si_shader *old_vs = si_get_vs(sctx)->current;
|
||||
unsigned old_kill_clip_distances = old_vs ? old_vs->key.opt.kill_clip_distances : 0;
|
||||
struct si_shader *old_ps = sctx->ps_shader.current;
|
||||
union si_vgt_stages_key key;
|
||||
|
|
@ -4038,7 +4038,7 @@ bool si_update_shaders(struct si_context *sctx)
|
|||
|
||||
si_update_vgt_shader_config(sctx, key);
|
||||
|
||||
if (old_kill_clip_distances != si_get_vs_state(sctx)->key.opt.kill_clip_distances)
|
||||
if (old_kill_clip_distances != si_get_vs(sctx)->current->key.opt.kill_clip_distances)
|
||||
si_mark_atom_dirty(sctx, &sctx->atoms.s.clip_regs);
|
||||
|
||||
if (sctx->ps_shader.cso) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue