gpu: log the exact fields of a refused slot 70 memory SRV call #1413

Merged
tedin7 merged 3 commits from upstream-pr/1420 into main 2026-11-24 11:37:23 +00:00
tedin7 commented 2026-11-24 11:10:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:10:27Z.


What

  • A refused device slot 70 call (a shader resource view whose resource is an address) used to log one fixed line with no fields. It now logs one compact line that names the first refusing check and the fields the checks read: resource dimension, format, width x height x depth/array size, mips, layout, flags, alignment, sample count/quality; view dimension, format, component mapping, and the mip/plane/array fields (2D and 2D-array), or first element/count/stride/flags (buffer), or six raw words (any other dimension); the destination handle and whether it is a descriptor of a known CBV/SRV/UAV heap; the address and whether its first byte is readable.
  • Reasons, in check order: null_destination, unreadable_resource, unreadable_view, null_address, unsupported_description, destination_outside_view_heaps, texture_unavailable.
  • Same rate limit as before (the first eight refusals of a process, shared counter), a fixed stack buffer, no allocation. The line goes where the old one went (stderr and X2W_TRAP_LOG). The old phrases are kept at the start of the line.
  • Buffer views and acceleration-structure views are refused exactly as before (unsupported_description); the line says "not supported" for them.
  • The formatter is a small header, src/startup_stubs/memory_srv_report.h, used by the production path. The only edit to d3d12_xs_device.cpp is one #include line (it must sit outside the anonymous namespace the .inl is included in). No other hunk touches that file, so it should not conflict with #1403, which edits the same file.

Why

Addresses #870. The reports there show the repeated line Device::slot70 unsupported memory SRV arguments with no field, so nobody can tell which check refused the call. Testers can paste the new line.

Tested

Windows (not run here; D3D12, WARP and MSVC were not available locally):

cmake --preset dev
cmake --build --preset dev --target startup_memory_srv_report_check startup_stream_consumer d3d12_xs_shim
ctest --preset dev --no-tests=error -R '^(startup_memory_srv_report|startup_address_srv_)' -V
cmake --preset release
cmake --build --preset release --target startup_memory_srv_report_check startup_stream_consumer d3d12_xs_shim
ctest --preset release --no-tests=error -R '^(startup_memory_srv_report|startup_address_srv_)' -V

startup_address_srv_hardware needs a real adapter; startup_address_srv_warp runs on WARP.

Run locally on Linux:

  • x86_64-w64-mingw32-g++ -std=c++17 -Wall -Wextra on tests/startup_memory_srv_report_check.cpp, then run under wine: passes (4 exact lines and a truncation check).
  • The five regular expressions in tests/startup_address_srv_check.py were run against lines produced by the same header (compiled with MinGW, run under wine) for the same arguments as the new calls in tests/startup_address_srv.cpp: all match; a one-field mutation is rejected.
  • x86_64-w64-mingw32-g++ -fsyntax-only on d3d12_xs_device.cpp (with the .inl) and tests/startup_address_srv.cpp: no error in changed code. d3d12_xs_device.cpp still reports the existing __try/__except errors in local_log.h (MSVC-only syntax), so it is not a full compile.
  • tests/docs_links_check.py, tests/bidi_controls_check.py, git diff --check: pass.

Behaviour on the success path: the decision is the same chain of checks in the same order (memory_srv_refusal), the log call happens only on a refusal, and the return paths and fallbacks are unchanged. This was checked by reading, not by a run.

The Windows address SRV test gains a call with a buffer resource/view and a call with a destination off the heap, placed before draw 6; draw 6 still expects the previous descriptor, so a refusal that wrote the descriptor would change the pixels. The 32 expected pixels are unchanged.

Unverified

  • That the run reported in #870 calls slot 70 with a buffer or acceleration-structure view. The issue text shows only the repeated refusal line, with no field. The new line is meant to answer this.
  • What object an acceleration-structure view should bind to in this runtime. Nothing in the placed-build material establishes it.
  • How a title lays out a buffer view at a guest address (element stride, raw views, first element). Not established.
  • The new Windows tests have not been run on D3D12.
  • The numeric view dimension 11 for acceleration-structure views is the documented enum value, used by number because the build headers may predate it.

