note to self, investigate Hades 2.
We should be hitting render pass clears in most cases already, but if games decide to issue resource transitions in between clears and rendering or if there's different views involved then the current logic won't work, and clears happening in different command lists are also problematic. DXVK has a lot more freedom there.
I think the idea here is to emit render pass resolve when possible instead of CmdResolveImage since it will allow Turnip to do "magic". According to Mike, that should be more feasible if we emit barriers that keep the image in color domain.
To clarify a bit, RP Resolve is better than CmdResolveImage only when RP Resolve is a part of a big renderpass, not when it is empty RP with just resolve. Also RP Resolve is faster only when we select tiled mode of rendering, in direct rendering they are equal. The biggest beneficiaries of this opt would be VR games.
As for clears, in direct (sysmem) rendering I think it doesn't matter where color clear occurs, but it's important for depth clear to be LOAD_OP_CLEAR in any mode.
We already do the clear fusion when possible. Fusing resolve into the render pass isn't really possible since we cannot know the future.
If resolves cannot be fused with proper renderpasses, then I guess CmdResolveImage could be left as is, converting them to renderpasses won't improve anything for us.
We can fuse it with d3d12 render pass API fwiw when https://github.com/HansKristian-Work/vkd3d-proton/pull/2761 lands, but there's not any known content using that yet, at least on non-VR desktop.
If possible, it would be useful for tilers if this matched how DXVK works re: using renderpass ops instead of transfer ops.