Native graphics: first-run menu stays black, VS refused with 'descriptor range does not cover resource' (byte offset 64 slot 2) #3726

Open
opened 2026-12-01 11:28:29 +00:00 by SimSalabimse · 1 comment
SimSalabimse commented 2026-12-01 11:28:29 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T11:28:29Z.


With the default -Render path (X2W_NATIVE_SHADERS_ONLY=1, native C++ frontend), the first-run menu never reaches the window: it stays black. On a ~7 minute title run on current main (a061032f), every not-drawn draw comes from one pipeline with one reason:

  • x2w-d3d12 direct-draw refusal 1: … reason=native_graphics_refused (about 12.2k calls, first seen at frame 8)
  • x2w-draw native graphics … refused: graphics descriptor range does not cover resource: VS root 0 byte offset 64 slot 2

Four other native graphics pipelines become ready and draw. The refused pipeline's root signature has one descriptor table with a single CBV range (slot 0, count 1), and the coverage check in prepare_direct_graphics (src/direct_compute_cache.cpp) is right that slot 2 is outside it. A sibling pipeline with the same root layout is accepted, so the suspect is the binding classification in the native lowerer (src/gfx1013_direct_compute.inl, SMEM table-slot association), which looks like it turns a load at data offset 64 inside the CBV window into descriptor-table slot 2. Not proven yet.

Heap-indexed root deferrals and textures uploaded 0 show up in the same run, but neither one is the draw gate (real draws refused: view heap 0, sampler heap 0).

I'll take this. The plan is a source-built fixture with that root layout: a VS that loads from the CBV at data offset 64 must be accepted and stay bound to slot 0, and a program that really loads a descriptor at table byte 64 must still be refused with the same reason. The fix goes in the lowerer's binding classification, not in the coverage check. If the false refusal can't be reproduced synthetically, I'll report back here before changing anything.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6719227903 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3726). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-01T11:28:29Z. --- With the default `-Render` path (`X2W_NATIVE_SHADERS_ONLY=1`, native C++ frontend), the first-run menu never reaches the window: it stays black. On a ~7 minute title run on current main (a061032f), every not-drawn draw comes from one pipeline with one reason: - `x2w-d3d12 direct-draw refusal 1: … reason=native_graphics_refused` (about 12.2k calls, first seen at frame 8) - `x2w-draw native graphics … refused: graphics descriptor range does not cover resource: VS root 0 byte offset 64 slot 2` Four other native graphics pipelines become ready and draw. The refused pipeline's root signature has one descriptor table with a single CBV range (slot 0, count 1), and the coverage check in `prepare_direct_graphics` (`src/direct_compute_cache.cpp`) is right that slot 2 is outside it. A sibling pipeline with the same root layout is accepted, so the suspect is the binding classification in the native lowerer (`src/gfx1013_direct_compute.inl`, SMEM table-slot association), which looks like it turns a load at data offset 64 inside the CBV window into descriptor-table slot 2. Not proven yet. Heap-indexed root deferrals and `textures uploaded 0` show up in the same run, but neither one is the draw gate (`real draws refused: view heap 0, sampler heap 0`). I'll take this. The plan is a source-built fixture with that root layout: a VS that loads from the CBV at data offset 64 must be accepted and stay bound to slot 0, and a program that really loads a descriptor at table byte 64 must still be refused with the same reason. The fix goes in the lowerer's binding classification, not in the coverage check. If the false refusal can't be reproduced synthetically, I'll report back here before changing anything. AI-Assisted
R0Y00 commented 2026-12-02 11:18:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T11:18:32Z.


PR #3821 covers the fixed graphics descriptor lookup at physical table offsets, including byte 64. Its source-built manifest and readback cases cover a valid record at that slot and reject a missing or incompatible record. The revised head passes the manifest and cache controls locally. Its Windows CI also hits the shared Mesh fixture failure tracked in #3851. The original first-run menu still needs a separate validation run after the runtime fix lands.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7343729157 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3726#issuecomment-7343729157). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T11:18:32Z. --- PR #3821 covers the fixed graphics descriptor lookup at physical table offsets, including byte 64. Its source-built manifest and readback cases cover a valid record at that slot and reject a missing or incompatible record. The revised head passes the manifest and cache controls locally. Its Windows CI also hits the shared Mesh fixture failure tracked in #3851. The original first-run menu still needs a separate validation run after the runtime fix lands.
Sign in to join this conversation.
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#3726
No description provided.