[Mesa-dev] [PATCH] llvmpipe: Tighten check for alpha-only formats

Roland Scheidegger sroland at vmware.com
Tue Jun 18 05:43:05 PDT 2013


Am 25.03.2013 16:19, schrieb Richard Sandiford:
> The AoS version of ld_build_blend_factor was assuming that if the first
> channel was alpha, there were no rgb components.
> 
> Fixes several piglit tests 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 at linux.vnet.ibm.com>
> ---
>  src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
> index c4d04a2..7c485e7 100644
> --- a/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
> +++ b/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c
> @@ -245,7 +245,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);
>     }
>  
> 

LGTM.

Roland


More information about the mesa-dev mailing list