mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] prefer 24 bit depth buffer format on vulkan backend. (#166854)
We really only need 24 bits of depth. 32 can be used as a fallback instead of the other way around.
This commit is contained in:
parent
f6c2b1dd78
commit
cbc8ee416c
@ -520,11 +520,11 @@ bool CapabilitiesVK::SetPhysicalDevice(
|
||||
default_color_format_ = PixelFormat::kUnknown;
|
||||
}
|
||||
|
||||
if (HasSuitableDepthStencilFormat(device, vk::Format::eD32SfloatS8Uint)) {
|
||||
default_depth_stencil_format_ = PixelFormat::kD32FloatS8UInt;
|
||||
} else if (HasSuitableDepthStencilFormat(device,
|
||||
vk::Format::eD24UnormS8Uint)) {
|
||||
if (HasSuitableDepthStencilFormat(device, vk::Format::eD24UnormS8Uint)) {
|
||||
default_depth_stencil_format_ = PixelFormat::kD24UnormS8Uint;
|
||||
} else if (HasSuitableDepthStencilFormat(device,
|
||||
vk::Format::eD32SfloatS8Uint)) {
|
||||
default_depth_stencil_format_ = PixelFormat::kD32FloatS8UInt;
|
||||
} else {
|
||||
default_depth_stencil_format_ = PixelFormat::kUnknown;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user