summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2010-03-31 22:16:09 -0400
committerZack Rusin <zackr@vmware.com>2010-03-31 22:16:09 -0400
commitb6d052e4fd83d923776320cf5fef66abcd4bf3d0 (patch)
treef68676e2c833965424ea82ef466ce83f8be25310 /src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
parentae5487d4276007e466b6a7c783d6fb740f9539c5 (diff)
parent2fb655d1dbb3f8425aeff1597271262661ef206b (diff)
Merge remote branch 'origin/master' into gallium_draw_llvm
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_soa.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_soa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
index 45ee4b12ce..c9fbe0ad10 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c
@@ -92,14 +92,14 @@ lp_build_unpack_rgba_soa(LLVMBuilderRef builder,
unsigned chan;
/* FIXME: Support more formats */
- assert(format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN);
+ assert(format_desc->is_bitmask);
assert(format_desc->block.width == 1);
assert(format_desc->block.height == 1);
assert(format_desc->block.bits <= 32);
/* Decode the input vector components */
start = 0;
- for (chan = 0; chan < 4; ++chan) {
+ for (chan = 0; chan < format_desc->nr_channels; ++chan) {
unsigned width = format_desc->channel[chan].size;
unsigned stop = start + width;
LLVMValueRef input;
@@ -123,7 +123,7 @@ lp_build_unpack_rgba_soa(LLVMBuilderRef builder,
if(format_desc->channel[chan].normalized)
input = lp_build_unsigned_norm_to_float(builder, width, type, input);
else
- input = LLVMBuildFPToSI(builder, input, lp_build_vec_type(type), "");
+ input = LLVMBuildSIToFP(builder, input, lp_build_vec_type(type), "");
}
else {
/* FIXME */