summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-05-15 11:10:13 +0200
committerEmil Velikov <[email protected]>2017-05-18 17:57:51 +0100
commit5c9b59de8bab451f5f4309f2b2f57680d4f603b2 (patch)
tree9bf164a438f8fcb4fbedc66394208eb3b82b2ced
parentb7d7458b9ae963670aca1f7d8f4733a3c3a974e9 (diff)
radeonsi: fix gl_PrimitiveIDIn in geometry shader when using tessellation
This builds on commit 0549ea15ec38 ("radeonsi: fix primitive ID in fragment shader when using tessellation"). Fixes piglit arb_tessellation_shader/execution/gs-primitiveid-instanced.shader_test Cc: 17.1 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (cherry picked from commit f4dbe2efb77be366c52cdd134876a6b00bf324bd)
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 0c82deebfc9..f2413907047 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1820,6 +1820,8 @@ static void si_update_tcs_tes_uses_prim_id(struct si_context *sctx)
sctx->tes_shader.cso->info.uses_primid) ||
(sctx->tcs_shader.cso &&
sctx->tcs_shader.cso->info.uses_primid) ||
+ (sctx->gs_shader.cso &&
+ sctx->gs_shader.cso->info.uses_primid) ||
(sctx->ps_shader.cso && !sctx->gs_shader.cso &&
sctx->ps_shader.cso->info.uses_primid);
}