intel/blorp: Allow LOD0 fast-clears with HiZ WT
I did some more debugging of this feature, but this time with a modified version of the piglit test, ./bin/depthstencil-render-miplevels. I modified the test to: * Control which LOD to stop populating/clearing * Print out the results of readpixels to stderr From there, I could see how different surface dimensions affected fast-clears. Depending on the surface dimensions, fast-clearing an LOD above the LOD0 could cause other LODs to be cleared and/or cause the targeted LOD to be only partially cleared (for example, when the LOD0 dimension is 66x66 and the test doesn't clear LOD3+). This never happens when fast-clearing LOD0 however. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5258 Reviewed-by: Rohan Garg <rohan.garg@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30250>
This commit is contained in:
@@ -982,7 +982,7 @@ blorp_can_hiz_clear_depth(const struct intel_device_info *devinfo,
|
||||
x1 % 16 || y1 % 8);
|
||||
const bool partial_clear = x0 > 0 || y0 > 0 || !max_x1_y1;
|
||||
|
||||
if (unaligned && (partial_clear || surf->levels > 1))
|
||||
if (unaligned && (partial_clear || level > 0))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user