Log skipped DrawInstanced when SRV not bound #3382
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!3382
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3380"
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?
@KelboLive on GitHub · 2026-11-28 17:14 UTC · original
KelboLive:fix/black-screen-investigation→main· +5 −0 · 1 files · 1 commits · merged 2026-11-29 08:53 UTCProblem
DrawInstanced calls are silently skipped when
pass.srv_bound & 1is false (root parameter 0 not bound), producing black screens with no diagnostic output. The code only increments a counter (render_draws_skipped) visible in periodic heartbeat reports, not during active rendering.Fix
Add logging for the first 4 skip events showing which state flags were false:
pipeline_real: whether the pipeline has a desktop equivalenttargets_bound: whether render targets were successfully boundtopology_ok: whether primitive topology is valid (1–5)srv_bound: the bitmask of root SRV parameters that reached the desktop listThis makes it immediately visible when SRV binding failures cause all draws to be skipped, helping diagnose black-screen issues.
Changes
src/startup_stubs/d3d12_xs_device.cpp: Addedstatic LONG skippedcounter and logging in thelist_drawelse branch (line ~4710).@Leyukaka on GitHub · 2026-11-29 07:12 UTC · original · approved these changes
Approve at
bb9dfb62. Read from the diff and from main (212d4b5f) only; nothing was built or run.The 5 added lines only log: the
render_draws_skippedincrement is unchanged.first_calls(skipped, 4)(local_log.h:45) stops at the limit with a compare-exchange, so at most 4 lines are printed. The format matches the field types: the threeboolfields go through? 1 : 0to%d, andsrv_boundisunsignedto%x.git merge-tree --write-tree origin/mainhas no conflicts.gh pr checks: the Windows build and test, the Linux Python checks and the fixture job pass; the /O2 build and the coverage chart are skipped.Non-blocking: this
else(d3d12_xs_device.cpp:4710 on main) is also taken whenrecording(self)is null, which happens whenlist_openis false (main:3001). When a list is recording without a desktop pipeline, the draw returns earlier (main:4680-4683). Sopipeline_real=0in this line can only appear when no list is recording. With a closed list, all four printed flags can be set and the line names no failing condition. Printinglist != nullptrwould cover that case.No test is added; none is needed for a log line.
github-bot referenced this pull request2026-12-02 19:11:36 +00:00