diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 5b99ee54a8d..11185c3f44c 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -1223,6 +1223,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info, info->has_dcc_constant_encode = info->family == CHIP_RAVEN2 || info->family == CHIP_RENOIR || info->gfx_level >= GFX10; + /* TC-compat HTILE is only available for GFX8-GFX11.5. */ + info->has_tc_compatible_htile = info->gfx_level >= GFX8 && info->gfx_level < GFX12; + info->has_etc_support = info->family == CHIP_STONEY || info->family == CHIP_VEGA10 || info->family == CHIP_RAVEN || info->family == CHIP_RAVEN2; diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index 954b7a3a2ae..1c93779c19e 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -85,6 +85,7 @@ struct radeon_info { bool has_clear_state; bool has_distributed_tess; bool has_dcc_constant_encode; + bool has_tc_compatible_htile; bool has_etc_support; bool has_rbplus; /* if RB+ registers exist */ bool rbplus_allowed; /* if RB+ is allowed */ diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 274026c05fa..0178e170ee3 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -72,8 +72,7 @@ radv_use_tc_compat_htile_for_image(struct radv_device *device, const VkImageCrea { const struct radv_physical_device *pdev = radv_device_physical(device); - /* TC-compat HTILE is only available for GFX8+. */ - if (pdev->info.gfx_level < GFX8) + if (!pdev->info.has_tc_compatible_htile) return false; /* TC-compat HTILE looks broken on Tonga (and Iceland is the same design) and the documented bug diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index f65f25e7b5b..729cd7eb926 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -1342,7 +1342,7 @@ si_texture_create_with_modifier(struct pipe_screen *screen, bool is_flushed_depth = templ->flags & SI_RESOURCE_FLAG_FLUSHED_DEPTH || templ->flags & SI_RESOURCE_FLAG_FORCE_LINEAR; bool tc_compatible_htile = - sscreen->info.gfx_level >= GFX8 && sscreen->info.gfx_level < GFX12 && + sscreen->info.has_tc_compatible_htile && /* There are issues with TC-compatible HTILE on Tonga (and * Iceland is the same design), and documented bug workarounds * don't help. For example, this fails: