diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-09-16 09:52:20 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-09-16 20:20:49 +0100 |
commit | 3d5b9c1f2d3340259dd0d8765090a5a963074f29 (patch) | |
tree | f45fc7d7a17d0befd26460a1b854200ab961a448 | |
parent | 50ac56bf98d6fd16fd1b7534268ee362e45b691d (diff) |
gallivm: Fix address register swizzle.
We're actually doing a double swizzling:
indirect_reg->Swizzle[indirect_reg->SwizzleX]
instead of simply
indirect_reg->SwizzleX
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index cd5b132b41..0d8d49be2c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -476,9 +476,8 @@ get_indirect_offsets(struct lp_build_tgsi_soa_context *bld, const struct tgsi_src_register *indirect_reg) { /* always use X component of address register */ - const int x = indirect_reg->SwizzleX; + unsigned swizzle = indirect_reg->SwizzleX; LLVMTypeRef int_vec_type = lp_build_int_vec_type(bld->base.type); - uint swizzle = tgsi_util_get_src_register_swizzle(indirect_reg, x); LLVMValueRef vec4 = lp_build_const_int_vec(bld->int_bld.type, 4); LLVMValueRef addr_vec; |