Mesa (master): r600g: check shaders presence in r600_draw_vbo
Alex Deucher
agd5f at kemper.freedesktop.org
Tue Dec 6 15:01:51 UTC 2011
Module: Mesa
Branch: master
Commit: e98521e0f3ef430adc0eb2587ffe83844e24be06
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e98521e0f3ef430adc0eb2587ffe83844e24be06
Author: Vadim Girlin <vadimgirlin at gmail.com>
Date: Fri Dec 2 13:44:29 2011 +0400
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 <vadimgirlin at gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
src/gallium/drivers/r600/r600_state_common.c | 3 +++
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 9ecbc53..d6ffda4 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);
More information about the mesa-commit
mailing list