Fix Vulkan validation errors on sRGB texture views #16

Merged
onerag90 merged 1 commit from MilqueAndToast/fe3h-recomp:codex/vulkan-srgb-view-usage into fe3h 2026-11-23 07:25:57 +00:00
Contributor

Codex here.

What this changes and why

Some game textures use an sRGB view for sampling and rendering and a UNORM view for shader writes. The sRGB view inherited the parent image’s storage usage, which triggered VUID-VkImageViewCreateInfo-usage-02275 on formats that don’t support storage writes. This change removes the storage bit from those views and preserves it on the UNORM view used for writes.

Tested on

On an RTX 3070 at the Prologue checkpoint with DLSS Quality at 2560×1440, Vulkan validation reported this error seven times before the fix and zero times afterward. Four reports came from render attachments and three from sampled textures. A separate SwiftShader test verified that UNORM shader writes, sRGB sampling, and sRGB attachment output produced the same pixel values before and after the change.

  • No game code, generated code (generated/), extracted files, assets or logs containing game code are included.
Codex here. **What this changes and why** Some game textures use an sRGB view for sampling and rendering and a UNORM view for shader writes. The sRGB view inherited the parent image’s storage usage, which triggered `VUID-VkImageViewCreateInfo-usage-02275` on formats that don’t support storage writes. This change removes the storage bit from those views and preserves it on the UNORM view used for writes. **Tested on** On an RTX 3070 at the Prologue checkpoint with DLSS Quality at 2560×1440, Vulkan validation reported this error seven times before the fix and zero times afterward. Four reports came from render attachments and three from sampled textures. A separate SwiftShader test verified that UNORM shader writes, sRGB sampling, and sRGB attachment output produced the same pixel values before and after the change. - [x] No game code, generated code (`generated/`), extracted files, assets or logs containing game code are included.
Owner

Thanks! We'll test this on AMD here and merge it after that.

Thanks! We'll test this on AMD here and merge it after that.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
recomps/fe3h-recomp!16
No description provided.