Skip to content

tu: Clear UBWC flags buffer on transition from UNDEFINED

Connor Abbott requested to merge cwabbott0/mesa:review/tu-clear-ubwc into main

This fixes a hang on a650 when running these two tests back-to-back on zink, or the entire GLES2.functional.texture.filtering.* set:

dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgba8888_npot
dEQP-GLES2.functional.texture.filtering.cube.nearest_linear_clamp_rgba4444_npot

The problem seems to be zink reinterpreting the flags buffer for a rgba8888 image as the flags buffer for a rgba4444 image, which with UBWC enabled blows up spectacularly, hanging the entire machine and causing an insta-reboot. To fix this we need to clear UBWC when the state of the underlying memory of an image is unknown, which in Vulkan is indicated by a transition from UNDEFINED. I was holding back on this, even though freedreno gallium had to do something similar in !4290 (merged), because the blob didn't seem to do it, but now we have conclusive proof that we need it.

In order to properly handle this, we now also have to properly handle automatic layout transitions in subpasses.

Merge request reports