radeonsi: always interpolate PrimID as flat
authorMarek Olšák <marek.olsak@amd.com>
Wed, 29 May 2019 00:12:53 +0000 (20:12 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 12 Jun 2019 00:05:21 +0000 (20:05 -0400)
src/gallium/drivers/radeonsi/si_state_shaders.c

index c26acbbc927b9b9aacd55d4d09f26004d24ff043..c4517fcf538a9e96f253defc7fe30e44ea4b4e96 100644 (file)
@@ -2828,7 +2828,8 @@ static unsigned si_get_ps_input_cntl(struct si_context *sctx,
        unsigned j, offset, ps_input_cntl = 0;
 
        if (interpolate == TGSI_INTERPOLATE_CONSTANT ||
-           (interpolate == TGSI_INTERPOLATE_COLOR && sctx->flatshade))
+           (interpolate == TGSI_INTERPOLATE_COLOR && sctx->flatshade) ||
+           name == TGSI_SEMANTIC_PRIMID)
                ps_input_cntl |= S_028644_FLAT_SHADE(1);
 
        if (name == TGSI_SEMANTIC_PCOORD ||