Commit 680d3761 by Alexis Hetu Committed by Alexis Hétu

Add VK_IMAGE_USAGE_SAMPLED_BIT to SurfaceKHR

ANGLE needs to be able to sample surfaces in order to emulate things like glBlitFramebuffer or use EGL images as textures. Section 32.3. Required Format Support of the Vulkan 1.1 spec dictates that all formats which must support VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, also support VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, and VK_IMAGE_USAGE_SAMPLE_BIT. It should already work properly in SwiftShader, so this cl just adds the bit. Bug b/139412450 b/139479506 Change-Id: I0f79d042789a8b6372f75ecf6cda5f28c6955652 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/35709Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 51d51084
...@@ -117,8 +117,11 @@ void SurfaceKHR::getSurfaceCapabilities(VkSurfaceCapabilitiesKHR *pSurfaceCapabi ...@@ -117,8 +117,11 @@ void SurfaceKHR::getSurfaceCapabilities(VkSurfaceCapabilitiesKHR *pSurfaceCapabi
pSurfaceCapabilities->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; pSurfaceCapabilities->supportedTransforms = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
pSurfaceCapabilities->currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; pSurfaceCapabilities->currentTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
pSurfaceCapabilities->supportedCompositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; pSurfaceCapabilities->supportedCompositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
pSurfaceCapabilities->supportedUsageFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | pSurfaceCapabilities->supportedUsageFlags =
VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT; VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT |
VK_IMAGE_USAGE_TRANSFER_SRC_BIT |
VK_IMAGE_USAGE_TRANSFER_DST_BIT |
VK_IMAGE_USAGE_SAMPLED_BIT;
} }
uint32_t SurfaceKHR::getSurfaceFormatsCount() const uint32_t SurfaceKHR::getSurfaceFormatsCount() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment