• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

shader-slang / slang-rhi / 26918387799

pending completion
26918387799

push

github

web-flow
Fix shader-slang/slang-rhi#762: don't request STORAGE usage for SRGB swapchains (#765)

The Vulkan backend auto-added UnorderedAccess to the default swapchain usage
whenever the chosen format reported ShaderUavStore, which maps to
VK_IMAGE_USAGE_STORAGE_BIT. For SRGB swapchain formats that a driver does not
allow as storage images, vkCreateSwapchainKHR then fails with
VUID-VkSwapchainCreateInfoKHR-imageFormat-01778 (reported on AMD Radeon 9070XT).

- configure(): stop auto-adding UnorderedAccess to the default swapchain usage.
  Apps that need storage on the swapchain must request it explicitly, which the
  existing else-branch already validates against the format.
- createSwapchain(): clamp the requested imageUsage against
  VkSurfaceCapabilitiesKHR::supportedUsageFlags (the caps were queried then
  discarded), as defense-in-depth.
- init(): advertise UnorderedAccess in m_info.supportedUsage only when the
  preferred format reports ShaderUavStore, instead of unconditionally.

Co-authored-by: nv-slang-bot[bot] <274397474+nv-slang-bot[bot]@users.noreply.github.com>
Co-authored-by: Harsh Aggarwal <haaggarwal@nvidia.com>

12317 of 20892 branches covered (58.96%)

Branch coverage included in aggregate %.

0 of 12 new or added lines in 1 file covered. (0.0%)

3 existing lines in 1 file now uncovered.

36548 of 50044 relevant lines covered (73.03%)

272712.72 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/vulkan/vk-surface.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc