summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-05-02 19:54:35 -0400
committerMarek Olšák <[email protected]>2018-05-10 18:40:10 -0400
commit9b1fdfc541ed0eb62632e893b2142500bb003453 (patch)
treeb6ebd09c3b782f8153d29fe312e585409feb35e2 /src/gallium
parentd26696283d494822f2df72a6b94d51e70f91c4d9 (diff)
ac/gpu_info: add has_2d_tiling
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_get.c6
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index ef74cd457b8..757192f309c 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -198,11 +198,7 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
sscreen->info.has_gpu_reset_counter_query;
case PIPE_CAP_TEXTURE_MULTISAMPLE:
- /* 2D tiling on CIK is supported since DRM 2.35.0 */
- return sscreen->info.chip_class < CIK ||
- (sscreen->info.drm_major == 2 &&
- sscreen->info.drm_minor >= 35) ||
- sscreen->info.drm_major == 3;
+ return sscreen->info.has_2d_tiling;
case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT:
return SI_MAP_BUFFER_ALIGNMENT;
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 3585b35af36..cb8c7ce9fcb 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -548,6 +548,8 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws)
ws->info.has_unaligned_shader_loads = ws->info.chip_class == CIK &&
ws->info.drm_minor >= 50;
ws->info.has_sparse_vm_mappings = false;
+ /* 2D tiling on CIK is supported since DRM 2.35.0 */
+ ws->info.has_2d_tiling = ws->info.chip_class <= SI || ws->info.drm_minor >= 35;
ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;