summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2014-03-19 17:12:38 +0000
committerRoland Scheidegger <sroland@vmware.com>2014-03-20 16:50:40 +0100
commitf4b3430a36ea88707f59ce147a140a1a559378c5 (patch)
tree69252ed1166046c8c36da8b0fc3aa810ab4e7870 /src/gallium/drivers/llvmpipe
parent8044fd6769d51ae35402cd62272ea8582b625445 (diff)
llvmpipe: Tighten check for alpha-only formats
The AoS version of ld_build_blend_factor was assuming that if the first channel was alpha, there were no rgb components. Fixes glean/blendFunc on System z. No piglit regressions on x86_64. The shortcut is still used in tests like spec/ARB_framebuffer_object/ fbo-alpha. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
index 377eaa5a6e0..564e19a1565 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
@@ -255,7 +255,7 @@ lp_build_blend_factor(struct lp_build_blend_aos_context *bld,
LLVMValueRef rgb_factor_, alpha_factor_;
enum lp_build_blend_swizzle rgb_swizzle;
- if (alpha_swizzle == 0) {
+ if (alpha_swizzle == UTIL_FORMAT_SWIZZLE_X && num_channels == 1) {
return lp_build_blend_factor_unswizzled(bld, alpha_factor, TRUE);
}