fix(🐛): Route surfaces configured with viewFormats through the blit path#73
Open
wcandillon wants to merge 2 commits into
Open
fix(🐛): Route surfaces configured with viewFormats through the blit path#73wcandillon wants to merge 2 commits into
wcandillon wants to merge 2 commits into
Conversation
Collaborator
|
The import failed again, do you mind opening a CL on Gerrit? |
Added check for viewFormats in swapchain image usage validation.The Vulkan swapchain creates its images without VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and wraps them in a texture descriptor that omits the configuration's viewFormats, so the first GetCurrentTexture() fails the viewFormats consistency DAWN_CHECK and aborts. Any non-empty viewFormats now sets needsBlit, like an unsupported extent or usage: the user-facing texture becomes the intermediate blit texture, a regular texture created from the full descriptor, which supports reinterpretation. Metal already builds the swapchain texture from the full descriptor and is unaffected. Adds a SurfaceTests end2end case; the file previously only exercised viewFormatCount = 0, which is why this went unnoticed. Change-Id: If09df3749bb4de9c9ed011bf924141ea1fbfe15b
When the device supports VK_KHR_swapchain_mutable_format, a surface configured with viewFormats no longer needs the blit fallback: the swapchain is created with VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR and a VkImageFormatListCreateInfo listing the base format and the viewFormats, and the wrapped texture descriptor carries the viewFormats so views can reinterpret the swapchain images directly. The SurfaceTests case is extended to render through the reinterpreted srgb view instead of only acquiring the texture. Change-Id: If6557d1600bb45f18c4889c794b924a8fdc49fe9
Contributor
Author
|
done ✅ and I also tested the fix on Android |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added check for viewFormats in swapchain image usage validation.The Vulkan swapchain creates its images without VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT and wraps them in a texture descriptor that omits the configuration's viewFormats, so the first GetCurrentTexture() fails the viewFormats consistency DAWN_CHECK and aborts. Any non-empty viewFormats now sets needsBlit, like an unsupported extent or usage: the user-facing texture becomes the intermediate blit texture, a regular texture created from the full descriptor, which supports reinterpretation.
Metal already builds the swapchain texture from the full descriptor and is unaffected. Adds a SurfaceTests end2end case; the file previously only exercised viewFormatCount = 0, which is why this went unnoticed.