Skip to content

GPU: refuse wave64 mesh and compute programs on hosts without 64-lane waves - #578

Open
wbkepler wants to merge 5 commits into
Marvisak:mainfrom
wbkepler:gpu/refuse-wave64-on-32-lane-hosts
Open

wbkepler wants to merge 5 commits into
Marvisak:mainfrom
wbkepler:gpu/refuse-wave64-on-32-lane-hosts

Conversation

@wbkepler

@wbkepler wbkepler commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

On hosts whose waves have fewer than 64 lanes (NVIDIA: D3D12 WaveLaneCountMin = Max = 32, in-box WARP: 4), pipelines whose shaders require unsupported wave widths are refused early so their draws and dispatches are dropped instead of hanging the GPU or hitting driver E_INVALIDARG.

  • Host::wave_lanes(): queries (WaveLaneCountMin, WaveLaneCountMax) from D3D12_OPTIONS1 once (defaults to (32, 64) if the query fails, so nothing is refused). Logs both bounds at startup and explicitly calls out narrow/software adapters (max < 32, e.g. 4-lane WARP).
  • Shader::wave64(): whether the container's native program runs in 64-lane console waves (cached per container).
  • HostPipeline::new:
    • Refuses console wave64 mesh shaders before translation on < 64-lane hosts.
    • Inspects the emitted DXIL container's PSV0 runtime info (MinimumExpectedWaveLaneCount / MaximumExpectedWaveLaneCount) against the host's [min, max] range.
    • Allows wave64 compute shaders explicitly lowered to a supported PSV0 range (such as WaveSize(32) split emulation in #233/#439) on 32-lane hosts, while refusing console wave64 compute shaders that declare WaveSize(64) or no PSV0 wave-lane range on < 64-lane hosts (preventing unsized wave64 compute hangs while keeping per-lane wave32 compute and vertex/pixel shaders running).
    • Refuses wider-wave shaders on 4-lane WARP with an explicit warning mentioning narrow/WARP hosts; unconstrained per-lane wave32 shaders continue to run on WARP.

Why

On 32-lane NVIDIA hosts (RTX 3090 / 4060 Ti / 4070 SUPER / 4090 / 5070 Ti / 5090), world runs without this check hit DXGI_ERROR_DEVICE_HUNG (TDR) in wave64 mesh or wave64 compute dispatches. Refusing wave64 mesh and unsized/64-lane wave64 compute shaders on < 64-lane hosts serves as a safe default until translator-side fixes (wave64 compute splitting, descriptor/loop fixes) make those programs safe on 32-lane waves.

Tests

  • Unit tests in victory-gpu: emitted_wave_size_checked_against_host_range and dxil_wave_lanes_reads_psv0_bounds.
  • cargo clippy -p victory-gpu --all-targets, cargo clippy -p victory --features diagnostics --all-targets, cargo test -p victory-gpu, and cargo xtask policy pass.

@fromthemoonx

Copy link
Copy Markdown

Tested 07508ab (on main d2a4bae) on another 32-lane NVIDIA host.

Environment: Windows 11 Pro build 26300, AMD Ryzen 7 5700X, 16 GB, NVIDIA GeForce RTX 3060 12 GB (driver 610.88), Rust 1.98.1 x86_64-pc-windows-msvc, debug.

What the adapters report. From a throwaway test (not pushed) calling host().wave_lanes_max() and CheckFeatureSupport(D3D12_OPTIONS1) on each adapter:

adapter WaveLaneCountMin WaveLaneCountMax
RTX 3060 32 32
WARP (Microsoft Basic Render Driver) 4 4

host().wave_lanes_max() returns 32 here, so the refusal applies to this GPU as intended.

One question, about WARP. With VICTORY_D3D12_WARP=1 the host reports 4 lanes, so every wave64 mesh and compute program is refused there as well, on AMD hosts too. The README points to WARP as the way to look further in the world, and WARP is also the one device that can't hang the driver, which is this PR's reason for refusing. Should the refusal be limited to hardware adapters, or is it intended on WARP (if those programs are also wrong on 4-lane waves)? Either way, a note in the refusal message or the README would help, since a WARP run would otherwise lose those draws and dispatches without the reason being obvious.

Tested

  • cargo test --locked -p victory-gpu --lib: 44 passed, 0 failed, 1 ignored, including wave64_mesh_and_compute_need_64_lane_hosts
  • cargo test --locked --workspace: 265 passed, 0 failed, 4 ignored
  • cargo build -p victory --features diagnostics: builds
  • cargo xtask policy: 151 files ok; git diff --check: clean
  • clippy and cargo fmt --check show the same as main (host.rs:267 safety comment; the same per-file fmt counts), nothing new
  • Checked that the stage names match: needs_wave64 compares against "mesh"/"compute", which are the names pipeline.rs gives these shaders.

Not tested: the world, or any title pipeline (no game data); whether the refused programs hang this GPU too.

AI-assisted (Claude Code) ran the checks and drafted this comment.

@Len1k Len1k mentioned this pull request Nov 24, 2026
@r4tedx

r4tedx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

From the side of the wave64 stack (#223 / #233 / #320 / #439, which I maintain), since this PR and that stack decide the same thing for compute on these hosts. Thank you for the runs: a hang at a console-flow dispatch is exactly the report that stack needs. Three points.

1. Which compute programs were running "as 32-lane waves". On main, a wave64 compute program that needs the console's lanes (reads other lanes, reads a mask as a number, shares LDS inside one wave) declares WaveSize(64), and NVIDIA refuses its pipeline with E_INVALIDARG (#468; reproduced on an RTX 4070 SUPER). So without #233 or a similar PR in the build, the wave64 compute programs that do run there are the ones translated per lane, whose results do not depend on the host's wave size. If your "without #233" build had none of #189 / #192 / #116 either, the compute dispatch that hung after about 2 min was such a program, and for it the wave size is probably not the cause. Which of those were in that build?

2. A measurement on how a correct form can still hang. The stack's forms are lane-by-lane exact on hardware for hand-assembled programs (RTX 5070 here; others ran them on an RTX 4070 SUPER, an RTX 5080 and an RTX 5090). That is correctness on synthetic input. It does not say a title program meets its loop exits on the data it is given, and when earlier passes are dropped that data is not what the console had. Translated loops are cut after 2^20 iterations per entry. I timed a synthetic console-flow loop on an RTX 5070 (driver 621.24), 8 groups of 64 threads, an empty body and one exchange between the halves per iteration:

iterations time over a 1-iteration dispatch
65,536 about 5 ms
262,144 about 14 ms
1,048,575 about 53 ms
4,000,000 (cut by the limit) about 49 ms

So an empty loop that runs to the limit costs about 6 ms per group. Alone that is far from 2 s, but the limit is per entry, so a loop nested in another, or one with buffer reads in its body, gets there. The runs in #71 that stayed in the world for 7 to 14 min with VICTORY_SHADER_LOOP_LIMIT=32 (RTX 5080, RTX 3080, RTX 3070) point the same way, though those builds differ in other PRs too. This is a hypothesis from one card and a trivial loop body, not a diagnosis.

For the dispatch you have (8x1x1, wave64, v_readfirstlane), these would settle it without any shader content: its container hash, its thread-group size, whether it has a loop inside a loop, and whether the same build still hangs there with VICTORY_SHADER_LOOP_LIMIT=32. If it hangs with no loop at all, that is a defect in the console flow and I will take it as one.

3. How the two PRs fit. As written, the refusal goes by the console program's wave size, so with both merged every compute program the stack translates is refused before it runs. With the stack, no compute program reaches the driver in a form that needs 64 lanes: it is split (the module declares WaveSize(32)), or translated per lane, or stopped at translation with a reason. A compute test on the emitted module's wave size against the host's range would keep your default for everything else. If you would rather refuse all of it until the hang is explained, that is a fair default too; an opt-out next to #579's switch would keep the stack measurable. I will do the rebase on my side whichever lands first. The mesh half of this PR is outside the stack and I have nothing against it.

Synthetic programs only on my side; no title data. AI-assisted (Claude Code).

@Nixitov

Nixitov commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

RTX 5070, native Windows D3D12 — confirms the wave64 part here, and there is a remaining wave32 compute hang.

Setup: Windows 11 Pro 26200.9974, NVIDIA RTX 5070, driver 617.14, in-box D3D12 10.0.26100.9818; cargo build --release -p victory at d2a4bae + #581 + this PR (nothing else except #636's one-line policy change). Host reports host wave lanes at most lanes=32, and the run logs the refusal: no host pipeline: a mesh or compute program written for 64-lane waves, on a host without them.

build where it ends
d2a4bae + #581 submission of 11 lists takes 10.97 s; device removed (0x887A0006 after 0x887A0004), before a numbered world frame
+ this PR world runs at 4.8-5.0 fps, 256-300 draws/frame, past frame 1024; ends after ~2.5 min in the world

So the wave64 mesh/compute part holds on this card too.

Remaining hang with this PR: a 1-list submission of 12 compute pipelines takes 11.34 s and the device goes away, again 0x887A0006. Those programs are not refused by this PR, so on this run they are wave32:

010a50ce68d02c16, 1ea7e2dbf731c8dc, 25c5ee5063e1a41f, 5b6eed17c131f881, 5da83868971acee9, 8080af82aaac33df, 9aa3629668b8e7ab, a68c4b8fc7bc4b5c, ae83305f523f4b1b, e35b7de6a9d2bfd4, ee26678cdf63cf32, f5f5e06abea6e83a.

They were first bound at frames 1504-1518, and the hang is at ~06:08:18 after the last frame log at 06:08:04. Not breadcrumbed (release build, no DRED). If a wave32 run is expected to survive, these hashes are the next thing to look at; I can rerun with the diagnostics build and DRED if that helps.

No game files are included; only log lines and shader hashes.

AI-assisted (DeepSeek V4.1 Flash coding agent).

r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
…tch)

wbkepler's Marvisak#579: in diagnostics builds, VICTORY_SKIP_WAVE64=<stage>,...
(mesh, compute, vertex, pixel) omits draws and dispatches whose pipeline
has a program of a listed stage written for 64-lane console waves, and
counts them as VICTORY_SKIP_PIPELINES does.

No conflict. Marvisak#578 (the same author's refusal of such programs on hosts
without 64-lane waves) is not merged.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
r4tedx added a commit to r4tedx/VIctory that referenced this pull request Nov 24, 2026
Seven more upstream PRs are in (Marvisak#493, Marvisak#483, Marvisak#206, Marvisak#469, Marvisak#459, Marvisak#454,
Marvisak#579) and the wave64 stack is at Marvisak#439's head 965ce30. Records how each
was combined with what the tree had, that a capped view heap keeps
2^18 dynamic slots and why, Marvisak#189 and Marvisak#578 as left out, and a new
section with testers' reports from the title: the set without the
world-entry hang on three NVIDIA cards and how this tree differs from
it, VICTORY_SKIP_WAVE64 as the switch to try, and Marvisak#136 bisected as
making every frame black.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@r4tedx

r4tedx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

A data point for the compute half of this PR, from a tester's run posted on #439: #439 (comment)

On an RTX 5080, main + #493 #483 #89 #205 #206 #469 #459 #454 with the wave64 stack (#439 at f653ea4) and VICTORY_SHADER_LOOP_LIMIT=32 ran 7 minutes, about 6 in the world, with no device removal, 0 pipelines refused, and wave64 compute running in the split forms. The same set with #189 in the stack's place also stayed up. In the dumped frame the G-buffer is 67.9% covered with coherent geometry on the stack's build against 10.5% on the other.

So on that card wave64 compute in those forms does not hang the device when the loop limit is 32, which fits the loop-limit reading above and is one run, not a proof. It suggests the compute refusal here would cost geometry on NVIDIA once those forms are in, and that a lower default loop limit may be the safer guard for compute. The default limit with the stack is still untested in the world, and your 8x1x1 dispatch is still the one concrete counter-example, so its hash and group size would still help.

AI-assisted (Claude Code).

@wbkepler

Copy link
Copy Markdown
Contributor Author

Thanks @fromthemoonx, @r4tedx, and @Nixitov for the feedback and test data — pushed a follow-up commit addressing both design points:

  1. Emitted DXIL PSV0 wave-lane check (for @r4tedx):
    • Host::wave_lanes() now queries the full (WaveLaneCountMin, WaveLaneCountMax) range from D3D12_FEATURE_D3D12_OPTIONS1 instead of only WaveLaneCountMax.
    • For compute (and vertex/pixel) stages, HostPipeline::new now inspects the emitted DXIL container's PSV0 runtime info (MinimumExpectedWaveLaneCount / MaximumExpectedWaveLaneCount) against the host's [min, max] range rather than unconditionally refusing every console-wave64 compute program.
    • This keeps the default refusal for modules that emit WaveSize(64) on 32-lane hosts, while allowing per-lane translations (unconstrained PSV0) and the wave64 compute stack (#223/#233/#320/#439, which emits WaveSize(32)) to run cleanly on 32-lane hosts with zero conflict.
    • Console wave64 mesh shaders do not emit PSV0 WaveSize(64) metadata and remain refused early on < 64-lane hosts.
    • (Re: the 8x1x1 v_readfirstlane hang shader details you asked for: I don't have the local title shader dumps in this environment to pull its hash / loop structure, so I'll leave that follow-up to whoever has the capture.)
  2. Explicit WARP 4-lane logging (for @fromthemoonx):
    • Refusal on WARP (WaveLaneCountMin = WaveLaneCountMax = 4) is intentional for shaders that require wider waves (both wave64 mesh and compute modules emitting WaveSize(32)/WaveSize(64) — note that per-lane unconstrained compute shaders still run on WARP!).
    • Host::wave_lanes() now logs both min and max and explicitly calls out narrow/software adapters (max < 32) at startup, and the refusal warning explicitly notes (e.g. 4-lane WARP) when host_lanes.1 < 32 so WARP runs never silently lose draws/dispatches without an obvious reason.
  3. For @Nixitov:
    • Thanks for confirming the wave64 refusal on RTX 5070 and sharing the 12 remaining wave32 compute hashes (010a50ce... etc.). A diagnostics build run with VICTORY_D3D12_DRED=1 (and optionally checking VICTORY_SHADER_LOOP_LIMIT=32 as @r4tedx noted) would definitely help narrow which of those 12 dispatches is timing out the driver — a separate issue from wave64 refusal.

Verified: cargo clippy -p victory-gpu --all-targets (0 new warnings), cargo test -p victory-gpu --lib (including emitted_wave_size_checked_against_host_range and dxil_wave_lanes_reads_psv0_bounds), and cargo xtask policy (151 files ok).

@fromthemoonx

Copy link
Copy Markdown

Thanks. Re-tested d2d26d1 on the same RTX 3060 machine, including what WARP does with the emitted wave sizes.

What the emitter puts in PSV0, and what each adapter accepts. A throwaway test (not pushed) built two one-thread wave32 programs with build_valu_cs, read PSV0's lane range at the offsets dxil_wave_lanes uses, and called compute_pipeline on each adapter:

program PSV0 lanes RTX 3060 WARP
v_mov_b32 (per lane) 0, 0xffffffff (unconstrained) created created
v_mbcnt_lo_u32_b32 (cross-lane, so WaveSize(32)) 32, 32 created refused: E_INVALIDARG

So a 4-lane WARP device already refuses WaveSize(32) (and WaveSize(64)) pipelines itself. The new check doesn't take anything away on WARP that would have run; it refuses early and now names the reason, and unconstrained per-lane programs still run there. That answers my question; thanks for adding the log lines.

Tested

  • cargo test --locked -p victory-gpu --lib: 45 passed, 0 failed, 1 ignored, including emitted_wave_size_checked_against_host_range and dxil_wave_lanes_reads_psv0_bounds
  • cargo test --locked --workspace: 266 passed, 0 failed, 4 ignored
  • cargo build -p victory --features diagnostics: builds; cargo xtask policy: 151 files ok; clippy: only main's host.rs:267 warning
  • one nit: cargo fmt --check wants the first assert_eq! in dxil_wave_lanes_reads_psv0_bounds split over lines. The other fmt output in these files is already on main.

Not tested: title pipelines or the world (no game data).

AI-assisted (Claude Code).

@wbkepler

Copy link
Copy Markdown
Contributor Author

Thanks @fromthemoonx for re-testing on RTX 3060 + WARP and catching the rustfmt nit in dxil_wave_lanes_reads_psv0_bounds! Fixed and pushed.

@iurysf

iurysf commented Nov 24, 2026

Copy link
Copy Markdown

Tested on an RTX 4070 (32-lane waves, driver 32.0.16.2101), on top of #493 + #483 (the pair that stops the device removal on this GPU, see #493). Default loop limit, 300 s, VICTORY_D3D12_DRED=1.

  • No device removal. Refused host pipelines go from 131 to 0, and the new warning is logged once up front, as intended.
  • Dynamic-descriptor-slot drops went from 32,768 (logged threshold) to none, and there were no slow submissions. However, this run spent only 117 s in the world (against 220 s for the base), and draws per frame fell from ~1,218 to ~252. So those drops may just reflect less work being done, not a gain. "dropped without a host pipeline" and indirect drops are unchanged. The host CPU was busy with other jobs, so ms/frame isn't comparable.

Overlap with #233: offline pipeline creation on the same GPU (translate --pipelines, all 26,096 programs) shows 321 WaveSize(64) compute programs that the driver refuses on main. This PR refuses all of them up front. #233 instead makes 98 of them run on 32-lane hosts and refuses the other 223 explicitly (numbers on #233). The two could combine: #233's halves where they apply, and this PR's up-front refusal for the rest.

AI-assisted.

@r4tedx

r4tedx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

@wbkepler thank you, checking the emitted module's PSV0 wave range against the host's is the right key: it refuses what cannot run and leaves alone what was translated for the host, whichever PR did the translating. I have read your description of the follow-up, not built it with the stack; nothing in the stack should conflict with it.

One thing to know for later, not for this PR: the next branch on top of the stack (shader/wave-per-group, not a PR yet) emits console groups of several wave64 waves as host groups of 64 threads, still WaveSize(32), so it passes the same check.

Understood on the 8x1x1 dispatch; if whoever has that capture can post its hash and group size, I will look at the form it takes.

AI-assisted (Claude Code).

@slint6614-dev

Copy link
Copy Markdown

AMD hardware check, Windows 11, Adrenalin driver: RX 9070 (RDNA4, 32-64 lane waves) and Ryzen 9600X iGPU (RDNA2, gfx1036).

On a host with 64-lane waves nothing is refused, as intended: victory translate --validate --pipelines over the full retail shader pack on the RX 9070 gives the same counts as main 1f858b0 (VS/PS 12272 / 12172 / 12272 pipelines, CS 1693 / 1670 / 1693, MS 8191 / 8129 / 8191). cargo test -p victory-shader passes.

@EduBertozzi

Copy link
Copy Markdown
Contributor

Windows 10 + Pascal data point (no game run, tests only).

Setup: Windows 10 Education 22H2 (19045), GTX 1060 6 GB (driver 582.66), i7-10700K, Rust 1.98.1, debug. I tested main ffe310e, with #486 and this PR merged locally. #486 is there because Windows 10's in-box runtime stops at SM 6.5; the Agility SDK 1.620.2 runtime sits beside the test binaries.

Tests:

  • cargo test -p victory-gpu: 52 passed, 0 failed, including dxil_wave_lanes_reads_psv0_bounds and emitted_wave_size_checked_against_host_range.
  • cargo test -p victory-shader: 120 passed, 0 failed.
  • cargo xtask policy: clean.

What the adapters report (OPTIONS1 and OPTIONS7, from a throwaway test that isn't pushed):

adapter WaveLaneCountMin / Max MeshShaderTier
GTX 1060 (Pascal) 32 / 32 not supported
WARP 1.0.22 (Microsoft.Direct3D.WARP, beside the binary) 4 / 128 1

So on Pascal this PR changes nothing for mesh pipelines today, because they're refused for having no mesh shaders. It does matter for the compute-shader fallback I'm prototyping in #3. Since the mesh check here comes first, wave64 mesh programs would be refused on 32-lane hosts before reaching the fallback. Given the hangs above, that seems right: the compute form keeps the same lane layout. It means the fallback can only help wave32 mesh programs on NVIDIA until wave64 runs on 32-lane hosts (#233's direction).

AI-assisted (Claude Code); runs on my machine.

1984742628 added a commit to 1984742628/VIctory that referenced this pull request Nov 24, 2026
… PresentX planes

Merges https://github.com/fxceless/victory-fork (main, 4e17478) into this
fork. The two rewrote the same GPU and shader code (20 files, 80 conflicts),
so the merged tree is fxceless's tree, with two additions it does not have,
re-applied on top:

- The FidelityFX upscaler answered by AMD's PC FidelityFX SDK when
  VICTORY_FFX_DIR is set (the pc-fsr branch, f96ad82): applied unchanged.
- PR Marvisak#211's multi-plane PresentX compositing (Series S menus): several
  planes are composited in a list of their own; a single plane keeps
  fxceless's present path, including presents sent ahead.

Dropped in favour of fxceless's own implementations: this fork's lazy host
textures and VRAM report, bounds root constants, rectangle geometry shader,
mesh index/position changes, the diagnostics switches added with them, and
PRs Marvisak#89, Marvisak#492 and Marvisak#578 (fxceless has its own target formats and wave64
handling; Marvisak#578 refused every wave64 compute program on 32-lane GPUs). That
work stays reachable on the try/pr-211-578 branch at 575a4ee.

Builds with and without the diagnostics feature; the workspace tests pass.
Not run in the game yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@cyudev

cyudev commented Nov 24, 2026

Copy link
Copy Markdown

RTX 3060 Ti (8 GB): #578 + #1296 + #1666 on main holds 16+ minutes in the world, under the video memory budget

Machine: RTX 3060 Ti 8 GB (driver 621.24, 32-lane waves), i5-12600KF, 16 GB RAM, Windows 11 26200, game files on SATA SSD. Series X profile.
Tree: main ffe310e + #578 (pr-578 head) + #1296 (a6f3ccb) + #1666 (a672556). All three merge cleanly. Diagnostics build, fresh shader cache, only VICTORY_LOG=info set.

Result: world entered at ~21:42 UTC and still running at 21:58 with no device removal, no ERROR, no no upload buffer, no crashes.log. The 3D scene is black, as on every card, with sound and subtitles.

earlier runs on this card (integration/testers u10, ± #1666) this tree
time in the world 2.5-6 min, then upload-heap E_OUTOFMEMORY and device removal 16+ min, still running
video memory in use / budget ~9,200 / 7,256 MB (over budget from world entry) ~6,000 / 7,085 MB
system memory in use / budget 4,300-5,600 / 7,437 MB, climbing ~2,000 / 7,437 MB, flat
list scratch 1,500 MB (130-170 with #1666) 104 MB, flat
frame rate in the world 0.2-0.3 fps 3.2 fps (308 ms/frame)

Memory figures come from #1666's host memory: line (QueryVideoMemoryInfo), every 5 s.

What each did, by the log:

Still there: 512 shader does not translate lines; ~4,250 draws dropped per frame without a host pipeline and ~4,900 indirect. no host texture comes up for formats 86 and 115, the packed 16-bit targets #89 handles; #89 is not in this tree.

The two runs are not the same tree: u10 carries far more translated shaders and therefore more GPU work. So the time comparison says this set is stable on 8 GB. It does not isolate which PR buys the stability.

Counts and messages only; no game data.

@cobrajet302gt

Copy link
Copy Markdown

@cyudev — label keeper checking in, since our census is cited as the baseline: treat 1,151 as a ceiling, not the expected refuse count. Our wave64 tag is the console-side declaration (FSSM 0xD4 bit 5), not a runtime predicate; the realized 32-lane fail set is bracketed by two independent measurements in this thread now: fiestorra's offline table: 831 of 1,151 labeled-wave64 computes CREATE fine on a 32-lane adapter, 320 refuse (E_INVALIDARG at creation; fail set = emitted DXIL that declares WaveSize(64), concentrated in the 64-thread one-wave group shapes — 416 8x8x1 + 298 64x1x1 + 32 4x4x4 distinct in the corpus, gist 1c777c2510e44e343101f9a183ac119e) — and your run: zero refuses at runtime. Both are right: creation-refuse and later bind/translate-drop are different filters, and your 512 shader does not translate + ~4,250 draws/frame dropped is where the rest went. So for anyone sizing #578's coverage cost: the honest range on this driver family is "320 refuse at creation, ~0 at runtime, the remainder dies at translation" — which is exactly the argument for merging 578 with the translation work rather than before it.

One data request for the stability isolation: if a variant run drops #578 from that exact tree, the refuse/no-refuse diff plus your 3.2 fps baseline tells the thread what 578 costs in world, and with #1296 auto-gating on VRAM the matrix stays cheap. Happy to fold any per-program lists into the labels the same way as before. Written with an AI assistant.

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/host.rs, crates/victory-gpu/src/pipeline.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

@slatefield

Copy link
Copy Markdown
Contributor

Rebased this onto current main (4118f33) since it carries the needs-rebase label: all five commits kept with your authorship and messages, seven conflict hunks resolved (the heap_atomics64 neighbour in host.rs, the newer Shader::new/translated shape in pipeline.rs, and the test module joins in pipeline/host.rs), Windows-target clippy clean with and without --all-features, native tests green, asset policy ok. The three tests need victory-gpu on Windows; I ran their bodies against the real parser through an off-tree harness and they pass.

It is open as #1922 in case the maintainer prefers merging a ready branch. If you would rather update this PR yourself, reset gpu/refuse-wave64-on-32-lane-hosts to 24a7bc20b8579eeb46796e13f8c590ee55479886 and I will close mine. Nothing in the resolution changes what the change does.

One thing I noticed while reading it: main still has ID3D12CommandQueue::Wait as a no-op (queue.rs:167), and every submission is waited synchronously today, so cross-queue ordering is accidental. #32 is the PR that fixes Wait; a title that relies on Wait before the queue is truly ordered would see the difference. Worth a line in the PR body if #1922 gets merged before #32.

Fayberr pushed a commit to Fayberr/Victory-United that referenced this pull request Nov 25, 2026
…n cast (Marvisak#578)

A shader view of a typed texture in another format of its family was
given the texture's format. For RGBA8 that dropped the sRGB conversion:
an sRGB view of a UNORM texture read its texels as linear, and a linear
view of an sRGB texture read them converted.

On a host that reports CastingFullyTypedFormatSupported (Options3, queried
once and logged), an RGBA8 shader view now keeps the sRGB or linear format
it asks for. Unordered access views, other format pairs and hosts without
the cast are as before. The fix follows the patch proposed in Marvisak#578.

Test: rgba8_views_keep_their_srgb_conversion samples one 0x80 texel on the
GPU through all four texture/view pairs. Here the sRGB view of
the UNORM texture reads 0.2159 with the change and 0.5020 without it.
Under the D3D12 debug layer the views raise no messages. Inplace's Rig is
pub(crate) so the test can use its queue.
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.