Repository navigation
shader: admit a depth-only export in the raw graphics front end - #3612
Merged
Merged
Conversation
A raw fixed VS/PS pair whose pixel stage ends in an uncompressed MRTZ export of depth alone was refused with "raw graphics varying or system export requires a stage interface". The raw reader now treats that export as the pixel stage's output and adds one SV_Depth row, which the existing emitter already lowers. Stencil and coverage channels and a compressed export keep the refusal. Depth next to a color export is refused by name, because a raw color target is typed without a signature. The mesh pixel caller is unchanged. Refs R0Y00#3541 Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
This was referenced Nov 30, 2026
R0Y00
approved these changes
Nov 30, 2026
R0Y00
left a comment
Owner
There was a problem hiding this comment.
Reviewed 5a2d27993840146534d43d64347bd41c3dd793bc. The raw fixed-pair reader admits uncompressed depth-only MRTZ and emits SV_Depth. The fixture checks the cold compile, frontend cache round trip, color control, and the stencil, coverage, compressed, and mixed-export refusals.
On Windows with SDK/DXC 10.0.26100.0, ctest --test-dir <build> --no-tests=error -j1 -R '^native_raw_depth_export$' --output-on-failure passed. I temporarily disabled the new SV_Depth signature insertion locally. The build succeeded and the test failed on the positive control with unmapped depth, stencil or coverage export. I restored the source after the check.
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
A raw fixed VS/PS pair whose pixel stage ends in an uncompressed MRTZ export of depth alone, with no colour export, was refused by the raw graphics front end with
raw graphics varying or system export requires a stage interface.read_raw_graphicsnow treats that export as the pixel stage's output and adds oneSV_Depthsignature row, which the existing emitter already lowers for reviewed containers.What stays refused:
raw depth export next to a color export requires a stage interface), because a raw colour target is typed without a signature and would otherwise fail later ascolor target absent from pixel signature;translate_mesh_pixel_program): unchanged, the new case is gated on!mesh_pixel.Refs #3541. This is the first refusal of the depth-only fixed slot 57 pass reported there (comment). It does not make that pass translate on its own: with this change its next refusal is
graphics branch on a wave mask.Shared interface:
read_raw_graphicsinsrc/gfx1013_compute_native.cpp. Open PR #3527 edits the same function in different lines, so a small merge conflict is possible whichever lands second.Verification
Commit
5a2d2799onmain077bff3a. Windows 11 build 26300, MSVC 19.44, Windows SDK 10.0.26100 (DXC from the SDK), release preset. No GPU is involved; the checks compile and inspect bytecode.native_raw_depth_export(new)native_fixed_graphics_psi1native_direct_containernative_graphics_interface_librarynative_compile_dxil_refusalsnative_compile_dxil_rekeynative_compile_dxil_watchnative_direct_meshmainnative_direct_meshfails at itstoo-many-primitivescase (the compiler accepts a program the test expects it to refuse withexceeds declared range). I rebuiltcompile_dxilfrom unmodifiedmain077bff3aand got the same assertion, so this change does not cause it. I have not bisected it.Before and after for the new fixture, run directly:
main077bff3anative compute +0x20: raw graphics varying or system export requires a stage interfaceSV_DepthNot run: tests driven by other executables (the draw consumer,
d3d12_xs.dll), because onlycompile_dxilwas rebuilt. The pull request check does not run thenative_*tests.Evidence and follow-up
The fixture is source-built: raw gfx1013 words assembled in the test, reusing the vertex program, root and helpers of
tests/native_fixed_graphics_psi1_check.py. MIT, no external inputs.Cases:
dxc -dumpbinshowsSV_Depth, astoreOutput.f32, and noSV_Target;frontend_cache_hit=1and byte-identical pixel bytecode, so the depth row survives the front-end pair cache;Assumptions and limits:
graphics branch on a wave maskwith this change. The public fixture verifies the depth export case, not that request.Follow-up another contributor can pick up: the next refusal for that pass is a per-pixel discard written as a compare that writes EXEC, then
s_cbranch_execzto a null export, with descriptor and buffer loads on the surviving path before the depth export.Checklist
tests/cmake/native_raw_depth_export.cmake.)This change was AI-assisted.
🤖 Generated with Claude Code