gallium: enable new quad output code, remove old code

This commit is contained in:
Brian 2008-04-14 21:01:40 -06:00
parent 90b9a11a6d
commit d3878b070b

View file

@ -88,7 +88,6 @@ shade_quad(
&qss->machine,
quad );
#if 0 /* XXX multi color outputs - untested */
/* store outputs */
boolean z_written = FALSE;
{
@ -133,41 +132,6 @@ shade_quad(
quad->outputs.depth[2] = z0 + dzdy;
quad->outputs.depth[3] = z0 + dzdx + dzdy;
}
#endif
/* store result color(s) */
if (qss->colorOutSlot >= 0) {
/* XXX need to handle multiple color outputs someday */
assert(softpipe->fs->info.output_semantic_name[qss->colorOutSlot]
== TGSI_SEMANTIC_COLOR);
memcpy(
quad->outputs.color[0],
&machine->Outputs[qss->colorOutSlot].xyzw[0].f[0],
sizeof( quad->outputs.color[0] ) );
}
/* store result Z */
if (qss->depthOutSlot >= 0) {
/* output[slot] is new Z */
uint i;
for (i = 0; i < 4; i++) {
quad->outputs.depth[i] = machine->Outputs[0].xyzw[2].f[i];
}
}
else {
/* compute Z values now, as in the quad earlyz stage */
/* XXX we should really only do this if the earlyz stage is not used */
const float fx = (float) quad->x0;
const float fy = (float) quad->y0;
const float dzdx = quad->posCoef->dadx[2];
const float dzdy = quad->posCoef->dady[2];
const float z0 = quad->posCoef->a0[2] + dzdx * fx + dzdy * fy;
quad->outputs.depth[0] = z0;
quad->outputs.depth[1] = z0 + dzdx;
quad->outputs.depth[2] = z0 + dzdy;
quad->outputs.depth[3] = z0 + dzdx + dzdy;
}
/* shader may cull fragments */
if( quad->mask ) {