Repository navigation
Conversation
… buffer `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in` fails on this machine (RTX 4090, driver 621.24) on `main`, and it is the only thing that fails in the crate's 86 descriptor tests here. The natural reading is that `raw_at` copies the wrong descriptor into the slot. This test asks the question the other way round: it takes the view `raw_at` makes, moves it into a shader-visible heap as it is, binds it, and has a compute shader read the buffer through it. If the view did not name its buffer, the shader would read something else. It passes here. So the view is right and the bytes of a descriptor slot are not the thing to compare: the driver does not put D3D12's documented layout there - the first two dwords are not the resource's address, in either the mode where a view is made in the slot or the one where it is made beside and copied in - and two slots for the same view need not hold the same bytes. What that means for the test above is left alone here, on purpose: it is someone's invariant on other drivers and turning it off is a decision with evidence from more than one card. This adds the check that can be trusted in its place. Measured on main 1fff691 with this change: cargo test -p leonida-gpu --lib -- --test-threads=1 descriptor:: 86 passed, 1 failed (that one), 5 ignored cargo clippy -p leonida-gpu --all-targets 0 warnings Not checked: a card that is not this one, and WARP - the test returns early where there is no host GPU. Written with an AI assistant.
|
Verified the shader readback at 74512d6 on native Windows with both an RTX 5070 (616.92) and Microsoft WARP. I extended the synthetic source buffer to two consecutive 256-byte ranges. The shader, dispatch, destination and descriptor-copy path stayed the same; only the source view's byte offset changed between runs.
Each run identified the selected adapter by device LUID and checked every word after dispatch. This confirms the new test observes the buffer range selected by raw_at on both adapters. On this 5070 the previous descriptor-byte comparison also passed, as reported in #2570. Codex-assisted. |
|
The shader readback isolates a descriptor-buffer-dependent failure on RADV. I tested
All rows used the same binary. A fresh isolated run of the stock shader reproduced failure at default, failure with only The full readback compares all 64 words at offsets 0 and 256, plus a 128-byte view at offset 256 whose last 32 reads must be zero. The test still includes the copy to the shader-visible heap, so the extension result locates a configuration dependency without distinguishing every step in the descriptor path. AI-assisted, independently checked against the raw results. |
|
CORRECTION to my earlier descriptor-buffer report. The stock test and my earlier fixture both pass I reran
All 14 valid runs matched all 192 checked words per run, including zeroes outside the shorter view. Binding the existing |
|
Thanks - RTX 5070 and WARP both reading all 64 words at both offsets is more than I could run here, and it is the negative control the test needed: a view that names its buffer reads it, on hardware and on the software adapter. AI-assisted: yes - DeepSeek v4.1 (flash). Written with an AI assistant. |
descriptor::host::tests::views_are_made_beside_the_heap_and_copied_infails on this machine (RTX 4090, driver 621.24) on
main, and it is the onlything that fails in the crate's 86 descriptor tests here. The natural reading
is that
raw_atcopies the wrong descriptor into the slot.This test asks the question the other way round: it takes the view
raw_atmakes, moves it into a shader-visible heap as it is, binds it, and has a
compute shader read the buffer through it. If the view did not name its
buffer, the shader would read something else.
It passes here. So the view is right and the bytes of a descriptor slot are
not the thing to compare: the driver does not put D3D12's documented layout
there - the first two dwords are not the resource's address, in either the
mode where a view is made in the slot or the one where it is made beside and
copied in - and two slots for the same view need not hold the same bytes.
What that means for the test above is left alone here, on purpose: it is
someone's invariant on other drivers and turning it off is a decision with
evidence from more than one card. This adds the check that can be trusted in
its place.
Measured on main 1fff691 with this change:
cargo test -p leonida-gpu --lib -- --test-threads=1 descriptor::
86 passed, 1 failed (that one), 5 ignored
cargo clippy -p leonida-gpu --all-targets 0 warnings
Not checked: a card that is not this one, and WARP - the test returns early
where there is no host GPU.
Written with an AI assistant.