Identify the FidelityFX destroy provider and verify wrapper cleanup #34

Merged
R0Y00 merged 1 commit from upstream-pr/34 into main 2026-11-21 11:27:42 +00:00
R0Y00 commented 2026-11-21 11:26:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T11:26:03Z.


Fixes #33.

On the upscaler route, the loader's create path initializes the provider table by resolving exports from the selected module. Slot 1 resolves to ffxDestroyContext in the packaged upscaler. The provider reads the address of the inner context and the optional allocator. The loader preserves the unsigned 32-bit status while releasing the outer wrapper. The experiment notes give the resolver, table and independently identified export RVAs, the provider's incoming register uses and AMD's public declaration.

The new explicit destroy profile translates both cleanup branches. Its binding checks run before dispatch. The regression uses a source-built provider resolved by name and compares the native caller with its translation on Windows. It checks two null exits, provider and allocator argument identity, cleanup ordering, preserved error codes and unresolved bindings.

Local comparison also ran the same regression against the static translation of all four owned intervals of the packaged loader. The package upscaler was inspected as a file. Its live graphics teardown remains open. No package inputs or generated DLLs are included.

Reproduce with cmake --build --preset dev and ctest --preset dev --no-tests=error -R '^cpu_aot_destroy_contract$' -V.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6528180257 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/34). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T11:26:03Z. --- Fixes #33. On the upscaler route, the loader's create path initializes the provider table by resolving exports from the selected module. Slot 1 resolves to ffxDestroyContext in the packaged upscaler. The provider reads the address of the inner context and the optional allocator. The loader preserves the unsigned 32-bit status while releasing the outer wrapper. The experiment notes give the resolver, table and independently identified export RVAs, the provider's incoming register uses and AMD's public declaration. The new explicit destroy profile translates both cleanup branches. Its binding checks run before dispatch. The regression uses a source-built provider resolved by name and compares the native caller with its translation on Windows. It checks two null exits, provider and allocator argument identity, cleanup ordering, preserved error codes and unresolved bindings. Local comparison also ran the same regression against the static translation of all four owned intervals of the packaged loader. The package upscaler was inspected as a file. Its live graphics teardown remains open. No package inputs or generated DLLs are included. Reproduce with `cmake --build --preset dev` and `ctest --preset dev --no-tests=error -R '^cpu_aot_destroy_contract$' -V`.
upstream-sync closed this pull request 2026-11-24 06:41:04 +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!34
No description provided.