GPU: run indirect rectangle-list draws (#255) #282

Closed
github-bot wants to merge 3 commits from gh-pr/282/head into gh-pr/282/base
Owner

@⁠artor410 on GitHub · 2026-11-24 02:01 UTC · original
artor410:indirect-rectangles → main · +293 −32 · 3 files · 3 commits · closed without merging

Refs #255: the non-indexed draws its diagnostics name. Left open for someone to confirm with the game.

Summary

State::execute_indirect used to refuse indirect draws with the rectangle-list topology. They now go through:

 execute_indirect(DRAW, stride, max, arguments, count)
   bound()                                  # clamp + budget, as before
+  if topology == RECTANGLES
+    rectangle_vertices()                   # vertices the bound per-vertex buffers hold, whole rects, <= 4 MiB expanded
+    indirect::rectangles()                 # compute pass: each record -> our own 16-byte record
+      (n, inst, first, first_inst) -> (6*(n/3), inst, 6*(first/3), first_inst)
+      first % 3 != 0 or past the expanded vertices -> draws nothing
+    prepare(); rectangles(list, vertices, 0)   # existing CPU expansion, whole buffers from vertex 0
+  ExecuteIndirect(DRAW stride 16, our records, title's count buffer)
  • The title's records are not modified. The rewrite isn't idempotent, and the shadow copy is reused across submissions. The title's buffer goes back to INDIRECT_ARGUMENT after the pass, so a count kept beside the records stays valid.
  • HostList::argument_space: per-list 64 KiB chunks of shader-writable memory for the rewritten records, reused after a reset.
  • indirect::make now takes the source and a name, so the clamp and the new pass share it.

Evidence

No game files were used, and this is untested against the game.

  • New GPU test indirect::rectangle_records_become_triangle_records. It runs the real bound → rectangles → done sequence on the host device:
    [6,2,0,1] [7,1,3,0] [3,1,1,0] [3,1,9,0] (stride 20, 9 expanded vertices) → [12,2,0,1] [12,1,6,0] [0] [0], and the title's records come out unchanged.
    Before: it does not compile (no pass). After: it passes on an RDNA GPU with mesh shaders.
  • cargo test -p victory-gpu: 44 passed, 1 ignored. Clippy (with and without diagnostics) adds no warnings, and cargo xtask policy passes.

Known gaps (marked shortcut: in the code):

  • Indexed rectangle draws are still dropped.
  • The vertices are expanded on the CPU at submission, as for direct rectangle draws. Vertex data the GPU writes in the same submission is not seen, and each call copies the bound buffers whole (up to 4 MiB of expanded data per buffer).
  • Pipelines that read only SV_VertexID see expanded ids, the same as direct rectangle draws today.
  • The budget is charged the title's count, half of the triangle vertices actually drawn.
  • At most 4,096 records per call.

Merge Danger

Door: two-way

Blast Radius: small

This only runs with VICTORY_INDIRECT=1 (diagnostics builds), for draws that were dropped before.

🤖 Generated with Claude Code

**@⁠artor410** on GitHub · 2026-11-24 02:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/282) `artor410:indirect-rectangles` → `main` · +293 −32 · 3 files · 3 commits · closed without merging Refs #255: the non-indexed draws its diagnostics name. Left open for someone to confirm with the game. ## Summary `State::execute_indirect` used to refuse indirect draws with the rectangle-list topology. They now go through: ```diff execute_indirect(DRAW, stride, max, arguments, count) bound() # clamp + budget, as before + if topology == RECTANGLES + rectangle_vertices() # vertices the bound per-vertex buffers hold, whole rects, <= 4 MiB expanded + indirect::rectangles() # compute pass: each record -> our own 16-byte record + (n, inst, first, first_inst) -> (6*(n/3), inst, 6*(first/3), first_inst) + first % 3 != 0 or past the expanded vertices -> draws nothing + prepare(); rectangles(list, vertices, 0) # existing CPU expansion, whole buffers from vertex 0 + ExecuteIndirect(DRAW stride 16, our records, title's count buffer) ``` - The title's records are not modified. The rewrite isn't idempotent, and the shadow copy is reused across submissions. The title's buffer goes back to `INDIRECT_ARGUMENT` after the pass, so a count kept beside the records stays valid. - `HostList::argument_space`: per-list 64 KiB chunks of shader-writable memory for the rewritten records, reused after a reset. - `indirect::make` now takes the source and a name, so the clamp and the new pass share it. ## Evidence No game files were used, and this is **untested against the game**. - New GPU test `indirect::rectangle_records_become_triangle_records`. It runs the real `bound` → `rectangles` → `done` sequence on the host device: `[6,2,0,1] [7,1,3,0] [3,1,1,0] [3,1,9,0]` (stride 20, 9 expanded vertices) → `[12,2,0,1] [12,1,6,0] [0] [0]`, and the title's records come out unchanged. **Before:** it does not compile (no pass). **After:** it passes on an RDNA GPU with mesh shaders. - `cargo test -p victory-gpu`: 44 passed, 1 ignored. Clippy (with and without `diagnostics`) adds no warnings, and `cargo xtask policy` passes. Known gaps (marked `shortcut:` in the code): - Indexed rectangle draws are still dropped. - The vertices are expanded on the CPU at submission, as for direct rectangle draws. Vertex data the GPU writes in the same submission is not seen, and each call copies the bound buffers whole (up to 4 MiB of expanded data per buffer). - Pipelines that read only `SV_VertexID` see expanded ids, the same as direct rectangle draws today. - The budget is charged the title's count, half of the triangle vertices actually drawn. - At most 4,096 records per call. ## Merge Danger **Door:** two-way **Blast Radius:** small This only runs with `VICTORY_INDIRECT=1` (diagnostics builds), for draws that were dropped before. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ExecuteIndirect draws with the console's rectangle-list topology were
refused, as rectangles are expanded on the CPU and an indirect draw's
vertex count is only on the GPU. Now the bound vertex buffers are expanded
whole (as direct rectangle draws are, up to 4 MiB of expanded vertices per
buffer), and a small compute pass rewrites each clamped record into a
triangle-list record of our own: 6 * (count / 3) vertices from 6 * (first
/ 3). Records that start inside a rectangle or reach past the expanded
vertices draw nothing; the title's records are left unchanged.

Indexed rectangle draws are still dropped.

Refs #255.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The count may sit beside the records, so the rectangle pass puts the
title's buffer back where the clamp left it; the signature is found before
the pass; triangle records stay within the clamp's 2^24 vertices; our
compute passes are named in compile errors; the 4,096-record limit is
marked as a shortcut.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A rectangle-list record groups its rectangles from its own first vertex,
so `[3, 1, 1, 0]` is one whole rectangle (vertices 1, 2, 3). The rewrite
refused records whose first vertex was not a multiple of 3. The bound
buffers are now expanded from each of their first three vertices, one
expansion after the other, and a record reads the expansion its first
vertex falls in. The expansions share the former 4 MiB per buffer.

Raised by r4tedx on #282.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:49 +00:00
github-bot closed this pull request 2026-11-26 03:57:49 +00:00
Author
Owner

@⁠ifBars on GitHub · 2026-11-24 02:15 UTC · original

I tested the non-indexed rectangle rewrite together with #242 on Windows 10 using Microsoft WARP. Both patches modify the lifetime and layout of the indirect argument buffer. We combined the rectangle rewrite with #242’s count-aware clamp so it can read the title arguments once, write the expanded draw into the existing scratch record, and charge the budget for the expanded vertices.

The software execution test read the rewritten records back and checked vertex counts and offsets, instance fields, stride padding, the active count, and the unchanged source. All seven indirect tests passed. This test covers argument generation. It does not establish visible world geometry. The original CPU expansion still cannot see vertex data written by the GPU earlier in the same submission.

Integration commit and software test. AI-assisted implementation and verification.

**@⁠ifBars** on GitHub · 2026-11-24 02:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7119931178) I tested the non-indexed rectangle rewrite together with [#242](https://git.gtahub.st/github/Marvisak--VIctory/pulls/242) on Windows 10 using Microsoft WARP. Both patches modify the lifetime and layout of the indirect argument buffer. We combined the rectangle rewrite with #242’s count-aware clamp so it can read the title arguments once, write the expanded draw into the existing scratch record, and charge the budget for the expanded vertices. The software execution test read the rewritten records back and checked vertex counts and offsets, instance fields, stride padding, the active count, and the unchanged source. All seven indirect tests passed. This test covers argument generation. It does not establish visible world geometry. The original CPU expansion still cannot see vertex data written by the GPU earlier in the same submission. [Integration commit and software test](https://github.com/ifBars/VICauseway/commit/78a7f5f62cfd10a7b13df3b9623555d4f0d71eea). AI-assisted implementation and verification.
Author
Owner

@⁠gw1337x on GitHub · 2026-11-24 02:18 UTC · original

Tested in game on an RX 7800 XT (Windows 11 26200), diag build, VICTORY_D3D12_DRED=1. Build: main d2a4bae + #135 + #124 + #130 + this PR (clean merge), one run into the opening cutscene.

What the PR fixes: the rectangle drops are gone. The drop summary had indirect kind 0: pipeline mismatch (... topology 17) at about 246 per frame before. With this PR that line never appears, and neither does rectangles not expanded. The draws go through.

The picture: no visible change. The cutscene still shows only its intro card and subtitles over black, at about 1–1.7 fps. So on its own this isn't what keeps the world black. The largest remaining drops are the untranslated shaders listed in #293: the mesh shader 910b4be059bfb28f, the compute shader e30970f1727063fd, and the "address in an SGPR" group.

How the run ended: the usual page fault inside freed textures (three 2048×2048 BC7), at about 113 s (#135's remaining case).

Merge note: this PR conflicts with #242, which rewrites the same clamp path into a scratch copy (draw.rs execute_indirect, host.rs argument memory, indirect.rs done). Whichever lands second will need its rectangle pass to read the clamped records from #242's copy.

**@⁠gw1337x** on GitHub · 2026-11-24 02:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7119995818) Tested in game on an RX 7800 XT (Windows 11 26200), `diag` build, `VICTORY_D3D12_DRED=1`. Build: `main` `d2a4bae` + #135 + #124 + #130 + this PR (clean merge), one run into the opening cutscene. **What the PR fixes:** the rectangle drops are gone. The drop summary had `indirect kind 0: pipeline mismatch (... topology 17)` at about 246 per frame before. With this PR that line never appears, and neither does `rectangles not expanded`. The draws go through. **The picture:** no visible change. The cutscene still shows only its intro card and subtitles over black, at about 1–1.7 fps. So on its own this isn't what keeps the world black. The largest remaining drops are the untranslated shaders listed in #293: the mesh shader `910b4be059bfb28f`, the compute shader `e30970f1727063fd`, and the "address in an SGPR" group. **How the run ended:** the usual page fault inside freed textures (three 2048×2048 BC7), at about 113 s (#135's remaining case). **Merge note:** this PR conflicts with #242, which rewrites the same clamp path into a scratch copy (`draw.rs` `execute_indirect`, `host.rs` argument memory, `indirect.rs` `done`). Whichever lands second will need its rectangle pass to read the clamped records from #242's copy.
Author
Owner

@⁠tanishq-dubey on GitHub · 2026-11-24 03:00 UTC · original

Independent title run of head ba9864dd48177e9a78a5dc95e54ca7a70a26db5e on RTX 5090, NVIDIA 620.70.06, Linux/Wine 11.22, vkd3d-proton 3.2.0, diagnostics build. Kept separately tested local handle-type, sparse-copy, indirect-budget and self-swap corrections; no wave64/waterfall stack. The world remained black and ran at roughly 0.3–0.6 fps in sampled intervals before a title null-write termination after a long stall. During early world intervals the drop summary reported indirect kind 0: rectangles not expanded (192–512 per frame, while pipelines were still building). That reason combines missing/pending host pipeline, unavailable vertex input, signature and rewrite failures, so this does not establish which condition occurred or whether later eligible rectangles ran. Other shader translations still fail. No game data attached. AI-assisted.

**@⁠tanishq-dubey** on GitHub · 2026-11-24 03:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7120679367) Independent title run of head `ba9864dd48177e9a78a5dc95e54ca7a70a26db5e` on RTX 5090, NVIDIA 620.70.06, Linux/Wine 11.22, vkd3d-proton 3.2.0, diagnostics build. Kept separately tested local handle-type, sparse-copy, indirect-budget and self-swap corrections; no wave64/waterfall stack. The world remained black and ran at roughly 0.3–0.6 fps in sampled intervals before a title null-write termination after a long stall. During early world intervals the drop summary reported `indirect kind 0: rectangles not expanded` (192–512 per frame, while pipelines were still building). That reason combines missing/pending host pipeline, unavailable vertex input, signature and rewrite failures, so this does not establish which condition occurred or whether later eligible rectangles ran. Other shader translations still fail. No game data attached. AI-assisted.
Author
Owner

