Mesa (master): softpipe: fix crash when accessing null colorbuffer
Brian Paul
brianp at kemper.freedesktop.org
Mon Jan 20 16:19:09 UTC 2014
Module: Mesa
Branch: master
Commit: 3ede8dd5f1096531a080bac6f17f2512bea7bbce
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ede8dd5f1096531a080bac6f17f2512bea7bbce
Author: Brian Paul <brianp at vmware.com>
Date: Mon Jan 20 07:59:25 2014 -0800
softpipe: fix crash when accessing null colorbuffer
Fixes piglit fbo-missing-attachment-blit test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73755
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
---
src/gallium/drivers/softpipe/sp_quad_blend.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
index fb19ba5..41149a0 100644
--- a/src/gallium/drivers/softpipe/sp_quad_blend.c
+++ b/src/gallium/drivers/softpipe/sp_quad_blend.c
@@ -1232,7 +1232,10 @@ choose_blend_quad(struct quad_stage *qs,
softpipe->blend->rt[0].colormask == 0xf &&
softpipe->framebuffer.nr_cbufs == 1)
{
- if (!blend->rt[0].blend_enable) {
+ if (softpipe->framebuffer.cbufs[0] == NULL) {
+ qs->run = blend_noop;
+ }
+ else if (!blend->rt[0].blend_enable) {
qs->run = single_output_color;
}
else if (blend->rt[0].rgb_src_factor == blend->rt[0].alpha_src_factor &&
More information about the mesa-commit
mailing list