Add native geometry shader support #334

Closed
github-bot wants to merge 0 commits from github-bot/gh-334 into main AGit
Owner

@⁠nativ69 on GitHub · 2026-12-01 14:19 UTC · original
nativ69:feat/native-geometry-shaders-v2 → main · +1204 −66 · 15 files · 73 commits · closed without merging

Summary

Rebased and sanitized resubmission of #126.

Adds native geometry shader translation and pipeline support for 195 previously unsupported shader programs.

  • Implements native geometry shader translation.
  • Supports linked-stage bindings and metadata across vertex, geometry and pixel stages.
  • Preserves existing generated rectangle geometry shaders.

Adapted from edsuuu/VI-BR-PORT #23, preserving original attribution.

Changes since #126

  • Rebased onto upstream/main at 94c3c5f3.
  • Separated the behavior-neutral refactor from the functional implementation.
  • Removed unrelated formatting changes.
  • Reduced the overall diff from 19 files (+3,149/-751) to 15 files (+1,213/-67).
  • Reduced the lower.rs diff from +942/-351 to +133/-1.
  • Verified compliance with the current asset policy.

Validation

  • Baseline: 94c3c5f3
  • Final commit: cee1acf6
  • GPU: RTX 4070; Driver 621.24
Check Result
Native geometry shader translations 195/195
DXIL validation 195/195
Pipeline creation 195/195
Targeted regression tests 9/9
Workspace tests 1,123 passed, 0 failed, 48 ignored
  • Clippy passed with default and all features.
  • Asset policy checks passed.
  • Existing rectangle geometry shader behavior is preserved.
  • Mixed-stage container handling was verified.
  • All 195 geometry shader validation results match the original implementation.

The previous non-geometry A/B validation established 25,782 identical shader outputs and 25,378 identical successful pipeline creations. These results were reviewed and reused rather than rerun, as upstream shader translator changes since that baseline were comment-only.

Visual Validation

The original motivation for this contribution was shader translation failures rather than an observed rendering defect during gameplay.

I have not yet identified a reproducible scene where the newly supported native geometry shaders contribute to rendering. Consequently, reliable in-game before/after images are not available.

If a known scene or reproducible route exercising these shaders is available, I would be happy to validate it.

This contribution can be considered alongside the planned translator update batch.

**@⁠nativ69** on GitHub · 2026-12-01 14:19 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/334) `nativ69:feat/native-geometry-shaders-v2` → `main` · +1204 −66 · 15 files · 73 commits · closed without merging ## Summary Rebased and sanitized resubmission of #126. Adds native geometry shader translation and pipeline support for 195 previously unsupported shader programs. - Implements native geometry shader translation. - Supports linked-stage bindings and metadata across vertex, geometry and pixel stages. - Preserves existing generated rectangle geometry shaders. Adapted from edsuuu/VI-BR-PORT #23, preserving original attribution. ## Changes since #126 - Rebased onto upstream/main at `94c3c5f3`. - Separated the behavior-neutral refactor from the functional implementation. - Removed unrelated formatting changes. - Reduced the overall diff from 19 files (+3,149/-751) to 15 files (+1,213/-67). - Reduced the `lower.rs` diff from +942/-351 to +133/-1. - Verified compliance with the current asset policy. ## Validation - Baseline: `94c3c5f3` - Final commit: `cee1acf6` - GPU: RTX 4070; Driver 621.24 | Check | Result | |---|---:| | Native geometry shader translations | 195/195 | | DXIL validation | 195/195 | | Pipeline creation | 195/195 | | Targeted regression tests | 9/9 | | Workspace tests | 1,123 passed, 0 failed, 48 ignored | - Clippy passed with default and all features. - Asset policy checks passed. - Existing rectangle geometry shader behavior is preserved. - Mixed-stage container handling was verified. - All 195 geometry shader validation results match the original implementation. The previous non-geometry A/B validation established 25,782 identical shader outputs and 25,378 identical successful pipeline creations. These results were reviewed and reused rather than rerun, as upstream shader translator changes since that baseline were comment-only. ## Visual Validation The original motivation for this contribution was shader translation failures rather than an observed rendering defect during gameplay. I have not yet identified a reproducible scene where the newly supported native geometry shaders contribute to rendering. Consequently, reliable in-game before/after images are not available. If a known scene or reproducible route exercising these shaders is available, I would be happy to validate it. This contribution can be considered alongside the planned translator update batch.
Preparation for native geometry shaders, with no change in output:
load_any_input now calls load_input_at, which takes an optional vertex
index. Every caller passes none, so the operand stays undef and is still
created last, which keeps existing shaders' constant IDs.

Split out of the backport of VI-BR PR #23.
Original-Commit: 535de92e666c2853c8617a72db3d44f3dda05e39

Co-authored-by: OpenAI Codex <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Raise native geometry ring accesses, emit and cut messages to DXIL.
Bind the geometry shader and its resources in D3D12 graphics pipelines
and include its bytecode in the pipeline library key.

Pipelines without a native geometry stage, with or without the generated
rectangle stage, keep their library keys.

Backported from VI-BR PR #23.
Original-Commit: 535de92e666c2853c8617a72db3d44f3dda05e39

Co-authored-by: OpenAI Codex <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 14:20:47 +00:00
Author
Owner

@⁠Aniseto on GitHub · 2026-12-01 15:07 UTC · original

Ran the emit::rect::tests and pipeline::host::tests groups at cee1acf on an NVIDIA Blackwell desktop part with 16 GB of VRAM.

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, debug build, detached worktree at the exact PR head, own CARGO_TARGET_DIR, no local patches.

cargo test -q --locked -p victory-shader --lib emit::rect::tests -- --test-threads=1
4 passed; 0 failed; 0 ignored; 293 filtered out      (exit 0)

cargo test -q --locked -p victory-gpu --lib pipeline::host::tests -- --test-threads=1
8 passed; 0 failed; 0 ignored; 506 filtered out      (exit 0)

All 12 tests pass here, including the native-geometry cases (a triangle emitted per vertex and the pipeline binding/stage constants). The description's 9/9 targeted suite and 1,123-workspace run were not repeated verbatim; these are the two groups on the same areas. No title was run.

Not tested: the full workspace suite, a retail title, any geometry-shader draw in a scene, Wine, AMD adapters, release profile, game data.

AI-assisted (OpenCode), model: MiMo-V2.6-Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

**@⁠Aniseto** on GitHub · 2026-12-01 15:07 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/334#issuecomment-7315375442) Ran the `emit::rect::tests` and `pipeline::host::tests` groups at `cee1acf` on an NVIDIA Blackwell desktop part with 16 GB of VRAM. Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, debug build, detached worktree at the exact PR head, own `CARGO_TARGET_DIR`, no local patches. ``` cargo test -q --locked -p victory-shader --lib emit::rect::tests -- --test-threads=1 4 passed; 0 failed; 0 ignored; 293 filtered out (exit 0) cargo test -q --locked -p victory-gpu --lib pipeline::host::tests -- --test-threads=1 8 passed; 0 failed; 0 ignored; 506 filtered out (exit 0) ``` All 12 tests pass here, including the native-geometry cases (a triangle emitted per vertex and the pipeline binding/stage constants). The description's 9/9 targeted suite and 1,123-workspace run were not repeated verbatim; these are the two groups on the same areas. No title was run. Not tested: the full workspace suite, a retail title, any geometry-shader draw in a scene, Wine, AMD adapters, release profile, game data. AI-assisted (OpenCode), model: **MiMo-V2.6-Flash Free** - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
github-bot closed this pull request 2026-12-02 07:54:39 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.