diff options
author | Samuel Pitoiset <[email protected]> | 2019-06-20 09:17:36 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-06-20 11:03:58 +0200 |
commit | 17f94e19841c9f31d571269cd622fd12de58e30d (patch) | |
tree | 7cda68076ee66ee4674a7eb486ce67e4239b8e02 /src/amd/vulkan/radv_meta_clear.c | |
parent | 450bce522a2d33b2ab051d975eb063e16acc33a0 (diff) |
radv: do not fast clears if one level can't be fast cleared
And fallback to slow color clears.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_clear.c')
-rw-r--r-- | src/amd/vulkan/radv_meta_clear.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c index b8ca5c2c9b2..6263b6d6f58 100644 --- a/src/amd/vulkan/radv_meta_clear.c +++ b/src/amd/vulkan/radv_meta_clear.c @@ -1522,6 +1522,21 @@ radv_can_fast_clear_color(struct radv_cmd_buffer *cmd_buffer, if (!can_avoid_fast_clear_elim) return false; } + + if (iview->image->info.levels > 1 && + cmd_buffer->device->physical_device->rad_info.chip_class == GFX8) { + for (uint32_t l = 0; l < iview->level_count; l++) { + uint32_t level = iview->base_mip + l; + struct legacy_surf_level *surf_level = + &iview->image->planes[0].surface.u.legacy.level[level]; + + /* Do not fast clears if one level can't be + * fast cleared. + */ + if (!surf_level->dcc_fast_clear_size) + return false; + } + } } return true; |