Mesh fallback for GPUs without mesh shaders #1555

Open
tarekmania wants to merge 15 commits from upstream-pr/1555 into main
tarekmania commented 2026-11-28 21:39:28 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tarekmania on 2026-11-28T21:39:28Z.


On GPUs without mesh shaders (GTX 10, RX 5000 and older) mesh pipelines were refused, so most world geometry was missing (#1201).

The mesh program now runs there as a compute shader that writes its vertices and primitives to a buffer, and a vertex shader draws them with the title's pixel shader. Covers direct and indirect mesh dispatches. On by default when the GPU has no mesh shaders; VICTORY_MESH_FALLBACK=1 forces it, 0 turns it off. Details in docs/mesh-fallback.md.

Tests: on WARP the fallback draws what the mesh shader draws; layout and vertex shader unit tests.

Also fixes two clippy lints in victory-shader (an unused colour, a manual checked division).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5544825001 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1555). Originally posted by [tarekmania](https://github.com/tarekmania) on 2026-11-28T21:39:28Z. --- On GPUs without mesh shaders (GTX 10, RX 5000 and older) mesh pipelines were refused, so most world geometry was missing (#1201). The mesh program now runs there as a compute shader that writes its vertices and primitives to a buffer, and a vertex shader draws them with the title's pixel shader. Covers direct and indirect mesh dispatches. On by default when the GPU has no mesh shaders; `VICTORY_MESH_FALLBACK=1` forces it, `0` turns it off. Details in `docs/mesh-fallback.md`. Tests: on WARP the fallback draws what the mesh shader draws; layout and vertex shader unit tests. Also fixes two clippy lints in victory-shader (an unused `colour`, a manual checked division).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1555:upstream-pr/1555'
git switch 'upstream-pr/1555'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1555'
git switch 'upstream-pr/1555'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1555'
git switch 'upstream-pr/1555'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1555'
git switch 'main'
git merge --squash 'upstream-pr/1555'
git switch 'main'
git merge --ff-only 'upstream-pr/1555'
git switch 'main'
git merge 'upstream-pr/1555'
git push origin 'main'
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
trustno1-coder/VIctory-NVIDIA!1555
No description provided.