summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_quad_fs.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-19 20:42:50 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:37 +0100
commit9ae47069b4a2b67e381b02d805f1ca74f31ea7b8 (patch)
tree69928d0be32cc2efe339791ed815920365ccfd9d /src/gallium/drivers/llvmpipe/lp_quad_fs.c
parentb5e397c3693fbae6b2c91c602454d9a70651c9c4 (diff)
llvmpipe: Code generate alpha testing and append to generated fragment shader.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_quad_fs.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_quad_fs.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_quad_fs.c b/src/gallium/drivers/llvmpipe/lp_quad_fs.c
index 78b4e1bab6..2736efc956 100644
--- a/src/gallium/drivers/llvmpipe/lp_quad_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_quad_fs.c
@@ -76,10 +76,15 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad)
{
struct quad_shade_stage *qss = quad_shade_stage( qs );
struct llvmpipe_context *llvmpipe = qs->llvmpipe;
+ struct lp_fragment_shader *fs = llvmpipe->fs;
void *constants;
struct tgsi_sampler **samplers;
unsigned chan_index;
+ assert(fs->current);
+ if(!fs->current)
+ return FALSE;
+
constants = llvmpipe->mapped_constants[PIPE_SHADER_FRAGMENT];
samplers = (struct tgsi_sampler **)llvmpipe->tgsi.frag_samplers_list;
@@ -87,16 +92,16 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad)
qss->mask[chan_index] = ~0;
/* run shader */
- llvmpipe->fs->jit_function( quad->input.x0,
- quad->input.y0,
- quad->coef->a0,
- quad->coef->dadx,
- quad->coef->dady,
- constants,
- qss->mask,
- quad->output.color,
- quad->output.depth,
- samplers);
+ fs->current->jit_function( quad->input.x0,
+ quad->input.y0,
+ quad->coef->a0,
+ quad->coef->dadx,
+ quad->coef->dady,
+ constants,
+ qss->mask,
+ quad->output.color,
+ quad->output.depth,
+ samplers);
for (chan_index = 0; chan_index < NUM_CHANNELS; ++chan_index)
if(!qss->mask[chan_index])