D3D12.X: resource-creation fallbacks accept console descriptions (desc, flags, clear values, heap props) #3729
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3729"
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 Kalmarv on 2026-12-02T20:48:45Z.
Unifies console resource description, resource flag, initial state, optimized clear value, and heap property/flag sanitization across D3D12.X resource-creation and fallback paths.
Consolidates and replaces #3291, #3414, #3418, and #3376 into a single consistent change (417 changed runtime lines across
device_x.rsandreal.rs), addressing every open review finding from those four PRs and follow-up review feedback on this PR.What is in it
device_x::pc_resource_desc): strips buffer-illegal flags (ALLOW_DEPTH_STENCIL,DENY_SHADER_RESOURCE,ALLOW_SIMULTANEOUS_ACCESS) while keepingALLOW_RENDER_TARGET(valid on PC buffers forD3D12_RTV_DIMENSION_BUFFER, without an optimized clear value) andALLOW_UNORDERED_ACCESS; resolves textureRT | DSconflicts by format family (depth families keepDS, color formats keepRT); stripsALLOW_SIMULTANEOUS_ACCESSon depth and MSAA textures; keepsDENY_SHADER_RESOURCEonly whenALLOW_DEPTH_STENCILor video reference flags (0x40 | 0x80) are set; stripsALLOW_CROSS_ADAPTERon textures forced toTEXTURE_LAYOUT_UNKNOWN.device_x::pc_initial_state_for_desc,promote_placed_buffer_uav): derives initial state from the sanitizedpc_flagsinstead of raw console flags and dropsRENDER_TARGET(0x04),DEPTH_WRITE | DEPTH_READ(0x10 | 0x20), andUNORDERED_ACCESS(0x08) whenever the matching PC resource flag is absent; placed console buffers created inUNORDERED_ACCESS(0x08) orRAYTRACING_ACCELERATION_STRUCTURE(0x40_0000) promoteALLOW_UNORDERED_ACCESS(0x04) beforepc_initial_state_for_descincreate_placed_resource_xandplaced_in_heap_xsoplace_at_title_address/sparse::place_buffer_inkeep the UAV flag and state.device_x::pc_clear_for_resource_desc): checks buffer/non-target flags before reading the pointer (returning null even for unreadable pointers), adds21 | 22 | 46 | 47tois_typeless_format, mapsALLOW_DEPTH_STENCILclears unconditionally viadepth_clear_format, resolvesUNKNOWN/typeless clears on concrete render targets, drops the unusedclearargument fromplace_console_bufferandplace_at_title_address, and wirespc_clear_for_resource_descthrough every creation and fallback path (create_placed_resource_x,dev_create_committed_resource_x,create_display_target,placed_in_heap_x,own_memory_if_larger_on_the_pc,create_reserved_with_fallback).ALLOW_DISPLAYrouting (real.rs): routes non-bufferALLOW_DISPLAYtextures indev_create_committed_resource_xthroughcreate_display_target(which now sanitizes desc, heap props, clear value, and initial state), intentionally matching slot #127's committed display-target path (allocating console memory viakernelx::runtime_alloc(D3D_DISPLAY_TARGET)as a plain committed resource rather thanplace_console_texture) and falling through to the existing path ifcreate_display_targetfails; retries sanitized heap properties (pc_heap_properties, preserving CPU-visible console buffers viaCUSTOM + L0with the sameCPUPageProperty) and committed heap flags (pc_committed_heap_flags, stripping console bits,ALLOW_DISPLAY, tier-1DENY_*,HARDWARE_PROTECTED,ALLOW_WRITE_WATCHon non-CUSTOM, andALLOW_SHADER_ATOMICSwithoutSHARED) only onhr < 0, logging both raw and tried values on failure.real.rs): addscreate_reserved_with_fallbackforCreateReservedResourceandCreateReservedResource1(skipping XCL'sown_workand purely PC-native invalid calls), maps console texture layouts (0or> 3) to64KB_UNDEFINED_SWIZZLEwhile keepingROW_MAJORrejected, refuses bytes-per-texel-changing format promotions (85/86/115,116/117,118..=120) soUpdateTileMappingstile counts cannot diverge, masksreserved_3dstate withPC_RESOURCE_STATES, and propagates the actual created PC state fromplaced_in_heap_x/own_memory_if_larger_on_the_pctolut3d::created.device_x::testsandreal::resource_creation_fallback_testscovering all invariants, placed-buffer UAV promotion,ALLOW_RENDER_TARGETbuffers on WARP,ALLOW_DISPLAYbuffer bypass, and prior review regressions.Tested
rustc 1.99.0 (b940084d7 2026-09-28), DXC 1.9.2609, debug + release.cargo build --release -p xcl: ok, 39 warnings (matchesorigin/main5ad98adbc: 39 warnings, 0 new warnings)..\scripts\test.ps1(with DXC 1.9.2609):3010 passed, 0 failed, 52 ignoredacross 44 targets (SKIPPEDGPU tests on this adapter: 24 — 22no wave64, 2no heap windows), including all 25hle::d3d12x::device_x::testsand all 3hle::d3d12x::real::resource_creation_fallback_tests(WARP D3D12 coverage for reserved, placed, committed, and display-target fallbacks).Regression run
Not tested
XCL_SAMPLE_*environment variables (52 ignored).place_at_title_addressend-to-end execution of a placed buffer created inUNORDERED_ACCESSwithoutALLOW_UNORDERED_ACCESS(verified bypromote_placed_buffer_uav+pc_initial_state_for_descunit tests and code inspection ofsparse::place_buffer_in, not an end-to-end UMA unit test).CreateReservedResource1,CUSTOM+L0CPU-visible console buffers, orALLOW_DISPLAYcommitted targets beyond the WARP integration tests and theea3b5e4dsmoke run.AI use
Imported from ivall/xcl. Originally posted by jsalzy on 2026-12-03T01:25:46Z.
merge-check claim
head:
e751b21215Imported from ivall/xcl. Originally posted by jsalzy on 2026-12-03T01:34:23Z.
merge-check
base:
078358a058head:
e751b21215merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 3011 passed, 0 failed, 52 ignored (44 test binaries); SKIPPED: 25 (22 no wave64 on this GPU; 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: none. All 5 tests the PR adds ran and passed, the two child-process WARP tests included (not skipped). git diff --check clean; 39 compiler warnings, the same as main.
title run: not run
review: (1) This PR says it replaces #3291, #3376, #3414 and #3418 (same author), but only #3291 is closed. #3376 (display-target and committed heap flags/properties), #3414 (pc_resource_desc flag invariants) and #3418 (optimized clear values) are still open and each makes part of this same change in an earlier form, so they should be closed once this lands. (2) All of it is on by default for every title: pc_resource_desc strips more flags on every resource (buffer RT/DS/DENY_SR/SIMULTANEOUS, texture RT+DS by format family, DENY_SR without DS, CROSS_ADAPTER on all textures); initial states are derived from the PC flags; optimized clear values on non-target resources and buffers are dropped; and ALLOW_DISPLAY committed resources through the older CreateCommittedResource now take the display-target path, as the newer #127 method already does on main. The PR names no retail run of those paths beyond one smoke title, and there's no AMD run here (the PR is gpu:both). (3) Minor: pc_clear_for_resource_desc still hands an unreadable clear pointer through unchanged for render targets and depth buffers, as pc_clear_for_desc did before; pc_initial_state_for_desc keeps an unused _orig_flags parameter. Checked and fine: the flag rules match D3D12's (no SIMULTANEOUS_ACCESS on buffers, depth or MSAA; DENY_SHADER_RESOURCE only with ALLOW_DEPTH_STENCIL or the video reference flags; no RT+DS together; no CROSS_ADAPTER with an UNKNOWN layout). pc_initial_state still turns UNORDERED_ACCESS into DEPTH_WRITE on depth buffers, now using the PC flags, and then drops RT, depth and UAV states whose resource flag is gone. Clear values are checked against the PC description before the pointer is read; depth families map to their one typed DSV format, and an UNKNOWN or typeless clear on a typeless color texture is dropped instead of passed on. The committed-resource retry with sanitized heap properties and flags runs only after the first call fails. The reserved-resource fallback leaves PC-native invalid calls alone and refuses format promotions that change bytes per texel, so tile counts can't drift. The buffer paths now pass a null clear value. The state each path actually used now reaches lut3d::created. Duplicates: I searched open and merged PRs for pc_resource_desc, optimized clear value, ALLOW_SIMULTANEOUS_ACCESS, DENY_SHADER_RESOURCE, CreateReservedResource1, ALLOW_DISPLAY committed, clear value typeless, initial state resource flags and heap flags committed console, and checked #1607's groups (none lists 3729, 3376, 3414 or 3418). Same change in part: open #3376, #3414 and #3418, as in (1).
performance: none worth measuring (reasoned): a few flag operations per resource creation, and the heap retry only after a failure. Older-API ALLOW_DISPLAY committed resources now also take their size in the title's memory through the allocation hook, as newer-API ones already do on main.
verdict: safe to merge: no blocking finding, and the suite passes, the WARP fallback tests included. It supersedes the author's still-open #3376, #3414 and #3418, which should be closed (review (1)).
hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.
Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:24:22Z.
Code review location:
crates/xcl/src/hle/d3d12x/device_x.rs; line 1354Finding 1 (medium, read not run): a placed buffer created in
UNORDERED_ACCESSwithoutALLOW_UNORDERED_ACCESSloses its UAV flag.sparse::place_buffer_in(untouched here) masks a buffer's flags toALLOW_UNORDERED_ACCESSand adds that flag back when the state it is handed hasUNORDERED_ACCESSorRAYTRACING_ACCELERATION_STRUCTURE. Onmainthis call site handsplace_at_title_addressthe title's state with only the console bits masked (pc_initial_state), so a buffer with flags 0 created in state 0x8 at a title address becomes a reserved buffer with the UAV flag, in UAV state. Here the state goes throughpc_initial_state_for_descfirst, which drops 0x8 because the description has no flag 4, soplace_buffergets state 0 and the buffer is made without the flag, in COMMON. The same happens inplaced_in_heap_x's heap-block path (real.rs, theplace_at_title_addresscall). After thatCreateUnorderedAccessViewon it takes the no-UAV branch (a null PC view), and the title's barriers to and from UAV name a state the resource cannot have.place_console_buffer(committed buffers) still passes the unsanitized state and keeps the promotion, so the two paths now differ.Suggested: keep 0x8 for buffers in
pc_initial_state_for_desc(the promotion downstream is what makes it valid), or pass the unsanitized state toplace_at_title_addressas before. A test of it needs unified memory, which the new tests do not bring up.Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:24:22Z.
Code review location:
crates/xcl/src/hle/d3d12x/real.rs; line 3942Finding 2 (medium, read not run): this early return changes what an older-method
ALLOW_DISPLAYresource is, and it is not limited to textures.On
maina committed texture with heap flag 0x8 through this method goes on toplace_console_texture→create_placed_resource_x: it is placed at a unified-memory address and gets that path's bookkeeping (vram,title_textures,depth_uav::note_created,lut3d::created); only if that declines is it committed with the title's heap flags. With this return it is always a plain committed PC resource with heap flags 0, and:create_display_targetcalls the title's allocation hook (kernelx::runtime_alloc(size, D3D_DISPLAY_TARGET)) for the texture's console size. That was written for the newer method (#127); a title that creates display targets through the older method now gets a hook call it did not get before, and nothing gives that memory back when the target is released;CreateCommittedResourceincreate_display_targetfails, itshris returned and the path that works onmainis not tried;place_console_buffer, ends up outside unified memory, andpc_heap_properties(props, false, …)treats it as a texture.The description's "Not tested" says no title exercised this. Is there a title where the older method's display target fails on
mainand this fixes it? If so, a line about it would help; if the aim is only consistency with #127, limiting the return to textures and falling through to the existing path whencreate_display_targetfails would keep what works today.Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:24:22Z.
Code review location:
crates/xcl/src/hle/d3d12x/device_x.rs; line 832Question (low): is
ALLOW_RENDER_TARGET(0x01) really invalid on a PC buffer?D3D12_RTV_DIMENSION_BUFFERexists, and as far as I know D3D12 refuses only depth-stencil, simultaneous access and deny-shader-resource on buffers. The unit test asserts the strip, but the WARP "raw description is rejected" cases have no buffer with 0x01 alone. If the PC accepts it, stripping it here also drops aRENDER_TARGETinitial state and the clear value for such a buffer. Not verified on a device from my side.Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:24:22Z.
Review: COMMENTED
Review of
e751b212(code reading and the runs named below, not a merge-check) · 2 findings, 1 questionIn short: for textures the new flag, state and clear rules only change combinations the PC refuses today, and the two retries (committed heap properties / flags, reserved resources) run only after a first call failed, so resources that are created fine on
mainkeep their path there. Two places do change behaviour for creations that work onmain(inline): a placed buffer the title creates inUNORDERED_ACCESSwithout the UAV flag, and a committedALLOW_DISPLAYresource through the older method. Neither was reached by the runs below, and the PR's tests run without unified memory, so they do not pin either.Measured (RTX 3080, Ryzen 9 7950X, merge of this head onto
main078358a0)cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 3011 passed, 0 failed, 52 ignored; 25 SKIPPED, the same tests as onmain(22 no wave64, 2 no heap windows, 1 driver cache).scripts/smoke.ps1, 60 s, release, offline: 1674 frames, exit 0x0, 0 device removals, 0 crashes, peak commit 18940 MB (main078358a0, same title and time: 1677 frames, 17992 MB). The start screen only, not the 3D world.mainand here, so finding 2's path was not run; its log has no resource-creation warning on this head.Not checked: AMD and Intel; a title that takes either path of the findings; the reserved-resource retry on a real title (it needs a call the PC refuses first); whether packed-mip tile counts stay the same on a retried reserved texture.
Review by Claude Code (Claude Fable 5.2), with an independent second read by a subagent (Claude Fable 5.2) whose points were checked before use, posted without a human check of each point. An automated PR review workflow is running at the request of the user.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T02:41:28Z.
Thanks @vasanex for the careful review! All three points are fixed in
26eaea260:UNORDERED_ACCESSwithoutALLOW_UNORDERED_ACCESS(device_x.rs,real.rs): addeddevice_x::promote_placed_buffer_uav(&mut d, raw_state)and called it beforepc_initial_state_for_descin bothcreate_placed_resource_xandplaced_in_heap_x's heap-block path. When the raw state (masked byPC_RESOURCE_STATES) includesUNORDERED_ACCESS(0x08) orRAYTRACING_ACCELERATION_STRUCTURE(0x40_0000),ALLOW_UNORDERED_ACCESS(0x04) is promoted on the sanitized PC desc first so0x08is preserved intoplace_at_title_address/sparse::place_buffer_in, matchingmainandplace_console_buffer.ALLOW_DISPLAYindev_create_committed_resource_x(real.rs): limited thecreate_display_targetearly call to non-buffer resources (Dimension != D3D12_RESOURCE_DIMENSION_BUFFER) and fall through tomain's path ifcreate_display_targetreturnshr < 0(create_display_targetreturns onhr < 0before callingkernelx::runtime_alloc). Added a WARP regression test verifying a CPU-visible console buffer withALLOW_DISPLAY | 0x2C2bypassescreate_display_targetand remainsMap()-able.ALLOW_RENDER_TARGET(0x01) on buffers (device_x.rs): verified empirically on WARP — WARP acceptsD3D12_RESOURCE_DIMENSION_BUFFERwithALLOW_RENDER_TARGET(0x01) andD3D12_RESOURCE_STATE_RENDER_TARGET(0x04) whenpOptimizedClearValueisNone, and rejects the same buffer when a non-null clear value is passed (E_INVALIDARG). Updatedpc_resource_descto keep0x01on buffers (stripping only0x02 | 0x08 | 0x20) whilepc_clear_for_resource_desccontinues to drop clear values on buffers, and added both WARP cases togpu_pc_resource_desc_state_and_clear_accepted_on_warp.Re-verified on
26eaea260(cc @jsalzy):cargo build --release -p xcl: ok, 39 warnings (0 new vsmain5ad98adbc)..\scripts\test.ps1(DXC 1.9.2609):3010 passed, 0 failed, 52 ignored(24 SKIPPED: 22no wave64, 2no heap windows).ea3b5e4d, RTX 5070 Ti):exit: 0x0,1693frames (60 60 61presents/2 s),0device removals,0crashes,17408 MBpeak commit (updated in the PR description).python scripts/pr_check.py --local:description ok(thePR descriptioncheck on GitHub is currently hitting a repo-widepull_request_targetstartup_failure).Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:50:24Z.
Code review location:
crates/xcl/src/hle/d3d12x/device_x.rs; line 1354Fixed in
26eaea26: both call sites promote the UAV flag on the sanitized description before the state is sanitized, so the state reachesplace_at_title_addressas onmain. (I cannot mark the thread resolved from this account.)Checked by reading the delta
e751b212..26eaea26, not rerun. Follow-up by Claude Code (Claude Fable 5.2), posted without a human check; an automated PR review workflow is running at the request of the user.Added 04:00Z: whole suite and smoke now run on this head merged onto
main395405e4(RTX 3080, Ryzen 9 7950X):cargo test --workspace --no-fail-fast -- --test-threads=4: 3017 passed, 0 failed, 56 ignored, 25 SKIPPED (the same tests as onmain); 60 s offline smoke: 1697 frames, exit 0x0, 0 device removals, 0 crashes, peak commit 17983 MB (main: 1689 frames, 18158 MB).Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:50:26Z.
Code review location:
crates/xcl/src/hle/d3d12x/real.rs; line 3942Buffers and the failure case are fixed in
26eaea26: a buffer no longer takes the early return, and a failedcreate_display_targetfalls through to the existing path. What remains as before: a texture with heap flag 0x8 through the older method thatcreate_display_targetcreates successfully is still a plain committed resource instead of a placed one (none of the placed path's bookkeeping, plus the allocation-hook call). If that is the intent, as for #127, a line in the description is enough; no title here takes that path, so I cannot measure either way.Checked by reading the delta
e751b212..26eaea26, not rerun. Follow-up by Claude Code (Claude Fable 5.2), posted without a human check; an automated PR review workflow is running at the request of the user.Imported from ivall/xcl. Originally posted by vasanex on 2026-12-03T02:50:28Z.
Code review location:
crates/xcl/src/hle/d3d12x/device_x.rs; line 832Answered in
26eaea26: the flag stays on buffers, the clear value is still dropped, and the WARP test covers both cases. Thanks for checking it on a device.Checked by reading the delta
e751b212..26eaea26, not rerun. Follow-up by Claude Code (Claude Fable 5.2), posted without a human check; an automated PR review workflow is running at the request of the user.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T05:18:23Z.
merge-check
base:
078358a058head:
26eaea260bmerge: clean
build: ok
tests: 3011 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 5 medium, 3 nits (below)
performance: 60 s smoke run: 1669 → 1669 frames (100 % of main), peak commit 17577 → 18114 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 234 s there, 0 device removals, 0 crashes, 2.7 presents/s; run with
XCL_SKIP_CS=95cc13288a27a96e(the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)verdict: not yet:
PR descriptionis red; otherwise no blocking finding, the suite passes and the smoke run is cleanhardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
In short: The PR merges four earlier PRs into one commit: it cleans up console resource flags, initial states, optimized clear values and committed heap properties/flags, and adds retry paths for committed and reserved resources; the push since
e751b212keeps ALLOW_RENDER_TARGET on buffers, gives placed buffers back their UAV flag, and limits the older-method ALLOW_DISPLAY path to textures, trying the existing path when it fails. Reading the code shows no bug that blocks merging: the new rules only change descriptions the PC refuses today, and the retries run only after a first call failed. Still open: one default-path reroute for older-method display-target textures, the size and mixed scope, the meaning conflict with open #3141, unguarded RTV/DSV calls on the flag that gets dropped, and missing caller-level tests.Medium
e751b212: buffers are now excluded and a failed create_display_target falls through (real.rs ~3942-3953). A texture created with heap flag ALLOW_DISPLAY through the older method (slot 76) still goes to create_display_target first. It no longer goes through place_console_texture / create_placed_resource_x, so on unified memory it loses that path's bookkeeping (vram, title_textures, depth_uav::note_created, lut3d::created). It also now calls kernelx::runtime_alloc(D3D_DISPLAY_TARGET), and nothing gives that memory back when the target is released. The PR names no title that needs this. Either say which title fails on main without it, or try create_display_target only after the existing path fails.e751b212. It holds five separate changes: flag rules, initial states, clear values, committed heap props/flags with the ALLOW_DISPLAY route, and the reserved-resource retry. CONTRIBUTING asks for one logical change and about 400 lines, and over 800 lines the description must say why it cannot be split. The description only says it merges four earlier PRs. Split it, or at least add that reason and make each part its own commit.& 0xFFmask. A test merge of the two heads conflicts in pc_resource_desc. Agree with #3141's author which reading is right before either one lands.Nit
" at warn (real.rs ~3908), even when the existing path that follows creates the resource. Log at info there, or only when the fallback also fails.
Checked and fine
e751b212is fixed: promote_placed_buffer_uav restores ALLOW_UNORDERED_ACCESS for UNORDERED_ACCESS / RAYTRACING_ACCELERATION_STRUCTURE states in create_placed_resource_x and placed_in_heap_x, before the state is cleaned up, so sparse::place_buffer_in gets state 0x8 as on main395405e4; the description's two smoke blocks are from main5ad98adband the head26eaea26on the same title for 60 s (1693 vs 1240 frames, 17408 vs 16798 MB peak commit, no removals or crashes)How this was tested
078358a0, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main078358a0and on this merge; presents per 2 s at the end: 60 60 60.XCL_RUN_SECONDS=300and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-03T05:22:36Z.
Thanks @Foniass for the thorough merge-check and 234 s title run! Leaving HEAD at
26eaea260untouched to preserve the verified run — the red PR description check is the repo-wide pull_request_target startup_failure currently hitting all open PRs (python scripts/pr_check.py --local passes with description ok on26eaea260).Imported from ivall/xcl. Originally posted by Foniass on 2026-12-03T15:33:18Z.
merge-check
base:
078358a058head:
26eaea260bmerge: clean
build: ok
tests: 3011 passed, 0 failed, 52 ignored; 28 skipped, the same as on main
review: 5 medium, 3 nits (below)
performance: 60 s smoke run: 1669 → 1669 frames (100 % of main), peak commit 17577 → 18114 MB, no device removal, no crash
title run: retail title on the RTX 5070 Ti (driver 621.14), into the world by scripted presses: 234 s there, 0 device removals, 0 crashes, 2.7 presents/s; run with
XCL_SKIP_CS=95cc13288a27a96e(the NVIDIA hang at the end of loading, #3541) and NVIDIA's 2048 MB shader heap (#2590)verdict: safe to merge: no blocking finding (the points below are medium or nits), the suite passes and the smoke run is clean
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
In short: The PR merges four earlier PRs into one commit: it cleans up console resource flags, initial states, optimized clear values and committed heap properties/flags, and adds retry paths for committed and reserved resources; the push since
e751b212keeps ALLOW_RENDER_TARGET on buffers, gives placed buffers back their UAV flag, and limits the older-method ALLOW_DISPLAY path to textures, trying the existing path when it fails. Reading the code shows no bug that blocks merging: the new rules only change descriptions the PC refuses today, and the retries run only after a first call failed. Still open: one default-path reroute for older-method display-target textures, the size and mixed scope, the meaning conflict with open #3141, unguarded RTV/DSV calls on the flag that gets dropped, and missing caller-level tests.Medium
e751b212: buffers are now excluded and a failed create_display_target falls through (real.rs ~3942-3953). A texture created with heap flag ALLOW_DISPLAY through the older method (slot 76) still goes to create_display_target first. It no longer goes through place_console_texture / create_placed_resource_x, so on unified memory it loses that path's bookkeeping (vram, title_textures, depth_uav::note_created, lut3d::created). It also now calls kernelx::runtime_alloc(D3D_DISPLAY_TARGET), and nothing gives that memory back when the target is released. The PR names no title that needs this. Either say which title fails on main without it, or try create_display_target only after the existing path fails.e751b212. It holds five separate changes: flag rules, initial states, clear values, committed heap props/flags with the ALLOW_DISPLAY route, and the reserved-resource retry. CONTRIBUTING asks for one logical change and about 400 lines, and over 800 lines the description must say why it cannot be split. The description only says it merges four earlier PRs. Split it, or at least add that reason and make each part its own commit.& 0xFFmask. A test merge of the two heads conflicts in pc_resource_desc. Agree with #3141's author which reading is right before either one lands.Nit
" at warn (real.rs ~3908), even when the existing path that follows creates the resource. Log at info there, or only when the fallback also fails.
Checked and fine
e751b212is fixed: promote_placed_buffer_uav restores ALLOW_UNORDERED_ACCESS for UNORDERED_ACCESS / RAYTRACING_ACCELERATION_STRUCTURE states in create_placed_resource_x and placed_in_heap_x, before the state is cleaned up, so sparse::place_buffer_in gets state 0x8 as on main395405e4; the description's two smoke blocks are from main5ad98adband the head26eaea26on the same title for 60 s (1693 vs 1240 frames, 17408 vs 16798 MB peak commit, no removals or crashes)How this was tested
078358a0, thencargo build --workspaceandcargo test --workspace --no-fail-fast -- --test-threads=4.scripts/smoke.ps1: 60 s of a retail title on main078358a0and on this merge; presents per 2 s at the end: 60 60 60.XCL_RUN_SECONDS=300and scripted A presses counted from the first frame (XCL_PRESS_BASE=frame, #3712) into the world from an existing save; time in the world is counted from the first in-world draw call to the end of the run.Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point.
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.