Fix mesh pipeline test on unsupported GPUs (issue #4) #181

Open
AndradeTK wants to merge 1 commit from upstream-pr/181 into main
AndradeTK commented 2026-11-24 22:17:24 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by AndradeTK on 2026-11-24T22:17:24Z.


a_mesh_pipeline_loads_from_the_library now skips when the host lacks mesh shader support (the same check production code uses) and disables depth testing for the color-only target, which has no depth plane; otherwise CreatePipelineState returns E_INVALIDARG, which is what #4 reported on an RTX 5080. Verified locally: victory-gpu lib tests 110 passed, 0 failed, 1 ignored; clippy clean.

The mesh PSV name-offset idea (issue #12) is intentionally NOT included: it cannot be validated without game data or the D3D12 validator on real mesh shaders, so it stays out until it can be tested.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6592517975 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/181). Originally posted by [AndradeTK](https://github.com/AndradeTK) on 2026-11-24T22:17:24Z. --- a_mesh_pipeline_loads_from_the_library now skips when the host lacks mesh shader support (the same check production code uses) and disables depth testing for the color-only target, which has no depth plane; otherwise CreatePipelineState returns E_INVALIDARG, which is what #4 reported on an RTX 5080. Verified locally: victory-gpu lib tests 110 passed, 0 failed, 1 ignored; clippy clean. The mesh PSV name-offset idea (issue #12) is intentionally NOT included: it cannot be validated without game data or the D3D12 validator on real mesh shaders, so it stays out until it can be tested.
copilot-pull-request-reviewer[bot commented 2026-11-24 23:09:03 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T22:19:26Z.

Review: COMMENTED


The depth-state change leaves the reported root-signature failure unaddressed, requiring investigation or a narrower PR description that distinguishes the separate pipeline-state fix.

1 open issue
What changed in this PR

This PR adjusts the GPU library’s mesh-pipeline test to handle unsupported hardware and use valid depth settings for a color-only target.

Changes:

  • Skip the test when the host reports no mesh-shader support.
  • Disable depth testing because the test target has no depth plane.
  • Leave the mesh PSV metadata changes discussed in #12 out of scope.
File Description
crates/​victory-gpu/​src/​pipeline/​host.rs Add a mesh-support guard and disable depth testing in the mesh-pipeline library test.

Review effort: Balanced

<!-- greyfinch-sync:fxceless/victory-fork:review:6048306726 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/181#pullrequestreview-6048306726). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-24T22:19:26Z. **Review:** COMMENTED --- <!-- ccr-overview-v2 --> ### 🟡 Changes recommended The depth-state change leaves the reported root-signature failure unaddressed, requiring investigation or a narrower PR description that distinguishes the separate pipeline-state fix. <details open> <summary><strong>1 open issue</strong></summary> - <picture><source media="(prefers-color-scheme: dark)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.svg"><img src="https://github.githubassets.com/static/images/icons/copilot-code-review/low-v2-light.png" alt="Low severity" width="62" height="18" align="texttop"></picture> [Root-signature failure remains unaddressed by depth-state change](https://github.com/fxceless/victory-fork/pull/181#discussion_r4687318155) · New </details> <details> <summary><strong>What changed in this PR</strong></summary> This PR adjusts the GPU library’s mesh-pipeline test to handle unsupported hardware and use valid depth settings for a color-only target. **Changes:** - Skip the test when the host reports no mesh-shader support. - Disable depth testing because the test target has no depth plane. - Leave the mesh PSV metadata changes discussed in #12 out of scope. | File | Description | | ---- | ----------- | | `crates/​victory-gpu/​src/​pipeline/​host.rs` | Add a mesh-support guard and disable depth testing in the mesh-pipeline library test. | </details> <sub>Review effort: Balanced</sub>
Copilot commented 2026-11-24 23:09:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Copilot on 2026-11-24T22:19:26Z.

Code review location: crates/victory-gpu/src/pipeline/host.rs; line 922

@@ -913,6 +917,9 @@ mod tests {
         let mut g = GraphicsState::default();
         g.targets.NumRenderTargets = 1;
         g.targets.RTFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
+        // The test's target has no depth plane, so the state must not ask
+        // for one: a depth test against an absent depth format is refused.
+        g.depth.DepthEnable = false.into();

The failure shown in #4 is an unwrap of Result<(ID3D12RootSignature, Vec<u8>)>, identifying the root_signature(...) call above rather than CreatePipelineState. On a host that passes the new capability check, that call still runs before this depth-state change, so this does not address the reported root-signature error. Please investigate that failure on the reported setup, or narrow the PR description to distinguish this separate pipeline-state fix from #4.

<!-- greyfinch-sync:fxceless/victory-fork:review-comment:4687318155 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/181#discussion_r4687318155). Originally posted by [Copilot](https://github.com/Copilot) on 2026-11-24T22:19:26Z. **Code review location:** `crates/victory-gpu/src/pipeline/host.rs`; line 922 ~~~~diff @@ -913,6 +917,9 @@ mod tests { let mut g = GraphicsState::default(); g.targets.NumRenderTargets = 1; g.targets.RTFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM; + // The test's target has no depth plane, so the state must not ask + // for one: a depth test against an absent depth format is refused. + g.depth.DepthEnable = false.into(); ~~~~ --- The failure shown in #4 is an unwrap of `Result<(ID3D12RootSignature, Vec<u8>)>`, identifying the `root_signature(...)` call above rather than `CreatePipelineState`. On a host that passes the new capability check, that call still runs before this depth-state change, so this does not address the reported root-signature error. Please investigate that failure on the reported setup, or narrow the PR description to distinguish this separate pipeline-state fix from #4.
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/181:upstream-pr/181'
git switch 'upstream-pr/181'

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/181'
git switch 'upstream-pr/181'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/181'
git switch 'upstream-pr/181'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/181'
git switch 'main'
git merge --squash 'upstream-pr/181'
git switch 'main'
git merge --ff-only 'upstream-pr/181'
git switch 'main'
git merge 'upstream-pr/181'
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
fxceless/victory-fork!181
No description provided.