summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-07-02 18:36:43 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-07-02 18:45:49 +0100
commit7071eefdb2ef2a1f644a2bbed9685847b60ff6c4 (patch)
treece39754bf855fbbe995acc435b545672fb99dbb5 /src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
parenteb20c57f03f7f6a43dedb9c317f3648087e6d1d7 (diff)
gallivm: Support multiple pixels in lp_build_fetch_rgba_aos().
This allows to do the unpacking of formats that fit in 4 x unorm8 in parallel, 4 pixels at a time.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c b/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
index d3eba50b77..e8f4ab69ff 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c
@@ -35,9 +35,6 @@
#include "util/u_format.h"
-#include "util/u_memory.h"
-#include "util/u_math.h"
-#include "util/u_string.h"
#include "lp_bld_arit.h"
#include "lp_bld_init.h"
@@ -359,16 +356,23 @@ grgb_to_rgba_aos(LLVMBuilderRef builder,
* @return a <4*n x i8> vector with the pixel RGBA values in AoS
*/
LLVMValueRef
-lp_build_unpack_subsampled_to_rgba_aos(LLVMBuilderRef builder,
- const struct util_format_description *format_desc,
- unsigned n,
- LLVMValueRef packed,
- LLVMValueRef i,
- LLVMValueRef j)
+lp_build_fetch_subsampled_rgba_aos(LLVMBuilderRef builder,
+ const struct util_format_description *format_desc,
+ unsigned n,
+ LLVMValueRef base_ptr,
+ LLVMValueRef offset,
+ LLVMValueRef i,
+ LLVMValueRef j)
{
+ LLVMValueRef packed;
LLVMValueRef rgba;
assert(format_desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED);
+ assert(format_desc->block.bits == 32);
+ assert(format_desc->block.width == 2);
+ assert(format_desc->block.height == 1);
+
+ packed = lp_build_gather(builder, n, 32, 32, base_ptr, offset);
(void)j;