Repository navigation
D3D12.X: the depth plane of an R24G8 buffer has a twin, drawn into the plane before its DSV is bound - #3089
D3D12.X: the depth plane of an R24G8 buffer has a twin, drawn into the plane before its DSV is bound#3089imnicho wants to merge 3 commits into
Conversation
|
I checked two previously untested boundaries at head Native precision, RTX 5070 / NVIDIA 616.92. The same instrumented binary ran the 18-draw EQUAL/stencil oracle on a 16×16 console D16S8 target in four fresh processes: the PR's R16_UINT conversion and a test-only R16_UNORM/float alternative, each on the RTX and on WARP. All 256 stencil bytes matched for both conversions on the RTX. On WARP, the PR conversion matched all 256, while the alternative had four mismatches (counts 385, 898, 1412, 1924). This independently reproduces the WARP distinction; on this RTX and sampled count set, both conversions matched. It does not establish equivalence for all counts. Two mips, WARP + D3D12 debug layer. Distinct patterns in two mips of an R32 twin produced the expected D24 depth values, within one quantization step, for all 256 base-mip and 64 second-mip texels under each initial state: both planes The two-mip check covers one array slice and depth-plane readback; it does not verify stencil contents or physical GPU behavior for that case. Neither fixture is a retail title or performance test. AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixtures; Codex reviewed and prepared this report. |
|
CI: the "Build and test" job's 2 failures are the base's, not this PR's. The run shows 1771 passed, 2 failed, 28 ignored. The two are AI use: Claude Code with Claude Fable 5.2 read the CI log and wrote this. |
aca8939 to
3b12e0b
Compare
|
Real-GPU counts for this PR from both Linux/Wine lanes. Heads-up first: we ran head Hardware
Filters
That set includes the five Tested: the 24 matching tests per lane per switch setting at |
|
Independent Windows check of #3089 head For this check I made a local test-only fixture change: enable the D3D12 debug layer before creating the device, require an Command for each case: AI use: Codex (GPT-6.2 Sol) prepared the fixture and ran these tests. |
|
Follow-up to my earlier row on this PR: we re-ran at the new head Same as Tested: the 24 matching tests per lane per switch setting at |
|
merge-check Windows results. verdict: not yet Review verdict: not yet. I found two boundaries outside the existing GPU fixtures:
Locally tested candidate for point 2. Keep immutable views per native destination in the cell, and attach the SRV heap, DSV heap and twin to that destination under distinct private GUIDs with Local candidate diff for the alias lifetime (including test hook)diff --git a/crates/xcl/src/hle/d3d12x/depth_uav.rs b/crates/xcl/src/hle/d3d12x/depth_uav.rs
index fe7e9eb5..014f27d0 100644
--- a/crates/xcl/src/hle/d3d12x/depth_uav.rs
+++ b/crates/xcl/src/hle/d3d12x/depth_uav.rs
@@ -104,7 +104,7 @@ struct Inner {
/// [depth, stencil]
twins: [Option<Twin>; 2],
/// an R24G8 buffer's depth twin: the views `before_dsv_bind` draws it into the plane with
- pass: Option<PassViews>,
+ passes: HashMap<usize, PassViews>,
/// `bind::activity`'s count of dispatches when the twin was last drawn into the plane
drawn_at: Option<u64>,
}
@@ -265,7 +265,7 @@ fn register(res: usize, x: &[u8; 0x38], at: Option<usize>, pc_state: u32) -> boo
Default::default()
}
// (an object XCL did not see released: its membership goes back)
- Some(old) => leave(cells, &old.cell),
+ Some(old) => leave(cells, &old.cell, res),
};
drop(g);
drop(gone);
@@ -289,13 +289,14 @@ pub(super) fn by_address<R>(f: impl FnOnce() -> R) -> R {
/// One object of `cell` is gone; the last one takes the Cell with it, and its twins, which the
/// caller drops outside every lock (their Release goes through `real::res_release`).
#[must_use]
-fn leave(cells: &mut HashMap<Key, Arc<Cell>>, cell: &Arc<Cell>) -> [Option<Twin>; 2] {
+fn leave(cells: &mut HashMap<Key, Arc<Cell>>, cell: &Arc<Cell>, res: usize) -> [Option<Twin>; 2] {
let mut inner = cell.inner.lock().unwrap();
+ inner.passes.remove(&res);
inner.members = inner.members.saturating_sub(1);
if inner.members == 0 && cells.get(&cell.key).is_some_and(|c| Arc::ptr_eq(c, cell)) {
cells.remove(&cell.key);
// (views and heaps of the PC's own, not adopted: their release calls nothing of XCL's)
- (inner.pass, inner.drawn_at) = (None, None);
+ (inner.passes, inner.drawn_at) = (HashMap::new(), None);
return std::mem::take(&mut inner.twins);
}
Default::default()
@@ -308,7 +309,7 @@ pub(super) fn forget(res: usize) {
}
let Some(o) = OBJECTS.remove(res) else { return };
REGISTERED.fetch_sub(1, Ordering::Relaxed);
- let gone = CELLS.lock().unwrap().as_mut().map(|cells| leave(cells, &o.cell));
+ let gone = CELLS.lock().unwrap().as_mut().map(|cells| leave(cells, &o.cell, res));
drop(gone);
}
@@ -644,13 +645,20 @@ fn note_plane_state(o: &Object, b: &[u32; 8]) {
/// its own, and a DSV of each level and slice of the depth plane of the object `of` (level `m`,
/// slice `a` at `m * array + a`), then each once more with the stencil plane read only. Heaps
/// of the PC's own, not adopted.
+#[derive(Clone)]
struct PassViews {
- of: usize,
srv_heap: ID3D12DescriptorHeap,
dsv_heap: ID3D12DescriptorHeap,
dsv_inc: usize,
}
+#[cfg(test)]
+pub(super) fn pass_heap_for_test(res: usize) -> Option<ID3D12DescriptorHeap> {
+ let o = OBJECTS.get(res)?;
+ let inner = o.cell.inner.lock().unwrap();
+ inner.passes.get(&res).map(|p| p.srv_heap.clone())
+}
+
// D3D12 objects are free-threaded
unsafe impl Send for PassViews {}
unsafe impl Sync for PassViews {}
@@ -814,7 +822,20 @@ unsafe fn make_pass_views(dev: *mut c_void, of: usize, twin: &ID3D12Resource, ke
}
}
}
- Some(PassViews { of, srv_heap, dsv_heap, dsv_inc })
+ Some(PassViews { srv_heap, dsv_heap, dsv_inc })
+}
+
+/// A recorded command list borrows descriptors and resources. Keep each pass's dependencies
+/// until its destination is actually destroyed, including when XCL defers that destruction.
+unsafe fn retain_pass_views(of: usize, pass: &PassViews, twin: &ID3D12Resource) -> bool {
+ let raw = of as *mut c_void;
+ let Some(dest) = ID3D12Resource::from_raw_borrowed(&raw) else { return false };
+ let srv = windows::core::GUID::from_u128(0x913c5c24e9c34f0a8c7ae2e36c3caeaf);
+ let dsv = windows::core::GUID::from_u128(0xf0a0bb4d165848bcaa00708b334aaee7);
+ let tex = windows::core::GUID::from_u128(0x6c51e87a5ead4deb89e3755c69fad178);
+ dest.SetPrivateDataInterface(&srv, &pass.srv_heap).is_ok()
+ && dest.SetPrivateDataInterface(&dsv, &pass.dsv_heap).is_ok()
+ && dest.SetPrivateDataInterface(&tex, twin).is_ok()
}
/// Before OMSetRenderTargets binds the DSV at `dsv` on `list` (`real::cl_om_set_render_targets`).
@@ -851,7 +872,7 @@ pub(super) unsafe fn before_dsv_bind(list: *mut c_void, dsv: usize) {
if state[0] == STATE_UNKNOWN {
return left("the title moved a part of the depth plane to a state of its own");
}
- let (twin, n, dev, srv_heap, table, dsv_base, dsv_inc) = {
+ let (twin, n, dev, srv_heap, table, dsv_base, dsv_inc, _pass) = {
let mut inner = cell.inner.lock().unwrap();
let Some(t) = inner.twins[0].as_ref() else { return };
if inner.drawn_at == Some(now) {
@@ -859,16 +880,21 @@ pub(super) unsafe fn before_dsv_bind(list: *mut c_void, dsv: usize) {
return;
}
let (twin, n, dev) = (t.res.clone(), t.n, t.dev as *mut c_void);
- if inner.pass.as_ref().map(|p| p.of) != Some(d.res) {
- inner.pass = make_pass_views(dev, d.res, &twin, &key, r16);
+ if !inner.passes.contains_key(&d.res) {
+ let Some(pass) = make_pass_views(dev, d.res, &twin, &key, r16) else {
+ drop(inner);
+ return left("its views could not be made");
+ };
+ if !retain_pass_views(d.res, &pass, &twin) {
+ drop(inner);
+ return left("its views could not be retained");
+ }
+ inner.passes.insert(d.res, pass);
}
- let Some(p) = inner.pass.as_ref() else {
- drop(inner);
- return left("its views could not be made");
- };
+ let p = inner.passes.get(&d.res).unwrap().clone();
let views = (p.srv_heap.as_raw() as usize, p.srv_heap.GetGPUDescriptorHandleForHeapStart().ptr, p.dsv_heap.GetCPUDescriptorHandleForHeapStart().ptr, p.dsv_inc);
inner.drawn_at = Some(now);
- (twin, n, dev, views.0, views.1, views.2, views.3)
+ (twin, n, dev, views.0, views.1, views.2, views.3, p)
};
let Some(pl) = pass_pipelines(dev) else { return left("the pass could not be made") };
let (mips, array) = (key.mips.max(1) as u32, key.array.max(1) as u32);Locally verified candidate for the clear path@@ clear_target(res, named) in depth_uav.rs
- let twins = o.cell.inner.lock().unwrap().twins.each_ref().map(|t| t.as_ref().map(|t| t.res.as_raw() as usize));
+ let mut inner = o.cell.inner.lock().unwrap();
+ let twins = inner.twins.each_ref().map(|t| t.as_ref().map(|t| t.res.as_raw() as usize));
let c = clear_choice(twins, named);
+ if let Clear::Twin(t) = &c {
+ if o.cell.key.format == 44 && twins[0] == Some(*t) {
+ inner.drawn_at = None;
+ }
+ }No paired title smoke or performance run in this check. Host: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), rustc 1.99.1; the focused depth fixture used WARP. AI use: Codex (GPT-6.2 Sol) inspected the paths, wrote and ran the local regression and candidate; Codex (GPT-6.2 Astra) independently reviewed the lifetime and state boundaries. |
|
Test report for #3089 on NVIDIA: the whole workspace suite on this PR merged onto today's Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the tests above on the hardware named and wrote this report. |
|
Tested on the retail title, RTX 3090, Windows 11, with Stack (exact)
Read The title's tiled lighting draws each material permutation as a separate full-tile pass, with an EQUAL depth test and no The title keeps the buffer in DEPTH_WRITE while the compute program writes it. There is no transition into or out of Measured
Deduced Without the plane, only permutation 0 (z = 0) passed EQUAL. A tile of one other material alone was then never shaded, and Not covered
Found and written with Claude Code (Claude Opus 5.5), checked and posted by me. 🤖 Generated with Claude Code |
|
Review note: the pass pipelines are made at the first DSV bind, on the recording thread
On the retail title (same stack and env, RTX 3090) that call stayed in the driver for more than 30 s:
None of 13 runs of the same stack and env without this PR stopped that way. When the pipelines were made off that thread, the same build step took 36,958 ms. That was on RTX 3090, with the system at The change we ran (on top of 3b12e0b):
In that run the pipelines were ready about 74 s before the first bind that needed them, and 0 binds were left waiting. I Found and written with Claude Code (Claude Opus 5.5), checked and posted by me. 🤖 Generated with Claude Code |
|
Correction to my test report above: the window part was wrong. Same binary and env as that run, minus two diagnostic dump switches ( The light squares result stands: 0 bright cells again in this run (3 without the PR). AI use: found and written with Claude Code (Claude Opus 5.5), checked and posted by me. |
|
This now conflicts with Would you rebase it onto current AI use: found and written with Claude Code (Claude Opus 5.5), checked and posted by me. |
3b12e0b to
8de5808
Compare
|
Rebased onto
Tested on the new head: 22 depth-twin tests passed (5 of them on WARP in child processes), and the regression runs in the description (1,465 frames against Not run by me: the title's world on this head, for the same reason as on #3094 (my caches are of the AI use: Claude Code with Claude Fable 5.2 did the merge and the changes and wrote this comment. 🤖 Generated with Claude Code |
|
Source follow-up on current head
Please elide a pass only when a pass for that destination was recorded earlier in the same live command-list recording, with no intervening twin write. Reset or discard must clear that proof; the existing clear path must still invalidate it. A focused regression can close and reset an unsubmitted list, bind the same DSV, submit, and compare a fenced depth readback with the twin's known values. The current WARP fixture covers sequential binds, clear routing and heap retention, but not a discarded recording. This is a source trace on the exact head; I did not run a GPU or title test of it. AI use: OpenAI Codex (GPT-6.2 Sol) checked the current source and discussion; OpenAI Codex (GPT-6.2 Astra) independently traced the reset and resource lifetimes. |
…t drawn into the plane), not for a PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e plane before its DSV is bound A retail title's tiled lighting tests a console D16_UNORM_S8_UINT buffer (R24G8 on the PC) with EQUAL, after a compute program wrote a count for each pixel into its depth plane through a UAV. The title keeps the buffer in a depth state all the while, so no transition says when the plane was written, and a D3D12 copy cannot put a colour texture into a 24-bit plane. With XCL_DEPTH_UAV_TWIN_R24=1 (off by default; the other depth twins stay as they are) the depth plane of an R24G8 buffer gets a twin in depth_uav: R16 for the console's 16-bit depth formats, else R32. resolve_uav makes the title's UAV a view of it, and before_dsv_bind draws it into the plane, by a pass of XCL's own that writes SV_Depth, before the title's bind of a DSV of the buffer, when a dispatch was recorded since the buffer's last pass. A 16-bit twin is read as a count and written as count * (1.0f / 65535), the product the title's vertex shader makes. The planes' states are followed as the PC gets the title's transitions (PARK where the title has the buffer in UNORDERED_ACCESS); the pass moves the depth plane to DEPTH_WRITE and back and does not move the stencil plane. After review of the first version on nvidia-dev: - a clear of the twin makes the next bind draw it again (thehollowedone); - the pass's views are kept one set an object of the buffer, and the object itself keeps their two heaps until the PC destroys it, so a recorded list never names a heap that is gone (thehollowedone); - the pass's pipelines are made on a thread of their own where the twin is made, not on the recording thread at the first bind; a bind that comes before they are ready is left out and the next one draws (CharlyRien). The SV_Depth pass and the 16-bit steps are raylitebull's, from xcl-dev#1989 and its follow-up on amd-dev (3cda5be). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…t drew it After the review of 8de5808 (thehollowedone): the note that a buffer's twin was drawn into its plane was the buffer's, set while recording. A recording that was reset and never submitted then spared the next recording its pass, and a pass for one object of a buffer spared another object's. The proof is now the list's live recording's and the object's (list_x::plane_drawn): which object's plane was drawn, at which count of dispatches and of clears of the twin. A Reset and a KickoffX clear it, as they clear depth_in_step. The WARP test resets its list and binds again: the new recording draws. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
8de5808 to
e228ed5
Compare
|
New head @thehollowedone, the recording-lifetime case on The WARP test follows your regression as far as the bind: after its first recording it resets the list and binds the same DSV with no dispatch and no clear in between, and the new recording draws. It does not submit that second recording and read the plane back; the first recording's readback is what it had. Tested on the new head: 22 depth-twin tests passed (5 on WARP in child processes), and the regression run in the description (1,321 frames against A correction to the description of Still not run by me: the title's world on AI use: Claude Code with Claude Fable 5.2 wrote the changes and this comment. 🤖 Generated with Claude Code |
|
Update on current head The console slot-31 remap forwards to PC Please route slot 31 through list-state tracking. A NULL call must retire the old private snapshot and transition its buffer out of Regression: set a suppressing predicate through slot 85, disable it through slot 31, bind the first eligible DSV, then issue a title draw and verify its output by readback. This is a source trace; I did not run this sequence on a GPU. AI use: OpenAI Codex (GPT-6.2 Sol) traced the dispatch and list-state paths; OpenAI Codex (GPT-6.2 Astra) independently checked predicate state and latching. |
|
Main's depth_uav module (#3290) still returns a null view for the depth plane of an R24G8 buffer. This PR adds that case behind XCL_DEPTH_UAV_TWIN_R24=1, with a plane-only pass before the DSV bind ( AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
After the review of e228ed5 (thehollowedone): the pass's draws were recorded while a predicate the title set with SetPredicationBufferX was on, so a failing predicate left the pass undrawn while the recording noted the plane as drawn. depth_only_pass takes the predicate off for its draws and sets it again after them from the list's own copy of the value the title's call latched (pred_buf), not from the title's memory. A predicate the title sets by the PC's own SetPredication, which XCL does not follow, still decides the pass's draws. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
New head @thehollowedone, the predication case on Two things it does not do, both in the description:
Regression run in the description: 1,551 frames against A word on scope, said with thanks for the findings on this PR and on #3094, every one of them real: this PR has grown from 437 to 575 lines of code by taking them. Where a further case is a defect in what the PR does today I will keep fixing it here; where it is a wider model (submission order, slot 31's predicate), I think it belongs in a follow-up, and I am glad to review or write one. AI use: Claude Code with Claude Fable 5.2 wrote the change and this comment. 🤖 Generated with Claude Code |
|
merge-check AI-written and posted by Foniass without a human check of each point. |
|
@Foniass thank you for the read and the second regression run. On the findings, on
What I will do, and one thing I would like settled first. The draft #3547 brings amd-dev's depth work, which has its own Nothing was built or run for this comment. AI use: Claude Code with Claude Fable 5.2 read the review against the code and wrote this comment. 🤖 Generated with Claude Code |
|
World test of Setup
What the log shows with the switch on
Picture (frames ≥ 2100, mean of every dumped frame)
Off: the cell is dark except the window. On: the door frame, the edge of the left wall and the figure are lit as well; walls and floor stay black. No device removal, no crash. Targets at frame 2802 (switch on)
So the lighting draws see the room now, but on most pixels they still do not pass. The hatch looks like the EQUAL test passing on some texels and failing on their neighbours, i.e. the plane's values matching the title's vertex depth on only part of the surface. I have not confirmed that with a pixel history yet; that is my next run, and I will add it here. Not checked
Tool and model: Claude Code, Claude Opus 5.5 (ran the builds and runs on the hardware above, measured the frames, wrote this report). |
With
XCL_DEPTH_UAV_TWIN_R24=1, the depth twins reach the depth target a retail title's lighting draws test (#970): the depth plane of an R24G8 buffer gets a twin the title's compute program can write, and the twin is drawn into the plane before the buffer's DSV is bound. The default is unchanged (off).Rebased onto
mainand merged with #3290 there, with what the reviews asked for. Three commits onmain493dbd3dd: the merge, and what two reviews of it (as8de5808d8ande228ed5da) asked for; the head isa9aa32db5. The old head3b12e0b25(onnvidia-dev) is what the reports below from before 1 December tested.This is not a second twin implementation.
mainhas depth UAV twins (hle/d3d12x/depth_uav.rs, on by default since #3290). This PR adds, inside that module, the one case it still turns away: the depth plane of an R24G8 buffer, which is the buffer the title's lighting uses. Nothing of the existing twins is replaced, and this one has a switch of its own because the others are on by default now.Plan comment: #970 (comment)
What is in it
On
maina UAV of the depth plane of an R24G8 buffer is still a null view ("its depth plane has no twin yet"), and the twins the module makes are copied around the title's transitions into and out of UNORDERED_ACCESS. The title's target is a consoleD16_UNORM_S8_UINT(console format 118), R24G8 on the PC, and the title keeps it in a depth state while its compute program writes it (@CharlyRien measured that onmainwith #3287's transitions: the planes are in DEPTH_WRITE or in read states at the bind, never in UNORDERED_ACCESS). So there is no transition to hang a copy on, and a D3D12 copy cannot put a colour texture into a 24-bit plane anyway.In that module, behind
XCL_DEPTH_UAV_TWIN_R24=1:resolve_uavmakes the UAV a view of it.before_dsv_bind, called fromcl_om_set_render_targets, records a pass of XCL's own that writesSV_Depthfrom the twin into every level and slice of the plane, before the title's bind of a DSV of the buffer. It is left out when this recording of the list already drew the twin into the plane of the same object and no dispatch was recorded and no clear of the twin made since (bind::activity): then nothing wrote the twin.count * (1.0f / 65535), the float0x37800080. That is the product the title's vertex shader makes for the draw that tests the plane with EQUAL. Read as R16_UNORM the same texel can come out one unit in the last place off, which in 24 bits is another value for some counts.list_x::depth_only_pass); view heaps, topology, viewports, scissors, blend factor, stencil reference, vertex buffers, render targets and the pipeline the title had set are set again after it.plan_with, with D3D12.X: depth UAV twins on by default, stencil twins copied with the plane #3290'sPARKwhere the title has the buffer in UNORDERED_ACCESS. The pass moves the depth plane to DEPTH_WRITE and back where the title has it elsewhere, and is left out (a line says so) after a transition of part of that plane. It does not move the stencil plane: its DSV names that plane read only where the title has it in DEPTH_READ.After the reviews:
A clear of the twin makes the next bind draw it again:
ClearUnorderedAccessView*writes the twin andbind::activitydoes not count it (@thehollowedone's first point, with the candidate from that comment).The pass's views live as long as a recorded list can name them. They are kept one set an object of the buffer, not one a buffer, and the object itself keeps their two descriptor heaps (private data of the PC's object, past XCL's hook) until the PC destroys it. XCL puts that off until the queues are past the work in flight, so a bind of another object of the buffer, or the title's release, no longer frees a heap a recorded pass names (@thehollowedone's second point; the candidate from that comment without the twin, whose own release is put off the same way).
The pass's pipelines are made on a thread of their own, where the twin is made (a title makes that UAV at load), not on the recording thread at the first bind. A bind that comes before they are ready is left out with a line, before the buffer is marked drawn, so the next one draws (@CharlyRien, who saw that first bind wait over 30 s in the driver on a PC short of memory, until the title's watchdog ended it).
What spares a pass is the recording's own. The note that a twin was drawn was the buffer's, set while recording, so a recording that was reset and never submitted spared the next one its pass, and a pass for one object of a buffer spared another's. It is now kept with the list's live recording and the object (
list_x::plane_drawn), next todepth_in_stepand cleared where that is: at a Reset and at a KickoffX (@thehollowedone, on8de5808d8).The pass runs with the title's predicate off. Its draws were recorded while a predicate the title set with SetPredicationBufferX was on, so a failing predicate left the pass undrawn while the recording noted the plane as drawn.
depth_only_passtakes the predicate off for its draws and sets it again after them from the list's own copy of the value the title's call latched (pred_buf), not from the title's memory (@thehollowedone, one228ed5da).The
SV_Depthpass and the 16-bit steps are @raylitebull's, from #1989 and its follow-up onamd-dev(3cda5bea).Size: 3 files, 575 lines of code and 463 of tests. That is more than a PR should be; about 140 lines of it are points 6 to 10.
Not in it (the module's header says so too):
SetPredication(console slot 31), which XCL passes on without following it, still decides the pass's draws.Tested
On this head (debug, RTX 5080 16 GB, driver 610.47, Windows 10 22H2):
cargo test -p xcl --lib -- --test-threads=1 depth_uav r24g8 twin: 22 passed, 0 failed, noSKIPPEDline (17 of the module, 5 on WARP in child processes; the crate's outputs cleaned first: see the note under "Not tested").cargo test -p xcl --lib -- --test-threads=1 list_x::tests predication: 105 passed, 0 failed.cargo test -p xcl --lib -- --test-threads=4gives no count on this PC: plainmain(d0832e614) ends the test process partway here. After 1,376 testsalloc_pool::tests::a_reset_that_puts_the_allocator_aside_keeps_what_the_gpu_still_readsfails and the process stops withsparse upload preparation still failed after bounded retries – the title is stopped before its GPU submission(exit 0x80004005); one test at a time (--test-threads=1 hle::d3d12x) plainmainstops the same way insparse::tests::a_buffer_over_a_remapped_tile_reads_the_new_pageafter 739 tests. This PR's firstmain-based head stopped the same way at four threads. CI has the whole suite. (Correction: this line said before that the head was run one test at a time too. Those two runs were of plainmain's binary, not the head's: see the note under "Not tested".)New and changed tests (WARP, synthetic shaders):
gpu_a_depth_twin_is_drawn_into_the_r24g8_plane_before_its_dsv_is_bound: an R32 twin with 256 different values; after the bind hook the plane, read back, holds each within one 24-bit step. A second bind with no dispatch between records no second pass; after a clear of the twin the next bind records one again, and the one after that none; the buffer holds the pass's two heaps, and still holds them after XCL has forgotten it. Then the list is reset: the new recording's first bind draws again, with no dispatch and no clear in between.gpu_an_equal_test_at_a_counts_depth_passes_where_the_16_bit_twin_holds_the_count: a console format 118 buffer, an R16 twin holding a count for each texel, then 18 draws with the depth test EQUAL atcount * (1.0 / 65535.0)that count the stencil up. The stencil plane, read back, is 1 on exactly the texels that hold a drawn count and 0 on the others. Twelve of the counts are ones where the product and the correctly roundedcount / 65535are different floats. With the pass changed to read the twin as R16_UNORM (not in the PR) this test fails on WARP at four of them: 385, 898, 1412 and 1924.the_states_of_an_r24g8_buffers_planes_follow_the_titles_transitions, and the format cases ina_depth_view_is_a_view_of_a_twin_of_the_planes_size.In the title, on this head: not run by me (see "Not tested"). What there is:
main7a649b0 with D3D12.X: depth UAV twins on by default, stencil twins copied with the plane #3290's stencil half and other changes, the first version ported, Series X size): the class buffer's depth plane (2560x1440) goes from one value to 38 distinct ones, among them exactly the 24-bit values of the title's permutations; the bright 128-px cells of the tiled lighting go from 3 to 0 at two times in two runs; at least 512 passes on that one buffer, 0 binds left without one, no device loss in 320 s of world. (The clean window of that report was withdrawn by its author: it came from that run's set-up.)nvidia-dev), mine (RTX 5080, Series S profile, the tree of my #1989 report): without it the room after the opening cutscene stays unlit in 3 of 3 runs; with it the room is lit in 3 of 3, one of them 600 s with 679 frames after the world's set-up and 1,024 passes logged, about two a frame. A version of the pass that moved both planes to DEPTH_WRITE lost the device in 4 of 4 runs, which is why the stencil plane is not moved.Regression run
scripts/smoke.ps1, 60 s,XCL_PREPARE=0, each built in release from a clean worktree. The switch is off in these runs, as it is by default.main(d0832e614):This PR (
a9aa32db5):Three kept runs of this binary gave 1,110, 1,551 and 1,533 frames; the block is the second. The first came straight after an hour of long title runs on this PC, the other two a few minutes later. (A new binary's very first run fills its caches and is not kept, as for
main.)Not tested
nvidia-devtree, andmainbuilds every pipeline anew; the 60 s runs above do not reach the buffer. A run of mine onmainwith this head will follow as a comment.mainpass with it. A bind left out while the pipelines are being made has no test (the test waits for them).crates/xcl/tests(eachd3d12_*one takes about 9 minutes here).8de5808d8that stood here was from a build I cannot vouch for either. Every count on this page now is from a build whose log names this worktree as compiled, with the crate's outputs cleaned first.AI use
Claude Code with Claude Fable 5.2 wrote the code and the tests, ran the suite and the regression runs, and wrote this description.
🤖 Generated with Claude Code