From cd0a39681377644b7d4574c9a33acbc9c844bb59 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sat, 3 Oct 2009 22:15:17 +0100 Subject: [PATCH] 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(-) diff --git a/src/gallium/drivers/llvmpipe/lp_bld_format_soa.c b/src/gallium/drivers/llvmpipe/lp_bld_format_soa.c index b5ff434e1ae..66bebdcdec8 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, -- 2.30.2