summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-07-02 16:59:39 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-07-02 18:45:49 +0100
commiteb20c57f03f7f6a43dedb9c317f3648087e6d1d7 (patch)
tree43ab4fcff8b1b6726726a007e7d6570493e4d4da /src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
parentbb1546f55be3b243b71d39e5fb7457c5b21e32c9 (diff)
gallivm: Move lp_build_rgba8_to_f32_soa() to lp_bld_format_soa.c
It will be more useful here.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
index a33231ddc4..8cca3f639a 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c
@@ -1713,36 +1713,6 @@ lp_build_sample_general(struct lp_build_sample_context *bld,
static void
-lp_build_rgba8_to_f32_soa(LLVMBuilderRef builder,
- struct lp_type dst_type,
- LLVMValueRef packed,
- LLVMValueRef *rgba)
-{
- LLVMValueRef mask = lp_build_const_int_vec(dst_type, 0xff);
- unsigned chan;
-
- /* Decode the input vector components */
- for (chan = 0; chan < 4; ++chan) {
- unsigned start = chan*8;
- unsigned stop = start + 8;
- LLVMValueRef input;
-
- input = packed;
-
- if(start)
- input = LLVMBuildLShr(builder, input, lp_build_const_int_vec(dst_type, start), "");
-
- if(stop < 32)
- input = LLVMBuildAnd(builder, input, mask, "");
-
- input = lp_build_unsigned_norm_to_float(builder, 8, dst_type, input);
-
- rgba[chan] = input;
- }
-}
-
-
-static void
lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
LLVMValueRef s,
LLVMValueRef t,
@@ -1936,8 +1906,6 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld,
* Convert to SoA and swizzle.
*/
- packed = LLVMBuildBitCast(builder, packed, i32_vec_type, "");
-
lp_build_rgba8_to_f32_soa(bld->builder,
bld->texel_type,
packed, unswizzled);