On 23.11.2012 10:25, Michel Dänzer wrote:
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.
Congratulations! You have just toasted my brain.

Well I knew that case labels are just labels, but haven't seen someone using them like this for quite a while.

That said, I'll concede it looks a bit weird. Feel free to follow up
with a cleanup.

No thanks, I was just wondering what the heck that code is supposed to do. Isn't there a compiler option forbidding this?

Christian.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to