radeonsi: inline the last use of si_get_vs_state
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8600>
This commit is contained in:
@@ -1695,15 +1695,6 @@ static inline struct si_shader_info *si_get_vs_info(struct si_context *sctx)
|
||||
return vs->cso ? &vs->cso->info : NULL;
|
||||
}
|
||||
|
||||
static inline struct si_shader *si_get_vs_state(struct si_context *sctx)
|
||||
{
|
||||
if (sctx->gs_shader.cso && sctx->gs_shader.current && !sctx->gs_shader.current->key.as_ngg)
|
||||
return sctx->gs_shader.cso->gs_copy_shader;
|
||||
|
||||
struct si_shader_ctx_state *vs = si_get_vs(sctx);
|
||||
return vs->current ? vs->current : NULL;
|
||||
}
|
||||
|
||||
static inline bool si_can_dump_shader(struct si_screen *sscreen, gl_shader_stage stage)
|
||||
{
|
||||
return sscreen->debug_flags & (1 << stage);
|
||||
|
||||
@@ -3337,7 +3337,7 @@ static unsigned si_get_ps_input_cntl(struct si_context *sctx, struct si_shader *
|
||||
static void si_emit_spi_map(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *ps = sctx->ps_shader.current;
|
||||
struct si_shader *vs = si_get_vs_state(sctx);
|
||||
struct si_shader *vs;
|
||||
struct si_shader_info *psinfo = ps ? &ps->selector->info : NULL;
|
||||
unsigned i, num_interp, num_written = 0;
|
||||
unsigned spi_ps_input_cntl[32];
|
||||
@@ -3345,6 +3345,12 @@ static void si_emit_spi_map(struct si_context *sctx)
|
||||
if (!ps || !ps->selector->info.num_inputs)
|
||||
return;
|
||||
|
||||
/* With legacy GS, only the GS copy shader contains information about param exports. */
|
||||
if (sctx->gs_shader.cso && !sctx->ngg)
|
||||
vs = sctx->gs_shader.cso->gs_copy_shader;
|
||||
else
|
||||
vs = si_get_vs(sctx)->current;
|
||||
|
||||
num_interp = si_get_ps_num_interp(ps);
|
||||
assert(num_interp > 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user