Skip to content

GPU: indirect mesh dispatches run as an indirect execution of one record - #1749

Open
bemalinho wants to merge 1 commit into
Marvisak:mainfrom
bemalinho:gpu-indirect-mesh-dispatch
Open

bemalinho wants to merge 1 commit into
Marvisak:mainfrom
bemalinho:gpu-indirect-mesh-dispatch

Conversation

@bemalinho

Copy link
Copy Markdown

DispatchMeshX with its group counts in GPU memory was dropped; it now runs through the host's indirect execution as one mesh dispatch record (x, y, z), like the title's ExecuteIndirect mesh signature. Not yet checked against the title (marked as a shortcut).

DispatchMeshX with its group counts in GPU memory was dropped; it now
runs through the host's indirect execution as one mesh dispatch record
(x, y, z), like the title's ExecuteIndirect mesh signature. Not yet
checked against the title (marked as a shortcut).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@acetonahard-code

Copy link
Copy Markdown

Heads-up: this is the third open PR for this fix. #24 (opened yesterday) and #1546 (earlier today) also run indirect DispatchMeshX through execute_indirect instead of dropping it. All three conflict in list.rs, so only one can land as-is.

Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current main (70564ae):

cargo test -p victory-gpu passed failed ignored
main 76 2 1
main + this PR 76 2 1
main, --all-features 79 2 -
main + this PR, --all-features 79 2 -

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

Personed referenced this pull request in Personed/Bored Nov 25, 2026
…ty-wave

* GPU: copy shader writes into write-watched pages under Wine

Port upstream #1831: when WriteProcessMemory/NtWriteVirtualMemory refuses an untouched MEM_WRITE_WATCH page under Wine, use the kernel read path into that destination so copy-back still lands.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* GPU: load cached pipelines outside the library lock

Port the Wine part of upstream #1722. vkd3d-proton treats a library load as a full compile, so holding the global library lock serialised all workers. Loads of different names can now overlap; same-name loads remain serialised as D3D12 requires.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* GPU: drop unready indirect calls before the argument clamp

Port upstream #1635: a call whose host pipeline is not ready cannot run, so do not refresh and clamp records that nothing will read.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* GPU: run indirect mesh dispatches as one-record ExecuteIndirect

Port upstream #1749: DispatchMeshX with group counts in GPU memory now uses the host indirect mesh path instead of being dropped.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Shaders: leave runaway translated loops after 2^14 iterations

Port upstream #1819. The previous 2^20 limit could outlast a driver reset; 2^14 bounds runaway loops to milliseconds per wave while VICTORY_SHADER_LOOP_LIMIT remains an override.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* Input: keep the keyboard stand-in while XInput pads are idle

Port upstream #1430: virtual or untouched controllers no longer disable keyboard controls; real input outside the XInput deadzones takes over, and fallback keys regain control once host pads are idle.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* GPU: keep pipeline workers competitive and configurable

Port upstream #1505 and #1728: workers no longer run below the title's priority, where busy world threads starved them, and VICTORY_PIPELINE_WORKERS can raise the worker count on many-core Linux/Windows hosts.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: stoltembergg <stoltembergg@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs work. This routes an indirect DispatchMeshX through State::execute_indirect as one 12-byte mesh record, and the call matches main's signature. Two things are missing: evidence (the title's code, or a public reference) that the record is three u32 group counts and that x is unused then (the comment marks this as a shortcut), and a test. This is also the third open PR for the same change: #1546 (rebased on current main, with a test) and #24 do the same in list.rs, and all three conflict. Please agree with those authors on one PR, and add the evidence and a test there. CI has not run (it needs approval).


Generated by Claude Code

Steenax6 added a commit to Steenax6/VIctory-NVID that referenced this pull request Nov 26, 2026
…pped

A DispatchMeshX whose group count is in memory was dropped (a warning
once). It now goes through State::execute_indirect as one mesh record
(kind 10, three group counts, 12 bytes), as an ExecuteIndirect with a mesh
signature does, and its count is clamped there like any record's. One that
cannot run there is counted with the dropped indirect executions in the
frame line. The record layout is inferred from the direct form and the
PC's DispatchMesh, not seen in the title's code. The flags and payload of
a mesh dispatch, which the host has no use for, are logged the first time
one is not 0, so a run shows whether the title passes any.

Source: Marvisak/VIctory PR Marvisak#1546 (duplicates Marvisak#24, Marvisak#1749), with its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants