Skip to content

tu: Handle non-overlapping WaW hazard with buffer copy/fill/update

Danylo Piliaiev requested to merge Danil/mesa:fix/turnip/buffer-waw-hazard into main

What does this MR do and why?

Copies/fills/updates for buffers are happening through CCU but need additional synchronization when write range is not aligned to 64 bytes. Because dst buffer access uses either R8_UNORM or R32_UINT and they are not coherent between each other in CCU since format seem to be a part of a cache key.

See: https://gitlab.khronos.org/vulkan/vulkan/-/issues/3306

The synchronization with writes from UCHE (e.g. with SSBO stores) are solved by the fact that UCHE has byte level dirtiness tracking and that CCU flush would happen always before UCHE flush for such case (e.g. both renderpass and dispatch would flush pending CCU write).

Additionally see: https://gitlab.khronos.org/vulkan/vulkan/-/issues/3398#note_400111

Fixes geometry corruption and potentially hangs in Resident Evil 3.

Merge request reports

Loading