xg_xs: implement XGSuggestSwizzleMode export #358
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/358"
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 omonkeyz/xbox-emulator. Originally posted by FilimonEnc on 2026-11-24T05:43:35Z.
Adds export ordinal 24 XGSuggestSwizzleMode to crates/compat/xg_xs:
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:51:11Z.
Thanks. Please cite the source of this signature (it differs from the one in #292), add a console-oracle or unit test of the result, and update the export count in exports_table.rs, whose test fails with the new line.
Imported from omonkeyz/xbox-emulator. Originally posted by FilimonEnc on 2026-11-25T15:41:18Z.
Thanks for catching that. I re-checked the actual call sites in game_scarlett_master.exe (IAT 0x6793f68, thunk 0x5f3ff50, callers at RVA 0xc4b3ce and 0x4eccca2), and they indeed pass const D3D12_RESOURCE_DESC* in RCX, 0 in RDX, and &desc->Layout in R8, expecting an HRESULT in EAX — confirming the signature in #292.
I've updated the PR with:
The verified (desc: *const u8, flags: usize, out: *mut u32) -> i32 signature reusing D3D12Desc::read + optimal_swizzle rules (writing 0x100 | mode).
exports.txt updated to pending with the call-site provenance.
exports_table.rs export count updated from 23 to 24.
Unit test suggest_swizzle_mode_rules covering Texture2D (default/RTV/DSV/UAV), invalid dimensions (E_INVALIDARG), and non-zero flags (E_NOTIMPL).
(If you'd prefer to merge #292 directly since it already covers this, feel free to close this one in favor of #292.)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.