[Mesa-dev] [PATCH 5/8] radeonsi: fix shader binding
Christian König
deathsimple at vodafone.de
Sun Jul 29 05:26:50 PDT 2012
Signed-off-by: Christian König <deathsimple at vodafone.de>
---
src/gallium/drivers/radeonsi/si_state.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index c417c9c..a80e169 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)
--
1.7.9.5
More information about the mesa-dev
mailing list