Skip cached raw descriptor twins when unavailable #23

Open
github-bot wants to merge 1 commit from github-bot/gh-23 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-12-03 03:06 UTC · original
avt0m4t48:perf-skip-disabled-cached-raw-twins → main · +4 −2 · 1 files · 1 commits · draft

Problem

A list-view cache miss always requested a second CPU descriptor. With raw views disabled or the host heap probe unable to allocate twins, no destination could use it. The extra work still entered the raw-twin counter, which could print a nonzero count while the feature was off.

Change

Decide whether to build the second descriptor using the effective process-wide raw-view offset. The recording cache is shared across destination heaps. A first use on a heap without a twin slot can still prepare the twin for a later capable heap when the feature is enabled.

Verification

The extracted cache method, raw-view toggle and window arithmetic matched on synthetic recordings in the default x86-64 and x86-64-v3 compiler layouts. The replay covers switching destination heaps, recording reset, cache saturation, unsupported views, null twins and retained resources. It preserves output descriptors and resource references. The disabled and unsupported cases went from 289 construction attempts to zero. The enabled cases kept all 433 raw descriptor copies. Staged asset policy passed.

The replay uses CPU descriptor stand-ins. D3D12 driver cost and gameplay frame times remain unmeasured.

Standalone GPU tests and combined workspace tests type-checked for Windows x64 MSVC with diagnostics and pure-Rust BLAKE3. The Linux host used a metadata-only mimalloc link declaration because it lacks the MSVC archiver.

**@⁠avt0m4t48** on GitHub · 2026-12-03 03:06 UTC · [original](https://github.com/linkoovosh/LinkoArts-build/pull/23) `avt0m4t48:perf-skip-disabled-cached-raw-twins` → `main` · +4 −2 · 1 files · 1 commits · draft ### Problem A list-view cache miss always requested a second CPU descriptor. With raw views disabled or the host heap probe unable to allocate twins, no destination could use it. The extra work still entered the raw-twin counter, which could print a nonzero count while the feature was off. ### Change Decide whether to build the second descriptor using the effective process-wide raw-view offset. The recording cache is shared across destination heaps. A first use on a heap without a twin slot can still prepare the twin for a later capable heap when the feature is enabled. ### Verification The extracted cache method, raw-view toggle and window arithmetic matched on synthetic recordings in the default x86-64 and x86-64-v3 compiler layouts. The replay covers switching destination heaps, recording reset, cache saturation, unsupported views, null twins and retained resources. It preserves output descriptors and resource references. The disabled and unsupported cases went from 289 construction attempts to zero. The enabled cases kept all 433 raw descriptor copies. Staged asset policy passed. The replay uses CPU descriptor stand-ins. D3D12 driver cost and gameplay frame times remain unmeasured. Standalone GPU tests and combined workspace tests type-checked for Windows x64 MSVC with diagnostics and pure-Rust BLAKE3. The Linux host used a metadata-only mimalloc link declaration because it lacks the MSVC archiver.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 05:21:46 +00:00
This pull request has changes conflicting with the target branch.
  • crates/darner-gpu/src/descriptor/host.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/23/head:github-bot/gh-23'
git switch 'github-bot/gh-23'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-23'
git switch 'github-bot/gh-23'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-23'
git switch 'github-bot/gh-23'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-23'
git switch 'main'
git merge --squash 'github-bot/gh-23'
git switch 'main'
git merge --ff-only 'github-bot/gh-23'
git switch 'main'
git merge 'github-bot/gh-23'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.