st/nine: Forbid POSITION0 for PS3.0
authorAxel Davy <axel.davy@ens.fr>
Sun, 21 Feb 2016 15:38:23 +0000 (16:38 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 18 May 2016 21:37:14 +0000 (23:37 +0200)
POSITION0 input is forbidden for PS3.0 apparently.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_shader.c

index 4ad5fa1723d6e7216ab776a4e4dea6677ef0e024..4698fd77e97f188bc0a07462a77e214d935b94a3 100644 (file)
@@ -2054,6 +2054,11 @@ DECL_SPECIAL(DCL)
             assert(sem.reg.idx < ARRAY_SIZE(tx->regs.v));
 
             if (tgsi.Name == TGSI_SEMANTIC_POSITION) {
+                /* Position0/PositionT0 are forbidden (likely because vPos already does that) */
+                if (sem.usage == D3DDECLUSAGE_POSITION ||
+                    sem.usage == D3DDECLUSAGE_POSITIONT)
+                    return D3DERR_INVALIDCALL;
+                /* Following code is for depth */
                 tx->regs.v[sem.reg.idx] = nine_get_position_input(tx);
                 return D3D_OK;
             }