Add geometry shader mesh fallback for GPUs without mesh shaders #2251

Open
github-bot wants to merge 2 commits from github-bot/gh-2251 into main AGit
Owner

@⁠ohwell3 on GitHub · 2026-11-25 11:20 UTC · original
ohwell3:shaders/direct-dxil-main → main · +784 −66 · 11 files · 2 commits · draft

Adds a geometry shader fallback for GPUs that do not support D3D12 mesh shaders, allowing XCL's geometry/NGG recompiler path to use a compute-generated record buffer followed by a point-list vertex/geometry shader pass.

What is in it

  • emit.rs, pso.rs, runner.rs, tests.rs: geometry fallback translation, pipeline selection, execution and synthetic GPU coverage.
  • Runtime integration, record-buffer handling and allocator/reset handling for the fallback path.
  • The change spans multiple connected runtime and test files because the fallback requires the compute producer, record consumer, pipeline setup and execution lifecycle to work together.

Tested

  • GPU: AMD Radeon RX 580 8 GB, physical adapter with mesh shader tier unavailable.
  • Synthetic two-pass fallback GPU test with pixel readback.
  • Extended synthetic fallback soak: 2,271 / 2,271 runs passed over 30 minutes, with no device-removal errors.
  • DXC compilation and generated geometry-shader output checks.
  • git diff --cached --check: clean before commit.

Regression run

  • Not performed on a retail title.

Not tested

  • Full workspace test suite.
  • End-to-end integration through a real title's command-list path.
  • Full PSO/pixel-readback verification of the SV_PrimitiveID interface.
  • Compatibility or gameplay with any retail title.

AI use

  • ChatGPT (GPT-6): assisted with code development, troubleshooting, testing analysis and PR description drafting. The contributor is responsible for reviewing and understanding the submitted changes.
**@⁠ohwell3** on GitHub · 2026-11-25 11:20 UTC · [original](https://github.com/xcl-dev/xcl/pull/2251) `ohwell3:shaders/direct-dxil-main` → `main` · +784 −66 · 11 files · 2 commits · draft Adds a geometry shader fallback for GPUs that do not support D3D12 mesh shaders, allowing XCL's geometry/NGG recompiler path to use a compute-generated record buffer followed by a point-list vertex/geometry shader pass. **What is in it** - `emit.rs`, `pso.rs`, `runner.rs`, `tests.rs`: geometry fallback translation, pipeline selection, execution and synthetic GPU coverage. - Runtime integration, record-buffer handling and allocator/reset handling for the fallback path. - The change spans multiple connected runtime and test files because the fallback requires the compute producer, record consumer, pipeline setup and execution lifecycle to work together. **Tested** - GPU: AMD Radeon RX 580 8 GB, physical adapter with mesh shader tier unavailable. - Synthetic two-pass fallback GPU test with pixel readback. - Extended synthetic fallback soak: 2,271 / 2,271 runs passed over 30 minutes, with no device-removal errors. - DXC compilation and generated geometry-shader output checks. - `git diff --cached --check`: clean before commit. **Regression run** - Not performed on a retail title. **Not tested** - Full workspace test suite. - End-to-end integration through a real title's command-list path. - Full PSO/pixel-readback verification of the `SV_PrimitiveID` interface. - Compatibility or gameplay with any retail title. **AI use** - ChatGPT (GPT-6): assisted with code development, troubleshooting, testing analysis and PR description drafting. The contributor is responsible for reviewing and understanding the submitted changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:24:36 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 16:42 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 16:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/2251#issuecomment-7168400150) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request has changes conflicting with the target branch.
  • README.md
  • crates/xcl/src/hle/d3d12x/bind.rs
  • crates/xcl/src/hle/d3d12x/real.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2251/head:github-bot/gh-2251'
git switch 'github-bot/gh-2251'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2251'
git switch 'github-bot/gh-2251'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2251'
git switch 'github-bot/gh-2251'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2251'
git switch 'main'
git merge --squash 'github-bot/gh-2251'
git switch 'main'
git merge --ff-only 'github-bot/gh-2251'
git switch 'main'
git merge 'github-bot/gh-2251'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.