Repository navigation
D3D12.X: fix null UAV fallback and MSAA/typeless companion SRVs - #2511
ChalanaGimhanaX wants to merge 1 commit into
Conversation
|
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
On a machine without the D3D12 debug layer, Head
The cause is the forwarding loop in the parent test: for line in stderr.lines().filter(|l| l.starts_with("SKIPPED ")) {
eprintln!("{line}");
}libtest captures use std::io::Write;
let _ = writeln!(std::io::stderr(), "{line}");I have not built or run that change. AI use: Claude Code (Claude Opus 5.5) found this while testing the PR on this machine and wrote this comment. |
luckyteagirl
left a comment
There was a problem hiding this comment.
Could the companion SRV and the console T# use the same normalized descriptor? For a 4x MSAA texture with an explicit TEXTURE2D UAV descriptor, the new code publishes a TEXTURE2DMS SRV, but dev_create_uav_x still builds the T# from the original UAV dimension and labels it non-MSAA. With a default UAV descriptor, the T# gets the MSAA type but hardcodes one mip, which encodes LAST_LEVEL=0 instead of 2 for four samples.
The existing srv_tsharp_from_desc helper can build the metadata from the normalized native SRV and the actual sample count. A focused fixture could check the published SRV dimension and decoded T# type and sample count for both descriptor forms. Exact-head source review of ba93ea4418e3b8440fc563ad3b270e4f328cd166. No GPU run. AI-assisted review with Codex.
…cl-dev#2511) (cherry picked from commit 56085f55cfaad3c006146e812b154893d2140681)
Fix invalid null UAV fallback dimensions in
dev_create_uav_checked_xand invalid MSAA /*_TYPELESScompanion SRV descriptors inuav_companion_srv, preventingDXGI_ERROR_INVALID_CALL(0x887A0001) device removals when console titles create image UAVs on unsupported formats, MSAA textures, or non-depth typeless textures.Part of #2461 and #1833.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:dev_create_uav_checked_x: reusenull_uav_desc(desc.as_ref(), Some(&rd))instead ofD3D12_UNORDERED_ACCESS_VIEW_DESC { ..Default::default() }whenpc_typed_uav_supportedreturns false, avoiding zeroArraySize/WSizeonTexture1DArray,Texture2DArray, andTexture3Dnull UAV fallbacks.null_uav_desc: ignoreViewDimension == UNKNOWN (0)so it falls back tord, and map MSAA 2DArray (7) toTexture2DArraywithArraySize = 1.uav_companion_srv+concrete_srv_format: accept MSAA dimensions (6/7) fromresource_dim_to_viewwhendesc == None, emitD3D12_SRV_DIMENSION_TEXTURE2DMS/D3D12_SRV_DIMENSION_TEXTURE2DMSARRAYwhenrd.SampleDesc.Count > 1(preventingCREATESHADERRESOURCEVIEW_INVALIDDESCandID3D12Device::RemoveDevice), and normalize any remaining*_TYPELESSor depth-only format to a concrete same-family SRV format (preventingCREATESHADERRESOURCEVIEW_INVALIDFORMAT).uav_companion_srv_tests: added unit testuav_companion_srv_msaa_typeless_and_null_uav_dimensionsand D3D12 debug-layer testgpu_uav_null_fallback_and_msaa_typeless_companion_srv_debug_layer.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.8.2502.11, release build.uav_companion_srv_msaa_typeless_and_null_uav_dimensionsfailed (MSAA 2D default companion SRVreturnedNone).gpu_uav_null_fallback_and_msaa_typeless_companion_srv_debug_layerfailed underD3D12SDKLayers.dllwithID3D12Device::CreateShaderResourceView: The base resource was created as a multisample resource. You must specify D3D12_SRV_DIMENSION_TEXTURE2DMSARRAY or D3D12_SRV_DIMENSION_TEXTURE2DMS.followed byID3D12Device::RemoveDevice(DXGI_ERROR_INVALID_CALL).ba93ea4):cargo test --release -p xcl --lib hle::d3d12x::real::uav_companion_srv_tests:: -- --test-threads=1 --nocaptureon RTX 3060: 4 passed, 0 failed, 0 skipped (0 D3D12 debug-layer errors).XCL_ADAPTER=warp): 4 passed, 0 failed, 0 skipped (0 D3D12 debug-layer errors).cargo build --release --workspace+cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture: 1425 passed, 0 failed, 46 ignored across 37 test binaries.SKIPPEDlines (26): 21no wave64(RTX 3060 is 32-lane), 3 per-lane refused f16/f32 forms (#1426), 1pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode required), 1heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).cargo test --release -p xcl --test e2e -- --test-threads=1: 4 passed, 0 failed.Regression run
main (
6d051da):this PR (
ba93ea4):Not tested
AI use
real.rsnull UAV fallback and MSAA/typeless companion SRV fixes and tests, ran the failing-first check, targeted GPU/WARP tests, full workspace test suite, e2e tests, and smoke run, and drafted this PR description.