diff options
author | José Fonseca <[email protected]> | 2009-08-21 07:42:29 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:37 +0100 |
commit | c0472f9c34da78bccecb2c790b54b9dd9712a0b9 (patch) | |
tree | be554214b9b558b85bf42e163747317e1f9dd076 /src/gallium/drivers/llvmpipe/lp_state_fs.c | |
parent | 3dbf00f9ab0d2e771c72a74d9db32c048ce7df4e (diff) |
llvmpipe: Centralize mask update logic.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 11 |
1 files changed, 7 insertions, 4 deletions
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; } |