Left out

  • Buffer SRVs at a guest address and acceleration-structure SRVs: not implemented. There is no evidence of what the draw path should read for a buffer view published through slot 70 (existing buffer SRVs are recorded with a resource object, not an address), and no evidence of a real call. Implementing either would invent semantics. A follow-up can use the new line from a failing run.
  • Returning an error code from slot 70 for a refused call (asked in #870): unchanged here; the call still returns without writing the descriptor.

AI-assisted (Claude Code); commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6580450656 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1420). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:10:27Z. --- ## What - A refused device slot 70 call (a shader resource view whose resource is an address) used to log one fixed line with no fields. It now logs one compact line that names the first refusing check and the fields the checks read: resource dimension, format, width x height x depth/array size, mips, layout, flags, alignment, sample count/quality; view dimension, format, component mapping, and the mip/plane/array fields (2D and 2D-array), or first element/count/stride/flags (buffer), or six raw words (any other dimension); the destination handle and whether it is a descriptor of a known CBV/SRV/UAV heap; the address and whether its first byte is readable. - Reasons, in check order: `null_destination`, `unreadable_resource`, `unreadable_view`, `null_address`, `unsupported_description`, `destination_outside_view_heaps`, `texture_unavailable`. - Same rate limit as before (the first eight refusals of a process, shared counter), a fixed stack buffer, no allocation. The line goes where the old one went (stderr and `X2W_TRAP_LOG`). The old phrases are kept at the start of the line. - Buffer views and acceleration-structure views are refused exactly as before (`unsupported_description`); the line says "not supported" for them. - The formatter is a small header, `src/startup_stubs/memory_srv_report.h`, used by the production path. The only edit to `d3d12_xs_device.cpp` is one `#include` line (it must sit outside the anonymous namespace the `.inl` is included in). No other hunk touches that file, so it should not conflict with #1403, which edits the same file. ## Why Addresses #870. The reports there show the repeated line `Device::slot70 unsupported memory SRV arguments` with no field, so nobody can tell which check refused the call. Testers can paste the new line. ## Tested Windows (not run here; D3D12, WARP and MSVC were not available locally): ```powershell cmake --preset dev cmake --build --preset dev --target startup_memory_srv_report_check startup_stream_consumer d3d12_xs_shim ctest --preset dev --no-tests=error -R '^(startup_memory_srv_report|startup_address_srv_)' -V cmake --preset release cmake --build --preset release --target startup_memory_srv_report_check startup_stream_consumer d3d12_xs_shim ctest --preset release --no-tests=error -R '^(startup_memory_srv_report|startup_address_srv_)' -V ``` `startup_address_srv_hardware` needs a real adapter; `startup_address_srv_warp` runs on WARP. Run locally on Linux: - `x86_64-w64-mingw32-g++ -std=c++17 -Wall -Wextra` on `tests/startup_memory_srv_report_check.cpp`, then run under wine: passes (4 exact lines and a truncation check). - The five regular expressions in `tests/startup_address_srv_check.py` were run against lines produced by the same header (compiled with MinGW, run under wine) for the same arguments as the new calls in `tests/startup_address_srv.cpp`: all match; a one-field mutation is rejected. - `x86_64-w64-mingw32-g++ -fsyntax-only` on `d3d12_xs_device.cpp` (with the `.inl`) and `tests/startup_address_srv.cpp`: no error in changed code. `d3d12_xs_device.cpp` still reports the existing `__try`/`__except` errors in `local_log.h` (MSVC-only syntax), so it is not a full compile. - `tests/docs_links_check.py`, `tests/bidi_controls_check.py`, `git diff --check`: pass. Behaviour on the success path: the decision is the same chain of checks in the same order (`memory_srv_refusal`), the log call happens only on a refusal, and the return paths and fallbacks are unchanged. This was checked by reading, not by a run. The Windows address SRV test gains a call with a buffer resource/view and a call with a destination off the heap, placed before draw 6; draw 6 still expects the previous descriptor, so a refusal that wrote the descriptor would change the pixels. The 32 expected pixels are unchanged. ## Unverified - That the run reported in #870 calls slot 70 with a buffer or acceleration-structure view. The issue text shows only the repeated refusal line, with no field. The new line is meant to answer this. - What object an acceleration-structure view should bind to in this runtime. Nothing in the placed-build material establishes it. - How a title lays out a buffer view at a guest address (element stride, raw views, first element). Not established. - The new Windows tests have not been run on D3D12. - The numeric view dimension 11 for acceleration-structure views is the documented enum value, used by number because the build headers may predate it. ## Left out - Buffer SRVs at a guest address and acceleration-structure SRVs: not implemented. There is no evidence of what the draw path should read for a buffer view published through slot 70 (existing buffer SRVs are recorded with a resource object, not an address), and no evidence of a real call. Implementing either would invent semantics. A follow-up can use the new line from a failing run. - Returning an error code from slot 70 for a refused call (asked in #870): unchanged here; the call still returns without writing the descriptor. AI-assisted (Claude Code); commands listed were executed locally.
upstream-sync closed this pull request 2026-11-24 12:02:52 +00:00
R0Y00 commented 2026-11-24 12:03:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:18:39Z.


