Skip to content

Stability: lower the default compute shader loop cap - #66

Open
space-de wants to merge 2 commits into
fxceless:mainfrom
space-de:stability/limit-default-compute-loops
Open

space-de wants to merge 2 commits into
fxceless:mainfrom
space-de:stability/limit-default-compute-loops

Conversation

@space-de

Copy link
Copy Markdown

Summary

Lower the default compute-shader loop cap from 4,096 to 256 iterations per lane. The existing pixel cap (128) and vertex/mesh cap (256) are unchanged. Diagnostic builds can still override the cap with VICTORY_SHADER_LOOP_LIMIT.

This follows the report in #18: on an RTX 3060 Ti with the default 2-second Windows TDR, a 1,024-iteration cap ended in device removal after 7 minutes, while 256 ran for 8 minutes. This is a stability-focused default; no FPS improvement is claimed.

Tradeoff

A legitimate compute shader loop that needs more than 256 iterations will now be cut short. That can omit rendering or other GPU work. The cap is deliberately aligned with the existing vertex/mesh default and the reported stable setting.

Validation

  • Checked the current open PRs and shader-loop implementation; no open PR changes the default cap.
  • git diff --check passed.
  • No tests or in-game run were performed for this change.

Korsuma added a commit to RicerBoy/DropItLikeItsHot that referenced this pull request Nov 24, 2026
… (#82), core/VRAM scaling (#49/#38/#42/#45/#47), scatter batching (#108), prelude textures (#80), and shader/UAV fixes

Integrates 15 upstream PRs orthogonal to Issue #2's default speed-switch measurements:
- GPU culling & compute cap:
  - Marvisak/VIctory#1731: real host D3D12 occlusion queries (wired into read_backs for both sync execute and async VICTORY_RELAY/LATE_WAIT flights)
  - fxceless/victory-fork#82: hardware depth-bounds test pass-through in pipelines and command lists
  - fxceless/victory-fork#66: lower default compute shader loop cap (4096 -> 256)
- CPU multicore, streaming & memory/VRAM scaling:
  - fxceless/victory-fork#49: scale shadow, pipeline (keeping VICTORY_PIPELINE_THREADS override), and DirectStorage workers with CPU cores
  - fxceless/victory-fork#38: default-on parallel host-copy refreshes on >=4 logical CPUs (VICTORY_WIDE_REFRESH=0 opts out)
  - fxceless/victory-fork#108: batch adjacent zero-page unmaps in XMemMapPhysicalPagesScatter
  - fxceless/victory-fork#67: release directly indexed buffer ranges with their heap
  - fxceless/victory-fork#42, #45, #47: auto-scale card buffers, texture staging/floor, and snapshot/scratch/list pools from VRAM and RAM
- Rendering smoothness & correctness:
  - fxceless/victory-fork#80: upload dirty title textures in HostList::prelude
  - fxceless/victory-fork#114: mirror placed unordered texture views onto host textures
  - fxceless/victory-fork#121: preserve VGPR slots observed by relative reads
  - fxceless/victory-fork#122: recompute ISG1 input usage and barycentrics flag after bitcode opt
  - fxceless/victory-fork#112: fix DXIL signature ordering for packed semantics

Verified:
- cargo xtask policy --staged: 21 files ok
- cargo clippy --workspace --all-features --lib --tests -- -D warnings: 0 warnings
- cargo test --workspace: 0 failures (140 victory-gpu incl. host occlusion query + depth-bounds tests; 226/226 victory-shader)
- Live 2560x1440 run (RTX 4080, VICTORY_RELAY=2 + VICTORY_INPLACE=1): reached 3D world (frame 1285), 77 in-place windows (364 MB, 0 refused), 0.0 ms texture remap waits, 0 crashes, 0 D3D12 errors

Fixes #10
@Revens2

Revens2 commented Nov 25, 2026

Copy link
Copy Markdown

Build check only: this PR merges cleanly on main c96b4f2 and the integration build of eight PRs (#115 #66 #36 #144 #147 #141 #139 #130) compiles (diagnostics profile). In the game, that combo was run alone 3 times (900 s, VICTORY_RELAY=2, scripted input): one run to the end (median 4.95 fps, about 4.9k draws per frame, against 4.84-5.04 fps on main), one title breakpoint 0x80000003 at about 157 s after a failed dstorage request (the pattern is explained on #115), one device removed (0x887A0005) at about 160 s that did not repeat in the two other runs. Nothing is proven for this PR alone: it was not run on its own, cargo test was not run on the combo, and nothing was checked on the title side of its change. Not verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants