summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_quad_fs.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-08-19 15:32:45 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-08-29 09:21:35 +0100
commit17baa01bfbebf71c68aebea5196ebcb313612038 (patch)
tree88adc9a8270c824b5f523b3c985299ff6a6d14e8 /src/gallium/drivers/llvmpipe/lp_quad_fs.c
parent7926b42d41058e5d2b99ba0e8810f93bc7c12d36 (diff)
llvmpipe: Put the position coefficients together with the inputs.
The automatic search'n'replace leaves lp_setup.c a bit ugly, but this code will be eventually code generated as well.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_quad_fs.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_quad_fs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_quad_fs.c b/src/gallium/drivers/llvmpipe/lp_quad_fs.c
index 8fa357dd4f..d5c3f57a45 100644
--- a/src/gallium/drivers/llvmpipe/lp_quad_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_quad_fs.c
@@ -69,7 +69,7 @@ quad_shade_stage(struct quad_stage *qs)
static void
setup_pos_vector(struct quad_shade_stage *qss,
- const struct tgsi_interp_coef *coef,
+ const struct quad_interp_coef *coef,
float x, float y)
{
uint chan;
@@ -88,9 +88,9 @@ setup_pos_vector(struct quad_shade_stage *qss,
/* do Z and W for all fragments in the quad */
for (chan = 2; chan < 4; chan++) {
- const float dadx = coef->dadx[chan];
- const float dady = coef->dady[chan];
- const float a0 = coef->a0[chan] + dadx * x + dady * y;
+ const float dadx = coef->dadx[0][chan];
+ const float dady = coef->dady[0][chan];
+ const float a0 = coef->a0[0][chan] + dadx * x + dady * y;
qss->pos[chan].f[0] = a0;
qss->pos[chan].f[1] = a0 + dadx;
qss->pos[chan].f[2] = a0 + dady;
@@ -113,7 +113,7 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad)
/* Compute X, Y, Z, W vals for this quad */
setup_pos_vector(qss,
- quad->posCoef,
+ quad->coef,
(float)quad->input.x0, (float)quad->input.y0);
@@ -125,9 +125,9 @@ shade_quad(struct quad_stage *qs, struct quad_header *quad)
/* run shader */
llvmpipe->fs->jit_function( qss->pos,
- quad->coef->a0,
- quad->coef->dadx,
- quad->coef->dady,
+ quad->coef->a0 + 1,
+ quad->coef->dadx + 1,
+ quad->coef->dady + 1,
constants,
qss->mask,
quad->output.color,