Vulkan Renderer - implement YcBcCr using VK_KHR_sampler_ycbcr_conversion. ()

* Vulkan Renderer - implement YcBcCr using VK_KHR_sampler_ycbcr_conversion.  This simplifies the shader code and will also allow support for additional formats that we don't yet support (such as SDL_PIXELFORMAT_P010 for ffmpeg). The renderer now queries for VK_KHR_sampler_ycbcr_conversion and dependent extensions and will enable it if it's present. It reimplements YUV/NV12 texture support using this extension (these formats are no longer supported if the extension is not present). For each YUV/NV12 texture, a VkSamplerYcbcrConversion object is created from SDL_Colorspace parameters.  This is passed to the VkImageView and also an additional sampler is created for Ycbcr.  Instead of using 1-3 textures, the shaders now all use 1 texture with a combined image sampler (required by the extension).  Further, when using Ycbcr, a separate descriptor set layout is baked with the Ycbcr sampler as an immutable sampler.  The code to copy the images now copies to the individual image planes.  The swizzling between formats is handled in the VkSamplerYcbcrConversion object.
This commit is contained in:
Dan Ginsburg 2024-02-28 11:57:09 -05:00 committed by GitHub
parent fb3bf1dcbd
commit ad036d43e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 726 additions and 825 deletions
src/render/vulkan

File diff suppressed because it is too large Load diff