diff options
author | Marek Olšák <[email protected]> | 2016-06-28 14:19:04 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-06-29 16:34:22 +0200 |
commit | eff81cbc81a728e26734a0fb5e8d774dba468e5b (patch) | |
tree | 08a09cf905fbacf876751c739d3eb2064370da7c /src/gallium/drivers | |
parent | dd56d04568ab1a563a29d2900cca0ebc4cf13f77 (diff) |
radeonsi: enable distributed tess on multi-SE parts only
ported from Vulkan
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state_shaders.c | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index f38ecc15ab4..633d4bb7a52 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -712,6 +712,10 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws) sscreen->tess_offchip_block_dw_size = sscreen->b.family == CHIP_HAWAII ? 4096 : 8192; + sscreen->has_distributed_tess = + sscreen->b.chip_class >= VI && + sscreen->b.info.max_se >= 2; + sscreen->b.has_cp_dma = true; sscreen->b.has_streamout = true; pipe_mutex_init(sscreen->shader_parts_mutex); diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h index ee64ecc6fd1..3aff0ac8c05 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.h +++ b/src/gallium/drivers/radeonsi/si_pipe.h @@ -83,6 +83,7 @@ struct si_screen { struct r600_common_screen b; unsigned gs_table_depth; unsigned tess_offchip_block_dw_size; + bool has_distributed_tess; /* Whether shaders are monolithic (1-part) or separate (3-part). */ bool use_monolithic_shaders; diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c index 35585107cd3..ce8def46659 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.c +++ b/src/gallium/drivers/radeonsi/si_state_draw.c @@ -274,7 +274,7 @@ static unsigned si_get_ia_multi_vgt_param(struct si_context *sctx, partial_vs_wave = true; /* Needed for 028B6C_DISTRIBUTION_MODE != 0 */ - if (sctx->b.chip_class >= VI) { + if (sctx->screen->has_distributed_tess) { if (sctx->gs_shader.cso) partial_es_wave = true; else diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 9aa4a7c8233..4bcdeb6a271 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -300,7 +300,7 @@ static void si_set_tesseval_regs(struct si_screen *sscreen, else topology = V_028B6C_OUTPUT_TRIANGLE_CW; - if (sscreen->b.chip_class >= VI) { + if (sscreen->has_distributed_tess) { if (sscreen->b.family == CHIP_FIJI || sscreen->b.family >= CHIP_POLARIS10) distribution_mode = V_028B6C_DISTRIBUTION_MODE_TRAPEZOIDS; |