Add support for older Android devices that don't support R11G11B10 texture format

This commit is contained in:
Wojciech Figat
2021-11-15 16:37:36 +01:00
parent 80ef2befd5
commit d07ca3fcf4
5 changed files with 47 additions and 6 deletions

View File

@@ -238,6 +238,11 @@ bool GPUTextureVulkan::OnInit()
if (useDSV)
format = PixelFormatExtensions::FindDepthStencilFormat(format);
_desc.Format = _device->GetClosestSupportedPixelFormat(format, _desc.Flags, optimalTiling);
if (_desc.Format == PixelFormat::Unknown)
{
LOG(Error, "Unsupported texture format {0}.", (int32)format);
return true;
}
// Setup texture description
VkImageCreateInfo imageInfo;