From: Christian König Date: Wed, 25 Jul 2012 20:39:15 +0000 (+0200) Subject: radeonsi: fix shader binding X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1fb8ee62faf081e6a5588e99620a9883e3788c46;p=mesa.git radeonsi: fix shader binding Signed-off-by: Christian König Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index c417c9cac65..a80e169b007 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1649,7 +1649,10 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state) rctx->shader_dirty = true; rctx->vs_shader = shader; - si_pm4_bind_state(rctx, vs, shader->pm4); + + if (shader) { + si_pm4_bind_state(rctx, vs, shader->pm4); + } } static void si_bind_ps_shader(struct pipe_context *ctx, void *state) @@ -1662,7 +1665,10 @@ static void si_bind_ps_shader(struct pipe_context *ctx, void *state) rctx->shader_dirty = true; rctx->ps_shader = shader; - si_pm4_bind_state(rctx, ps, shader->pm4); + + if (shader) { + si_pm4_bind_state(rctx, ps, shader->pm4); + } } static void si_delete_vs_shader(struct pipe_context *ctx, void *state)