Verify upscaler context slot selection and exhaustion on Windows #40

Manually merged
github merged 1 commit from gh-pr/40/head into gh-pr/40/base 2026-11-26 21:23:41 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-21 12:35 UTC · original
R0Y00:codex/ffx-backend-slots → main · +285 −18 · 11 files · 1 commits · merged 2026-11-21 12:36 UTC

Change

Continue the local upscaler translation from the fifth descriptor heap through the backend context-selection result. The provider supplies its own index field at offset 0xec. The first free 96-byte record receives the descriptor cursors, ranges and occupancy flag. Exhaustion returns zero, preserves the caller's index and increments the scratch counter.

Fixes #37.

Verification

At commit c4645bc the package build passed both adapters with ctest --test-dir out/build/ffx-device -R '^ffx_device_init_' --no-tests=error -V. On the RTX 4060 Laptop and WARP both debug layers reported zero warnings and errors. First use produced index 0 and count 1. A second call retained the sentinel and raised the count to 2. The controlled two-slot case selected index 1 and preserved it as occupied on a subsequent exhausted call. Compared the entire scratch and guarded provider field against an independent native Windows control.

The default build completed ctest --preset dev --no-tests=error with 64 passes, two wave64 capability skips and no failures. The public WARP control checks observable writes. A source-owned MASM fixture additionally compares native and translated scan and vector arithmetic, including wraparound.

Evidence and follow-up

On the default resource path the provider reloads the index into R8D. The first device call for FSR4UPSCALER_Recurrent requests ID3D12Resource at Xbox slot 76. This edge was traced statically; #39 tracks returning an actual Windows resource. The local binary and generated translation are excluded. The tests and fixtures are original repository contributions under MIT.

Experiment and reproduction commands

**@⁠R0Y00** on GitHub · 2026-11-21 12:35 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/40) `R0Y00:codex/ffx-backend-slots` → `main` · +285 −18 · 11 files · 1 commits · merged 2026-11-21 12:36 UTC ## Change Continue the local upscaler translation from the fifth descriptor heap through the backend context-selection result. The provider supplies its own index field at offset 0xec. The first free 96-byte record receives the descriptor cursors, ranges and occupancy flag. Exhaustion returns zero, preserves the caller's index and increments the scratch counter. Fixes #37. ## Verification At commit c4645bc the package build passed both adapters with `ctest --test-dir out/build/ffx-device -R '^ffx_device_init_' --no-tests=error -V`. On the RTX 4060 Laptop and WARP both debug layers reported zero warnings and errors. First use produced index 0 and count 1. A second call retained the sentinel and raised the count to 2. The controlled two-slot case selected index 1 and preserved it as occupied on a subsequent exhausted call. Compared the entire scratch and guarded provider field against an independent native Windows control. The default build completed `ctest --preset dev --no-tests=error` with 64 passes, two wave64 capability skips and no failures. The public WARP control checks observable writes. A source-owned MASM fixture additionally compares native and translated scan and vector arithmetic, including wraparound. ## Evidence and follow-up On the default resource path the provider reloads the index into R8D. The first device call for FSR4UPSCALER_Recurrent requests ID3D12Resource at Xbox slot 76. This edge was traced statically; #39 tracks returning an actual Windows resource. The local binary and generated translation are excluded. The tests and fixtures are original repository contributions under MIT. [Experiment and reproduction commands](https://github.com/R0Y00/Xbox2Windows/blob/c4645bc/docs/experiments.md#backend-context-slot-selection)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:23:39 +00:00
github manually merged commit c4645bc33b into gh-pr/40/base 2026-11-26 21:23:41 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.