startup: diagnose incomplete draw buffers and root SRV spans #3599
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!3599
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3597"
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?
@tedin7 on GitHub · 2026-11-30 12:27 UTC · original
tedin7:uppr23-diagnostic-span-incomplete-buffers→main· +118 −3 · 5 files · 2 commits · merged 2026-11-30 17:18 UTCAdd bounded per-key diagnostic logging (
log_incomplete_buffer, capped per shader key) when indirect translated draws refuse due to an incomplete vertex, index, or buffer SRV range, reporting the requested address/size and the nearest registered desktop buffer span via a small header-onlyDiagnosticSpanhelper (src/startup_stubs/diagnostic_span.h).Read-only diagnostics on existing refusal paths — zero change to draw behavior.
Tests
tests/startup_diagnostic_span_check.cpp(registered viatests/cmake/startup_diagnostic_span.cmakeasstartup_diagnostic_span) covering containment, distance selection, and the 64 MiB span cutoff.@chatgpt-codex-connector[bot] on GitHub · 2026-11-30 12:27 UTC · original · edited 2026-11-30 12:31 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
77e6891ℹ️ 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.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-30 12:31 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
77e689167fℹ️ 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".
@ -3765,6 +3822,8 @@ bool draw_translated(Wrapper* self, bool indexed, UINT count, UINT instances, UI: "translated draw requires a complete GPU-backed table buffer range",srv.source == 1 ? indirect_refusal_code::incomplete_vertex_stream: indirect_refusal_code::incomplete_table_buffer);log_incomplete_buffer(tr->key, i, srv.source, srv.a, address, bytes, "incomplete GPU-backed buffer range");@chatgpt-codex-connector[bot] on GitHub · 2026-11-30 12:31 UTC · original
For an indirect descriptor-table SRV (
srv.source == 0),addressandbytesare still zero here: only vertex/root bindings initialize these locals above, and the outer table-range decoding occurs below this early return.indirect_table_bufferdecodes the descriptor internally but does not update those locals. Consequently, a non-null range that crosses its backing allocation is misleadingly logged asaddress 0x0 bytes 0, discarding the information this diagnostic is intended to expose. Populate the diagnostic fields from the descriptor or resolver before emitting both new early-refusal logs.Useful? React with 👍 / 👎.
@ -0,0 +1,22 @@#include "startup_stubs/diagnostic_span.h"#include <cassert>@chatgpt-codex-connector[bot] on GitHub · 2026-11-30 12:31 UTC · original
With the
releasepreset,NDEBUGdisables every assertion in this test, so the new CTest reports success without checking any result in the Release suite run by.github/workflows/windows.yml. I verified this with a standalone build: changingdiagnostic_span.h:11fromgap <=togap <fails the Debug check but still exits successfully with-O2 -DNDEBUG. UndefineNDEBUGbefore including<cassert>, as the other assertion-based checks do, or use explicit failure checks so Release builds retain the regression coverage.Useful? React with 👍 / 👎.
github-bot referenced this pull request2026-11-30 13:14:41 +00:00
@R0Y00 on GitHub · 2026-11-30 17:17 UTC · original · approved these changes
Verified that the indirect-table decode now reports address and span back to the refusal log, including when backing lookup fails after decoding. The environment-gated root diagnostic uses the existing table and allocator locks. Built
tests/startup_diagnostic_span_check.cppwith MSVC C++17 and ran it successfully on Windows, covering exact containment, both proximity bounds and overflow. This run covered the helper, not a live draw.