>> The fbo-blending-formats test now only fails on I8 with DST_ALPHA,
>> I'm
>> guessing what happens is we have an I8 dst, but we never flush the
>> tiles, so we end up using the alpha from the tile as the dst alpha
>> value instead of the red value.

Okay I've taken your suggestion, and the attached patch seems
sufficient to fix the fbo-blending-formats test in all its variants on
llvmpipe.

Dave.
From d64bdea85e8d58a3cb6ac24a9d648e6e84c1a631 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airl...@gmail.com>
Date: Fri, 30 Dec 2011 20:10:26 +0000
Subject: [PATCH] llvmpipe: fix blending for intensity formats

This fixes the piglit fbo-blending-formats test for standard, ARB_texture_float
and EXT_texture_snorm.

Signed-off-by: Dave Airlie <airl...@redhat.com>
---
 src/gallium/drivers/llvmpipe/lp_state_fs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 5af74fe..53e35ef 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -1294,7 +1294,8 @@ make_variant_key(struct llvmpipe_context *lp,
        *
        * Also, force rgb/alpha func/factors match, to make AoS blending easier.
        */
-      if (format_desc->swizzle[3] > UTIL_FORMAT_SWIZZLE_W) {
+      if (format_desc->swizzle[3] > UTIL_FORMAT_SWIZZLE_W ||
+	  format_desc->swizzle[3] == format_desc->swizzle[0]) {
          blend_rt->rgb_src_factor   = force_dst_alpha_one(blend_rt->rgb_src_factor);
          blend_rt->rgb_dst_factor   = force_dst_alpha_one(blend_rt->rgb_dst_factor);
          blend_rt->alpha_func       = blend_rt->rgb_func;
-- 
1.7.7.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to