Repository navigation
Conversation
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Tested: current PR head merged onto current Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
|
Rerun on the new head
First run, on Why: d3d12.dll's pipeline object answers those four IIDs with a pointer other than the pipeline's own, so the check
So without the debug layer, a title's Tested:
Not tested: a title, a release build, AMD / Intel (another driver's objects may answer these IIDs differently). AI use: Claude Code (Claude Opus 5.5) ran the tests and the scratch QI test, and wrote this report. |
…M methods Part of xcl-dev#1333 Part of xcl-dev#1566 Follow-up to 625a0f3 in shared stand-in pipelines (`hle/d3d12x/standin.rs`): - In `shell()`, re-check `SHARED` on re-lock after concurrent `make()` misses so losing threads reuse the winning `Arc<Shared>`, skip double-AddRefing `root_signature`, suppress duplicate power-of-two log lines, and release the redundant driver pipeline outside `SHARED.lock()`. - In `query_interface()`, zero `*ppv` even when `riid` is null, accept only the five single-inheritance `ID3D12PipelineState` IIDs (`IUnknown`, `ID3D12Object`, `ID3D12DeviceChild`, `ID3D12Pageable`, `ID3D12PipelineState`), validate via the underlying pipeline's `QueryInterface` and release its returned pointer (allowing real `d3d12.dll` subobject pointers distinct from `pipeline` for base IIDs), and return `E_NOINTERFACE` for any other interface. - In `set_private_data()`, reject `(size != 0, data.is_null())` with `E_INVALIDARG` without erasing existing data and clear the entry when `size == 0`; in `set_name()`, reject null with `E_INVALIDARG` and store the NUL-terminated UTF-16 name per shell under `WKPDID_D3DDebugObjectNameW`. - Add unit tests covering concurrent `shell()` races, `QueryInterface` on both synthetic tearoff/secondary mocks and a real D3D12 compute `ID3D12PipelineState`, `SetPrivateData` validation/clearing, and per-shell `SetName` round-trips. Assisted-by: Google Antigravity (Gemini 4 Neon)
bmjask
left a comment
There was a problem hiding this comment.
P1: head 9c48d84 appears to make an existing unit test deterministically fail. is_pipeline_iid at standin.rs:137-139 allows only five D3D12 IIDs, and query_interface returns E_NOINTERFACE before forwarding any other IID (:141-146). But the existing a_shell_has_the_drivers_interfaces_and_its_own_references_and_private_data test still expects query_interface(s, &KNOWN, &mut out) == S_OK at :350-359; KNOWN (765a30f3-f624-4c6f-a828-ace948622445) is none of the five allowed IIDs. Please update/remove that legacy assertion to use a pipeline IID, or preserve the intended previous QI behavior, and rerun the tests from the current head.
9c48d84 to
0738c30
Compare
|
Great catch
(Re |
|
AMD RDNA4 / Linux (Proton Experimental) test report on head Hardware & environment
Isolated unit tests (
Combined 300 s retail sanity run (release,
Not tested
AI use
|
|
Independent amd-win test report for head Tested
Not tested
AI use |
Part of #1333
Part of #1566
What is in it
Follow-up to 625a0f3 in shared stand-in pipelines (
crates/xcl/src/hle/d3d12x/standin.rs):shell()misses (shell):SHAREDafter a miss and out-of-lockmake(), re-check whether another thread already populatedkey. If so, drop the lock, immediatelyunrefthe redundant driver pipeline outsideSHARED.lock(), and reuse the winningArc<Shared>without double-AddRefingkey.root_signatureor emitting duplicate power-of-two log lines.query_interface(is_pipeline_iid,query_interface):*ppvwhenppvis non-null, including whenriidis null.ID3D12PipelineStatehierarchy IIDs implemented byShell's vtable (IUnknown,ID3D12Object,ID3D12DeviceChild,ID3D12Pageable,ID3D12PipelineState): validate with the underlying driver pipeline'sQueryInterface,unref(out)the driver pointer (zero refcount leak), and returnthiswithadd_ref(this). Do not requireout as usize == pipeline, because reald3d12.dllpipeline objects return a distinct subobject pointer forIUnknown/ID3D12Object/ID3D12DeviceChild/ID3D12Pageablewithout the debug layer (caught by@fromthemoonx). ReturnE_NOINTERFACEfor any non-pipeline interface.set_private_datavalidation and implement per-shellset_name(set_private_data,set_private_data_interface,set_name):guid.is_null()or(size != 0 && data.is_null())withE_INVALIDARGwithout erasing existing private data, and clear the entry whensize == 0(regardless of whetherdatais null).nameinset_namewithE_INVALIDARGand store the NUL-terminated UTF-16 name per shell underWKPDID_D3DDebugObjectNameW(keepingaddrefunder thedatalock inget_private_datato avoid TOCTOU UAF).standin::tests):concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline: barrier-synchronized two-thread race confirming both shells share one driver pipeline, the loser pipeline drops torefs == 0, androot_signaturerefcount stays exact.query_interface_rejects_secondary_interfaces_and_zeroes_out_on_null_riid: checks null-riid*ppvzeroing, all five single-inheritance IIDs (including distinct subobject pointer forIUnknownreleasing the driver ref cleanly without leaking), and secondary IID rejection.query_interface_on_real_d3d12_pipeline_accepts_hierarchy_and_rejects_other: builds a real D3D12 computeID3D12PipelineState, wraps it withshell(), and verifiesS_OK+out == sfor all five hierarchy IIDs (IUnknown,ID3D12Object,ID3D12DeviceChild,ID3D12Pageable,ID3D12PipelineState) andE_NOINTERFACE+out.is_null()forID3D12DebugCommandList(cleanly skips if no DXC or D3D12/WARP device).set_private_data_validation_and_per_shell_set_name: checks(size != 0, null)preservation,size == 0clearing with non-null pointer, nullset_namerejection, and per-shellWKPDID_D3DDebugObjectNameWUTF-16 round-trip.Tested
cargo test -p xcl --lib hle::d3d12x::standin::tests -- --test-threads=1 --nocapture):2 passed, 3 failed—concurrent_shell_miss_reuses_winner_and_releases_loser_pipelinekept both driver pipelines alive and double-logged2 driver pipelines,query_interface_rejects_secondary_interfaces_and_zeroes_out_on_null_riidleft*ppvnon-null on nullriid, andset_private_data_validation_and_per_shell_set_namereturnedS_OKinstead ofE_INVALIDARGfor(size = 4, null).cargo test --release -p xcl --lib hle::d3d12x::standin::tests -- --test-threads=1 --nocaptureat0738c30fatop889ef3e8):6 passed, 0 failed, 0 ignoredon both NVIDIA GeForce RTX 4060 (0.35 s,0skipped) and WARP (0.20 s,0skipped), includingquery_interface_on_real_d3d12_pipeline_accepts_hierarchy_and_rejects_other.cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocaptureon NVIDIA GeForce RTX 4060, driver621.14, DXC1.9.2609.5):37test binaries,1417 passed, 0 failed, 46 ignored;29pre-existing hardware/debug-layerSKIPPEDlines (0instandin::tests):21no wave64(RTX 4060 is wave32-only),3per-lane form: refused(lower_dxil::testswave32 per-lane),3no D3D12 debug layer/no d3d12SDKLayers.dll,1cannot disable the driver cache(shaders::tests::pso_measurement_compiles_an_exact_synthetic_record),1no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form).Regression run
Base (
origin/main889ef3e8aa7f267323ab4879e735e65da6bcef10):PR head (
0738c30f4cf8705c953d6cab8f06dff1cca5d3ab):Not tested
d3d12SDKLayers.dllis not installed on this host).AI use
Google Antigravity (Gemini 4 Neon) assisted with implementing the concurrency deduplication and COM method hardening in
standin.rs, writing the mock-COM regression tests, and running the workspace and smoke verification suite.