From 8b3c99a5ebbc2f8b586d8ae2bd9aa5c55bbf3f04 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 2 Feb 2011 14:20:10 +0000 Subject: [PATCH] gallivm: Swizzle constants into the right AoS ordering. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Constants array is always assumed to be RGBA, which means we need to swizzle the constant elements into place to match the AoS ordering (e.g., BGRA) that was passed to lp_build_tgsi_aos(). Signed-off-by: José Fonseca --- src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index a021efd69ff..74b3b75039a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c @@ -189,7 +189,7 @@ emit_fetch( * NOTE: constants array is always assumed to be RGBA */ - swizzle = lp_build_const_int32(bld->base.gallivm, chan); + swizzle = lp_build_const_int32(bld->base.gallivm, bld->swizzles[chan]); res = LLVMBuildInsertElement(builder, res, scalar, swizzle, ""); } -- 2.30.2