radeonsi: save raster config in screen, add se_tile_repeat

This commit is contained in:
Marek Olšák
2018-09-29 19:28:20 -04:00
parent ac76aeef20
commit fedc1fda30
6 changed files with 31 additions and 11 deletions
+11 -2
View File
@@ -643,9 +643,10 @@ ac_get_gs_table_depth(enum chip_class chip_class, enum radeon_family family)
void
ac_get_raster_config(struct radeon_info *info,
uint32_t *raster_config_p,
uint32_t *raster_config_1_p)
uint32_t *raster_config_1_p,
uint32_t *se_tile_repeat_p)
{
unsigned raster_config, raster_config_1;
unsigned raster_config, raster_config_1, se_tile_repeat;
switch (info->family) {
/* 1 SE / 1 RB */
@@ -722,8 +723,16 @@ ac_get_raster_config(struct radeon_info *info,
raster_config_1 = 0x0000002a;
}
unsigned se_width = 8 << G_028350_SE_XSEL_GFX6(raster_config);
unsigned se_height = 8 << G_028350_SE_YSEL_GFX6(raster_config);
/* I don't know how to calculate this, though this is probably a good guess. */
se_tile_repeat = MAX2(se_width, se_height) * info->max_se;
*raster_config_p = raster_config;
*raster_config_1_p = raster_config_1;
if (se_tile_repeat_p)
*se_tile_repeat_p = se_tile_repeat;
}
void
+2 -1
View File
@@ -150,7 +150,8 @@ void ac_print_gpu_info(struct radeon_info *info);
int ac_get_gs_table_depth(enum chip_class chip_class, enum radeon_family family);
void ac_get_raster_config(struct radeon_info *info,
uint32_t *raster_config_p,
uint32_t *raster_config_1_p);
uint32_t *raster_config_1_p,
uint32_t *se_tile_repeat_p);
void ac_get_harvested_configs(struct radeon_info *info,
unsigned raster_config,
unsigned *cik_raster_config_1_p,
+1 -1
View File
@@ -134,7 +134,7 @@ si_set_raster_config(struct radv_physical_device *physical_device,
ac_get_raster_config(&physical_device->rad_info,
&raster_config,
&raster_config_1);
&raster_config_1, NULL);
/* Always use the default config when all backends are enabled
* (or when we failed to determine the enabled backends).