Fix Vulkan validation errors on sRGB texture views #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "MilqueAndToast/fe3h-recomp:codex/vulkan-srgb-view-usage"
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?
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-02275on 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.
generated/), extracted files, assets or logs containing game code are included.Thanks! We'll test this on AMD here and merge it after that.