@⁠ChruutvoLuzi on GitHub · 2026-11-24 03:04 UTC · original

Confirmation on NVIDIA in game. RTX 4090, driver 621.01, Windows 11, diag build with VICTORY_D3D12_DRED=1, the first mission's opening. d2a4bae with #189, #205, #206, #134, #123, #89, #136 and #193 merged locally, once without and once with this PR at ba9864d (#388 was also added in the second run; it doesn't touch the indirect path).

On this base the dropped rectangle draws are labelled differently from the AMD report: execute_indirect sends DRAW/INDEXED with the rectangle topology to prepare, so the drop summary says indirect kind 0: prepare failed (compute false, mesh false) instead of pipeline mismatch (... topology 17). It's the same refusal.

Without this PR With this PR
indirect kind 0: prepare failed about 258 per frame (2,581 over 10 world reporting intervals) never logged
Indirect executions dropped per frame, all reasons about 1,110 about 940
End 0x887A0006 after about 60 s in the world 0x887A0006 after about 90 s

So the rectangle drops are gone on NVIDIA too, at about the rate the AMD run above saw. After it the drop summary names no indirect-specific reason; what it still lists is per program without a host pipeline. The hang at the end is the one in #71 and not related to this PR. I didn't capture frames, so I can't say whether anything new shows up on screen.

