Repository navigation
DirectStorage: submitted cancellation, intermediate_size, and physical-page destinations - #21
Merged
Merged
Conversation
…l-page destinations
Collaborator
|
Reviewed and merged, thanks – the physical-page reads / writes follow XCL's page model (a page is at its home or where it is mapped), and BCPack / hardware swizzle modes are refused instead of faked. Checked together with #21, #22 and #25 on top of current main: full workspace tests pass (277 lib tests, e2e, console_dlls_e2e, gpu_pso_e2e, rpf_e2e), no new build warnings. |
rootw0rm
pushed a commit
to rootw0rm/xcl
that referenced
this pull request
Nov 27, 2026
…wports/scissors/topo) into ListDrawRecord List slots xcl-dev#34 (SetGraphicsRootSignature), xcl-dev#50 (OMSetRenderTargets), xcl-dev#47 (IASetIndexBuffer), plus PC-side xcl-dev#20/xcl-dev#21/xcl-dev#22 (topology, viewports, scissors) store into ListDrawRecord. SetPipelineState (xcl-dev#25) now merges instead of overwriting so PSO-first or state-first order both keep the full record. Store-only: no draw, no validation, no execute; triangle/ bias FAILs stay failing. Evidence: new draw_s2_list_state_recorded_pre_draw fails pre-change (S2 symbols absent at HEAD: grep count 0) and passes post; full lib 806 passed, 0 failed, 1 ignored; both cargo checks clean; title null 4 FAILs identical to HEAD-baseline worktree run (triangle, present, bias-xcl-dev#94, all D3D12.X GPU-only, + pre-existing files:delete also on HEAD), delta 0; Vulkan 3 (triangle, bias-xcl-dev#94 + same files:delete); retail HOLDS (exit 139 @ exe+0x2237320, SIGSEGV fault 0, 20 stubs, xgr XAsync/XNetworking/XUser, 0 d3d12).
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.
Summary
Implements three console DirectStorage (
xcrdapi.dll) enhancements incrates/xcl/src/hle/dstorage.rs:Cancellation of already-submitted requests (
CancelRequestsWithTag):{ up_to_seq, mask, value }cancellation rules in shared queue state (pruned as the worker advances).workerbeforependinginQueueInner::submit()so concurrent submissions preserve strict FIFO ordering.IDStorageStatusArrayXorDSTORAGE_ERROR_RECORD, while leaving requests enqueued afterCancelRequestsWithTagunaffected.Entry::Signalin an RAIIFenceRefsoID3D12FenceCOM references are never leaked on close or error.Multi-stage decompression /
intermediate_size:DSTORAGE_REQUEST_OPTIONSbitfield (ZlibDecompressbit 0,BcpackModebits 1..=4,SwizzleModebits 5..=20,DestinationIsPhysicalPagesbit 21,SourceTypebit 22,SourceIsPhysicalPagesbit 23).source_size < intermediate_size <= destination_size(zero-padding any trailing destination bytes), validates two-stage bounds (E_DESTINATION_SIZE), and refuses unsupported BCPack / hardware swizzle modes withE_DECOMPRESSION.Physical-page destinations and sources (
DestinationIsPhysicalPages/SourceIsPhysicalPages):MEM_WRITE_WATCH), while the non-virtual mode in the0x48-byteDSTORAGE_REQUESTtargets 64 KiB physical page arrays (DestinationPageArray+DestinationPageOffset@0x10;SourcePageArray+SourcePageOffset@0x28).PULONG_PTRpage arrays at enqueue time and exportsPHYS_PAGE_SIZE,read_physical_pages, andwrite_physical_pagesincrates/xcl/src/hle/kernelx.rs(obeyingAWAY -> PHYS_BLOCKSlock order and validating all pages before copying, including pages mapped into reserved virtual address space).Testing
crates/xcl/src/hle/dstorage.rs:cancel_pending_and_submitted_requests_by_tag,multi_stage_intermediate_size_validation_and_zlib,physical_page_destinations_and_sources.tests/testtitle/src/gpu.rs::direct_storagee2e check withDestinationIsPhysicalPages+DestinationPageOffsetandCancelRequestsWithTag.cargo build --workspace(0 new warnings) andcargo test --workspace -- --test-threads=4all passing (243 lib + 12console_dlls_e2e+ 1console_shaders+ 1e2e+ 6gpu_pso_e2e+ 3xg_oracle).