Author Topic: [DEV] The Blend2D library partially runs on ppc64le.  (Read 802 times)

DKnoto

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +13/-0
    • View Profile
[DEV] The Blend2D library partially runs on ppc64le.
« on: April 08, 2023, 12:54:04 pm »
I've been playing with the Blend2D library for a while now. It is a high performance 2D vector
graphics engine written in C++ and released under the Zlib license https://blend2d.com/.
On the x86_64 platform everything compiles and works quite well but on ppc64le it is no
longer so ideal.

What works:
  • single-threaded mode without boosters;
  • multi-threaded mode without boosters but in a limited way.

What doesn't work:

I tested this on my Talos II with POWER9/18c. I downloaded the sources for the library
https://github.com/blend2d/blend2d and the bl_bench test program https://github.com/blend2d/blend2d-bench.
After downloading the library code and bl_bench, I compiled this program with the following
command:

Code: [Select]
build]$ cmake .. -DCMAKE_BUILD_TYPE=Release -DBLEND2D_DIR=../../Source/ -DBLEND2D_NO_JIT=TRUE -DBLEND2D_NO_STDCXX=false

In single-threaded mode everything works correctly but in for multi-threaded mode you should
run bl_bench with the parameter --quantity=N where N = <1, 15>. For N=16 it sometimes crashes
and for N=17+ it crashes always.

By default multithreaded mode works for 2T and 4T, to add more threads I added the following
piece of code to bl_bench/src/app.cpp in line 359:

Code: [Select]
    {
      Blend2DModule mod(8);
      runModule(mod, params);
    }

    {
      Blend2DModule mod(16);
      runModule(mod, params);
    }

After these modifications, I obtained the following results:
  • bl_bench-gcc-Release-quantity-1000.txt: results for single-threaded mode with default parameters;
  • bl_bench-gcc-Release-quantity-16.txt: results for single- and multi-threaded mode with quantity = 16;

I'm also attaching screenshots showing the performance of selected modes, images can be obtained from
the library's website after entering your own performance measurements using bl_bench.

The conclusion of an incorrigible dreamer:

Haiku on x86 uses the AGG engine and its UI is incredibly responsive, if on ppc64le one had such a Blend2D-based
UI then there would be no complaints about the graphical performance of Gnome or KDE ;-)


Desktop: Talos II T2P9S01 REV 1.01 | IBM Power 9/18c DD2.3, 02CY646 | AMD Radeon Pro WX7100 | 64GB RAM | SSD 1TB

DKnoto

  • Jr. Member
  • **
  • Posts: 75
  • Karma: +13/-0
    • View Profile
Re: [DEV] The Blend2D library partially runs on ppc64le.
« Reply #1 on: April 10, 2023, 06:32:21 am »
To illustrate the performance differences between Qt and Blend2D, I include four
more screenshots from one of the test applications included with the library:
Desktop: Talos II T2P9S01 REV 1.01 | IBM Power 9/18c DD2.3, 02CY646 | AMD Radeon Pro WX7100 | 64GB RAM | SSD 1TB