summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Girlin <[email protected]>2011-12-02 13:44:29 +0400
committerAlex Deucher <[email protected]>2011-12-06 09:53:35 -0500
commite98521e0f3ef430adc0eb2587ffe83844e24be06 (patch)
tree6e47c3c75bd477c92526afcaf353cd0a50563cd3
parent81a715605af97f12e8907dba3d1de27addf5335f (diff)
r600g: check shaders presence in r600_draw_vbo
This patch should prevent the crashes when some shaders are absent, see https://bugs.freedesktop.org/show_bug.cgi?id=43341 Note this is a candidate for the stable branch. Signed-off-by: Vadim Girlin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 9ecbc53522b..d6ffda47c2c 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -534,6 +534,9 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo)
return;
}
+ if (!rctx->ps_shader || !rctx->vs_shader)
+ return;
+
r600_update_derived_state(rctx);
u_vbuf_draw_begin(rctx->vbuf_mgr, dinfo);