Skip to content

WebGL No Hardware Acceleration on Jetson #1458

Open

Description

@xinsonglin-bc

As described in #1456, I am setting up WPEWebkit on Nvidia Jetson Xavier AGX with Weston on Jetpack 5.1.4

I am using libwpe 1.14.2, wpebackend-fdo 1.14.3, and wpewebkit 2.38.6.

I have tried three scenarios:

  1. Compiling normally, with all the flags untouched in OptionsWPE.cmake
  2. Turn off USE_LIBEPOXY
  3. Turn off USE_LIBEPOXY and turn on USE_ANGLE, USE_ANGLE_EGL and USE_ANGLE_WEBGL

The results of each of the above

  1. Compiles. WebGL is operational but no hardware acceleration present.
  2. Compiles. WebGL is operational but no hardware acceleration present.
  3. Does not compile. At first, I ran into this issue, which seems related to USE_NICOSIA
    ../Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerDmabuf.cpp:107:5: error: ‘glEGLImageTargetTexture2DOES’ was not declared in this scope
    
    I turned off USE_NICOSIA and ran into some more issues like
    ../Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3159:41: error: no match for call to ‘(WebCore::MediaPlayerPrivateGStreamer::pushTextureToCompositor()::<lambda(WebCore::TextureMapperPlatformLayerProxyGL&)>) (WebCore::TextureMapperPlatformLayerProxy&)’
    
    So I turned off USE_TEXTURE_MAPPER and USE_TEXTURE_MAPPER_GL and ran into more issues like
    ../Source/WebCore/platform/graphics/texmap/TextureMapperSolidColorLayer.h:36:10: error: ‘void WebCore::TextureMapperSolidColorLayer::paintToTextureMapper(WebCore::TextureMapper&, const WebCore::FloatRect&, const WebCore::TransformationMatrix&, float)’ marked ‘override’, but does not override
    

Some additional background information:

  1. I installed chromium from a non-snap source and WebGL hardware acceleration works
  2. I have used lsof to make sure these 3 libraries are loaded
    * /usr/lib/aarch64-linux-gnu/tegra-egl/libEGL_nvidia.so.0
    * /usr/lib/aarch64-linux-gnu/tegra-egl/libGLESv2_nvidia.so.2
    * /usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.35.5.0
    
    but it seems somehow WPEWebkit is not calling them but instead some software rendering library like mesa. For context the libEGL_mesa.so is also loaded and that seems to be doing the work setting up software rendering context.

So I am wondering if there are some code changes required in WPEWebkit to make hardware acceleration work in Jetson? Alternatively, is there some combination of flags that can make WPEWebkit compile with ANGLE? chromium uses ANGLE and apparently it correctly enables hardware acceleration.

Thank you!

Activity

  1. magomez commented on Feb 7, 2025

    @magomez

    If WebGL is working, despite not accelerated, then it's not a WPE problem.
    The problem is probably that libepoxy is not using the nvidia version of EGL/GLESv2.
    I'm not an expert on libepoxy, but I guess that, when building, it uses pkg-config to find the libEGL/libGLESv2 libraries that it should use, creates the wrappers and links to them. I guess in you system, for some reason, the libraries that it's using are the mesa ones and not the nvidia ones, as you want. Maybe because the libraries have a different name. Maybe because you installed the nvidia version first and then the mesa, which overwrote the nvidia pkg-config file (assuming that you have a pkg-config file for the nvidia installation).

  2. xinsonglin-bc commented on Feb 8, 2025

    @xinsonglin-bc
    Author

    And my other question regarding ANGLE. Just to be clear, that is not currently supported correct?

  3. magomez commented on Feb 10, 2025

    @magomez

    And my other question regarding ANGLE. Just to be clear, that is not currently supported correct?
    ANGLE is supported from version 2.46 on.

  4. MG-ng commented on Mar 11, 2026

    @MG-ng

    Hey @xinsonglin-bc ,

    You wrote "I installed chromium from a non-snap source and WebGL hardware acceleration works"
    May I ask you from which source you got that?
    Kind regards

  5. xinsonglin-bc commented on Mar 11, 2026

    @xinsonglin-bc
    Author

    Hey @xinsonglin-bc ,

    You wrote "I installed chromium from a non-snap source and WebGL hardware acceleration works" May I ask you from which source you got that? Kind regards

    It's been a while but I remember getting the tar ball from the official website!

  6. MG-ng commented on Mar 18, 2026

    @MG-ng

    Ah, okay, interesting, thank!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions