diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-03-31 14:05:21 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-03-31 14:05:21 +0100 |
commit | 213e6584ed91b4ac6c3ed27f076e1b64e51cbc06 (patch) | |
tree | 25c7fa4e7b44219d1934b92ce4f713dfa94a5132 | |
parent | ead8f82eeb2db035cb95a2387a93aced361360f6 (diff) | |
download | external_mesa3d-213e6584ed91b4ac6c3ed27f076e1b64e51cbc06.zip external_mesa3d-213e6584ed91b4ac6c3ed27f076e1b64e51cbc06.tar.gz external_mesa3d-213e6584ed91b4ac6c3ed27f076e1b64e51cbc06.tar.bz2 |
gallivm: Fix USCALED translation. Minor Cleanups.
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_format_soa.c | 6 |
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 45ee4b1..c9fbe0a 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 */ |