From 17baa01bfbebf71c68aebea5196ebcb313612038 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 19 Aug 2009 15:32:45 +0100 Subject: 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. --- src/gallium/drivers/llvmpipe/lp_quad_fs.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_quad_fs.c') 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, -- cgit v1.2.3