Changeset 273549 in webkit


Ignore:
Timestamp:
Feb 26, 2021 3:53:07 AM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Implement OpenXR port graphics binding
https://bugs.webkit.org/show_bug.cgi?id=222173

Patch by Imanol Fernandez <imanol> on 2021-02-26
Reviewed by Sergio Villar Senin.

.:

Enable OpenXR defines required for EGL graphics binding.

  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

This patch implements the graphics binding required to initialize OpenXR sessions
with tracking and rendering support. The current implementation was using a headless
OpenXR session which is not valid for tracking.

The headless session was used to avoid allocating the graphics resources during WebXR
device enumeration. The problem is that it can't be converted later to a valid session for
tracking, and the global XrInstance needs to be recreated. This patch implements a new approach
to keep the delayed graphics initialization without using the headless session.

  • platform/graphics/egl/GLContextEGL.cpp: Add EGLConfig argument to create methods

(WebCore::GLContextEGL::createWindowContext):
(WebCore::GLContextEGL::createPbufferContext):
(WebCore::GLContextEGL::createSurfacelessContext):
(WebCore::GLContextEGL::GLContextEGL):

  • platform/graphics/egl/GLContextEGL.h: Add EGLConfig member
  • platform/graphics/egl/GLContextEGLLibWPE.cpp: initialize m_config

(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createWPEContext):

  • platform/graphics/egl/GLContextEGLWayland.cpp: initialize m_config

(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createWaylandContext):

  • platform/graphics/egl/GLContextEGLX11.cpp: initialize m_config

(WebCore::GLContextEGL::GLContextEGL):
(WebCore::GLContextEGL::createPixmapContext):

  • platform/xr/openxr/OpenXRExtensions.cpp: Add OpenXRExtensionMethods

(PlatformXR::OpenXRExtensions::loadMethods):

  • platform/xr/openxr/OpenXRExtensions.h:
  • platform/xr/openxr/OpenXRInstance.cpp: Enable graphics related extensions instead of XR_MND_HEADLESS_EXTENSION

(PlatformXR::Instance::Impl::Impl):

  • platform/xr/openxr/OpenXRUtils.h: Forward declare symbols required by openxr_platform.
  • platform/xr/openxr/PlatformXROpenXR.cpp:

(PlatformXR::OpenXRDevice::initializeTrackingAndRendering): Setup XrGraphicsBindingEGLMNDX
(PlatformXR::OpenXRDevice::collectEnabledFeatures): Alternative solution to enumerateReferenceSpaces()
(PlatformXR::OpenXRDevice::collectSupportedSessionModes):
(PlatformXR::OpenXRDevice::resetSession): deallocate graphic resources

  • platform/xr/openxr/PlatformXROpenXR.h:
Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r273545 r273549  
     12021-02-26  Imanol Fernandez  <ifernandez@igalia.com>
     2
     3        Implement OpenXR port graphics binding
     4        https://bugs.webkit.org/show_bug.cgi?id=222173
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Enable OpenXR defines required for EGL graphics binding.
     9
     10        * Source/cmake/OptionsWPE.cmake:
     11
    1122021-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r273545 r273549  
     12021-02-26  Imanol Fernandez  <ifernandez@igalia.com>
     2
     3        Implement OpenXR port graphics binding
     4        https://bugs.webkit.org/show_bug.cgi?id=222173
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        This patch implements the graphics binding required to initialize OpenXR sessions
     9        with tracking and rendering support. The current implementation was using a headless
     10        OpenXR session which is not valid for tracking.
     11
     12        The headless session was used to avoid allocating the graphics resources during WebXR
     13        device enumeration. The problem is that it can't be converted later to a valid session for
     14        tracking, and the global XrInstance needs to be recreated. This patch implements a new approach
     15        to keep the delayed graphics initialization without using the headless session.
     16
     17        * platform/graphics/egl/GLContextEGL.cpp: Add EGLConfig argument to create methods
     18        (WebCore::GLContextEGL::createWindowContext):
     19        (WebCore::GLContextEGL::createPbufferContext):
     20        (WebCore::GLContextEGL::createSurfacelessContext):
     21        (WebCore::GLContextEGL::GLContextEGL):
     22        * platform/graphics/egl/GLContextEGL.h: Add EGLConfig member
     23        * platform/graphics/egl/GLContextEGLLibWPE.cpp: initialize m_config
     24        (WebCore::GLContextEGL::GLContextEGL):
     25        (WebCore::GLContextEGL::createWPEContext):
     26        * platform/graphics/egl/GLContextEGLWayland.cpp: initialize m_config
     27        (WebCore::GLContextEGL::GLContextEGL):
     28        (WebCore::GLContextEGL::createWaylandContext):
     29        * platform/graphics/egl/GLContextEGLX11.cpp: initialize m_config
     30        (WebCore::GLContextEGL::GLContextEGL):
     31        (WebCore::GLContextEGL::createPixmapContext):
     32
     33        * platform/xr/openxr/OpenXRExtensions.cpp: Add OpenXRExtensionMethods
     34        (PlatformXR::OpenXRExtensions::loadMethods):
     35        * platform/xr/openxr/OpenXRExtensions.h:
     36
     37        * platform/xr/openxr/OpenXRInstance.cpp: Enable graphics related extensions instead of XR_MND_HEADLESS_EXTENSION
     38        (PlatformXR::Instance::Impl::Impl):
     39
     40        * platform/xr/openxr/OpenXRUtils.h: Forward declare symbols required by openxr_platform.
     41
     42        * platform/xr/openxr/PlatformXROpenXR.cpp:
     43        (PlatformXR::OpenXRDevice::initializeTrackingAndRendering): Setup XrGraphicsBindingEGLMNDX
     44        (PlatformXR::OpenXRDevice::collectEnabledFeatures): Alternative solution to enumerateReferenceSpaces()
     45        (PlatformXR::OpenXRDevice::collectSupportedSessionModes):
     46        (PlatformXR::OpenXRDevice::resetSession): deallocate graphic resources
     47        * platform/xr/openxr/PlatformXROpenXR.h:
     48
    1492021-02-26  Carlos Garcia Campos  <cgarcia@igalia.com>
    250
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp

    r270477 r273549  
    205205    }
    206206
    207     return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, WindowSurface));
     207    return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, config, WindowSurface));
    208208}
    209209
     
    231231    }
    232232
    233     return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, PbufferSurface));
     233    return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, config, PbufferSurface));
    234234}
    235235
     
    260260    }
    261261
    262     return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, EGL_NO_SURFACE, Surfaceless));
     262    return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, EGL_NO_SURFACE, config, Surfaceless));
    263263}
    264264
     
    354354}
    355355
    356 GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, EGLSurfaceType type)
     356GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, EGLConfig config, EGLSurfaceType type)
    357357    : GLContext(display)
    358358    , m_context(context)
    359359    , m_surface(surface)
     360    , m_config(config)
    360361    , m_type(type)
    361362{
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.h

    r270477 r273549  
    5353    static const char* lastErrorString();
    5454
     55    EGLConfig config() const { return m_config; }
     56
    5557    virtual ~GLContextEGL();
    5658
     
    7274    enum EGLSurfaceType { PbufferSurface, WindowSurface, PixmapSurface, Surfaceless };
    7375
    74     GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, EGLSurfaceType);
     76    GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, EGLConfig, EGLSurfaceType);
    7577#if PLATFORM(X11)
    76     GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, XUniquePixmap&&);
     78    GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, EGLConfig, XUniquePixmap&&);
    7779#endif
    7880#if PLATFORM(WAYLAND)
    79     GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, WlUniquePtr<struct wl_surface>&&, struct wl_egl_window*);
     81    GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, EGLConfig, WlUniquePtr<struct wl_surface>&&, struct wl_egl_window*);
    8082    void destroyWaylandWindow();
    8183#endif
    8284#if USE(WPE_RENDERER)
    83     GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, struct wpe_renderer_backend_egl_offscreen_target*);
     85    GLContextEGL(PlatformDisplay&, EGLContext, EGLSurface, EGLConfig, struct wpe_renderer_backend_egl_offscreen_target*);
    8486    void destroyWPETarget();
    8587#endif
     
    105107    EGLContext m_context { nullptr };
    106108    EGLSurface m_surface { nullptr };
     109    EGLConfig m_config { nullptr };
    107110    EGLSurfaceType m_type;
    108111#if PLATFORM(X11)
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGLLibWPE.cpp

    r245807 r273549  
    4141namespace WebCore {
    4242
    43 GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, struct wpe_renderer_backend_egl_offscreen_target* target)
     43GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, EGLConfig config, struct wpe_renderer_backend_egl_offscreen_target* target)
    4444    : GLContext(display)
    4545    , m_context(context)
    4646    , m_surface(surface)
     47    , m_config(config)
    4748    , m_type(WindowSurface)
    4849    , m_wpeTarget(target)
     
    9091    }
    9192
    92     return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, target));
     93    return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, config, target));
    9394}
    9495
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGLWayland.cpp

    r229663 r273549  
    3030namespace WebCore {
    3131
    32 GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, WlUniquePtr<struct wl_surface>&& wlSurface, struct wl_egl_window* wlWindow)
     32GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, EGLConfig config, WlUniquePtr<struct wl_surface>&& wlSurface, struct wl_egl_window* wlWindow)
    3333    : GLContext(display)
    3434    , m_context(context)
    3535    , m_surface(surface)
     36    , m_config(config)
    3637    , m_type(WindowSurface)
    3738    , m_wlSurface(WTFMove(wlSurface))
     
    7071    }
    7172
    72     return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, WTFMove(wlSurface), window));
     73    return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, config, WTFMove(wlSurface), window));
    7374}
    7475
  • trunk/Source/WebCore/platform/graphics/egl/GLContextEGLX11.cpp

    r229663 r273549  
    2929namespace WebCore {
    3030
    31 GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, XUniquePixmap&& pixmap)
     31GLContextEGL::GLContextEGL(PlatformDisplay& display, EGLContext context, EGLSurface surface, EGLConfig config, XUniquePixmap&& pixmap)
    3232    : GLContext(display)
    3333    , m_context(context)
    3434    , m_surface(surface)
     35    , m_config(config)
    3536    , m_type(PixmapSurface)
    3637    , m_pixmap(WTFMove(pixmap))
     
    9192    }
    9293
    93     return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, WTFMove(pixmap)));
     94    return std::unique_ptr<GLContextEGL>(new GLContextEGL(platformDisplay, context, surface, config, WTFMove(pixmap)));
    9495}
    9596
  • trunk/Source/WebCore/platform/xr/openxr/OpenXRExtensions.cpp

    r273382 r273549  
    5555}
    5656
     57void OpenXRExtensions::loadMethods(XrInstance instance)
     58{
     59#if USE(EGL)
     60    m_methods.getProcAddressFunc = eglGetProcAddress;
     61#endif
     62    xrGetInstanceProcAddr(instance, "xrGetOpenGLGraphicsRequirementsKHR", reinterpret_cast<PFN_xrVoidFunction*>(&m_methods.xrGetOpenGLGraphicsRequirementsKHR));
     63}
     64
    5765bool OpenXRExtensions::isExtensionSupported(const char* name) const
    5866{
  • trunk/Source/WebCore/platform/xr/openxr/OpenXRExtensions.h

    r273382 r273549  
    2929namespace PlatformXR {
    3030
     31struct OpenXRExtensionMethods {
     32    PFNEGLGETPROCADDRESSPROC getProcAddressFunc { nullptr };
     33    PFN_xrGetOpenGLGraphicsRequirementsKHR xrGetOpenGLGraphicsRequirementsKHR { nullptr };
     34};
     35
    3136class OpenXRExtensions final {
    3237    WTF_MAKE_FAST_ALLOCATED;
     
    3641    OpenXRExtensions(Vector<XrExtensionProperties>&&);
    3742
     43    void loadMethods(XrInstance);
    3844    bool isExtensionSupported(const char*) const;
     45    const OpenXRExtensionMethods& methods() const { return m_methods; }
    3946
    4047private:
    4148    Vector<XrExtensionProperties> m_extensions;
     49    OpenXRExtensionMethods m_methods;
    4250};
    4351
  • trunk/Source/WebCore/platform/xr/openxr/OpenXRInstance.cpp

    r273382 r273549  
    5757            return;
    5858
    59         if (!m_extensions->isExtensionSupported(XR_MND_HEADLESS_EXTENSION_NAME)) {
    60             LOG(XR, "Required extension %s not supported", XR_MND_HEADLESS_EXTENSION_NAME);
    61             return;
    62         }
    63 
    6459        static const char* s_applicationName = "WebXR (WebKit)";
    6560        static const uint32_t s_applicationVersion = 1;
    6661
    6762        const char* const enabledExtensions[] = {
    68             XR_MND_HEADLESS_EXTENSION_NAME
     63            XR_KHR_OPENGL_ENABLE_EXTENSION_NAME,
     64            XR_MNDX_EGL_ENABLE_EXTENSION_NAME
    6965        };
    7066
     
    8278        if (m_instance == XR_NULL_HANDLE)
    8379            return;
     80
     81        m_extensions->loadMethods(m_instance);
    8482
    8583        LOG(XR, "xrCreateInstance(): using instance %p\n", m_instance);
  • trunk/Source/WebCore/platform/xr/openxr/OpenXRUtils.h

    r273382 r273549  
    2222#if ENABLE(WEBXR) && USE(OPENXR)
    2323
     24#if USE(EGL)
     25// EGL symbols required by openxr_platform.h
     26#if USE(LIBEPOXY)
     27#define __GBM__ 1
     28#include "EpoxyEGL.h"
     29#else
     30#if PLATFORM(WAYLAND)
     31#include <wayland-egl.h>
     32#endif
     33#include <EGL/egl.h>
     34#endif
     35
     36#endif // USE(EGL)
     37
    2438#include "Logging.h"
    2539#include "PlatformXR.h"
    2640#include <openxr/openxr.h>
     41#include <openxr/openxr_platform.h>
    2742
    2843#include <wtf/text/StringConcatenateNumbers.h>
  • trunk/Source/WebCore/platform/xr/openxr/PlatformXROpenXR.cpp

    r273382 r273549  
    8282        ASSERT(m_instance != XR_NULL_HANDLE);
    8383        ASSERT(m_session == XR_NULL_HANDLE);
     84        ASSERT(m_extensions.methods().xrGetOpenGLGraphicsRequirementsKHR);
    8485
    8586        m_currentViewConfigurationType = toXrViewConfigurationType(mode);
    8687        ASSERT(m_configurationViews.contains(m_currentViewConfigurationType));
     88
     89        // https://www.khronos.org/registry/OpenXR/specs/1.0/man/html/xrGetOpenGLGraphicsRequirementsKHR.html
     90        // OpenXR requires to call xrGetOpenGLGraphicsRequirementsKHR before creating a session.
     91        auto requirements = createStructure<XrGraphicsRequirementsOpenGLKHR, XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR>();
     92        auto result = m_extensions.methods().xrGetOpenGLGraphicsRequirementsKHR(m_instance, m_systemId, &requirements);
     93        RETURN_IF_FAILED(result, "xrGetOpenGLGraphicsRequirementsKHR", m_instance);
     94
     95        m_graphicsBinding = createStructure<XrGraphicsBindingEGLMNDX, XR_TYPE_GRAPHICS_BINDING_EGL_MNDX>();
     96        m_egl = GLContextEGL::createSharingContext(PlatformDisplay::sharedDisplay());
     97        if (!m_egl) {
     98            LOG(XR, "Failed to create EGL context");
     99            return;
     100        }
     101
     102        auto& context = static_cast<GLContext&>(*m_egl);
     103        context.makeContextCurrent();
     104
     105        m_graphicsBinding.display = PlatformDisplay::sharedDisplay().eglDisplay();
     106        m_graphicsBinding.context = context.platformContext();
     107        m_graphicsBinding.config = m_egl->config();
     108        m_graphicsBinding.getProcAddress = m_extensions.methods().getProcAddressFunc;
    87109
    88110        // Create the session.
    89111        auto sessionCreateInfo = createStructure<XrSessionCreateInfo, XR_TYPE_SESSION_CREATE_INFO>();
    90112        sessionCreateInfo.systemId = m_systemId;
    91 
    92         auto result = xrCreateSession(m_instance, &sessionCreateInfo, &m_session);
     113        sessionCreateInfo.next = &m_graphicsBinding;
     114
     115        result = xrCreateSession(m_instance, &sessionCreateInfo, &m_session);
    93116        RETURN_IF_FAILED(result, "xrEnumerateInstanceExtensionProperties", m_instance);
    94117
     
    221244}
    222245
    223 Device::ListOfEnabledFeatures OpenXRDevice::enumerateReferenceSpaces(XrSession session) const
    224 {
    225     uint32_t referenceSpacesCount;
    226     auto result = xrEnumerateReferenceSpaces(session, 0, &referenceSpacesCount, nullptr);
    227     RETURN_IF_FAILED(result, "xrEnumerateReferenceSpaces", m_instance, { });
    228 
    229     Vector<XrReferenceSpaceType> referenceSpaces(referenceSpacesCount);
    230     referenceSpaces.fill(XR_REFERENCE_SPACE_TYPE_VIEW, referenceSpacesCount);
    231     result = xrEnumerateReferenceSpaces(session, referenceSpacesCount, &referenceSpacesCount, referenceSpaces.data());
    232     RETURN_IF_FAILED(result, "xrEnumerateReferenceSpaces", m_instance, { });
    233 
    234     ListOfEnabledFeatures enabledFeatures;
    235     for (auto& referenceSpace : referenceSpaces) {
    236         switch (referenceSpace) {
    237         case XR_REFERENCE_SPACE_TYPE_VIEW:
    238             enabledFeatures.append(ReferenceSpaceType::Viewer);
    239             LOG(XR, "\tDevice supports VIEW reference space");
    240             break;
    241         case XR_REFERENCE_SPACE_TYPE_LOCAL:
    242             enabledFeatures.append(ReferenceSpaceType::Local);
    243             LOG(XR, "\tDevice supports LOCAL reference space");
    244             break;
    245         case XR_REFERENCE_SPACE_TYPE_STAGE:
    246             enabledFeatures.append(ReferenceSpaceType::LocalFloor);
    247             enabledFeatures.append(ReferenceSpaceType::BoundedFloor);
    248             LOG(XR, "\tDevice supports STAGE reference space");
    249             break;
    250         case XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT:
    251             enabledFeatures.append(ReferenceSpaceType::Unbounded);
    252             LOG(XR, "\tDevice supports UNBOUNDED reference space");
    253             break;
    254         default:
    255             continue;
    256         }
    257     }
    258 
    259     return enabledFeatures;
     246Device::ListOfEnabledFeatures OpenXRDevice::collectEnabledFeatures()
     247{
     248    Device::ListOfEnabledFeatures features;
     249
     250    // https://www.khronos.org/registry/OpenXR/specs/1.0/man/html/XrReferenceSpaceType.html
     251    // OpenXR runtimes must support Viewer and Local spaces.
     252    features.append(ReferenceSpaceType::Viewer);
     253    features.append(ReferenceSpaceType::Local);
     254
     255    // Mark LocalFloor as supported regardless if XR_REFERENCE_SPACE_TYPE_STAGE is available.
     256    // The spec uses a estimated height if we don't provide a floor transform in frameData.
     257    features.append(ReferenceSpaceType::LocalFloor);
     258
     259    // FIXME: Enable BoundedFloor when we implement xrGetReferenceSpaceBoundsRect and the related bits in the DOM.
     260    // enabledFeatures.append(ReferenceSpaceType::BoundedFloor);
     261
     262    if (m_extensions.isExtensionSupported(XR_MSFT_UNBOUNDED_REFERENCE_SPACE_EXTENSION_NAME))
     263        features.append(ReferenceSpaceType::Unbounded);
     264
     265    return features;
    260266}
    261267
     
    271277    RETURN_IF_FAILED(result, "xrEnumerateViewConfigurations", m_instance);
    272278
    273     // Retrieving the supported reference spaces requires an initialized session. There is no need to initialize all the graphics
    274     // stuff so we'll use a headless session that will be discarded after getting the info we need.
    275     auto sessionCreateInfo = createStructure<XrSessionCreateInfo, XR_TYPE_SESSION_CREATE_INFO>();
    276     sessionCreateInfo.systemId = m_systemId;
    277     XrSession ephemeralSession;
    278     result = xrCreateSession(m_instance, &sessionCreateInfo, &ephemeralSession);
    279     RETURN_IF_FAILED(result, "xrCreateSession", m_instance);
    280 
    281     ListOfEnabledFeatures features = enumerateReferenceSpaces(ephemeralSession);
     279    ListOfEnabledFeatures features = collectEnabledFeatures();
    282280    for (uint32_t i = 0; i < viewConfigurationCount; ++i) {
    283281        auto viewConfigurationProperties = createStructure<XrViewConfigurationProperties, XR_TYPE_VIEW_CONFIGURATION_PROPERTIES>();
     
    300298        m_viewConfigurationProperties.add(configType, WTFMove(viewConfigurationProperties));
    301299    }
    302     xrDestroySession(ephemeralSession);
    303300}
    304301
     
    417414    }
    418415    m_sessionState = XR_SESSION_STATE_UNKNOWN;
     416
     417    // deallocate graphic resources
     418    m_egl.reset();
    419419}
    420420
  • trunk/Source/WebCore/platform/xr/openxr/PlatformXROpenXR.h

    r273382 r273549  
    2222#if ENABLE(WEBXR) && USE(OPENXR)
    2323
     24#include "GLContextEGL.h"
    2425#include "OpenXRUtils.h"
    2526#include "PlatformXR.h"
     
    5960
    6061    // Custom methods
    61     ListOfEnabledFeatures enumerateReferenceSpaces(XrSession) const;
     62    ListOfEnabledFeatures collectEnabledFeatures();
    6263    void collectSupportedSessionModes();
    6364    void collectConfigurationViews();
     
    7677    XrSession m_session { XR_NULL_HANDLE };
    7778    XrSessionState m_sessionState { XR_SESSION_STATE_UNKNOWN };
     79    XrGraphicsBindingEGLMNDX m_graphicsBinding;
     80    std::unique_ptr<WebCore::GLContextEGL> m_egl;
    7881
    7982    using ViewConfigurationPropertiesMap = HashMap<XrViewConfigurationType, XrViewConfigurationProperties, IntHash<XrViewConfigurationType>, WTF::StrongEnumHashTraits<XrViewConfigurationType>>;
  • trunk/Source/cmake/OptionsWPE.cmake

    r273545 r273549  
    197197    endif ()
    198198    SET_AND_EXPOSE_TO_BUILD(USE_OPENXR ${OpenXR_FOUND})
     199    SET_AND_EXPOSE_TO_BUILD(XR_USE_PLATFORM_EGL TRUE)
     200    SET_AND_EXPOSE_TO_BUILD(XR_USE_GRAPHICS_API_OPENGL TRUE)
    199201endif ()
    200202
Note: See TracChangeset for help on using the changeset viewer.