Repository navigation
Conversation
CopyFromSubresource (vtable slot xcl-dev#9) takes an extra u32 argument before src: (dst, plane, sub, arg4, src, row_pitch, slice_pitch). With the old 6-argument signature, src was decoded as row_pitch and rows were copied far outside dst, causing access violations (xcl-dev#477, xcl-dev#662). Update copy_from and xg_oracle to the 7-argument ABI, validate row_pitch, 3D slice_pitch, and destination span readability before writing (logging a bounded warning and returning E_INVALIDARG on invalid spans), and add 2D, 3D, and invalid-span unit tests. Fixes xcl-dev#477 Part of xcl-dev#662
Reject read-only destinations before detiling and copying rows. Reuse the existing committed writable-span check and cover a committed read-only allocation in the XG regression test. Assisted-by: OpenAI Codex (GPT-6)
Open
Contributor
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
This was referenced Nov 24, 2026
IvyNotFound
added a commit
to IvyNotFound/xcl
that referenced
this pull request
Nov 25, 2026
…(port of xcl-dev#976, xcl-dev#992) xcl-dev#976 and xcl-dev#992 are stacked on xcl-dev#684, which is not merged here: xcl-dev#1435 already fixes the 7-argument ABI another way (copy_args tells the two forms apart). Their checks are ported onto xcl-dev#1435's copy_from: the destination span (row and 3D slice pitch, from xcl-dev#684) must be writable memory (dstorage::writable, xcl-dev#976) and the tiled source range readable (shader::readable_range, xcl-dev#992) before anything is detiled or copied. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Open
Contributor
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 XG: fix CopyFromSubresource 7-argument ABI and guard destination span #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.