diff options
author | Marek Olšák <[email protected]> | 2016-04-08 12:57:43 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-27 13:54:39 +0200 |
commit | f6ff4836460f0e76d5e2ba82ffeb7bb52c0554fc (patch) | |
tree | 49771b3032f7792f28f1aabf4c0c0a8fbbf7a90f /src/gallium/drivers/radeonsi | |
parent | 46dba701d81199e6450dc50ef3f0ff476dbfb17f (diff) |
radeonsi: use optimal WD settings for primitive restart on Polaris
ported from Vulkan
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 717149bceb1..5f866d5bd21 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -291,13 +291,21 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx, if (sctx->b.chip_class >= CIK) { /* WD_SWITCH_ON_EOP has no effect on GPUs with less than * 4 shader engines. Set 1 to pass the assertion below. - * The other cases are hardware requirements. */ + * The other cases are hardware requirements. + * + * Polaris supports primitive restart with WD_SWITCH_ON_EOP=0 + * for points, line strips, and tri strips. + */ if (sctx->b.screen->info.max_se < 4 || prim == PIPE_PRIM_POLYGON || prim == PIPE_PRIM_LINE_LOOP || prim == PIPE_PRIM_TRIANGLE_FAN || prim == PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY || - info->primitive_restart || + (info->primitive_restart && + (sctx->b.family < CHIP_POLARIS10 || + (prim != PIPE_PRIM_POINTS && + prim != PIPE_PRIM_LINE_STRIP && + prim != PIPE_PRIM_TRIANGLE_STRIP))) || info->count_from_stream_output) wd_switch_on_eop = true; |