WIP: d3d12_xs: support differently shaped depth textures at one base #689

Closed
leonida/mandy
QemmHD wants to merge 0 commits from qemmhd/rt-depth-same-base-shapes into old-pr/9991

Pull request closed

This pull request cannot be reopened because the branch was deleted.

QemmHD commented 2026-11-24 12:08:23 +00:00

Claimed in #14 as RT-DEPTH-SAME-BASE-SHAPES. Direct follow-up to #261, targeted at its branch so the review shows only this change.

What and why

Slot 133 can place multiple depth/UAV textures with different extents or array sizes at the same guest address. The existing placement table rejects the second shape. Keep a separate real attachment and storage-plane backing for each incompatible shape. Keep the shared backing for exact compatible placements. The caller still synchronizes a shape switch with an aliasing barrier and initializes the newly active texture. Distinct-base partial overlaps are still refused, including when a same-base group grows toward a neighboring placement.

Tested

  • Windows, MSVC 2022 x64, RTX 4070 SUPER. All 14 focused tests passed on the local integration of #261, with zero skips.
  • A synthetic test switches between a small texture and a larger array at one base. It uses explicit alias barriers and full depth clears, writes through a UAV, and checks each layer by readback. It also covers exact alias sharing and range overlap checks.
  • The offline boot on the local integration advanced past the earlier slot 133 placement failure and reached a later exception.
  • This patch applies to the exact #261 head at 632cb75ad. Diff and repository game-data checks passed.

AI-assisted: yes (Codex).

Claimed in #14 as [RT-DEPTH-SAME-BASE-SHAPES](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7131014204). Direct follow-up to #261, targeted at its branch so the review shows only this change. ### What and why Slot 133 can place multiple depth/UAV textures with different extents or array sizes at the same guest address. The existing placement table rejects the second shape. Keep a separate real attachment and storage-plane backing for each incompatible shape. Keep the shared backing for exact compatible placements. The caller still synchronizes a shape switch with an aliasing barrier and initializes the newly active texture. Distinct-base partial overlaps are still refused, including when a same-base group grows toward a neighboring placement. ### Tested - Windows, MSVC 2022 x64, RTX 4070 SUPER. All 14 focused tests passed on the local integration of #261, with zero skips. - A synthetic test switches between a small texture and a larger array at one base. It uses explicit alias barriers and full depth clears, writes through a UAV, and checks each layer by readback. It also covers exact alias sharing and range overlap checks. - The offline boot on the local integration advanced past the earlier slot 133 placement failure and reached a later exception. - This patch applies to the exact #261 head at `632cb75ad`. Diff and repository game-data checks passed. AI-assisted: yes (Codex).
MoonEyes commented 2026-11-29 14:40:08 +00:00

Closing: main already handles differently shaped depth textures at one base, in runtime/shims/d3d12_xs_placed_depth.h:104-107 (same_shape via compatible()), with tests in runtime/test/d3d12_placed_depth_test.h. Checked on current main just now. Reopen with a pointer if a case is still missing. Thanks!

Closing: main already handles differently shaped depth textures at one base, in runtime/shims/d3d12_xs_placed_depth.h:104-107 (same_shape via compatible()), with tests in runtime/test/d3d12_placed_depth_test.h. Checked on current main just now. Reopen with a pointer if a case is still missing. Thanks!
Sign in to join this conversation.
No description provided.