graphics: restore block image storage usage where the device supports it #894
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!894
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/894/head"
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?
@joaodiaslobo on GitHub · 2026-09-28 20:49 UTC · original
joaodiaslobo:graphics/block-image-storage→main· +23 −3 · 1 files · 1 commits · merged 2026-09-28 21:57 UTCFixes texture problems reported in #698. Block compressed textures render black in Stray, and it affects any game whose shaders write BC data.
Block compressed images were created without storage usage, while their create flags still allowed uncompressed views of their blocks. A shader that writes BC blocks through one of those views therefore could not use the image as a storage image, leaving the texture black.
Storage usage for a compressed format is optional, and image creation can fail when the device rejects the requested usage, so it cannot simply be enabled for every block-compressed image. This change queries the device first. If it supports storage for that format, the image is created with storage usage. Otherwise, storage is omitted and a one-time warning explains why those textures will not render.
Testing
Stray (PPSA02100). Textures render correctly again and no warning is printed. Tested on Windows with clang-cl.
@coderabbitai[bot] on GitHub · 2026-09-28 20:56 UTC · original
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
fac1dad4-71fb-4c57-98c8-9436d2af9c91📥 Commits
Reviewing files that changed from the base of the PR and between
4b0de1b672and4b3c1df035.📒 Files selected for processing (1)
src/graphics/host_gpu/renderer/image/image.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough
Block-compressed images use transfer and sampled usage. When block-texel views are enabled, the code queries whether storage usage is supported. It adds storage usage if the query succeeds. If the query fails, it keeps the existing usage and logs a warning once. Other formats continue through the existing format-feature checks.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
4b3c1Supported block-compressed images can gain storage usage, while unsupported images retain transfer and sampled usage. No merge-blocking issue was identified.
Security Architecture Review
Security architecture risk: 🔵 Low · up to
4b3c1Storage access is added only when the selected device supports it, and image creation retains its validation checks. No new security bypass was identified. Some runtime and concurrency behavior remains unverified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@Nmzik on GitHub · 2026-09-28 21:57 UTC · original
@joaodiaslobo Nice!