From cd0a39681377644b7d4574c9a33acbc9c844bb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Sat, 3 Oct 2009 22:15:17 +0100 Subject: llvmpipe: Adjust format assertion. We support array layout too -- if it has a single channel. --- src/gallium/drivers/llvmpipe/lp_bld_format_soa.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/llvmpipe') diff --git a/src/gallium/drivers/llvmpipe/lp_bld_format_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_format_soa.c index b5ff434e1a..66bebdcdec 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_format_soa.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_format_soa.c @@ -119,7 +119,9 @@ lp_build_unpack_rgba_soa(LLVMBuilderRef builder, unsigned chan; /* FIXME: Support more formats */ - assert(format_desc->layout == UTIL_FORMAT_LAYOUT_ARITH); + assert(format_desc->layout == UTIL_FORMAT_LAYOUT_ARITH || + (format_desc->layout == UTIL_FORMAT_LAYOUT_ARRAY && + format_desc->block.bits == format_desc->channel[0].size)); assert(format_desc->block.width == 1); assert(format_desc->block.height == 1); assert(format_desc->block.bits <= 32); @@ -195,10 +197,9 @@ lp_build_load_rgba_soa(LLVMBuilderRef builder, { LLVMValueRef packed; - assert(format_desc->layout == UTIL_FORMAT_LAYOUT_ARITH); assert(format_desc->block.width == 1); assert(format_desc->block.height == 1); - assert(format_desc->block.bits <= 32); + assert(format_desc->block.bits <= type.width); packed = lp_build_gather(builder, type.length, format_desc->block.bits, type.width, -- cgit v1.2.3