startup: indirect draws refused with "index view has no proven desktop buffer range" (small index views) #3899

Open
opened 2026-12-02 23:22:19 +00:00 by SimSalabimse · 1 comment
SimSalabimse commented 2026-12-02 23:22:19 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-02T23:22:19Z.


Summary

Indirect draws whose index view points at memory the native path does not track are refused with "index view has no proven desktop buffer range". The views are small (16-bit index ranges), so a snapshot of the range into the upload ring, as the direct draw path does, may be enough.

What was measured

One native-path run of about 410 s on the Windows test PC (Simsalabim), from the indirect-other refusal census:

  • About 70k refused calls over 25 pipelines. About 68k of them (about 97%) are this reason.
  • The stored census lines name 14 pipelines for it. An earlier run had about 67k calls over 27 pipelines.
  • Only one of the 14 has a translation-time log line; the others were refused before translation, so there is no shader-side wall behind them.
  • The remaining reasons in that group are small (an unsupported topology and a missing render target, about 0.8k calls each).

Idea (not tested)

In the indirect path of src/startup_stubs/d3d12_xs_device.cpp, where the view is refused, copy the small index range into the upload ring the way the direct path does and build the view on that copy. Whether that is safe for every refused view (size limits, ranges that change between frames) has not been checked.

  • #3477 (refusal diagnostics)
  • No draft PR for this yet.

AI-Assisted

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6756679928 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3899). Originally posted by [SimSalabimse](https://github.com/SimSalabimse) on 2026-12-02T23:22:19Z. --- ## Summary Indirect draws whose index view points at memory the native path does not track are refused with "index view has no proven desktop buffer range". The views are small (16-bit index ranges), so a snapshot of the range into the upload ring, as the direct draw path does, may be enough. ## What was measured One native-path run of about 410 s on the Windows test PC (Simsalabim), from the indirect-other refusal census: - About 70k refused calls over 25 pipelines. About 68k of them (about 97%) are this reason. - The stored census lines name 14 pipelines for it. An earlier run had about 67k calls over 27 pipelines. - Only one of the 14 has a translation-time log line; the others were refused before translation, so there is no shader-side wall behind them. - The remaining reasons in that group are small (an unsupported topology and a missing render target, about 0.8k calls each). ## Idea (not tested) In the indirect path of `src/startup_stubs/d3d12_xs_device.cpp`, where the view is refused, copy the small index range into the upload ring the way the direct path does and build the view on that copy. Whether that is safe for every refused view (size limits, ranges that change between frames) has not been checked. ## Related - #3477 (refusal diagnostics) - No draft PR for this yet. AI-Assisted
triggered02 commented 2026-12-03 13:25:18 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-03T13:25:18Z.


Claiming this, with the slice scoped so the safety questions the idea raises get answered in the change rather than assumed away.

What I will do. In the indirect path, when the index view points at memory the native path does not track, snapshot the range into the upload ring the way the direct draw path does, and build the view on that copy — but only for views that fit a size limit, and with the copy taken at submission time so a range that changes between frames is captured per draw rather than aliased.

The three safety questions, and how I intend to answer each:

  1. Size limits. Snapshot only below a bound, refuse above it as today. The bound needs to come from the direct path's own limits so the two paths agree; I will read that before choosing a number, and the bound will be visible in the refusal text for anything still refused.
  2. Ranges that change between frames. Snapshot at draw submission, not at view creation, so each draw sees the bytes it was submitted with. If the direct path does it differently, I will follow the direct path and say which.
  3. What the copy costs. The ring is already the direct path's mechanism, so this adds ring traffic only for views that were previously refused outright — no new failure mode, just the same one the direct path pays.

Verification I can do here: build the shim with clang-cl, run the indirect-draw fixtures under Wine (they run here), and add a fixture case whose index view lives in memory the native path does not track — refused today, drawn through the snapshot after. What I cannot do is measure the effect on the title's 70k refused calls or frame time; that needs the Windows test PC, and the PR will say so.

Overlap: no comments, no assignee, no draft PR (the issue says so). #3477 is the diagnostics thread, not an implementation.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7379788860 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3899#issuecomment-7379788860). Originally posted by [triggered02](https://github.com/triggered02) on 2026-12-03T13:25:18Z. --- Claiming this, with the slice scoped so the safety questions the idea raises get answered in the change rather than assumed away. **What I will do.** In the indirect path, when the index view points at memory the native path does not track, snapshot the range into the upload ring the way the direct draw path does, and build the view on that copy — but only for views that fit a size limit, and with the copy taken at submission time so a range that changes between frames is captured per draw rather than aliased. **The three safety questions, and how I intend to answer each:** 1. *Size limits.* Snapshot only below a bound, refuse above it as today. The bound needs to come from the direct path's own limits so the two paths agree; I will read that before choosing a number, and the bound will be visible in the refusal text for anything still refused. 2. *Ranges that change between frames.* Snapshot at draw submission, not at view creation, so each draw sees the bytes it was submitted with. If the direct path does it differently, I will follow the direct path and say which. 3. *What the copy costs.* The ring is already the direct path's mechanism, so this adds ring traffic only for views that were previously refused outright — no new failure mode, just the same one the direct path pays. **Verification I can do here:** build the shim with clang-cl, run the indirect-draw fixtures under Wine (they run here), and add a fixture case whose index view lives in memory the native path does not track — refused today, drawn through the snapshot after. What I cannot do is measure the effect on the title's 70k refused calls or frame time; that needs the Windows test PC, and the PR will say so. **Overlap:** no comments, no assignee, no draft PR (the issue says so). #3477 is the diagnostics thread, not an implementation. AI-assisted.
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#3899
No description provided.