Fix linker error with iOS build
The IsMacOSVersionAtLeast() function is only defined on macOS, but was being used on all Apple platforms. Change-Id: Ie5e37fb8e408f424e55795327cca7f2a345bfdfa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61120 Commit-Queue: James Price <jrprice@google.com> Commit-Queue: Austin Eng <enga@chromium.org> Auto-Submit: James Price <jrprice@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
2086c655e5
commit
565863e954
|
@ -24,7 +24,7 @@ std::string GetEnvironmentVar(const char* variableName);
|
|||
bool SetEnvironmentVar(const char* variableName, const char* value);
|
||||
std::string GetExecutableDirectory();
|
||||
|
||||
#ifdef DAWN_PLATFORM_APPLE
|
||||
#ifdef DAWN_PLATFORM_MACOS
|
||||
void GetMacOSVersion(int32_t* majorVersion, int32_t* minorVersion = nullptr);
|
||||
bool IsMacOSVersionAtLeast(uint32_t majorVersion, uint32_t minorVersion = 0);
|
||||
#endif
|
||||
|
|
|
@ -225,9 +225,13 @@ namespace dawn_native { namespace metal {
|
|||
// Disable timestamp query on macOS 10.15 on AMD GPU because WriteTimestamp
|
||||
// fails to call without any copy commands on MTLBlitCommandEncoder. This issue
|
||||
// has been fixed on macOS 11.0. See crbug.com/dawn/545
|
||||
BOOL enableTimestampQuery = !gpu_info::IsAMD(GetPCIInfo().vendorId);
|
||||
#if defined(DAWN_PLATFORM_MACOS)
|
||||
// TODO(crbug.com/dawn/940): Disable timestamp query on macOS 11.0+. Need to
|
||||
// figure out what to do with dstOffset alignment on that system.
|
||||
if (!gpu_info::IsAMD(GetPCIInfo().vendorId) && !IsMacOSVersionAtLeast(11)) {
|
||||
enableTimestampQuery &= !IsMacOSVersionAtLeast(11);
|
||||
#endif
|
||||
if (enableTimestampQuery) {
|
||||
mSupportedExtensions.EnableExtension(Extension::TimestampQuery);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -786,7 +786,7 @@ bool DawnTestBase::IsLinux() const {
|
|||
}
|
||||
|
||||
bool DawnTestBase::IsMacOS(int32_t majorVersion, int32_t minorVersion) const {
|
||||
#ifdef DAWN_PLATFORM_APPLE
|
||||
#ifdef DAWN_PLATFORM_MACOS
|
||||
if (majorVersion == -1 && minorVersion == -1) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue