blorp: Ensure aligned HIZ_CCS_WT partial clears

Fixes: 5425fcf2cb ("intel/blorp: Satisfy HIZ_CCS fast-clear alignments")
Reported-by: Sagar Ghuge <sagar.ghuge@intel.com>
Tested-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6854>
This commit is contained in:
Nanley Chery 2020-09-24 10:01:11 -07:00 committed by Marge Bot
parent 7898993bcd
commit 7f3e881c6c

View file

@ -834,11 +834,12 @@ blorp_can_hiz_clear_depth(const struct gen_device_info *devinfo,
const bool unaligned = (slice_x0 + x0) % 16 || (slice_y0 + y0) % 8 ||
(max_x1_y1 ? haligned_x1 % 16 || valigned_y1 % 8 :
x1 % 16 || y1 % 8);
const bool alignment_used = surf->levels > 1 ||
surf->logical_level0_px.depth > 1 ||
surf->logical_level0_px.array_len > 1;
const bool partial_clear = x0 > 0 || y0 > 0 || !max_x1_y1;
const bool multislice_surf = surf->levels > 1 ||
surf->logical_level0_px.depth > 1 ||
surf->logical_level0_px.array_len > 1;
if (unaligned && alignment_used)
if (unaligned && (partial_clear || multislice_surf))
return false;
}