aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-09-29 19:28:20 -0400
committerMarek Olšák <[email protected]>2018-10-16 15:28:22 -0400
commitfedc1fda3096d6e41ccd40efdcff6dc966badbc3 (patch)
tree10c5f38d9d69d87282be5789ede7d713125e5703 /src/gallium/drivers
parentac76aeef20abff6ead3e362b30dc07d809678e53 (diff)
radeonsi: save raster config in screen, add se_tile_repeat
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c9
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.h3
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c12
3 files changed, 17 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index ea321bf62d3..14b075c7b76 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -819,6 +819,15 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws,
ws->query_info(ws, &sscreen->info);
si_handle_env_var_force_family(sscreen);
+ if (sscreen->info.chip_class >= GFX9) {
+ sscreen->se_tile_repeat = 32 * sscreen->info.max_se;
+ } else {
+ ac_get_raster_config(&sscreen->info,
+ &sscreen->pa_sc_raster_config,
+ &sscreen->pa_sc_raster_config_1,
+ &sscreen->se_tile_repeat);
+ }
+
sscreen->debug_flags = debug_get_flags_option("R600_DEBUG",
debug_options, 0);
diff --git a/src/gallium/drivers/radeonsi/si_pipe.h b/src/gallium/drivers/radeonsi/si_pipe.h
index dad3029bc31..ff11eab0224 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.h
+++ b/src/gallium/drivers/radeonsi/si_pipe.h
@@ -405,6 +405,9 @@ struct si_screen {
uint64_t debug_flags;
char renderer_string[183];
+ unsigned pa_sc_raster_config;
+ unsigned pa_sc_raster_config_1;
+ unsigned se_tile_repeat;
unsigned gs_table_depth;
unsigned tess_offchip_block_dw_size;
unsigned tess_offchip_ring_size;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index bc1417aadfb..a170d525ecf 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -4782,13 +4782,11 @@ si_write_harvested_raster_configs(struct si_context *sctx,
static void si_set_raster_config(struct si_context *sctx, struct si_pm4_state *pm4)
{
- unsigned num_rb = MIN2(sctx->screen->info.num_render_backends, 16);
- unsigned rb_mask = sctx->screen->info.enabled_rb_mask;
- unsigned raster_config, raster_config_1;
-
- ac_get_raster_config(&sctx->screen->info,
- &raster_config,
- &raster_config_1);
+ struct si_screen *sscreen = sctx->screen;
+ unsigned num_rb = MIN2(sscreen->info.num_render_backends, 16);
+ unsigned rb_mask = sscreen->info.enabled_rb_mask;
+ unsigned raster_config = sscreen->pa_sc_raster_config;
+ unsigned raster_config_1 = sscreen->pa_sc_raster_config_1;
if (!rb_mask || util_bitcount(rb_mask) >= num_rb) {
/* Always use the default config when all backends are enabled