diff options
author | Marek Olšák <[email protected]> | 2018-09-29 19:28:20 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-10-16 15:28:22 -0400 |
commit | fedc1fda3096d6e41ccd40efdcff6dc966badbc3 (patch) | |
tree | 10c5f38d9d69d87282be5789ede7d713125e5703 /src/amd | |
parent | ac76aeef20abff6ead3e362b30dc07d809678e53 (diff) |
radeonsi: save raster config in screen, add se_tile_repeat
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_gpu_info.c | 13 | ||||
-rw-r--r-- | src/amd/common/ac_gpu_info.h | 3 | ||||
-rw-r--r-- | src/amd/vulkan/si_cmd_buffer.c | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 766ad835476..d6df2f6443e 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -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 diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index 0583a6037f2..a7dc1094c05 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -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, diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c index e0d474756a3..de057657ee7 100644 --- a/src/amd/vulkan/si_cmd_buffer.c +++ b/src/amd/vulkan/si_cmd_buffer.c @@ -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). |