Fix compilation on iOS where setDisplaySyncEnabled isn't available.
Bug: dawn:269 Change-Id: I607983aaf437c39082156151b79887e72d529247 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18260 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
a0d8362e00
commit
d25b8e14f4
|
@ -84,9 +84,11 @@ namespace dawn_native { namespace metal {
|
|||
[mLayer setDevice:ToBackend(GetDevice())->GetMTLDevice()];
|
||||
[mLayer setPixelFormat:MetalPixelFormat(GetFormat())];
|
||||
|
||||
if (@available(macos 10.13, ios 11.0, *)) {
|
||||
#if defined(DAWN_PLATFORM_MACOS)
|
||||
if (@available(macos 10.13, *)) {
|
||||
[mLayer setDisplaySyncEnabled:(GetPresentMode() != wgpu::PresentMode::Immediate)];
|
||||
}
|
||||
#endif // defined(DAWN_PLATFORM_MACOS)
|
||||
|
||||
// There is no way to control Fifo vs. Mailbox in Metal.
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue