startup: validate title UAV, RTV and DSV views before forwarding #3200
Open
tedin7 wants to merge 5 commits from
upstream-pr/3200 into main
pull from: upstream-pr/3200
merge into: R0Y00:main
R0Y00:main
R0Y00:codex/indirect-large-backed-views
R0Y00:codex/word3-preflight-check
R0Y00:codex/vertex-table-two-records
R0Y00:codex/live-index-alias
R0Y00:codex/copied-vertex-buffer-srv
R0Y00:codex/windows-stage-test-output
R0Y00:codex/preserve-live-srv-retirement
R0Y00:codex/share-render-target-tracking
R0Y00:codex/sgd5-negative-offset-fixture
R0Y00:coverage-dashboard
R0Y00:codex/mesh-loose-root
R0Y00:codex/mesh86-cache-padding
R0Y00:codex/xmem-scatter-preflight
R0Y00:codex/mesh-depth-ps
R0Y00:codex/indirect-dispatch-refresh
R0Y00:codex/compute-container-index
R0Y00:codex/startup-compute-formatted-load
R0Y00:codex/compute-indirect-producer
R0Y00:codex/compute-atomic-soffset
R0Y00:codex/mesh-dual-handoff
R0Y00:codex/startup-run-sh-watcher-control
R0Y00:codex/queue31-page-alias
R0Y00:codex/indexed-indirect-compute-root
R0Y00:codex/typed-buffer-view-metadata
R0Y00:codex/translated-indexed-address-alias
R0Y00:codex/fixed-mesh-create-result
R0Y00:codex/xmem-section-lease
R0Y00:codex/startup-slot86-mesh-cache
R0Y00:codex/restore-mesh-barrier-iteration
R0Y00:codex/translated-indirect-upload-index
R0Y00:codex/xapu-completion-opt-in
R0Y00:codex/translated-indexed-rect
R0Y00:codex/translated-indexed-indirect
R0Y00:codex/startup-mesh-lds-integration
R0Y00:codex/startup-console-ms24
R0Y00:codex/startup-slot57-mesh-request
R0Y00:codex/indirect-copy-provenance
R0Y00:codex/present-color-producer-trace
R0Y00:codex/compute-dispatch-binding-trace
R0Y00:codex/translated-indirect-table-buffers
R0Y00:codex/indirect-copy-provenance-base
R0Y00:codex/mix-half-literal-source
R0Y00:codex/translated-indirect-draw
R0Y00:codex/xmem-scatter-diagnostics
R0Y00:codex/slot148-recording-upload
R0Y00:codex/slot70-loading-art-verified
R0Y00:codex/command-list-upload-arena
R0Y00:codex/recover-failed-command-list
R0Y00:codex/startup-heap-timing-notes
R0Y00:codex/align-audio-input-timeline
R0Y00:codex/synthetic-depth-export-control
R0Y00:codex/startup-texture1d-on-windows
R0Y00:codex/1629-packed-position-fixture
R0Y00:codex/cpu-srv-refresh
R0Y00:codex/stream-root-srv-draw
R0Y00:codex/audio-mixer-timer
R0Y00:codex/startup-reload-published-shader
R0Y00:codex/priority-integrate-1284
R0Y00:codex/guest-sixteen-page-record
R0Y00:codex/aot-placed-dxr-batch
R0Y00:codex/guest-directory-selection
R0Y00:codex/gamesave-enumerate-read
R0Y00:codex/readme-archive-to-pixels
R0Y00:codex/pe-placed-view-draw
R0Y00:codex/archive-directory-gpu
R0Y00:codex/slot133-dxr-build
R0Y00:codex/materialize-placed-vertex-view
R0Y00:codex/dstorage-directory-offsets
R0Y00:codex/xg-nine-bc-copy
R0Y00:codex/xg-slot10-bc64-arrays
R0Y00:codex/dxr-guest-address-readback
R0Y00:codex/gpu-va-high-bits
R0Y00:codex/clarify-diagnostic-startup-scope
R0Y00:codex/xg-six-levels
R0Y00:codex/typed-derived-blend
R0Y00:codex/english-legal-text-progress
R0Y00:codex/address-bc-4ks
R0Y00:codex/dstorage-bounded-file-read
R0Y00:codex/wide-srv-offsets-menu
R0Y00:codex/startup-memory-srv
R0Y00:codex/bound-view-tail
R0Y00:codex/language-selector-readback
R0Y00:codex/setup-menu-progress
R0Y00:codex/cpu-plane-refresh
R0Y00:codex/startup-ubyte-vertex
R0Y00:codex/presenter-window-selection
R0Y00:codex/startup-uniform-buffer-lane
R0Y00:codex/intro-loop-timing
R0Y00:codex/static-clzero-loops
R0Y00:codex/document-rtx-intro
R0Y00:codex/startup-insertq
R0Y00:codex/nv12-startup-texture
R0Y00:codex/stream-stage-draw
R0Y00:codex/startup-null-uav-format
R0Y00:codex/startup-draw-capture
R0Y00:codex/shorten-windows-checks
R0Y00:codex/dstorage-rfc1950
R0Y00:codex/startup-dump-fence
R0Y00:codex/pr1135-review-base
R0Y00:codex/startup-stream-requests
R0Y00:codex/startup-chroma-view
R0Y00:codex/readme-graphics-pipeline-streams
R0Y00:codex/static-crt-free-tls
R0Y00:codex/arc-140t-rtx-5080-laptop-gpu-reports
R0Y00:codex/main-startup-progress-entry
R0Y00:codex/signed-dxil-catalogue
R0Y00:codex/reloc-free-preferred-base
R0Y00:codex/quad-dpp-bit-mask
R0Y00:codex/raw-srv-bounds
R0Y00:codex/rx9070-31044-hardware-report
R0Y00:codex/gpu-page-source-provenance
R0Y00:codex/runtime-placeholder-interior
R0Y00:codex/gpu-copy-queue-tile-order
R0Y00:codex/pe-pin-external-providers
R0Y00:codex/xmem-placeholder-reservations
R0Y00:codex/xmem-shared-physical-pages
R0Y00:codex/pe-package-startup
R0Y00:codex/xmem-tools-memory-query
R0Y00:codex/cpu-stack-output-import
R0Y00:codex/pe-load-security-cookie
R0Y00:codex/record-three-bvh-retests
R0Y00:codex/cpu-rbp-frame-anchor
R0Y00:codex/xmem-default-startup
R0Y00:codex/record-rtx-3050-ti-9597
R0Y00:codex/docs-readme-start-here
R0Y00:codex/check-compute-mad24-truncation
R0Y00:codex/docs-discord-community
R0Y00:codex/bound-rcx-branch-mutants
R0Y00:codex/rtx5060ti-bvh-62114
R0Y00:codex/837-neutral-readme-disclaimer
R0Y00:codex/record-rtx-3070-ti
R0Y00:codex/title-neutral-public-wording
R0Y00:codex/exe-shadow-frame-submissions
R0Y00:codex/exe-shadow-runtime-chain
R0Y00:codex/readme-polish
R0Y00:codex/gpu-coverage-nov23
R0Y00:codex/spirv-minlod
R0Y00:codex/shadow-shim-device
R0Y00:codex/exe-two-shadow-frames
R0Y00:codex/shim-dispatch-cleanup
R0Y00:codex/fix-spirv-cache-probe
R0Y00:codex/sampler-use
R0Y00:codex/ballot-bit-extract
R0Y00:codex/packed-fma-release
R0Y00:codex/cpu-packed-fma-o2
R0Y00:codex/publish-coverage-dashboard
R0Y00:codex/mesh-cbv-binding-order
R0Y00:codex/spirv-window-fixture
R0Y00:codex/ps-e32-float-uint
R0Y00:codex/ps-cbuffer-reads
R0Y00:codex/fixed-profile-rescan
R0Y00:codex/shim-compute-integration
R0Y00:codex/readme-visible-coverage
R0Y00:codex/readme-research-navigation
R0Y00:codex/integrate-pr-256
R0Y00:codex/indexed-mesh
R0Y00:codex/sampled-coverage
R0Y00:codex/first-ms
R0Y00:codex/dual-ps
R0Y00:codex/ps-attribute
R0Y00:codex/compute-first
R0Y00:codex/ps-export
R0Y00:codex/readme-research-status
R0Y00:codex/ps-layout
R0Y00:codex/blast-window
R0Y00:codex/chart-caption
R0Y00:codex/reviewer-roles
R0Y00:codex/blast-aot
R0Y00:codex/archive-program
R0Y00:codex/crc-stream-program
R0Y00:codex/exe-image-data-chain
R0Y00:codex/local-cpu-fixture-coverage
R0Y00:codex/exe-bound-frame-chain
R0Y00:codex/exe-mapped-comparison
R0Y00:codex/contribution-dependencies
R0Y00:codex/exe-entry-aot
R0Y00:codex/bink-frame-heap-integration
R0Y00:docs/hardware-seven-reports
R0Y00:codex/bink-custom-heap
R0Y00:codex/bink-heap-callers
R0Y00:codex/discussions-entry-points
R0Y00:codex/gpu-community-batch-64
R0Y00:codex/ffx-scratch-writers
R0Y00:codex/generic-project-documentation
R0Y00:codex/ffx-dispatch-rcas
R0Y00:codex/four-windows-gpu-reports
R0Y00:codex/title-neutral-project-wording
R0Y00:codex/community-coverage-provenance
R0Y00:codex/rcas-packed-texels
R0Y00:codex/community-gpu-retests
R0Y00:codex/community-build-and-gpu-reports
R0Y00:codex/ffx-provider-loop
R0Y00:codex/ffx-recurrent-views
R0Y00:codex/ffx-recurrent-resource
R0Y00:codex/amd-wave64-reports
R0Y00:codex/ffx-backend-slots
R0Y00:codex/upscaler-device-init
R0Y00:codex/ffx-context-lifecycle
R0Y00:codex/ffx-version-query
R0Y00:codex/ffx-provider-contract
R0Y00:codex/typed-object-callback
R0Y00:codex/cpu-ordinal-import
R0Y00:codex/chained-cpu-ranges
R0Y00:codex/cpu-import-call
R0Y00:codex/cpu-direct-call
R0Y00:codex/cpu-leaf-aot
R0Y00:codex/community-project-status
R0Y00:codex/script-state-path-replay
R0Y00:codex/script-state-evidence
R0Y00:codex/bc7-resident-tail
R0Y00:codex/bcpack-mip-tail
R0Y00:codex/bc7-texture-draw
R0Y00:codex/asset-ranges
R0Y00:codex/pixel-constants
R0Y00:codex/pixel-aot
R0Y00:codex/pre-exe-workloads
R0Y00:codex/root-signature-device-coverage
R0Y00:engineering/packed-bvh-leaves
R0Y00:engineering/bvh-build-and-update
R0Y00:engineering/intake-root-roundtrip
R0Y00:community/gpu-check-release
R0Y00:community/english-contributor-entry
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
R0Y00/Xbox2Windows!3200
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3200"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-27T21:29:55Z.
Part of #870
What this unblocks: title UAV, RTV and DSV views that D3D12 would reject are repaired or refused before they reach the desktop device, so real GPUs and the debug layer stop failing on them.
Console view descriptions can name a MipSlice past the resource, an array or W range longer than what remains, a PlaneSlice on a single-plane format, a view format outside the resource's format family, a DSV with a color or UNKNOWN format, a read-only-stencil DSV on a format without stencil, a multisample dimension on a single-sample resource (or the reverse), a multisample UAV, or a UAV counter on a resource or offset D3D12 does not allow (see "ID3D12Device::CreateUnorderedAccessView", "ID3D12Device::CreateRenderTargetView", "ID3D12Device::CreateDepthStencilView" and "D3D12_UNORDERED_ACCESS_VIEW_DESC" on Microsoft Learn). Forwarding these breaks the debug layer and can remove the device on hardware.
The new header
src/startup_stubs/target_view_check.hchecks device slots 19-21 after the existing dimension and format checks inview_slot:CastingFullyTypedFormatSupported), DSV format replaced by the resource's depth format, read-only-stencil flag dropped without a stencil plane, a counter offset without a counter resource reset to 0,The depth-format and format-cast helpers are local to this header; if the sibling SRV validation draft lands first, the two share one copy.
Tests:
startup_target_view_check(CPU): valid descriptions stay byte-identical; each repair and each refusal above.startup_target_views_warp(title view calls through the shim on a WARP device with the debug layer on; passes only with zero debug-layer errors and no device removal; without the new check inview_slotthe bad MipSlice RTV reaches the debug layer and removes the WARP device, see Verification).startup_target_views_hardwareskips (77) without a hardware adapter.Verification:
x86_64-w64-mingw32-g++ -std=c++20 -fsyntax-only -Wall -Isrc tests/startup_target_view_check.cpp-> OKx86_64-w64-mingw32-g++ -std=c++20 -fsyntax-only -Isrc tests/startup_target_views_device.cpp-> OKcmake -S . -B <tmp> -G Ninja -DDXC_EXECUTABLE=/bin/true-> configure OKpython3 tests/bidi_controls_check.py-> passed9e6d28f7, targetsd3d12_xs_device_obj d3d12_xs_shim startup_target_view_check startup_target_views_device startup_view_dimension startup_null_views_check startup_resource_retire_views:ctest --preset dev -R '^(startup_target_view_check|startup_target_views_|startup_view_dimension|startup_null_views_|startup_resource_retire_views_)'-> 18/18 passed/O2): same regex -> 18/18 passedview_slotcheck reverted (tests kept),ctest --preset dev -R '^startup_target_views_warp$'-> 0/1 passed (debug layer:CreateRenderTargetView ... MipSlice (value = 9), then device removed0x887a0001)Draft until an independent peer review and the Win2025 WARP gate pass.
Thanks to @Makto94 for the testing that found this.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T23:44:52Z.
Review: APPROVED
Review of PR #3200 — startup: validate title UAV, RTV and DSV views before forwarding
Summary
This PR adds
src/startup_stubs/target_view_check.h— a device-independent validation library for D3D12 target views (UAV, RTV, DSV). It validates view descriptors against their underlying resources, repairing invalid fields when possible and refusing when fundamentally incompatible.Changes reviewed
src/startup_stubs/target_view_check.h: New 167-line header withcheck()template function for UAV/RTV/DSV validation. Includes format cast fitting logic (respecting typeless casting rules), planar video format handling, depth-stencil aspect selection, mip/array bounds checking, counter placement validation (check_uav), and repair callback pattern.d3d12_xs_device.cppapplies this validation before forwarding views to the desktop device, with refusal counting for diagnostics.Assessment
The implementation is thorough and well-designed:
constexpr if.check_uavensures proper alignment and size for structured buffer counters.Verdict: Approve
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T10:49:23Z.
Real-GPU verification (NVIDIA RTX 3070 Ti, driver 32.0.16.2101, Windows 11):
Tested at
9e6d28f(current head). dev preset, ctest run one test at a time:These complement the existing WARP runs.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-28T10:49:36Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
9e6d28fℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-28T10:55:10Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
9e6d28f7bfℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-28T10:55:10Z.
Code review location:
src/startup_stubs/d3d12_xs_device.cpp; line 5237When a UAV is repaired,
record_view(created)still callsnote_viewwith the originalc, not the repaired description.record_translated_dispatch()reads that record ind3d12_compute_dispatch.inl:473–520and recreates the UAV at lines 622–623 without this validation. For example, anR32_FLOATview on anR8G8B8A8_UNORMresource is repaired initially, but the incompatibleR32_FLOATdescription is forwarded again during dispatch, reintroducing the debug-layer/device-removal failure. Repaired array sizes and plane slices can instead cause the dispatch to be refused. Store the effective description for downstream consumers rather than changing only the initial native-call arguments.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-28T10:55:10Z.
Code review location:
src/startup_stubs/target_view_check.h; line 131On hardware supporting NV12 RTV/UAVs, legal plane views use
R8_UNORMfor plane 0 orR8G8_UNORMfor plane 1, notNV12. Those formats are not in the resource's typeless format family, soformat_cast_fits()returns false and this branch replaces a legal view format withNV12. The resulting invalid view is then forwarded to D3D12, introducing a device-removal path for descriptions that previously passed through unchanged; P010/P016 plane views have the same problem. Account for resource/plane/view-format compatibility before applying the generic format-family fallback.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T11:05:59Z.
Code review location:
src/startup_stubs/d3d12_xs_device.cpp; line 5237Valid, fixed in
f67d16272onup-target-view-check.record_view()now stores the description that was actually forwarded (the repaired copy) for slots 19, 20 and 21, so the translated dispatch (d3d12_compute_dispatch.inl) recreates the UAV from the repaired description and no longer sends the original one again.Test:
startup_compute_dispatch_texture_check.pyhas a new casetexture-store-viewfmt(a UAV with an incompatibleR32_FLOATview format over an RGBA16_FLOAT texture, then a translated dispatch). It checks the readback and that the debug layer stays silent.Gate on aws-1 with WARP (
x2w_pipe.py win2025 3200 --host aws-1 --regex 'startup_target_view|startup_compute_dispatch_texture' --force, headf67d1627): dev 5/5 and release 5/5 passed. Mutants run after the main gate: reverting the record fix failsstartup_compute_dispatch_texture_warpand_hardware(dev and release); removing the planar rule failsstartup_target_view_check(NV12 plane 0, NV12 plane 1, P010 plane 1).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T11:06:00Z.
Code review location:
src/startup_stubs/target_view_check.h; line 131Valid, fixed in
f67d16272.target_view_check.hhas a newplanar_view_fits(): for NV12 plane 0R8_UNORMand plane 1R8G8_UNORM, for P010/P016 plane 0R16_UNORMand plane 1R16G16_UNORMare kept as they are. This is the plane-format rule in the D3D12 resource binding spec (planar formats). Any other format on a planar resource is still repaired to the resource format. The format check now allows a view when eitherformat_cast_fits()orplanar_view_fits()is true.Test:
startup_target_view_check.cppcovers NV12 plane 0 and 1, plane 1 with the plane 0 format (repaired), P010 plane 1, and an unrelated P010 format (repaired).Gate on aws-1 with WARP (
x2w_pipe.py win2025 3200 --host aws-1 --regex 'startup_target_view|startup_compute_dispatch_texture' --force, headf67d1627): dev 5/5 and release 5/5 passed. Mutants run after the main gate: reverting the record fix failsstartup_compute_dispatch_texture_warpand_hardware(dev and release); removing the planar rule failsstartup_target_view_check(NV12 plane 0, NV12 plane 1, P010 plane 1).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T21:53:59Z.
Merged current
maininto this branch (merge commit, no force push); head is now78c320f56. One conflict insrc/startup_stubs/d3d12_xs_device.cpp(record_view): kept main'sViewRecord::srv_desc_bytes/uav_desc_bytessizes and this PR's repaired-description pointer passed tonote_view.Both automated review findings were already fixed in
f67d16272(see the replies in the threads: the record keeps the repaired description, andplanar_view_fits()allows the legal plane formats).Verification (Windows Server 2025, D3D12 WARP, PR head
78c320f56, dev and release):x2w_pipe.py win2025 3200 --regex '^(startup_target_view_check|startup_target_views_|startup_view_dimension|startup_null_views_|startup_resource_retire_views_)'-> 18/18 passed in both legs.@MasterDomino ready for review and merge when you have time.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-28T22:22:52Z.
Merged current
maininto this branch (merge commit, no force push); head is now78c320f56. One conflict insrc/startup_stubs/d3d12_xs_device.cpp(record_view): kept main'sViewRecord::srv_desc_bytes/uav_desc_bytessizes and this PR's repaired-description pointer passed tonote_view.Both automated review findings were already fixed in
f67d16272(see the replies in the threads: the record keeps the repaired description, andplanar_view_fits()allows the legal plane formats).Verification (Windows Server 2025, D3D12 WARP, PR head
78c320f56, dev and release):x2w_pipe.py win2025 3200 --regex '^(startup_target_view_check|startup_target_views_|startup_view_dimension|startup_null_views_|startup_resource_retire_views_)'-> 18/18 passed in both legs.@MasterDomino ready for review and merge when you have time.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-29T08:50:03Z.
Review: CHANGES_REQUESTED
Independently reviewed
78c320f5integrated overmain7c123092(tree01e2b13c). The trial merge is clean andgit diff --checkis clean.I read
target_view_check.hagainst theview_slotpath and the record consumers (view_format_of,resolve_view, the translated dispatch), and compared its verdicts with what desktop D3D12 accepts, using a standalone probe that creates each view on a fresh debug-layer device and callscheck/check_uavon the same description.Blocking: legal 32-bit UAV casts are refused or rewritten. D3D12 lets a UAV name
R32_UINT,R32_SINTorR32_FLOATover a 32-bit texture of another format family.format_cast_fits()starts withcompatible_formats(), which is family equality, so these never fit. Onmainthey are forwarded unchanged (slot 19 has no format check there).ALLOW_UNORDERED_ACCESS)check_uavat78c320f5R8G8B8A8_TYPELESSR32_UINTRefusal::formatR8G8B8A8_TYPELESSR32_FLOATRefusal::formatR10G10B10A2_TYPELESSR32_UINTRefusal::formatR16G16_TYPELESSR32_UINTRefusal::formatB8G8R8A8_TYPELESSR32_UINTRefusal::formatR8G8B8A8_UNORM(CastingFullyTypedFormatSupported= 1)R32_UINTR8G8B8A8_TYPELESS(control)R8G8B8A8_UNORMR8G8B8A8_TYPELESS(control)R16G16B16A16_FLOAT0x887a0001Refusal::formatThe results are the same on WARP and on the hardware adapter below. So a view that works today is skipped (first five rows), and in the typed case the title's
R32_UINTview silently becomes anR8G8B8A8_UNORMone, which changes what a shader reads and writes through it.To reproduce without a device, add to
tests/startup_target_view_check.cpp:It fails at
78c320f5withFAIL: R32 UAV over a 32-bit family. Suggested direction (unconfirmed beyond the rows above): for UAVs, letR32_UINT/R32_SINT/R32_FLOATpass over the 32-bit families D3D12 allows, next toplanar_view_fits(), with a device case instartup_target_views_device.cppso the debug layer confirms it. I did not testB8G8R8X8_TYPELESSorR32_SINT.What I ran. Built all targets in
devandrelease, thenctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '_hardware$|startup_audio' -R '^(startup_target_view_check|startup_target_views_warp|startup_view_dimension.*|startup_null_views_.*|startup_resource_retire_views_.*|startup_compute_dispatch_texture_warp|startup_compute_dispatch_warp|startup_packed.*)$':28/28 passed in Debug and Release
/O2, no skips. Under the GPU lock with-j 1andX2W_TEST_DEBUG_LAYER=1,startup_target_views_hardwareandstartup_compute_dispatch_texture_hardwarepassed in both presets, no skips.Negative control: with the refusal in
view_slotdisabled (if (false && refusal != Refusal::none)),startup_target_views_warpfails (the debug layer reports the views and the device is removed with0x887a0001; the process then exits0xc0000409).The record change is sound as far as I traced it: the record now holds the description that was forwarded (desktop format, repaired fields), and the consumers that map the format again (
view_format_of, the dispatch) are unaffected becausedesktop_format()maps its outputs to themselves.Mutants (dev; CPU test, plus
startup_target_views_warpandstartup_compute_dispatch_texture_warpwhere marked "device"):Killed (13):
*p.mip >= r->MipLevels->>(device; the CPU test does not catch it, only the mip-4 UAV in the WARP test does)*p.first >= limit->>~0exception removedWidth - 4->Widthview_slotignores the refusal (device)startup_compute_dispatch_texture_warp)Surviving (5), all with the device tests included; none blocks on its own, but they are untested rules:
ArraySize/WSizerefusal removed (!*p.count)*p.plane > 1->> 2(no plane-2 case on a planar resource)D32_FLOAT_S8X24_UINT(onlyD24_UNORM_S8_UINTis covered)CastingFullyTypedFormatSupported(no test passestyped_cast)Equivalent: none found.
Smaller notes, not blocking:
check()names only the UAV and DSV descriptions; it also handles RTVs.Real-title run of this head merged onto the baseline commit: flaky. It was judged worse than the baseline on the first run (
[fail] judgement: Judged worse than the baseline: black-frame) and passed on the re-run ([warn] repeat: Failed on the first run and passed on a re-run (job 28).). That does not block on its own.Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; NVIDIA GeForce RTX 5090 driver 32.0.16.1088, D3D12 debug layer on; WARP for the
_warptests.CI:
Build and test on Windowspassed on78c320f5.This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T13:05:08Z.
Review of head
78c320f5againstmain94b679e7. I read the source and ran trial merges only; I did not build or run anything.git merge-tree --write-tree origin/main 78c320f5exits 0.Status: pigalot's change request on this head is still open, with no push or reply since. In that finding, legal
R32_*UAV casts are refused, or rewritten to the resource format. That holds the merge, so I am not merging. I have nothing to add to the cast rule itself.SHOULD
A refused RTV, DSV or UAV keeps the slot's previous view.
refuse_viewwrites a null view only for slot 18. The comment above it says: "A skipped UAV, RTV or DSV does not write a replacement to the desktop heap, so its previous descriptor record must stay live." This PR sends many more slot 19-21 calls down that path, with no switch on the default launcher path.OMSetRenderTargetsand draws into whatever view was there before. The only trace is the first 6x2w-d3d12 view refused: slot%d %slines per reason.maintoday reach this path, so a wrong refusal costs more than an empty target.Could the refusals this PR adds write a null RTV, DSV or UAV of the requested dimension too? If keeping the old view is the safer choice for one of them, the body could say why.
NIT
CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS3, ...)runs on each slot 19-21 call whose format differs from a typed resource's format.CastingFullyTypedFormatSupporteddoes not change for a device, so one query per device would do.main): with this PR in, #3199 conflicts ind3d12_xs_device.cpp(view_slot). #3214 then conflicts inCMakeLists.txt,d3d12_xs_device.cppandd3d12_draw.inl, where the last is its existing conflict withmain. The body already says the depth-format and cast helpers should be shared with the SRV draft. Settling the order now would also settle which PR keeps those helpers.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-30T14:05:14Z.
Merged current
main(077bff3ac) and fixed the cross-family R32 UAV typeless cast check (with a regression test covering legal R32 UAV casts while keeping invalid casts refused). Ready for CI and re-review.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.