From c0472f9c34da78bccecb2c790b54b9dd9712a0b9 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 21 Aug 2009 07:42:29 +0100 Subject: llvmpipe: Centralize mask update logic. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c') diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 702be429164..22274676df6 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -210,11 +210,13 @@ shader_generate(struct llvmpipe_screen *screen, setup_pos_vector(builder, x, y, a0_ptr, dadx_ptr, dady_ptr, pos); + mask = LLVMBuildLoad(builder, mask_ptr, ""); + memset(outputs, 0, sizeof outputs); - mask = lp_build_tgsi_soa(builder, tokens, type, - pos, a0_ptr, dadx_ptr, dady_ptr, - consts_ptr, outputs, samplers_ptr); + lp_build_tgsi_soa(builder, tokens, type, &mask, + pos, a0_ptr, dadx_ptr, dady_ptr, + consts_ptr, outputs, samplers_ptr); for (attrib = 0; attrib < shader->info.num_outputs; ++attrib) { for(chan = 0; chan < NUM_CHANNELS; ++chan) { @@ -233,7 +235,8 @@ shader_generate(struct llvmpipe_screen *screen, /* Alpha test */ /* XXX: should the alpha reference value be passed separately? */ if(cbuf == 0 && chan == 3) - mask = lp_build_alpha_test(builder, alpha, type, outputs[attrib][chan], mask); + lp_build_alpha_test(builder, &key->alpha, type, &mask, + outputs[attrib][chan]); break; } -- cgit v1.2.3