AI-assisted (Claude Code).

**@⁠ChruutvoLuzi** on GitHub · 2026-11-24 03:04 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7120745916) Confirmation on NVIDIA in game. RTX 4090, driver 621.01, Windows 11, diag build with `VICTORY_D3D12_DRED=1`, the first mission's opening. `d2a4bae` with #189, #205, #206, #134, #123, #89, #136 and #193 merged locally, once without and once with this PR at `ba9864d` (#388 was also added in the second run; it doesn't touch the indirect path). On this base the dropped rectangle draws are labelled differently from the AMD report: `execute_indirect` sends `DRAW`/`INDEXED` with the rectangle topology to `prepare`, so the drop summary says `indirect kind 0: prepare failed (compute false, mesh false)` instead of `pipeline mismatch (... topology 17)`. It's the same refusal. | | Without this PR | With this PR | |---|---|---| | `indirect kind 0: prepare failed` | about 258 per frame (2,581 over 10 world reporting intervals) | never logged | | Indirect executions dropped per frame, all reasons | about 1,110 | about 940 | | End | `0x887A0006` after about 60 s in the world | `0x887A0006` after about 90 s | So the rectangle drops are gone on NVIDIA too, at about the rate the AMD run above saw. After it the drop summary names no indirect-specific reason; what it still lists is per program without a host pipeline. The hang at the end is the one in #71 and not related to this PR. I didn't capture frames, so I can't say whether anything new shows up on screen. AI-assisted (Claude Code).
Author
Owner

