[Mesa-dev] [PATCH 5/7] radeonsi: allow unbinding vertex shaders

Marek Olšák maraeo at gmail.com
Thu Oct 22 16:12:17 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

Draw calls without a vertex shader are skipped.
---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 25cba84..4a3a04c 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -799,11 +799,11 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
 	struct si_context *sctx = (struct si_context *)ctx;
 	struct si_shader_selector *sel = state;
 
-	if (sctx->vs_shader.cso == sel || !sel)
+	if (sctx->vs_shader.cso == sel)
 		return;
 
 	sctx->vs_shader.cso = sel;
-	sctx->vs_shader.current = sel->first_variant;
+	sctx->vs_shader.current = sel ? sel->first_variant : NULL;
 	si_mark_atom_dirty(sctx, &sctx->clip_regs);
 	si_update_viewports_and_scissors(sctx);
 }
-- 
2.1.4



More information about the mesa-dev mailing list