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 c26acbb..c4517fc 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 ||