diff options
author | Dave Airlie <airlied@redhat.com> | 2010-10-06 09:35:07 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-13 09:30:04 +1000 |
commit | ef8bb7ada98f1ddc8e2554a7336af5d669cb1290 (patch) | |
tree | bbd81789000fa2c33ef5d4c2ccbd26a8646f40ff /src/mesa/state_tracker/st_mesa_to_tgsi.c | |
parent | 06642c61757b459f4f9283b721ad93b6f15386a7 (diff) |
st/mesa: use shader stencil export to accelerate shader drawpixels.
If the pipe driver has shader stencil export we can accelerate DrawPixels
using it. It tries to pick an S8 texture and works its way to X24S8 and S8X24
if that isn't supported.
Diffstat (limited to 'src/mesa/state_tracker/st_mesa_to_tgsi.c')
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 0ed822b8c2..582ca6f173 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1002,6 +1002,13 @@ st_translate_mesa_program( t->outputs[i] = ureg_writemask( t->outputs[i], TGSI_WRITEMASK_Z ); break; + case TGSI_SEMANTIC_STENCIL: + t->outputs[i] = ureg_DECL_output( ureg, + TGSI_SEMANTIC_STENCIL, /* Stencil */ + outputSemanticIndex[i] ); + t->outputs[i] = ureg_writemask( t->outputs[i], + TGSI_WRITEMASK_Y ); + break; case TGSI_SEMANTIC_COLOR: t->outputs[i] = ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, |