Verify upscaler context slot selection and exhaustion on Windows #40

Merged
R0Y00 merged 1 commit from upstream-pr/40 into main 2026-11-21 12:36:43 +00:00
R0Y00 commented 2026-11-21 12:35:00 +00:00 (Migrated from github.com)

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 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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6528839888 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/40). Originally posted by [R0Y00](https://github.com/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 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)
upstream-sync closed this pull request 2026-11-24 06:41:05 +00:00
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
R0Y00/Xbox2Windows!40
No description provided.