Fix D3D12 frame and texture handling #68

Merged
Tems-py merged 1 commit from upstream-pr/69 into main 2026-11-23 09:59:31 +00:00
Tems-py commented 2026-11-22 23:33:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Tems-py on 2026-11-22T23:33:27Z.


Summary

  • Bind the selected private D3D12 view heap for local descriptor indices and retain the shared heap for shared indices.
  • Preserve placed texture identities in aliasing barriers and remove resource tracking on final release.
  • Queue the PresentX copy before reporting the flip, retain its source until the copy fence completes, and skip allocator reuse when the fence wait times out.
  • Serialize texture refreshes and preserve pending CPU writes when registering textures.
<!-- greyfinch-sync:ivall/xcl:issue:6549255219 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/69). Originally posted by [Tems-py](https://github.com/Tems-py) on 2026-11-22T23:33:27Z. --- ## Summary - Bind the selected private D3D12 view heap for local descriptor indices and retain the shared heap for shared indices. - Preserve placed texture identities in aliasing barriers and remove resource tracking on final release. - Queue the PresentX copy before reporting the flip, retain its source until the copy fence completes, and skip allocator reuse when the fence wait times out. - Serialize texture refreshes and preserve pending CPU writes when registering textures.
upstream-sync closed this pull request 2026-11-24 06:57:00 +00:00
Tems-py commented 2026-11-24 07:00:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Tems-py on 2026-11-22T23:37:56Z.


obraz fixes flicker on intel arc
<!-- greyfinch-sync:ivall/xcl:comment:7087717560 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/69#issuecomment-7087717560). Originally posted by [Tems-py](https://github.com/Tems-py) on 2026-11-22T23:37:56Z. --- <img width="1792" height="1084" alt="obraz" src="https://github.com/user-attachments/assets/abd88af3-bab6-4941-b728-53b67f004e61" /> fixes flicker on intel arc
Foniass commented 2026-11-24 07:00:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-23T02:39:19Z.


For the reviewer, since #84 touches the same problem: on NVIDIA the shared shader-visible heap holds 1 000 000 view descriptors. Minecraft's eight view heaps need 1 179 632, so the last two got no range in it, and their draws read other heaps' slots (blank frames). This PR's first item binds such a heap separately. #84 gives every view heap its place in the shared heap a page at a time instead, so no heap is left out, and draws that mix descriptors from several heaps keep working.

The two don't fight: with #84 every view heap is in the shared heap, so the pc_heaps change here never has a private heap to pick. They merge cleanly, and main + #84 + #86 + #68 + #67 + this PR passes the full test suite on an RTX 5070 Ti. The rest of this PR (aliasing barriers, PresentX ordering, texture refresh) is independent of #84.

Intel Arc: if its MaxViewDescriptorHeapSize is also 1 000 000, #84 alone should fix the flicker there too. Not tested, there's no Arc here.

<!-- greyfinch-sync:ivall/xcl:comment:7090107940 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/69#issuecomment-7090107940). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-23T02:39:19Z. --- For the reviewer, since #84 touches the same problem: on NVIDIA the shared shader-visible heap holds 1 000 000 view descriptors. Minecraft's eight view heaps need 1 179 632, so the last two got no range in it, and their draws read other heaps' slots (blank frames). This PR's first item binds such a heap separately. #84 gives every view heap its place in the shared heap a page at a time instead, so no heap is left out, and draws that mix descriptors from several heaps keep working. The two don't fight: with #84 every view heap is in the shared heap, so the `pc_heaps` change here never has a private heap to pick. They merge cleanly, and `main` + #84 + #86 + #68 + #67 + this PR passes the full test suite on an RTX 5070 Ti. The rest of this PR (aliasing barriers, PresentX ordering, texture refresh) is independent of #84. Intel Arc: if its `MaxViewDescriptorHeapSize` is also 1 000 000, #84 alone should fix the flicker there too. Not tested, there's no Arc here.
ivall commented 2026-11-24 07:00:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T09:59:48Z.


Merged. Checked on an RX 9070 (RDNA4): cargo test --workspace with the retail samples (shader pack, console DLLs, texture archive) – natively, and with XCL_SPLIT_WAVE64=1 (new in ba905cf: forces the split wave64 form on RDNA, which runs both wave sizes, so the NVIDIA path can be checked on AMD). XDefiant (title screen correct, 6 299 translated pipelines, 0 translation errors), Minecraft and Unicorn Overlord run.

One change on top (593a237): with #84 every view heap goes into the shared heap and is created CPU-only, so a heap that found no room there is a non-shader-visible PC heap – binding it in pc_heaps would be invalid. A title's own view heap is now bound only when it is shader visible; otherwise the shared heap stays bound, as before.

<!-- greyfinch-sync:ivall/xcl:comment:7097359457 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/69#issuecomment-7097359457). Originally posted by [ivall](https://github.com/ivall) on 2026-11-23T09:59:48Z. --- Merged. Checked on an RX 9070 (RDNA4): `cargo test --workspace` with the retail samples (shader pack, console DLLs, texture archive) – natively, and with `XCL_SPLIT_WAVE64=1` (new in ba905cf: forces the split wave64 form on RDNA, which runs both wave sizes, so the NVIDIA path can be checked on AMD). XDefiant (title screen correct, 6 299 translated pipelines, 0 translation errors), Minecraft and Unicorn Overlord run. One change on top (593a237): with #84 every view heap goes into the shared heap and is created CPU-only, so a heap that found no room there is a non-shader-visible PC heap – binding it in `pc_heaps` would be invalid. A title's own view heap is now bound only when it is shader visible; otherwise the shared heap stays bound, as before.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!68
No description provided.