Implement/use fragment kill results

This commit is contained in:
Brian 2007-10-02 19:16:57 -06:00
parent ff9949d05c
commit 355f8f7eed
3 changed files with 9 additions and 9 deletions

View file

@ -113,7 +113,7 @@ shade_quad(
machine->InterpCoefs );
}
else {
tgsi_exec_machine_run( machine );
quad->mask &= tgsi_exec_machine_run( machine );
}
/* store result color (always in output[1]) */

View file

@ -2359,16 +2359,16 @@ exec_instruction(
}
void
/**
* Run TGSI interpreter.
* \return bitmask of "alive" quad components
*/
uint
tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
{
uint i;
int pc = 0;
#if XXX_SSE
mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0] = 0;
#else
mach->CondMask = 0xf;
mach->LoopMask = 0xf;
mach->ContMask = 0xf;
@ -2399,8 +2399,6 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
exec_instruction( mach, mach->Instructions + pc, &pc );
}
#endif
#if 0
/* we scale from floats in [0,1] to Zbuffer ints in sp_quad_depth_test.c */
if (mach->Processor == TGSI_PROCESSOR_FRAGMENT) {
@ -2411,6 +2409,8 @@ tgsi_exec_machine_run( struct tgsi_exec_machine *mach )
mach->Outputs[0].xyzw[2].f[i] *= ctx->DrawBuffer->_DepthMaxF;
}
#endif
return ~mach->Temps[TEMP_KILMASK_I].xyzw[TEMP_KILMASK_C].u[0];
}

View file

@ -175,7 +175,7 @@ tgsi_exec_machine_init(
unsigned numSamplers,
struct tgsi_sampler *samplers);
void
uint
tgsi_exec_machine_run(
struct tgsi_exec_machine *mach );