Thanks for taking the diagnostic slice. This pairs with the independent menu retest in #870: menu navigation worked, and a later load emitted slot 70 refusals before the exception. Please keep this draft focused on classification. For reports from private inputs, ask for the refusal reason and a sanitized resource/view category summary, with source-built inputs for any full log excerpts. For the Windows fixture, please check that a rejected request leaves the destination untouched and an accepted request still writes a usable descriptor.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7129931874 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1420#issuecomment-7129931874). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T11:18:39Z. --- Thanks for taking the diagnostic slice. This pairs with the [independent menu retest in #870](https://github.com/R0Y00/Xbox2Windows/issues/870#issuecomment-7127658919): menu navigation worked, and a later load emitted slot 70 refusals before the exception. Please keep this draft focused on classification. For reports from private inputs, ask for the refusal reason and a sanitized resource/view category summary, with source-built inputs for any full log excerpts. For the Windows fixture, please check that a rejected request leaves the destination untouched and an accepted request still writes a usable descriptor.
tedin7 commented 2026-11-24 12:03:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T11:19:59Z.


Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 2dfe4df1:

  • Debug (--preset dev): ctest --preset dev -R '^(startup_memory_srv_report|startup_address_srv_warp)$' --no-tests=error --output-on-failure — 2/2 passed (startup_memory_srv_report 0.02s, startup_address_srv_warp 1.02s)
  • Release /O2 (--preset release): ctest --preset release -R '^(startup_memory_srv_report|startup_address_srv_warp)$' --no-tests=error --output-on-failure — 2/2 passed (startup_memory_srv_report 0.02s, startup_address_srv_warp 0.91s)
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7129960884 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1420#issuecomment-7129960884). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T11:19:59Z. --- Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `2dfe4df1`: - **Debug (`--preset dev`)**: `ctest --preset dev -R '^(startup_memory_srv_report|startup_address_srv_warp)$' --no-tests=error --output-on-failure` — **2/2 passed** (`startup_memory_srv_report` 0.02s, `startup_address_srv_warp` 1.02s) - **Release `/O2` (`--preset release`)**: `ctest --preset release -R '^(startup_memory_srv_report|startup_address_srv_warp)$' --no-tests=error --output-on-failure` — **2/2 passed** (`startup_memory_srv_report` 0.02s, `startup_address_srv_warp` 0.91s)
chatgpt-codex-connector[bot commented 2026-11-24 12:03:15 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T11:20:11Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T11:23:34.951034Z 2dfe4df Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7129965105 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1420#issuecomment-7129965105). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T11:20:11Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"2dfe4df1c8506bf5f59e1653f9abf53f0f8a0b32","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T11:23:34.951034Z">2026-11-24T11:23:34.951034Z</relative-time> | `2dfe4df` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
R0Y00 commented 2026-11-24 12:03:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T11:31:57Z.


Windows Release passed all three slot 70 cases on the previous head, including both WARP and hardware. d2b9bcd6 adds documentation for keeping full private-input logs local and uses the same executable behavior. The checks are startup_memory_srv_report and startup_address_srv_{warp,hardware}.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7130217957 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1420#issuecomment-7130217957). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T11:31:57Z. --- Windows Release passed all three slot 70 cases on the previous head, including both WARP and hardware. d2b9bcd6 adds documentation for keeping full private-input logs local and uses the same executable behavior. The checks are startup_memory_srv_report and startup_address_srv_{warp,hardware}.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1413
No description provided.