-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathangle.visionos.patch
More file actions
40 lines (39 loc) · 1.78 KB
/
angle.visionos.patch
File metadata and controls
40 lines (39 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/src/common/apple/apple_platform.h b/src/common/apple/apple_platform.h
index cee7b44d61..718c9b9f8f 100644
--- a/src/common/apple/apple_platform.h
+++ b/src/common/apple/apple_platform.h
@@ -18,7 +18,8 @@
(ANGLE_PLATFORM_WATCHOS && !ANGLE_PLATFORM_IOS_FAMILY_SIMULATOR && \
__WATCH_OS_VERSION_MIN_REQUIRED >= 80000) || \
(TARGET_OS_TV && !ANGLE_PLATFORM_IOS_FAMILY_SIMULATOR && \
- __TV_OS_VERSION_MIN_REQUIRED >= 150000)) && \
+ __TV_OS_VERSION_MIN_REQUIRED >= 150000) || \
+ (TARGET_OS_VISION && !ANGLE_PLATFORM_IOS_FAMILY_SIMULATOR)) && \
(defined(__has_include) && __has_include(<Metal/MTLResource_Private.h>))
# define ANGLE_HAVE_MTLRESOURCE_SET_OWNERSHIP_IDENTITY 1
#else
diff --git a/src/common/platform.h b/src/common/platform.h
index 48d6c5dfa7..07bc78c59f 100644
--- a/src/common/platform.h
+++ b/src/common/platform.h
@@ -149,6 +149,8 @@
# error tvOS 17 SDK or newer is required.
# endif
# define ANGLE_PLATFORM_APPLETV 1
+# elif TARGET_OS_VISION
+# define ANGLE_PLATFORM_VISION 1
# endif
# endif
#endif
diff --git a/src/libANGLE/renderer/metal/DisplayMtl.mm b/src/libANGLE/renderer/metal/DisplayMtl.mm
index 7cdf6bcef3..a74fd6278f 100644
--- a/src/libANGLE/renderer/metal/DisplayMtl.mm
+++ b/src/libANGLE/renderer/metal/DisplayMtl.mm
@@ -1373,7 +1373,7 @@ bool DisplayMtl::supports32BitFloatFiltering() const
bool DisplayMtl::supportsBCTextureCompression() const
{
- if (@available(macCatalyst 16.4, iOS 16.4, *))
+ if (@available(macCatalyst 16.4, iOS 16.4, tvOS 16.4, visionOS 1.0, *))
{
return [mMetalDevice supportsBCTextureCompression];
}