summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-10-06 09:28:46 +1000
committerDave Airlie <airlied@redhat.com>2010-10-13 09:30:02 +1000
commit4ecb2c105da590abf79421a06234b636cd1afcd6 (patch)
tree835d8e723f20687b8e11730e6828d7437321d16c /src/gallium/drivers/softpipe
parent43873b53c4d15f10f0321c770b1b8bd537cc226d (diff)
gallium/tgsi: add support for stencil writes.
this adds the capability + a stencil semantic id, + tgsi scan support. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_fs_exec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_fs_exec.c b/src/gallium/drivers/softpipe/sp_fs_exec.c
index 67e2c8f8bc..346e1b402b 100644
--- a/src/gallium/drivers/softpipe/sp_fs_exec.c
+++ b/src/gallium/drivers/softpipe/sp_fs_exec.c
@@ -158,9 +158,17 @@ exec_run( const struct sp_fragment_shader *base,
case TGSI_SEMANTIC_POSITION:
{
uint j;
- for (j = 0; j < 4; j++) {
+
+ for (j = 0; j < 4; j++)
quad->output.depth[j] = machine->Outputs[i].xyzw[2].f[j];
- }
+ }
+ break;
+ case TGSI_SEMANTIC_STENCIL:
+ {
+ uint j;
+
+ for (j = 0; j < 4; j++)
+ quad->output.stencil[j] = (unsigned)machine->Outputs[i].xyzw[1].f[j];
}
break;
}