Repository navigation
shader: accept an unavailable debug layer in the attr0.z/w sampled draw - #1964
Merged
Merged
Conversation
pixel_aot_attribute_sampled_{hardware,warp} required the line
"debug_errors=0 debug_warnings=0" in every renderer run. offscreen_check
prints those counts only when the D3D12 debug layer is enabled; without
it (no Graphics Tools on the host) it prints debug_layer=unavailable and
no counts. Both tests therefore failed on such hosts at the first draw,
although the draw matched the reference exactly
(pixels=64 channels=256 max_absolute_error=0).
Add debug_status(): with the layer enabled both counts must be zero, as
before; with the layer unavailable the run is accepted only if it prints
no counts; any other output is refused. The per-draw line now prints the
status that was checked. draw() pins debug_status() on six synthetic
outputs (clean, unavailable, one error, two warnings, enabled without
counts, no layer marker) before any device work, so a version that
ignores the counts fails.
This follows the rule of tests/pixel_cb_read_check.py, which already
accepts debug_layer=unavailable.
tedin7
reviewed
Nov 24, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head d28732b66d790be8314ccaba1af4622f7f357eaa (test-only change to tests/pixel_attribute_sampled_check.py, no CMake changes, clean-room).
The check now accepts debug_layer=unavailable (no counts) and still requires zero error and warning counts when the layer is enabled. The new in-test table covers the enabled/unavailable/missing cases.
Commands executed:
python3 -I tests/pixel_attribute_sampled_check.py(Linux): PASSpython3 tests/docs_links_check.py: PASS (18 files, 386 links)python3 tests/bidi_controls_check.py: PASSgit diff --check origin/main...HEAD: PASSgit merge-tree --write-tree --name-only origin/main HEAD: no conflictspython3 x2w_pipe.py win2025 1964 --wait 900(Win2025, WARP): Debugpixel_aot_attribute_sampled_warp1/1 passed; Release /O2 1/1 passed- CI: Windows build/test, Linux checks, gfx1013 fixtures all pass
Mutations (applied as a patch on Win2025, Debug):
- Killed: accept an enabled layer with any
debug_errors=text instead of exactly zero counts. The test fails withAssertionError: debug_status(...). - Survived (not blocking): drop the "no counts" requirement for
debug_layer=unavailable. No table row covers "unavailable plus counts". A row such asbackend=warp debug_layer=unavailable\ndebug_errors=1 debug_warnings=0\n->Nonewould close this.
P1: 0. P2: 0.
AI-assisted; commands listed were executed locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Follow-up to #1912.
pixel_aot_attribute_sampled_hardwareandpixel_aot_attribute_sampled_warprequire the linedebug_errors=0 debug_warnings=0from every renderer run.offscreen_checkprints those counts only when the D3D12 debug layer is enabled. Without the layer (Graphics Tools not installed) it printsdebug_layer=unavailableand no counts, so both tests fail at the first draw on such a host even though the draw matches the reference exactly. The Windows CI job runs withdebug_layer=enabled, so CI does not hit this.tests/pixel_attribute_sampled_check.pynow checks the debug layer throughdebug_status():The per-draw line prints the status that was checked instead of always printing
debug_errors=0 debug_warnings=0. This is the ruletests/pixel_cb_read_check.pyalready applies. The translator, the programs, the reference and the swapped-z/w controls are unchanged. One file changes.Verification
Windows 11 build 26300.9974, D3D12 debug layer unavailable (Graphics Tools not installed), MSVC 19.52, DXC from SDK 10.0.26100.0. Adapters: NVIDIA GeForce RTX 5080 (driver 32.0.16.2124), AMD Radeon(TM) Graphics iGPU (driver 32.0.11034.2, selected with
XBOX2WINDOWS_ADAPTER=Radeon) and WARP (10.0.26100.9818).Before the change (upstream
6d0a788), the same failure on all three adapters:After the change, GPU tests run serially. The two focused tests ran on the PR head, commit
d28732bonmain11f11e8. The^pixel_group and the Python checks ran on the same commit one rebase earlier (320aa11on82f0db6), and the commits in between don't change this file ortests/offscreen_check.cpp:The Python check list of the platform-independent CI job (69 files, through
tools/run_checks_parallel.py) exits 0.Full suites, on
6d0a788, three rebases earlier. The commits since then don't change this file:The 27 skips are the same capability skips in both configurations, and none is a
pixel_aot_attribute_sampled_*test. The one failure isrdna2_tools_checkin both configurations, caused by my shell environment: it hadLLVM_LIBset withoutLLVM_MC/LLVM_OBJCOPY, and in that case the test fails by design. With none of the three set, and with all three pointing at LLVM 15, it passes indevandrelease.I could not run the draw with the debug layer enabled on this machine. That path keeps the previous requirement, and the pins below cover it without a device.
Negative controls
draw()pinsdebug_status()on six synthetic outputs before any device work: clean counts, unavailable layer, one error, two warnings, enabled without counts, no layer marker.AssertionError: debug_status('backend=warp debug_layer=enabled\ndebug_errors=1 debug_warnings=0\n') is not None.AssertionError: debug_status('backend=warp\n') is not None.Evidence and follow-up
No new fixture or input; the test keeps its source-built programs and its Fraction reference. No README or docs change: the reproduction command in
docs/experiments.mdis unchanged.This change was AI-assisted (Claude Code); I reviewed the diff and the test results.
Checklist