protonscr

use renderpasses for clear/resolve ops when possible

vkd3dclosed
HansKristian-Work/vkd3d-proton#2856 · opened 2026-03-02 by zmike · updated 2026-03-16 · 8 comments · github
Zzmike 2026-03-02 github

If possible, it would be useful for tilers if this matched how DXVK works re: using renderpass ops instead of transfer ops.

HHansKristian-Work maintainer 2026-03-03 github

note to self, investigate Hades 2.

KK0bin 2026-03-03 github

Doesn't vkd3d-Proton already do that for clears? (#2725)

Ddoitsujin maintainer 2026-03-03 github

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.

HHansKristian-Work maintainer 2026-03-04 github

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.

Wwerman 2026-03-06 github

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.

HHansKristian-Work maintainer 2026-03-06 github

We already do the clear fusion when possible. Fusing resolve into the render pass isn't really possible since we cannot know the future.

Wwerman 2026-03-06 github

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.

HHansKristian-Work maintainer 2026-03-06 github

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.