From 24668a38d176607dec5eee9ae351076487b57542 Mon Sep 17 00:00:00 2001 From: Dave Airlie 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 --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 5af74fe7925..53e35ef6b3e 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; -- 2.30.2