summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-02-21 16:38:23 +0100
committerAxel Davy <[email protected]>2016-05-18 23:37:14 +0200
commita77d8cd710ec5091e9c31167032427189ae77437 (patch)
tree2418551081641a58d745f11ea15b8f29df801944 /src
parent217d969746e3c1473df4cc1e6e6ec1eb0d84a3d4 (diff)
st/nine: Forbid POSITION0 for PS3.0
POSITION0 input is forbidden for PS3.0 apparently. Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/nine_shader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index 4ad5fa1723d..4698fd77e97 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 < 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;
}