GPU: RGBA8 shader views keep their sRGB or linear format where the host can cast (#578) #644
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!644
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-644"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@laptopnotebook on GitHub · 2026-11-25 03:52 UTC · original
laptopnotebook:fix/578-srgb-views→main· +224 −8 · 3 files · 1 commits · openFixes #578.
fitsindescriptor/host.rsgave a shader view of a typed texture the texture's format whenever the view asked for another format of the same family. For RGBA8 that dropped the sRGB conversion: an sRGB view of a UNORM texture read its texels as linear, and a linear view of an sRGB texture read them converted.On a host that reports
CastingFullyTypedFormatSupported(Options3, queried once and logged like the depth bounds check), an RGBA8 shader view now keeps the sRGB or linear format it asks for. Unordered access views, other format pairs (BGRA8 still has the old shortcut) and hosts without the cast behave as before. This follows the patch @akimfomin proposed in the issue.inplace::Rigis nowpub(crate)so the new test can use its queue; nothing else about it changed.Validation (Windows 11, NVIDIA):
descriptor::host::tests::rgba8_views_keep_their_srgb_conversionuploads one 0x80 texel and samples it on the GPU through all four texture/view pairs. The sRGB view of the UNORM texture reads 0.2159 with the change and 0.5020 without it (the test fails then).VICTORY_D3D12_DEBUG=1) the four views raise no messages.cargo test --workspace --locked: all pass.mainindraw.rs(sort_unstable_by_key),indirect.rs(depth_writtenunused) andresource.rs(placed_filler_twinsunused); this PR doesn't touch those.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.