A small Panfrost on C4 showcase

Post Reply
AreaScout
Posts: 1531
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 82 times
Been thanked: 251 times
Contact:

A small Panfrost on C4 showcase

Post by AreaScout »

@all

I want to just post a video showcasing Panfrost on C4, it's not 100% now but it looks verrrryy compromising :ugeek:



Looking forward to play more with it :)

If you want to play with it too, here are all my steps to get this running, I am running the whole thing from console with Mesa GBM drivers, but one could install a desktop to test too

Download the Image:

https://users.armbian.com/igorp/images/ ... 4/archive/

I was using Debian Bullseye Image, just the first one in the list as of today

Building upstream Mesa with Panfrost support:

Edit the file /etc/apt/sources.list and remove all hash (#) sign from the deb-src sources

perform a apt update

Code: Select all

apt install git cmake build-essential flex bison meson ninja-build pkg-config libxcb-shm0-dev mlocate
apt-get build-dep mesa

git clone https://gitlab.freedesktop.org/mesa/mesa.git
cd mesa
meson -Ddri-drivers= -Dvulkan-drivers= -Dgallium-drivers=panfrost,kmsro -Dlibunwind=false -Dprefix=/usr build/
ninja -C build
ninja -C build install
Build SDL2+tests with KMSDRM support:

Code: Select all

cd ~
git clone https://github.com/bminor/SDL.git
cd SDL/
./configure --enable-video-kmsdrm
make -j3
make install -j3
cd test
./configure
make -j3
Test if we already can use Panfrost

Code: Select all

./testgles2 --fullscreen-desktop
./testgles --fullscreen-desktop
./testgl2 --fullscreen-desktop
Build Shader2LCD ShaderViewer:

Code: Select all

apt-get install libsoil-dev
cd ~
git clone https://github.com/AreaScout/Shader2LCD.git
cd Shader2LCD
make native -j3
Enable GLES3 and GL3:

export PAN_MESA_DEBUG=gl3,deqp

Test if it works

Code: Select all

./Shader2Monitor shaders/heartfelt.f.glsl textures/texl5.jpg
./Shader2Monitor shaders/flower.f.glsl
./Shader2Monitor shaders/clover.f.glsl
./Shader2Monitor shaders/plasma.f.glsl
./Shader2Monitor shaders/plasmawaves.f.glsl
./Shader2Monitor shaders/julia.f.glsl
./Shader2Monitor shaders/relieftunnel.f.glsl textures/texl0.jpg
Note ! Not all shaders work flawlessly at the moment

RG
Last edited by AreaScout on Fri Nov 20, 2020 10:54 pm, edited 5 times in total.
These users thanked the author AreaScout for the post (total 5):
tobetter (Fri Nov 20, 2020 3:08 am) • odroid (Fri Nov 20, 2020 9:45 am) • jgmdev (Fri Nov 20, 2020 1:44 pm) • brad (Fri Nov 20, 2020 8:42 pm) • hominoid (Sat Nov 21, 2020 11:53 pm)

User avatar
tobetter
Posts: 6622
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 328 times
Been thanked: 921 times
Contact:

Re: A small Panfrost on C4 showcase

Post by tobetter »

It says "This video is private".
These users thanked the author tobetter for the post:
AreaScout (Fri Nov 20, 2020 2:50 am)

AreaScout
Posts: 1531
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell, Go2, C4
Has thanked: 82 times
Been thanked: 251 times
Contact:

Re: A small Panfrost on C4 showcase

Post by AreaScout »

    tobetter wrote:
    Fri Nov 20, 2020 2:48 am
    It says "This video is private".
    changed ! sorry ;)

    mad_ady
    Posts: 8825
    Joined: Wed Jul 15, 2015 5:00 pm
    languages_spoken: english
    ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
    Location: Bucharest, Romania
    Has thanked: 586 times
    Been thanked: 529 times
    Contact:

    Re: A small Panfrost on C4 showcase

    Post by mad_ady »

    That was rendered content?! I thought it was a video of rain drops...

    AreaScout
    Posts: 1531
    Joined: Sun Jul 07, 2013 3:05 am
    languages_spoken: german, english
    ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
    N1, Go, VU5A, Show2, CloudShell2,
    H2, N2, VU7A, VuShell, Go2, C4
    Has thanked: 82 times
    Been thanked: 251 times
    Contact:

    Re: A small Panfrost on C4 showcase

    Post by AreaScout »

      mad_ady wrote:
      Fri Nov 20, 2020 2:56 am
      That was rendered content?! I thought it was a video of rain drops...
      Naaa that is pure rendered cool content ! If you want to run it too, I will post image link and build instruction for the shader viewer :ugeek:

      RG

      mad_ady
      Posts: 8825
      Joined: Wed Jul 15, 2015 5:00 pm
      languages_spoken: english
      ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
      Location: Bucharest, Romania
      Has thanked: 586 times
      Been thanked: 529 times
      Contact:

      Re: A small Panfrost on C4 showcase

      Post by mad_ady »

      Please do...

      AreaScout
      Posts: 1531
      Joined: Sun Jul 07, 2013 3:05 am
      languages_spoken: german, english
      ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
      N1, Go, VU5A, Show2, CloudShell2,
      H2, N2, VU7A, VuShell, Go2, C4
      Has thanked: 82 times
      Been thanked: 251 times
      Contact:

      Re: A small Panfrost on C4 showcase

      Post by AreaScout »

        @mad_ady

        Added it on the first Post !

        RG

        jgmdev
        Posts: 213
        Joined: Tue Jan 28, 2020 2:28 pm
        languages_spoken: english, spanish
        ODROIDs: U2, N2, N2+, C4
        Has thanked: 80 times
        Been thanked: 148 times
        Contact:

        Re: A small Panfrost on C4 showcase

        Post by jgmdev »

        AreaScout wrote:
        Fri Nov 20, 2020 2:46 am
        ...
        export PAN_MESA_DEBUG=gl3,deqp
        ...
        Using those options was able to test-run xonotic-sdl, not great performance but was rendering pretty nice. Thanks!
        These users thanked the author jgmdev for the post:
        AreaScout (Fri Nov 20, 2020 5:51 pm)

        AreaScout
        Posts: 1531
        Joined: Sun Jul 07, 2013 3:05 am
        languages_spoken: german, english
        ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
        N1, Go, VU5A, Show2, CloudShell2,
        H2, N2, VU7A, VuShell, Go2, C4
        Has thanked: 82 times
        Been thanked: 251 times
        Contact:

        Re: A small Panfrost on C4 showcase

        Post by AreaScout »

          Ok, changed all shaders to GLSL3.0 + added rain simulation shader

          ./Shader2Monitor shaders/heartfelt.f.glsl textures/texl5.jpg

          RG

          AreaScout
          Posts: 1531
          Joined: Sun Jul 07, 2013 3:05 am
          languages_spoken: german, english
          ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
          N1, Go, VU5A, Show2, CloudShell2,
          H2, N2, VU7A, VuShell, Go2, C4
          Has thanked: 82 times
          Been thanked: 251 times
          Contact:

          Re: A small Panfrost on C4 showcase

          Post by AreaScout »

            @all



            I have added a command line switch, to flip Y texture coordinate, some shaders with textures need it like this one:

            ./Shader2Monitor shaders/basicscroll.f.glsl textures/texl3.png --invert-y

            RG
            These users thanked the author AreaScout for the post:
            odroid (Mon Nov 23, 2020 12:20 pm)

            Post Reply

            Return to “General Topics”

            Who is online

            Users browsing this forum: No registered users and 0 guests