Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 58b5768990e1c013032b721936d0a4b1c1b7a6d6
      
https://github.com/WebKit/WebKit/commit/58b5768990e1c013032b721936d0a4b1c1b7a6d6
  Author: Dan Glastonbury <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M Source/WebCore/PAL/pal/spi/cocoa/MetalSPI.h
    M Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm
    M Source/WebGPU/WebGPU/MetalSPI.h
    M Source/WebKit/UIProcess/XR/xros/PlatformXRCompositor.mm

  Log Message:
  -----------
  [WebXR|visionOS] Try shared MTLTexture before falling back to IOSurface
https://bugs.webkit.org/show_bug.cgi?id=316380
rdar://178666073

Reviewed by Mike Wyrzykowski.

When entering immersive VR mode on visionOS simulator only black is rendered
because the compositor surfaces passed as IOSurfaces return 0x0 dimensions.

To fix this, we know use the same logic as a visionOS device. Try to access the
compositor surfaces as shared MTLTextures before falling back to trying
IOSurface.

Tested by launching Safari in simulator and trying a WebXR immersive VR page.

* Source/WTF/wtf/PlatformUse.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLCocoa::createExternalImage):
* Source/WebKit/UIProcess/XR/xros/PlatformXRCompositor.mm:
(makeMachSendRight):

Canonical link: https://commits.webkit.org/314780@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to