shader: lower and draw the null export target (Part of #1723) #2612
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2612
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2612/head"
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?
@lambirou on GitHub · 2026-11-25 23:20 UTC · original
lambirou:startup/export-null-draw→main· +212 −1 · 5 files · 3 commits · closed without mergingProblem
exp null, off, off, off, off done vmis a pixel shader that only discards: the null target writes no channel, whilevmstill kills the lanes outside the entry execution mask. The startup translator refused it asexport target null, and a stage whose only export was null was classified asother.This PR revives the two commits from the closed #2026 by @tedin7 and adds the missing draw coverage. #2026 was closed only to keep the Windows queue short; its branch is unchanged.
Change
tools/startup/gfx2hlsl.py: accept the null target, keep thevmdiscard, add noSV_Targetor write mask, and classify a null-only stage as a pixel stage. A null export with a source operand, a compressed mask or anen:field stays refused.tests/startup_gfx2hlsl_export_null_check.py: the source-built translation, classification and refusal controls from #2026.tests/startup_gfx2hlsl_export_null_draw_check.py: compile a colour export followed byexp nullwith DXCps_6_0, draw 4x4 pixels throughoffscreen_check --startup-pixel-words, and compare all 64 words with the four constants. The negative control writesmrt0 = 0from the null site and must producepixel mismatch.CMakeLists.txtanddocs/experiments.md: register the pure check plusstartup_gfx2hlsl_export_null_draw_{warp,hardware}and document the scope.Verification
The hardware case ran on Windows 11 build 26300 with the D3D12 debug layer unavailable.
tests/docs_links_check.pypasses (19 files, 498 links),tests/bidi_controls_check.pypasses, andgit diff --checkis clean.Evidence
Every instruction is built from the documented EXP encoding; no archive bytes, game files, dumps or private logs are used. The pure check covers the null-only translation, null before and after
mrt0, thevmdiscard outside entry EXEC, the three refusal shapes and the pixel/vertex classification controls.Follow-up
Checklist
AI-assisted: the translation and first checks are @tedin7's; the draw fixture and this description were prepared with a Codex subagent and reviewed locally.
@lambirou on GitHub · 2026-11-25 23:22 UTC · original
@tedin7 this PR revives the two commits from your closed #2026 and adds the draw fixture discussed there (
7ee0b6d7). Your authorship is preserved on both commits.If you prefer to reopen #2026 instead, I can close this PR and hand the draw commit over; otherwise this is the combined branch ready for review. CI is running on
7ee0b6d7.@lambirou on GitHub · 2026-11-25 23:24 UTC · original
#2026 was reopened and merged at 23:22 UTC (merge commit
66026a39). Its merge includes the draw fixture from7ee0b6d7and the documentation update, withCo-authored-by: Roland Edi.This PR is now a duplicate of the merged #2026, so I am closing it. The useful draw coverage is already on
main; no further change is needed here.Pull request closed