diff options
author | Dave Airlie <airlied@redhat.com> | 2010-10-06 09:32:32 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-13 09:30:04 +1000 |
commit | d8f6ef456581644ab9444a1ed23542c2b0fff9e4 (patch) | |
tree | 88b0e8615ec9eda6aeac7c5b88e71731a65dace6 /src/gallium/drivers/softpipe/sp_fs_sse.c | |
parent | c79e681a68a1ef73cdb756f7b46b2a1df1bcc710 (diff) |
softpipe: add support for shader stencil export capability
this allows softpipe to be used to test shader stencil ref exporting.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_fs_sse.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_fs_sse.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_fs_sse.c b/src/gallium/drivers/softpipe/sp_fs_sse.c index daa158df7c..5b18cd035e 100644 --- a/src/gallium/drivers/softpipe/sp_fs_sse.c +++ b/src/gallium/drivers/softpipe/sp_fs_sse.c @@ -169,9 +169,15 @@ fs_sse_run( const struct sp_fragment_shader *base, case TGSI_SEMANTIC_POSITION: { uint j; - for (j = 0; j < 4; j++) { - quad->output.depth[j] = machine->Outputs[0].xyzw[2].f[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] = machine->Outputs[i].xyzw[1].f[j]; } break; } |