summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-01-20 07:59:25 -0800
committerBrian Paul <[email protected]>2014-01-20 08:18:21 -0800
commit3ede8dd5f1096531a080bac6f17f2512bea7bbce (patch)
tree57e92dd0639a40f1d92bfeaeac06b97317ab6b51
parent33ae0c24d045e7b5e210785cb9f6a36483fec941 (diff)
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 <[email protected]>
-rw-r--r--src/gallium/drivers/softpipe/sp_quad_blend.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c
index fb19ba52e8b..41149a06b63 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 &&