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

Open
opened 2026-12-02 23:23:44 +00:00 by github-bot · 1 comment
Owner

@⁠SimSalabimse on GitHub · 2026-12-02 23:22 UTC · original

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.

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

AI-Assisted

**@⁠SimSalabimse** on GitHub · 2026-12-02 23:22 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3899) ## 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 - #3479 (refusal diagnostics) - No draft PR for this yet. AI-Assisted
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 23:23:44 +00:00
Author
Owner

@⁠triggered02 on GitHub · 2026-12-03 13:25 UTC · original

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). #3479 is the diagnostics thread, not an implementation.

AI-assisted.

**@⁠triggered02** on GitHub · 2026-12-03 13:25 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3899#issuecomment-7379788860) 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). #3479 is the diagnostics thread, not an implementation. AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3901
No description provided.