mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
radv: fix fast clearing depth images with mips on GFX10+
Found by inspection. Cc: 21.2 mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12325>
This commit is contained in:
parent
c94ff7dd81
commit
b16f3261a7
1 changed files with 8 additions and 0 deletions
|
|
@ -1000,6 +1000,14 @@ radv_can_fast_clear_depth(struct radv_cmd_buffer *cmd_buffer, const struct radv_
|
|||
!radv_is_fast_clear_stencil_allowed(clear_value))))
|
||||
return false;
|
||||
|
||||
if (iview->image->info.levels > 1) {
|
||||
uint32_t last_level = iview->base_mip + iview->level_count - 1;
|
||||
if (last_level >= iview->image->planes[0].surface.num_meta_levels) {
|
||||
/* Do not fast clears if one level can't be fast cleared. */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue