Verify upscaler context slot selection and exhaustion on Windows #40
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/40"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T12:35:00Z.
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
c4645bcthe package build passed both adapters withctest --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=errorwith 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