[Mesa-dev] [PATCH 3/6] radeonsi: Flesh out support for depth/stencil exports from the pixel shader.
Michel Dänzer
michel at daenzer.net
Fri Nov 23 01:25:14 PST 2012
On Fre, 2012-11-23 at 09:43 +0100, Christian König wrote:
> On 22.11.2012 18:57, Michel Dänzer wrote:
> > + if (si_shader_ctx->type == TGSI_PROCESSOR_VERTEX) {
> > + case TGSI_SEMANTIC_PSIZE:
> > + target = V_008DFC_SQ_EXP_POS;
> > + } else {
> > + case TGSI_SEMANTIC_STENCIL:
> > + if (d->Semantic.Name == TGSI_SEMANTIC_STENCIL)
> > + stencil_index = index;
> > + else
> > + depth_index = index;
> > + continue;
> > + }
>
> Is it just me or does this code look rather strange?
>
> Its probably just some comment or disabled part of code, otherwise I
> have my doubts that this would compile otherwise.
Of course it compiles... How could I have run piglit if it didn't? :)
The idea is to treat TGSI_SEMANTIC_POSITION the same as
TGSI_SEMANTIC_PSIZE for vertex shaders and similarly as
TGSI_SEMANTIC_STENCIL for fragment shaders.
That said, I'll concede it looks a bit weird. Feel free to follow up
with a cleanup.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the mesa-dev
mailing list