summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-02 19:16:57 -0600
committerBrian <[email protected]>2007-10-02 19:16:57 -0600
commit355f8f7eedf9ddfac7edd2244f09c5a47fd8af86 (patch)
tree977ff4c80a116a096e49743e0afabc763f967f90 /src
parentff9949d05caa5543f4e57d831e603cba52f62e8b (diff)
Implement/use fragment kill results
Diffstat (limited to 'src')
-rwxr-xr-xsrc/mesa/pipe/softpipe/sp_quad_fs.c2
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.c14
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_exec.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index 57c01dcfcc3..f394c587dc8 100755
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -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]) */
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.c b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
index 158abba270b..a0b3bc1c8e6 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.c
@@ -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];
}
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_exec.h b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
index e7827ecce15..354d5df6c26 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_exec.h
+++ b/src/mesa/pipe/tgsi/exec/tgsi_exec.h
@@ -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 );