Repository navigation
Conversation
Consolidates xcl-dev#3319 and xcl-dev#3280 (excluding the MSAA default-DSV overlap with xcl-dev#1087) and addresses all review findings from both PRs: - Null-resource SRV/UAV/RTV/DSV sanitization: reject unmapped console formats when CheckFeatureSupport fails, map all 22 *_TYPELESS formats to concrete same-family view formats, reject depth formats on null RTVs, set PlaneSlice = 1 only for 2D/2DArray stencil SRVs and clear PlaneSlice to 0 on all non-stencil null SRVs, null image UAVs, and null RTVs. - Default and DXGI_FORMAT_UNKNOWN views on typeless depth buffers: resolve DXGI_FORMAT_UNKNOWN on typeless depth DSVs, build 1D/1DArray default DSVs and default SRVs (`pc_srv`), and preserve D16_UNORM DSV formats on R24G8_TYPELESS resources so DSVs remain aligned with PSO DSVFormat. - Add unit tests and a child-isolated WARP D3D12 debug-layer test covering null and default view creation (skipping cleanly when the D3D12 debug layer or WARP is unavailable). Assisted-by: Antigravity (Gemini 4 Neon)
|
merge-check claim |
|
merge-check |
vasanex
left a comment
There was a problem hiding this comment.
Review of cb4b1335 (code reading and the tests named below, not a merge-check) · no findings
In short: views of a real resource with a valid description take the same code as on main; the only change there is a DSV with format UNKNOWN on a typeless depth buffer, which now gets the typed depth format. Null-resource image SRVs, UAVs and RTVs go through the new sanitizers, null DSVs get a depth format, and 1D typeless depth buffers get 1D default views. The typeless and depth format tables are right, the support cache is a leaf lock that is not held across CheckFeatureSupport, and the rewritten descriptions outlive the forwarded call.
Result: no blockers found. From the code, nothing stands in the way of a merge. This is a review, not a merge-check: the suite and a title run are not covered here.
Measured (RTX 3080, merge of this head onto main 078358a0, debug; the debug-layer test ran its child on WARP, not skipped)
cargo test -p xcl --lib -- null_and_default_view_tests: 2 passed, 0 failed.- The debug-layer test covers each sanitizer: with
sanitize_null_image_srv,sanitize_null_image_uavorsanitize_null_rtvput back to whatmaindoes (one at a time), it fails at the first case of that kind ("null SRV fmt=118", "null UAV fmt=29", "null RTV fmt=0"). - The stencil cases do reach the
PlaneSlice = 1branch on WARP: with a temporary print insanitize_null_image_srv, formats 47 on Texture2D and 22 on Texture2DArray are kept with plane 1 and the debug layer accepts them; on TextureCube and Texture2DMS they fall back to R32_FLOAT.
Notes, none blocking
- The test's child sets
XCL_COHERENT_MB=64but notXCL_UMA_MB; the two other child tests in this file set both to 64. Here unified memory comes up with its default size, and the child then assertsuma::get().is_some(): on a machine short of address space or commit that is a failure, not a skip. - The debug-layer test asserts "no error", not which format a case ends up with, so a sanitizer that always fell back to R32_FLOAT would pass it too. The measurement above shows that is not what happens today; an assertion on two or three of the resulting formats (the stencil plane, one typeless mapping) would keep it that way.
Not checked: the whole suite and a title run on this head (see the merge check), AMD and Intel (the support bits differ per driver; only WARP and the RTX 3080's build were run here), whether a title on this machine creates null views of the kinds changed.
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.
|
merge-check In short: Turns null-resource SRV, image UAV, RTV and DSV descriptions into formats and PlaneSlices the PC accepts, resolves DXGI_FORMAT_UNKNOWN on typeless depth DSVs, and adds 1D/1DArray default DSV and SRV views. Reading the code found no bug, and only null views and calls that were invalid on main behave differently. Nothing blocks it; it is over the size target and conflicts with the open #1087. Medium
Checked and fine
How this was tested
Written by Claude Code (Claude Opus 5.5) and posted by Foniass without a human check of each point. |
Consolidates #3319 and #3280 into one change on
crates/xcl/src/hle/d3d12x/real.rsso PC D3D12 accepts console null-resource view descriptions (pResource == NULL) and default/DXGI_FORMAT_UNKNOWNview descriptions on typeless depth buffers.default_dsvbranch, which duplicates earlier open D3D12.X: match default depth views to MSAA textures #1087.dev_create_uav_checked_x'snull_uav_descfallback dimensions oruav_companion_srv(covered by open D3D12.X: fix null UAV fallback and MSAA/typeless companion SRVs #2511);dev_create_uav_x's null-resource format/PlaneSlicesanitization is complementary.CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)failures (unmapped console formats) as unsupported (None) instead of passing them through.*_TYPELESScolor, BC, and depth formats to concrete same-family view formats on null SRVs/UAVs/RTVs, and rejects depth formats (D32_FLOAT_S8X24_UINT,D32_FLOAT,D24_UNORM_S8_UINT,D16_UNORM) on null RTVs.PlaneSlice = 1only for 2D/2DArray stencil SRVs (X32_TYPELESS_G8X24_UINT,X24_TYPELESS_G8_UINT) and clearsPlaneSlice = 0on all other null image SRVs, all null image UAVs, and all null RTVs.D16_UNORMinpc_dsvonR24G8_TYPELESSresources instead of rewriting it toD24_UNORM_S8_UINTwhile PSOs keepDSVFormat = D16_UNORM.pc_srv's default-view (None) branch to matchdefault_dsv.skip_testand forwardSKIPPEDlines when the debug layer or WARP is unavailable.What is in it
crates/xcl/src/hle/d3d12x/real.rs:typeless_depth_format,pc_dsv, anddefault_dsv: resolveDXGI_FORMAT_UNKNOWNon typeless depth DSVs, sanitize null-resource DSV formats, support 1D/1DArray default DSVs, and reuseGetDesc()once indev_create_dsv_x.is_typeless_format,concrete_view_format,pc_format_support1,sanitize_null_image_srv,sanitize_null_image_uav, andsanitize_null_rtv: cached per-adapter format support check and null-resource view sanitization wired intodev_create_srv_inner,dev_create_uav_x, anddev_create_rtv.pc_srv: 1D and 1DArray default SRV construction for typeless depth textures.null_and_default_view_tests: unit tests for 1D/typeless DSV and SRV construction plus a child-isolated WARP D3D12 debug-layer test verifying null SRV/UAV/RTV/DSV and default 1D/2D view creation with zero debug-layer errors.Regression run
main(5ad98adbc360225ac8a57ad9661e16fe8df9d8dd):PR (
cb4b133553997f9061796a2cf5c6537e0521d424):Tested
Hardware: AMD Ryzen 9 9950X, Windows 11 10.0.26200.0, NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.1074),
rustc 1.99.0, DXC 1.9.2609.5.cargo build --release -p xcl: ok (39 warnings, unchanged from 39 onmain5ad98adbc).cargo test -p xcl --lib -- null_and_default_view_tests --nocapture: 2 passed, 0 failed, 0 ignored, 0 SKIPPED (D3D12 debug layer ran on WARP with 0 errors)..\scripts\test.ps1: 3007 passed, 0 failed, 52 ignored, 24 SKIPPED (22 no wave64 on RTX 5070 Ti, 2 no heap windows).Not tested
XCL_HEAP_WINDOWS=1.AI use
Antigravity (Gemini 4 Neon) consolidated #3319 and #3280, fixed the review findings, wrote the unit and WARP debug-layer tests, ran the test suite and paired smoke runs, and drafted this PR description.