-
Document single-level YCbCr image assumption · 77b43d68Nicolas Capens authored
We currently rely on limiting the mipmap level count of YCbCr images and the presence of sampler YCbCr conversion to disable mipmapping. This is valid, but fragile. The Vulkan 1.2 spec guarantees that when sampler Y'CbCr conversion is used, the image view must have a Y'CbCr format: "If the descriptor refers to a sampler that performs Y'CbCr conversion, the sampler must only be used to sample the image in the same descriptor." "If the image view is to be used with a sampler which supports sampler Y'CbCr conversion, an identically defined object of type VkSamplerYcbcrConversion to that used to create the sampler must be passed to vkCreateImageView in a VkSamplerYcbcrConversionInfo included in the pNext chain of VkImageViewCreateInfo. Conversely, if a VkSamplerYcbcrConversion object is passed to vkCreateImageView, an identically defined VkSamplerYcbcrConversion object must be used when sampling the image." "maxMipLevels is the maximum number of mipmap levels. maxMipLevels must be equal to the number of levels in the complete mipmap chain based on the maxExtent.width, maxExtent.height, and maxExtent.depth, except when one of the following conditions is true, in which case it may instead be 1: * ... * image format is one of those listed in Formats requiring sampler Y′CBCR conversion for VK_IMAGE_ASPECT_COLOR_BIT image views" Bug: b/151263485 Change-Id: Ibb8e3fe34ecda04d6fb41308437fa4c66815f1fb Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42228 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by:Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Alexis Hétu <sugoi@google.com>
77b43d68
×