diff options
| author | aslan2142 <jan.trencansky@protonmail.com> | 2026-11-25 00:24:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-25 00:24:32 +0100 |
| commit | cdb003ea19256ab29997b2ca1e4abf0be05ae9d2 (patch) | |
| tree | 9cd5dd1df53bc471b88991ce566e484a93da1116 /runtime/src/command_list.h | |
| parent | 79d044e54de1701b28a0657028c169e5f590ad2e (diff) | |
| parent | 59dcc9e91713887215168873f0c5268e4298cfd9 (diff) | |
Merge pull request #1055 from milk4sale/d3d12/barrier-into-undefined
d3d12: an enhanced texture barrier into LAYOUT_UNDEFINED closes and keeps the layout (D3D-BARRIER-INTO-UNDEFINED)
Diffstat (limited to 'runtime/src/command_list.h')
| -rw-r--r-- | runtime/src/command_list.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h index bc3496ddc..c28904efe 100644 --- a/runtime/src/command_list.h +++ b/runtime/src/command_list.h | |||
| @@ -701,10 +701,11 @@ public: | |||
| 701 | return append(barrier); | 701 | return append(barrier); |
| 702 | } | 702 | } |
| 703 | 703 | ||
| 704 | // LayoutAfter UNDEFINED is legal: the subresources' contents are no longer needed, as before their memory is | ||
| 705 | // aliased (the retail title ends a depth buffer's use this way, #984; WARP closes such a list, | ||
| 706 | // d3d12_close_parity_test). Replay keeps the image's Vulkan layout and orders the accesses only. | ||
| 704 | bool barrier(const TextureBarrier& barrier) { | 707 | bool barrier(const TextureBarrier& barrier) { |
| 705 | if (!barrier.resource || !valid_sync(barrier.sync_before, barrier.sync_after)) return false; | 708 | if (!barrier.resource || !valid_sync(barrier.sync_before, barrier.sync_after)) return false; |
| 706 | if (barrier.layout_after == d3d12_layout::undefined && barrier.layout_before != d3d12_layout::undefined) | ||
| 707 | return false; | ||
| 708 | if (barrier.flags & ~texture_barrier_discard) return false; | 709 | if (barrier.flags & ~texture_barrier_discard) return false; |
| 709 | if (barrier.range.mip_count && (!barrier.range.layer_count || !barrier.range.plane_count)) return false; | 710 | if (barrier.range.mip_count && (!barrier.range.layer_count || !barrier.range.plane_count)) return false; |
| 710 | if (barrier.sync_after == d3d12_sync::split) return !closed_; | 711 | if (barrier.sync_after == d3d12_sync::split) return !closed_; |