summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2009-07-27 11:23:51 +0100
committerJosé Fonseca <[email protected]>2009-08-29 09:21:21 +0100
commit38a1479fe137b9bed3bdd1078b24f844c3af4863 (patch)
tree77eba523b8747af4c55105a11d36c080d1f8097e /src/gallium/drivers
parent4639f8aad5db08cf9386a910c02a4dc205740d8b (diff)
llvmpipe: cope with nr_cbufs == 0
Disable blend code when no color buffer
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_quad_blend.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_quad_blend.c b/src/gallium/drivers/llvmpipe/lp_quad_blend.c
index 0ebe0e6c51f..fe6d30d7c86 100644
--- a/src/gallium/drivers/llvmpipe/lp_quad_blend.c
+++ b/src/gallium/drivers/llvmpipe/lp_quad_blend.c
@@ -924,6 +924,13 @@ single_output_color(struct quad_stage *qs,
}
}
+static void
+blend_noop(struct quad_stage *qs,
+ struct quad_header *quads[],
+ unsigned nr)
+{
+}
+
static void
choose_blend_quad(struct quad_stage *qs,
@@ -934,9 +941,12 @@ choose_blend_quad(struct quad_stage *qs,
const struct pipe_blend_state *blend = llvmpipe->blend;
qs->run = blend_fallback;
-
- if (!llvmpipe->blend->logicop_enable &&
- llvmpipe->blend->colormask == 0xf)
+
+ if (llvmpipe->framebuffer.nr_cbufs == 0) {
+ qs->run = blend_noop;
+ }
+ else if (!llvmpipe->blend->logicop_enable &&
+ llvmpipe->blend->colormask == 0xf)
{
if (!blend->blend_enable) {
qs->run = single_output_color;