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

Closed
artor410 wants to merge 3 commits from upstream-pr/282 into main
artor410 commented 2026-11-24 02:01:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-24T02:01:57Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:6572909371 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282). Originally posted by [artor410](https://github.com/artor410) on 2026-11-24T02:01:57Z. --- 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)
ifBars commented 2026-11-24 06:55:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ifBars on 2026-11-24T02:15:32Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119931178 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7119931178). Originally posted by [ifBars](https://github.com/ifBars) on 2026-11-24T02:15:32Z. --- I tested the non-indexed rectangle rewrite together with [#242](https://github.com/Marvisak/VIctory/pull/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.
gw1337x commented 2026-11-24 06:55:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by gw1337x on 2026-11-24T02:18:23Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119995818 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7119995818). Originally posted by [gw1337x](https://github.com/gw1337x) on 2026-11-24T02:18:23Z. --- 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.
tanishq-dubey commented 2026-11-24 06:55:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tanishq-dubey on 2026-11-24T03:00:14Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120679367 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7120679367). Originally posted by [tanishq-dubey](https://github.com/tanishq-dubey) on 2026-11-24T03:00:14Z. --- 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.
ChruutvoLuzi commented 2026-11-24 06:55:19 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ChruutvoLuzi on 2026-11-24T03:04:26Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120745916 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7120745916). Originally posted by [ChruutvoLuzi](https://github.com/ChruutvoLuzi) on 2026-11-24T03:04:26Z. --- 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).
lordon1a commented 2026-11-24 06:55:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by lordon1a on 2026-11-24T03:08:36Z.


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.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120810988 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7120810988). Originally posted by [lordon1a](https://github.com/lordon1a) on 2026-11-24T03:08:36Z. --- 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.)*
r4tedx commented 2026-11-24 06:55:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-24T03:29:56Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121154575 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121154575). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-24T03:29:56Z. --- 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.
SpaghettiMaster545 commented 2026-11-24 06:55:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SpaghettiMaster545 on 2026-11-24T03:31:33Z.


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.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121179702 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121179702). Originally posted by [SpaghettiMaster545](https://github.com/SpaghettiMaster545) on 2026-11-24T03:31:33Z. --- **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.)
artor410 commented 2026-11-24 06:55:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by artor410 on 2026-11-24T03:34:46Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121228755 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121228755). Originally posted by [artor410](https://github.com/artor410) on 2026-11-24T03:34:46Z. --- 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.
SpaghettiMaster545 commented 2026-11-24 06:55:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SpaghettiMaster545 on 2026-11-24T03:51:45Z.


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.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7121490398 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7121490398). Originally posted by [SpaghettiMaster545](https://github.com/SpaghettiMaster545) on 2026-11-24T03:51:45Z. --- 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.)
Exorion1er commented 2026-11-24 10:03:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Exorion1er on 2026-11-24T09:33:33Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7127580041 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7127580041). Originally posted by [Exorion1er](https://github.com/Exorion1er) on 2026-11-24T09:33:33Z. --- 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).
iurysf commented 2026-11-24 12:04:30 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by iurysf on 2026-11-24T11:21:52Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7130000470 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/282#issuecomment-7130000470). Originally posted by [iurysf](https://github.com/iurysf) on 2026-11-24T11:21:52Z. --- 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.
upstream-sync closed this pull request 2026-11-24 23:04:01 +00:00

Pull request closed

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
Marvisak/VIctory!282
No description provided.