@⁠lordon1a on GitHub · 2026-11-24 03:08 UTC · original

AI-assisted.

Tested ba9864dd4 on Windows 11 Home 26H2 (build 26200) with Intel(R) Iris(R) Xe Graphics (8086:46a6, driver 32.0.101.7088, DXGI Adapter 0), rustc 1.100.0 (x86_64-pc-windows-gnullvm):

  • cargo xtask policy: 151 files ok
  • cargo test -p victory-gpu -- --test-threads=1: 44 passed, 0 failed, 1 ignored (benchmark) in 0.24s, including indirect::tests::rectangle_records_become_triangle_records and indirect::tests::argument_clamp_builds.
  • Zero new compiler warnings in the touched files (draw.rs, host.rs, indirect.rs).

(Unit/host D3D12 verification only; no title dump run.)

**@⁠lordon1a** on GitHub · 2026-11-24 03:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7120810988) AI-assisted. Tested `ba9864dd4` on **Windows 11 Home 26H2 (build 26200)** with **Intel(R) Iris(R) Xe Graphics** (`8086:46a6`, driver `32.0.101.7088`, DXGI Adapter 0), `rustc 1.100.0` (`x86_64-pc-windows-gnullvm`): - `cargo xtask policy`: `151 files ok` - `cargo test -p victory-gpu -- --test-threads=1`: **44 passed, 0 failed, 1 ignored** (benchmark) in `0.24s`, including `indirect::tests::rectangle_records_become_triangle_records` and `indirect::tests::argument_clamp_builds`. - Zero new compiler warnings in the touched files (`draw.rs`, `host.rs`, `indirect.rs`). *(Unit/host D3D12 verification only; no title dump run.)*
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 03:29 UTC · original

