diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-08-16 21:01:57 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-08-29 09:21:33 +0100 |
commit | 7821664b15501b173b2304bbada758c33c5ff972 (patch) | |
tree | 7ff73c8299ec1d2189dcfbef0a4d6c973df00b7b /src/gallium/drivers/llvmpipe/lp_quad_fs.c | |
parent | 2c90652ed9e119f09af6757c59d10273894ba590 (diff) |
llvmpipe: Implement KIL.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_quad_fs.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_quad_fs.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_quad_fs.c b/src/gallium/drivers/llvmpipe/lp_quad_fs.c index f013aa68da..5c37fab8e6 100644 --- a/src/gallium/drivers/llvmpipe/lp_quad_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_quad_fs.c @@ -56,6 +56,7 @@ struct quad_shade_stage union tgsi_exec_channel ALIGN16_ATTRIB pos[NUM_CHANNELS]; struct tgsi_exec_vector ALIGN16_ATTRIB outputs[PIPE_MAX_ATTRIBS]; + uint32_t ALIGN16_ATTRIB mask[NUM_CHANNELS]; }; @@ -109,6 +110,7 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad) struct llvmpipe_context *llvmpipe = qs->llvmpipe; void *constants; struct tgsi_sampler **samplers; + unsigned chan_index; boolean z_written; /* Compute X, Y, Z, W vals for this quad */ @@ -120,6 +122,9 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad) constants = llvmpipe->mapped_constants[PIPE_SHADER_FRAGMENT]; samplers = (struct tgsi_sampler **)llvmpipe->tgsi.frag_samplers_list; + for (chan_index = 0; chan_index < NUM_CHANNELS; ++chan_index) + qss->mask[chan_index] = ~0; + /* run shader */ llvmpipe->fs->jit_function( qss->pos, quad->coef->a0, @@ -127,14 +132,14 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad) quad->coef->dady, constants, qss->outputs, + qss->mask, samplers); - /* FIXME */ -#if 0 - quad->inout.mask &= ... ; + for (chan_index = 0; chan_index < NUM_CHANNELS; ++chan_index) + if(!qss->mask[chan_index]) + quad->inout.mask &= ~(1 << chan_index); if (quad->inout.mask == 0) return FALSE; -#endif /* store outputs */ z_written = FALSE; |