From: Marek Olšák Date: Sat, 25 Feb 2023 22:24:56 +0000 (-0500) Subject: radeonsi: assume shader is never NULL in si_emit_shader_* X-Git-Tag: upstream/23.3.3~12282 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73c91c4c8ae25d2d8774a3bb1fcb53730fa976db;p=platform%2Fupstream%2Fmesa.git radeonsi: assume shader is never NULL in si_emit_shader_* Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.cpp b/src/gallium/drivers/radeonsi/si_state_shaders.cpp index 2ee42ef..3c50148 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.cpp +++ b/src/gallium/drivers/radeonsi/si_state_shaders.cpp @@ -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*/