summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2018-06-01 16:03:31 +0200
committerMarek Olšák <[email protected]>2019-07-03 15:51:12 -0400
commit1b11fb148c3c60bc8a2af22a0bbee352f405264d (patch)
tree57a782db7cb4cd59af71d2cb391e559e118bb709
parent8060339278e596ed121aed31191c3daf7e3e847b (diff)
radeonsi/gfx10: take PRIMID from the correct output when exported by GS
Acked-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 442cbca3fe6..80d06b19867 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -3156,8 +3156,8 @@ static unsigned si_get_ps_input_cntl(struct si_context *sctx,
}
}
- if (name == TGSI_SEMANTIC_PRIMID)
- /* PrimID is written after the last output. */
+ if (j == vsinfo->num_outputs && name == TGSI_SEMANTIC_PRIMID)
+ /* PrimID is written after the last output when HW VS is used. */
ps_input_cntl |= S_028644_OFFSET(vs->info.vs_output_param_offset[vsinfo->num_outputs]);
else if (j == vsinfo->num_outputs && !G_028644_PT_SPRITE_TEX(ps_input_cntl)) {
/* No corresponding output found, load defaults into input.