summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-02-21 16:35:31 +0100
committerAxel Davy <[email protected]>2016-02-29 18:55:58 +0100
commit8a8affdfdace486f4e416e66e2dd0ed122505a90 (patch)
tree87b4f8403f8226b1d73638cc7890964e17b0ba7c
parentf08c990af53e91114257b19e5679e2dbbc277e45 (diff)
st/nine: Use Position input helper for ps3 declared inputs
When the semantic is Position (which can happen with index 0 only), use the helper to get Position input. Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
-rw-r--r--src/gallium/state_trackers/nine/nine_shader.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index f0c5236fd75..eb6479bb4d9 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -2052,9 +2052,16 @@ DECL_SPECIAL(DCL)
unsigned interp_location = 0;
/* SM3 only, SM2 input semantic determined by file */
assert(sem.reg.idx < Elements(tx->regs.v));
+
+ if (tgsi.Name == TGSI_SEMANTIC_POSITION) {
+ tx->regs.v[sem.reg.idx] = nine_get_position_input(tx);
+ return D3D_OK;
+ }
+
if (sem.reg.mod & NINED3DSPDM_CENTROID ||
(tgsi.Name == TGSI_SEMANTIC_COLOR && tx->info->force_color_in_centroid))
interp_location = TGSI_INTERPOLATE_LOC_CENTROID;
+
tx->regs.v[sem.reg.idx] = ureg_DECL_fs_input_cyl_centroid(
ureg, tgsi.Name, tgsi.Index,
nine_tgsi_to_interp_mode(&tgsi),