startup: diagnose incomplete draw buffers and root SRV spans #3597
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-30T12:27:01Z.
Add 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.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-30T12:27:14Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-30T12:31:41Z.
Code review location:
src/startup_stubs/d3d12_draw.inl; line 3825For 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 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-30T12:31:41Z.
Code review location:
tests/startup_diagnostic_span_check.cpp; line 2With 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 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-30T12:31:41Z.
Review: COMMENTED
💡 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".
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-30T17:17:57Z.
Review: APPROVED
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.