Compose test: an sRGB BGRX plane gets the plain UNORM view, as every sRGB plane does since 95f6ef0f #2646

Open
github-bot wants to merge 1 commit from github-bot/gh-2646 into main AGit
Owner

@⁠boraswim on GitHub · 2026-11-29 15:31 UTC · original
boraswim:fix/bgrx-typed-view → main · +5 −4 · 1 files · 1 commits · open

Part of #2420 (item 3).

What it changes

compose::tests::bgrx_plane_selects_a_typed_view fails deterministically in the diagnostics build:

assertion `left == right` failed
  left: Some(DXGI_FORMAT(88))   // B8G8R8X8_UNORM
 right: Some(DXGI_FORMAT(93))   // B8G8R8X8_UNORM_SRGB

The code is right and the test is stale:

  • 95f6ef0f (Nov 26), "Two planes: read sRGB planes as plain UNORM so the scene's bytes reach the screen unchanged", made view() map sRGB planes to their plain UNORM view (27 | 29, 90 | 91).
  • 29473fb (Nov 28), "Compose BGRX scene planes through their legal sampled views", added BGRX and this test on a base without that rule, so the test expected the sRGB view to be kept (93 => 93).
  • The merge that brought both in (7bd42af) gave BGRX the same rule as the others (92 | 93 => B8G8R8X8_UNORM), and the doc comment on view() says so, but the test kept its old expectation.

The module's tests are #[cfg(all(test, feature = "diagnostics"))] and the diagnostics build has not compiled since the wave merges (#2048, #2208), so nobody saw the failure. The test now expects the rule, and checks the BGRA and RGBA sRGB planes too, so the rule is pinned for all three. Test-only.

How it was tested

  • GPU and profile: unit tests only (Windows 11, rustc 1.98.1, RTX 4070 SUPER; the GPU composite tests in the module ran on the card)
  • Before: cargo test -p victory-gpu --lib --features diagnostics -- compose:: fails bgrx_plane_selects_a_typed_view
  • After: 6 passed, 0 failed (with the diagnostics-build fix from #2048 applied, since main's diag build does not compile)
  • For shader changes, the wave sizes tested: not a shader change
  • cargo test passed for the crates it touches: yes, as above. CI does not run the diagnostics tests.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #2420 (the issue). #2048 and #2208 make the diag build compile. #1727 and #605 touch compose.rs but not view() or this test.
**@⁠boraswim** on GitHub · 2026-11-29 15:31 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2646) `boraswim:fix/bgrx-typed-view` → `main` · +5 −4 · 1 files · 1 commits · open Part of #2420 (item 3). ## What it changes `compose::tests::bgrx_plane_selects_a_typed_view` fails deterministically in the diagnostics build: ``` assertion `left == right` failed left: Some(DXGI_FORMAT(88)) // B8G8R8X8_UNORM right: Some(DXGI_FORMAT(93)) // B8G8R8X8_UNORM_SRGB ``` The code is right and the test is stale: - 95f6ef0f (Nov 26), "Two planes: read sRGB planes as plain UNORM so the scene's bytes reach the screen unchanged", made `view()` map sRGB planes to their plain UNORM view (`27 | 29`, `90 | 91`). - 29473fb (Nov 28), "Compose BGRX scene planes through their legal sampled views", added BGRX and this test on a base without that rule, so the test expected the sRGB view to be kept (`93 => 93`). - The merge that brought both in (7bd42af) gave BGRX the same rule as the others (`92 | 93 => B8G8R8X8_UNORM`), and the doc comment on `view()` says so, but the test kept its old expectation. The module's tests are `#[cfg(all(test, feature = "diagnostics"))]` and the diagnostics build has not compiled since the wave merges (#2048, #2208), so nobody saw the failure. The test now expects the rule, and checks the BGRA and RGBA sRGB planes too, so the rule is pinned for all three. Test-only. ## How it was tested - GPU and profile: unit tests only (Windows 11, rustc 1.98.1, RTX 4070 SUPER; the GPU composite tests in the module ran on the card) - Before: `cargo test -p victory-gpu --lib --features diagnostics -- compose::` fails `bgrx_plane_selects_a_typed_view` - After: 6 passed, 0 failed (with the diagnostics-build fix from #2048 applied, since main's diag build does not compile) - For shader changes, the wave sizes tested: not a shader change - `cargo test` passed for the crates it touches: yes, as above. CI does not run the diagnostics tests. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #2420 (the issue). #2048 and #2208 make the diag build compile. #1727 and #605 touch `compose.rs` but not `view()` or this test.
bgrx_plane_selects_a_typed_view came with 29473fb from a base without
95f6ef0f (Two planes: read sRGB planes as plain UNORM so the scene's
bytes reach the screen unchanged); the merge that brought both in
(7bd42af) gave BGRX the same rule (92 | 93 => B8G8R8X8_UNORM), and the
test still expected B8G8R8X8_UNORM_SRGB. It is diagnostics-only and the
diag build did not compile, so the failure went unseen. The test now
expects the rule, for BGRA and RGBA sRGB planes too.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 15:35:50 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2646'
git switch 'github-bot/gh-2646'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2646'
git switch 'github-bot/gh-2646'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2646'
git switch 'main'
git merge --squash 'github-bot/gh-2646'
git switch 'main'
git merge --ff-only 'github-bot/gh-2646'
git switch 'main'
git merge 'github-bot/gh-2646'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2646
No description provided.