XG: require writable memory for CopyFromSubresource #970
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/976"
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 ivall/xcl. Originally posted by Marukooh on 2026-11-24T09:48:14Z.
Stacked on #684. Only the top commit,
807fbfb, belongs to this PR.CopyFromSubresourcewrites rows to the caller's destination. The range check in #684 also accepts committed read-only memory. Use the existing DirectStorage writable-range check so the call returnsE_INVALIDARGbefore copying to a read-only destination. This addresses the destination check noted in the review of #684.What is in it
Tested
CachyOS, Intel Core i9-14900KF, NVIDIA RTX 5070 Ti (driver 620.73.04), Proton Experimental, patched vkd3d-proton 3.1, DXC 1.9.2609.5. Windows GNU Release build with Rust 1.98.0.
On
807fbfb, the workspace cross-build and test build succeeded. Under Proton, XG tests passed 6/6 and DirectStorage tests passed 13/13 (zero failed or ignored in either filter).With just the regression assertion added to the upstream #684 head
e56dbc3, the read-only case terminated the synthetic test process. It returnsE_INVALIDARGand passes on this PR.Workspace attempt under Proton:
cargo test --locked --release --workspace --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4. The test binaries reported 708 passed, 14 failed and 41 ignored, with 89 GPU skip markers included in those totals. Several suites hit Vulkan device-initialization failures. The doctest target could not launch rustdoc in this setup. The full run is not green.Regression run
Both 60-second smoke runs used the same retail title on the RTX 5070 Ti with Proton and the
scripts/linux/smoke.shhelper from #257. Both usedVKD3D_CONFIG=ignore_shared_fence,single_queueafter the default Vulkan device creation failed. The Windows process-commit counter reported 0 MB under Wine, so these runs do not measure peak commit.Not tested
Native Windows and the native retail smoke pair.
AI use
OpenAI Codex (GPT-6) wrote the follow-up and its regression case, ran the local checks, and prepared this description.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:28:51Z.
Independent verification, merged onto current
main384f7f7locally (clean merge).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
cargo test -p xcl --lib hle::xg::: 6 passed, 0 failed — includes the newcopy_from_rejects_invalid_dst_spancovering the writable-memory requirement.cargo test -p xcl --test xg_oracle: 6 passed, 0 failed, 12 ignored (console-library comparisons needXCL_SAMPLE_*; the layout/copy oracle tests that run locally all pass).AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:23:31Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:42:01Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:34:38Z.
Triage (#1607) – head
807fbfbStacked on #684 (its commit
af9f9bbis the same patch as #684'se56dbc3); only807fbfbis this PR's own: the CopyFromSubresource destination check goes fromshader::readabletodstorage::writable, with a read-only test case. No other open PR makes that change.Main has changed since this was opened.
adccb7d("XG CopyInto/FromSubresource take the newer library's added argument") already handles the 7-argument ABI, and it handles both forms per call throughcopy_args, because a retail game calls both. The base commit hardcodescopy_fromto the 7-argument form, so a rebase has to keep main'scopy_argsand put only the destination span and writable checks on top of it.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-12-02T22:50:49Z.
@Marukooh the base of this moved: #684 is carried on by #3738, rebased onto
main'scopy_args, and it already uses yourdstorage::writablecheck (credited in its commit), so this PR may have nothing left after it; #992 can rebase onto #3738.AI use: Claude Code (Claude Opus 5.5) wrote this.
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.