Changeset 276567 in webkit
- Timestamp:
- Apr 25, 2021, 12:06:07 PM (5 years ago)
- Location:
- trunk/Source/ThirdParty/ANGLE
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
src/libANGLE/renderer/metal/DisplayMtl.h (modified) (1 diff)
-
src/libANGLE/renderer/metal/DisplayMtl.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/ThirdParty/ANGLE/ChangeLog
r276507 r276567 1 2021-04-25 Kyle Piddington <kpiddington@apple.com> 2 3 [Metal ANGLE] Select proper IOSurface backing format for WebGL environment 4 https://bugs.webkit.org/show_bug.cgi?id=224948 5 <rdar://76284889> 6 7 Depending on the architecture, WebCore expects different 8 IOSurface texture targets for the main buffer. When running catalyst on 9 Arm64 devices, Metal-ANGLE needs to select the TEXTURE_2D texture target for our 10 IOSurface/Pbuffer bind point, rather than TEXTURE_RECTANGLE. 11 12 Reviewed by Dean Jackson. 13 14 * src/libANGLE/renderer/metal/DisplayMtl.h: 15 * src/libANGLE/renderer/metal/DisplayMtl.mm: 16 (rx::needsEAGLOnMac): 17 (rx::DisplayMtl::EGLDrawingBufferTextureTarget): 18 (rx::DisplayMtl::generateConfigs): 19 1 20 2021-04-23 Truitt Savell <tsavell@apple.com> 2 21 -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.h
r275685 r276567 166 166 void initializeFeatures(); 167 167 void initializeLimitations(); 168 EGLenum EGLDrawingBufferTextureTarget(); 168 169 id<MTLDevice> getMetalDeviceMatchingAttribute(const egl::AttributeMap &attribs); 169 170 angle::Result initializeShaderLibrary(); -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/DisplayMtl.mm
r275841 r276567 438 438 void DisplayMtl::populateFeatureList(angle::FeatureList *features) {} 439 439 440 #if TARGET_OS_MACCATALYST 441 static bool needsEAGLOnMac() 442 { 443 #if defined(__arm64__) || defined(__aarch64__) 444 return true; 445 #else 446 return false; 447 #endif 448 } 449 #endif 450 451 EGLenum DisplayMtl::EGLDrawingBufferTextureTarget() 452 { 453 #if TARGET_OS_MACCATALYST 454 if (needsEAGLOnMac()) 455 return EGL_TEXTURE_2D; 456 return EGL_TEXTURE_RECTANGLE_ANGLE; 457 #elif TARGET_OS_OSX 458 return EGL_TEXTURE_RECTANGLE_ANGLE; 459 #else 460 return EGL_TEXTURE_2D; 461 #endif 462 } 440 463 egl::ConfigSet DisplayMtl::generateConfigs() 441 464 { … … 461 484 462 485 // Pbuffer 463 #if TARGET_OS_OSX || TARGET_OS_MACCATALYST 464 config.bindToTextureTarget = EGL_TEXTURE_RECTANGLE_ANGLE; 465 #else 466 config.bindToTextureTarget = EGL_TEXTURE_2D; 467 #endif 486 config.bindToTextureTarget = EGLDrawingBufferTextureTarget(); 468 487 config.maxPBufferWidth = 4096; 469 488 config.maxPBufferHeight = 4096;
Note:
See TracChangeset
for help on using the changeset viewer.