radeonsi: assume shader is never NULL in si_emit_shader_*
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21641>
This commit is contained in:
@@ -774,8 +774,6 @@ static void si_shader_hs(struct si_screen *sscreen, struct si_shader *shader)
|
||||
static void si_emit_shader_es(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.es;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
radeon_opt_set_context_reg(sctx, R_028AAC_VGT_ESGS_RING_ITEMSIZE,
|
||||
@@ -935,8 +933,6 @@ void gfx9_get_gs_info(struct si_shader_selector *es, struct si_shader_selector *
|
||||
static void si_emit_shader_gs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.gs;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
|
||||
@@ -1224,8 +1220,6 @@ static void gfx10_emit_shader_ngg_tail(struct si_context *sctx, struct si_shader
|
||||
static void gfx10_emit_shader_ngg_notess_nogs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.gs;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
gfx10_emit_shader_ngg_tail(sctx, shader);
|
||||
}
|
||||
@@ -1233,8 +1227,6 @@ static void gfx10_emit_shader_ngg_notess_nogs(struct si_context *sctx)
|
||||
static void gfx10_emit_shader_ngg_tess_nogs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.gs;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
radeon_opt_set_context_reg(sctx, R_028B6C_VGT_TF_PARAM, SI_TRACKED_VGT_TF_PARAM,
|
||||
@@ -1247,8 +1239,6 @@ static void gfx10_emit_shader_ngg_tess_nogs(struct si_context *sctx)
|
||||
static void gfx10_emit_shader_ngg_notess_gs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.gs;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
radeon_opt_set_context_reg(sctx, R_028B38_VGT_GS_MAX_VERT_OUT, SI_TRACKED_VGT_GS_MAX_VERT_OUT,
|
||||
@@ -1262,9 +1252,6 @@ static void gfx10_emit_shader_ngg_tess_gs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.gs;
|
||||
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
radeon_opt_set_context_reg(sctx, R_028B38_VGT_GS_MAX_VERT_OUT, SI_TRACKED_VGT_GS_MAX_VERT_OUT,
|
||||
shader->ngg.vgt_gs_max_vert_out);
|
||||
@@ -1554,8 +1541,6 @@ static void gfx10_shader_ngg(struct si_screen *sscreen, struct si_shader *shader
|
||||
static void si_emit_shader_vs(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.vs;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
radeon_opt_set_context_reg(sctx, R_028A40_VGT_GS_MODE, SI_TRACKED_VGT_GS_MODE,
|
||||
@@ -1781,8 +1766,6 @@ static unsigned si_get_spi_shader_col_format(struct si_shader *shader)
|
||||
static void si_emit_shader_ps(struct si_context *sctx)
|
||||
{
|
||||
struct si_shader *shader = sctx->queued.named.ps;
|
||||
if (!shader)
|
||||
return;
|
||||
|
||||
radeon_begin(&sctx->gfx_cs);
|
||||
/* R_0286CC_SPI_PS_INPUT_ENA, R_0286D0_SPI_PS_INPUT_ADDR*/
|
||||
|
||||
Reference in New Issue
Block a user