radeonsi: fix gl_PrimitiveIDIn in geometry shader when using tessellation
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 15 May 2017 09:10:13 +0000 (11:10 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 16 May 2017 14:11:53 +0000 (16:11 +0200)
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 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state_shaders.c

index 5da60148af2a1d713de3e09c8b897116caccd252..f761073616ab1d07e260c8f9f98c976374fd4025 100644 (file)
@@ -2133,6 +2133,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);
 }