summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-13 09:05:15 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-12-13 09:05:15 -0700
commit81c9058ea90615cd0c819da6e51c3a539a540a7e (patch)
tree3b37cd0c70b61394072b42b26e3de8333c4f23b0 /src/mesa/pipe/tgsi
parent8cd608d5ba538cdebea7e9bb51c1458ce7eb5137 (diff)
Add QuadX,Y fields to tgsi_exec_machine to pass quad's position to tgsi interpreter.
The tgsi linear/perspective attribute code now uses these values rather than input[0]. Need to update SSE path to take quad x,y as function params. Then, we can remove additional code.
Diffstat (limited to 'src/mesa/pipe/tgsi')
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.c6
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.h1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
index 8636271a34..03997f9099 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
@@ -1352,8 +1352,7 @@ linear_interpolation(
unsigned attrib,
unsigned chan )
{
- const float x = mach->Inputs[0].xyzw[0].f[0];
- const float y = mach->Inputs[0].xyzw[1].f[0];
+ const float x = mach->QuadX, y = mach->QuadY;
const float dadx = mach->InterpCoefs[attrib].dadx[chan];
const float dady = mach->InterpCoefs[attrib].dady[chan];
const float a0 = mach->InterpCoefs[attrib].a0[chan] + dadx * x + dady * y;
@@ -1369,8 +1368,7 @@ perspective_interpolation(
unsigned attrib,
unsigned chan )
{
- const float x = mach->Inputs[0].xyzw[0].f[0];
- const float y = mach->Inputs[0].xyzw[1].f[0];
+ const float x = mach->QuadX, y = mach->QuadY;
const float dadx = mach->InterpCoefs[attrib].dadx[chan];
const float dady = mach->InterpCoefs[attrib].dady[chan];
const float a0 = mach->InterpCoefs[attrib].a0[chan] + dadx * x + dady * y;
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.h b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
index e7952a08e3..8d166bb5f4 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.h
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
@@ -170,6 +170,7 @@ struct tgsi_exec_machine
struct tgsi_exec_vector *Inputs;
struct tgsi_exec_vector *Outputs;
const struct tgsi_token *Tokens;
+ float QuadX, QuadY; /**< for frag progs only */
unsigned Processor;
/* GEOMETRY processor only. */