Review note (built on main d2a4bae; cargo test -p victory-gpu passes on an RTX 5070). One case that is refused although it is a complete rectangle list: the helper shader requires the start vertex to be a multiple of 3,

bool whole = a.z % 3 == 0 && a.z <= vertices && rects * 3 <= vertices - a.z;

A record [3, 1, 1, 0] (three vertices, one instance, starting at vertex 1) is one whole rectangle, formed from vertices 1, 2, 3: primitives are grouped from the record's start vertex, not from vertex 0. Here it becomes an empty draw, and the test encodes that as expected. Grouping relative to a.z would keep it (#346 expands on the GPU from the record's start).

These are the roughly 250 dropped draws per frame of #255, so if a tester has the numbers: how many of the world's rectangle-list records have a start vertex that is not a multiple of 3? If none, this does not matter in practice.

From reading and synthetic tests only; I have no copy of the title.

**@⁠r4tedx** on GitHub · 2026-11-24 03:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121154575) Review note (built on `main` `d2a4bae`; `cargo test -p victory-gpu` passes on an RTX 5070). One case that is refused although it is a complete rectangle list: the helper shader requires the start vertex to be a multiple of 3, ```hlsl bool whole = a.z % 3 == 0 && a.z <= vertices && rects * 3 <= vertices - a.z; ``` A record `[3, 1, 1, 0]` (three vertices, one instance, starting at vertex 1) is one whole rectangle, formed from vertices 1, 2, 3: primitives are grouped from the record's start vertex, not from vertex 0. Here it becomes an empty draw, and the test encodes that as expected. Grouping relative to `a.z` would keep it (#346 expands on the GPU from the record's start). These are the roughly 250 dropped draws per frame of #255, so if a tester has the numbers: how many of the world's rectangle-list records have a start vertex that is not a multiple of 3? If none, this does not matter in practice. From reading and synthetic tests only; I have no copy of the title.
Author
Owner

@⁠SpaghettiMaster545 on GitHub · 2026-11-24 03:31 UTC · original

