machine->InterpCoefs = quad->coef;
+#if 1 /* XXX only do this if the fp really reads fragment.position */
machine->Inputs[0].xyzw[0].f[0] = fx;
machine->Inputs[0].xyzw[0].f[1] = fx + 1.0f;
machine->Inputs[0].xyzw[0].f[2] = fx;
machine->Inputs[0].xyzw[1].f[1] = fy;
machine->Inputs[0].xyzw[1].f[2] = fy + 1.0f;
machine->Inputs[0].xyzw[1].f[3] = fy + 1.0f;
+#endif
+
+ machine->QuadX = quad->x0;
+ machine->QuadY = quad->y0;
/* run shader */
#if defined(__i386__) || defined(__386__)
machine->Outputs,
machine->Consts,
machine->Temps,
- machine->InterpCoefs );
+ machine->InterpCoefs
+#if 0
+ ,quad->x0, quad->y0
+#endif
+ );
quad->mask &= ~(machine->Temps[TGSI_EXEC_TEMP_KILMASK_I].xyzw[TGSI_EXEC_TEMP_KILMASK_C].u[0]);
}
else
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;
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;
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. */