[Mesa-dev] [PATCH 06/39] st/nine: Forbid POSITION0 for PS3.0

Axel Davy axel.davy at ens.fr
Sun May 15 10:45:20 UTC 2016


POSITION0 input is forbidden for PS3.0 apparently.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_shader.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index a539ab9..6fb7547 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -2054,6 +2054,11 @@ DECL_SPECIAL(DCL)
             assert(sem.reg.idx < Elements(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;
             }
-- 
2.8.2



More information about the mesa-dev mailing list