Repository navigation
Conversation
Console command list slot #146 is ID3D12GraphicsCommandList7::Barrier(NumBarrierGroups, pBarrierGroups) on both older and newer layouts; previously it emitted only a wildcard UAV barrier, dropping every texture layout transition. - Parse D3D12_BARRIER_GROUP (GLOBAL, TEXTURE, BUFFER) safely with readable() checks; unparseable calls fall back to the legacy global UAV barrier. - Map D3D12_BARRIER_LAYOUT 0..=31 including 0x1F (DIRECT_QUEUE_GENERIC_READ_COMPUTE_QUEUE_ACCESSIBLE) and fall back to access bits for console-only layouts > 0x1F; align device #127/#133 initial layout states with texture-vs-buffer awareness. - Track whole-resource states across #127/#133 creation, legacy #26, and enhanced #146 (cleared on res_release) for UNDEFINED Before layouts, forward emitted transitions to title_textures::note_transitions, emit wildcard aliasing barriers for UNDEFINED placed textures, keep non-UAV textures out of UNORDERED_ACCESS, and skip states disallowed on compute/copy lists.
Owner
Author
|
Upstream PR xcl-dev#1025 was closed or merged. |
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.
Translate console command list slot
#146(ID3D12GraphicsCommandList7::Barrier(NumBarrierGroups, pBarrierGroups)) into legacyResourceBarriercalls instead of emitting only a wildcard UAV barrier. Modern Scarlett titles that create resources with barrier layouts (device#127/#133) rely on#146for all render-target, depth, shader-resource, and copy layout transitions; dropping those transitions left targets stuck in their initial states.(The diff is ~950 lines as one self-contained module: ~520 lines for parsing, layout mapping, state tracking, and legacy barrier translation, plus ~395 lines of unit and GPU tests.)
What is in it
crates/xcl/src/hle/d3d12x/enhanced_barrier.rs: parsesD3D12_BARRIER_GROUP(GLOBAL,TEXTURE,BUFFER) withreadable()guards (falling back to the legacy global UAV barrier on unparseable calls), mapsD3D12_BARRIER_LAYOUT0..=31(including0x1F) plus access-bit fallback for console-only layouts> 0x1F, tracks whole-resource states forUNDEFINEDbefore layouts, emits aliasing barriers forUNDEFINEDplaced textures, skipsUNORDERED_ACCESSon non-UAV textures and states disallowed on compute/copy lists, forwards emitted transitions totitle_textures::note_transitions, and includes 13 unit + GPU tests.crates/xcl/src/hle/d3d12x/device_x.rs,real.rs,list_x.rs,mod.rs: wire slot#146toenhanced_barrier::barrier_x, align#127/#133initial layout states with texture-vs-buffer awareness, record initial/legacy barrier states, and clear tracked state onres_release.Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), release + test profilescargo test --workspace -- --test-threads=4: 741 passed, 0 failed, 41 ignored (0 SKIPPED GPU tests)Regression run
main:
PR:
Not tested
AI use
origin/main, cleaned up unused helper/constant warnings, ran the full GPU test suite and 60 s smoke regression check, and drafted this description.Mirror of xcl-dev#1025 (auto-synced, do not edit).