Confirmed with the title on ba9864d merged alone onto main d2a4bae (clean), against two main runs made the same way (#255).

  • NVIDIA GeForce RTX 5070 Ti, driver 621.24 (32.0.16.2124); Ryzen 7 9800X3D; Windows 11 10.0.26100; Rust 1.98.1. Diag build, its own empty VICTORY_CACHE_DIR, VICTORY_KEYS into story mode, until the host GPU failure (#71, unrelated).
  • dropped N/frame without a host pipeline: indirect kind 0, every 5 s line, from the first world line to the hang:
    • main, two runs: prepare failed (compute false, mesh false): 40, 64, 64, 70, 127, 200, then 256 per frame on every line after (45 … 256 in the second run). These are the ~250 of #255.
    • this PR: rectangles not expanded: 214, 192, 192, 192, 130, 80, 20 per frame. The drops fall while the world loads, instead of rising to 256: by the last line, about 236 of the ~256 per frame go through.
  • What is left is the new reason rectangles not expanded, so some records still fall outside what the expansion takes (whole rectangles within the bound vertices, the 4 MiB cap, or first % 3 != 0). I did not split those further.
  • Nothing else changes: program by program the translation is as on main, and the world hang is at the same point (84 s, within main's 59–111 s).

Not tested

  • Whether the scene behind the cutscene is drawn now: I did not capture frames, so this report confirms only that the draws are run.
  • AMD GPUs, a release build.

(Claude Code, Claude Opus 5.5: ran the title on both builds and compared the drop lines.)

**@⁠SpaghettiMaster545** on GitHub · 2026-11-24 03:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121179702) **Confirmed with the title** on `ba9864d` merged alone onto `main` `d2a4bae` (clean), against two `main` runs made the same way (#255). - NVIDIA GeForce RTX 5070 Ti, driver 621.24 (32.0.16.2124); Ryzen 7 9800X3D; Windows 11 10.0.26100; Rust 1.98.1. Diag build, its own empty `VICTORY_CACHE_DIR`, `VICTORY_KEYS` into story mode, until the host GPU failure (#71, unrelated). - `dropped N/frame without a host pipeline: indirect kind 0`, every 5 s line, from the first world line to the hang: - `main`, two runs: `prepare failed (compute false, mesh false)`: 40, 64, 64, 70, 127, 200, then 256 per frame on every line after (45 … 256 in the second run). These are the ~250 of #255. - this PR: `rectangles not expanded`: 214, 192, 192, 192, 130, 80, 20 per frame. The drops fall while the world loads, instead of rising to 256: by the last line, about 236 of the ~256 per frame go through. - What is left is the new reason `rectangles not expanded`, so some records still fall outside what the expansion takes (whole rectangles within the bound vertices, the 4 MiB cap, or `first % 3 != 0`). I did not split those further. - Nothing else changes: program by program the translation is as on `main`, and the world hang is at the same point (84 s, within `main`'s 59–111 s). **Not tested** - Whether the scene behind the cutscene is drawn now: I did not capture frames, so this report confirms only that the draws are run. - AMD GPUs, a release build. (Claude Code, Claude Opus 5.5: ran the title on both builds and compared the drop lines.)
Author
Owner

@⁠artor410 on GitHub · 2026-11-24 03:34 UTC · original

Thanks, r4tedx: fixed in 4d3d003. The bound buffers are now expanded from each of their first three vertices, one expansion after the other, and a record reads the expansion its first vertex falls in. So [3, 1, 1, 0] draws vertices 1, 2, 3 (the test now expects this, plus a start at 5). The three expansions share the former 4 MiB per buffer, and the CPU copy runs three times per draw. Synthetic tests only (cargo test -p victory-gpu: 44 passed); untested against the title.

On #242 (gw1337x, ifBars): agreed, whichever lands second has to read the clamped records from #242's copy. I'll rebase onto it if it merges first.

**@⁠artor410** on GitHub · 2026-11-24 03:34 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121228755) Thanks, r4tedx: fixed in 4d3d003. The bound buffers are now expanded from each of their first three vertices, one expansion after the other, and a record reads the expansion its first vertex falls in. So `[3, 1, 1, 0]` draws vertices 1, 2, 3 (the test now expects this, plus a start at 5). The three expansions share the former 4 MiB per buffer, and the CPU copy runs three times per draw. Synthetic tests only (`cargo test -p victory-gpu`: 44 passed); untested against the title. On #242 (gw1337x, ifBars): agreed, whichever lands second has to read the clamped records from #242's copy. I'll rebase onto it if it merges first.
Author
Owner

@⁠SpaghettiMaster545 on GitHub · 2026-11-24 03:51 UTC · original

Follow-up for the new head 4d3d003, the same setup as my report above: three runs, but each ended at the world hang (#71) after only 47, 52 and 64 s, so they reach just the first one or two drop lines. Those read 192, then 96–146 rectangles not expanded per frame, falling the same way as on ba9864d (214 → 20 over an 84 s run). That is too short to tell whether the first % 3 change removes the rest of the drops.

All three 4d3d003 runs hung a bit earlier than main (59–111 s over three runs) and ba9864d (84 s). With so few runs, and the hang time varying this much on main alone, I would not read anything into that yet.

(Claude Code, Claude Opus 5.5.)

**@⁠SpaghettiMaster545** on GitHub · 2026-11-24 03:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121490398) Follow-up for the new head `4d3d003`, the same setup as my report above: three runs, but each ended at the world hang (#71) after only 47, 52 and 64 s, so they reach just the first one or two drop lines. Those read 192, then 96–146 `rectangles not expanded` per frame, falling the same way as on `ba9864d` (214 → 20 over an 84 s run). That is too short to tell whether the `first % 3` change removes the rest of the drops. All three `4d3d003` runs hung a bit earlier than `main` (59–111 s over three runs) and `ba9864d` (84 s). With so few runs, and the hang time varying this much on `main` alone, I would not read anything into that yet. (Claude Code, Claude Opus 5.5.)
Author
Owner

@⁠Exorion1er on GitHub · 2026-11-24 09:33 UTC · original

For whoever picks between this and #346, which handle the same draws (#255):

  • #346 expands indirect rectangle lists on the GPU after the clamp, with a byte-for-byte GPU-vs-CPU test.
  • Its head (c256f83) builds under stock Proton.
  • On an RX 9070 XT under Proton, the rectangle-list draws ran in the title with it, with no GPU fault from the expander.
  • This PR takes a CPU route and says it was left open for a game confirmation.
  • Both touch the same functions in draw.rs and indirect.rs, so only one can land.

AI-assisted (Claude Code).

**@⁠Exorion1er** on GitHub · 2026-11-24 09:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7127580041) For whoever picks between this and #346, which handle the same draws (#255): - #346 expands indirect rectangle lists on the GPU after the clamp, with a byte-for-byte GPU-vs-CPU test. - Its head (`c256f83`) builds under stock Proton. - On an RX 9070 XT under Proton, the rectangle-list draws ran in the title with it, with no GPU fault from the expander. - This PR takes a CPU route and says it was left open for a game confirmation. - Both touch the same functions in `draw.rs` and `indirect.rs`, so only one can land. AI-assisted (Claude Code).
Author
Owner

@⁠iurysf on GitHub · 2026-11-24 11:21 UTC · original

In-game confirmation on NVIDIA, as asked. RTX 4070, driver 32.0.16.2101, on top of #493 + #483 (needed to keep this GPU alive in the world). Merges cleanly. Default loop limit, 300 s, DRED=1 + GPU_TIMING=1, 2 runs each, alternating, idle CPU.

rectangle drops (indirect kind 0: prepare failed, per frame, last report) device removed time in world
base 256, 256 no, no 225 s, 217 s
base + this PR 47, 12 no, no 225 s, 218 s
  • This removes most of #255's dropped rectangle draws (80–95%), with no removal and no GPU-time change beyond run-to-run noise.
  • Most of the remainder is not this PR's fault: the expanded draws then fail in prepare, because the dynamic descriptor slots run out (a draw or dispatch dropped: no dynamic slots for its tables). #688 targets that, and I'm measuring the two together next. A few logged rectangles not expanded (16 in one run).
  • No visible change yet: in the frames we captured (~100–700 frames into the world), the screen is the opening credit sequence over black in all variants.

AI-assisted.

**@⁠iurysf** on GitHub · 2026-11-24 11:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7130000470) In-game confirmation on NVIDIA, as asked. RTX 4070, driver 32.0.16.2101, on top of #493 + #483 (needed to keep this GPU alive in the world). Merges cleanly. Default loop limit, 300 s, `DRED=1` + `GPU_TIMING=1`, 2 runs each, alternating, idle CPU. | | rectangle drops (`indirect kind 0: prepare failed`, per frame, last report) | device removed | time in world | |---|---|---|---| | base | 256, 256 | no, no | 225 s, 217 s | | base + this PR | **47, 12** | no, no | 225 s, 218 s | - This removes most of #255's dropped rectangle draws (80–95%), with no removal and no GPU-time change beyond run-to-run noise. - Most of the remainder is not this PR's fault: the expanded draws then fail in `prepare`, because the dynamic descriptor slots run out (`a draw or dispatch dropped: no dynamic slots for its tables`). #688 targets that, and I'm measuring the two together next. A few logged `rectangles not expanded` (16 in one run). - **No visible change yet:** in the frames we captured (~100–700 frames into the world), the screen is the opening credit sequence over black in all variants. AI-assisted.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/Marvisak--VIctory!282
No description provided.