gallivm: Swizzle constants into the right AoS ordering.
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 <jfonseca@vmware.com>
This commit is contained in:
@@ -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, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user