fbpx

On WebGL,Raspberry Pi 3 and Chromium

I did a couple of interesting things on the Raspberry Pi before but this is the first time I’m really looking at the GPU.

I always took for granted that the Raspberry Pi 3 is a cheap mini computer with GPU that can play 1080p video. Cool right? Until I started running things that require WebGL, then the headache comes. I must admit it’s also due to my lack of knowledge on WebGL.

I shall put everything here quickly and not talk about the headache.

  1. Check GPU setting.
Check if GPU is enabled

If not enabled, go to Settings –> Advanced –> Enable “Use hardware acceleration when available

Enable GPU

Check the GPU again. If still not enabled, continue.

For Raspberry Pi / Raspbian only, look for this file:

/etc/chromium-browser/customizations/00-rpi-vars

Inside this file contains the flags for Chromium

[email protected]:~# cat /etc/chromium-browser/customizations/00-rpi-vars
CHROMIUM_FLAGS="--ignore-gpu-blacklist --disable-quic --enable-fast-unload --enable-tcp-fast-open"
#CHROMIUM_FLAGS="--ignore-gpu-blacklist --disable-quic --enable-fast-unload --enable-tcp-fast-open --disable-gpu-compositing --ppapi-flash-version=29.0.0.113"

Insert “–ignore-gpu-blacklist” and remove “–disable-gpu-compositing”

In this case, we were actually doing an animation using Phaser.io which uses GPU and WebGL extensively. Do bear in mind that each GPU has a max texture it can render. In the case of Raspberry Pi, it’s 2048 x 2048. ie your images must not be bigger than this size or Phaser will not render it.

Author: yibi

YiBi's numb :) YiBi writes about anything. Technology, Gossips, Rubbish YiBi's a half f%#k geek :P

3 Replies to “On WebGL,Raspberry Pi 3 and Chromium”

  1. Hi,
    I tested your trick, it didn’t work for my version of chromium 78.0.3904.108 with pi 3. WebGL is really slow on this pi, could you let me now which version for chrome you used.

    cheers

    1. Hi. I was using stock Chrome from Raspbian installation. Not sure of the version. Another thing I found out later is that 720p performance is better.

This is useful? Please leave your comment or Share this on Facebook!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: