diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c index bedc8f87b7c..8e57a5e349e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c @@ -987,6 +987,7 @@ lp_build_pack_rgba_soa(struct gallivm_state *gallivm, { unsigned chan; struct lp_build_context bld; + LLVMValueRef rgba_swiz[4]; assert(format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN); assert(format_desc->block.width == 1); assert(format_desc->block.height == 1); @@ -995,13 +996,16 @@ lp_build_pack_rgba_soa(struct gallivm_state *gallivm, assert(type.width == 32); lp_build_context_init(&bld, gallivm, type); + + lp_build_format_swizzle_soa(format_desc, &bld, rgba_in, rgba_swiz); + for (chan = 0; chan < format_desc->nr_channels; ++chan) { struct util_format_channel_description chan_desc = format_desc->channel[chan]; lp_build_insert_soa_chan(&bld, format_desc->block.bits, chan_desc, packed, - rgba_in[chan]); + rgba_swiz[chan]); } } diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 4e0756463ba..dc9ffce97e2 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -728,6 +728,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, case PIPE_FORMAT_R8G8_SNORM: case PIPE_FORMAT_R16_SNORM: case PIPE_FORMAT_R8_SNORM: + case PIPE_FORMAT_B8G8R8A8_UNORM: break; default: