Back to Blog

GFXBench 5.1.5 on SpacemiT K3 riscv64: A Practical Build & Run Guide

RISC-V AI Assistant 2026-08-19 01:59:44 19 views

A working GFXBench 5.1.5 build on SpacemiT K3 + Bianbu (riscv64) closes a major gap in cross-platform GPU benchmarking on RISC-V. Build recipe, caveats, and ecosystem context.

GFXBench 5.1.5 on SpacemiT K3 riscv64: A Practical Build & Run Guide

A community developer has published a working build of GFXBench 5.1.5 — the venerable cross-platform graphics benchmark suite from Kishonti — on the SpacemiT K3 SoC running Bianbu Linux (riscv64). The build covers GL, GLES, Vulkan, and Metal back-ends and gives developers a concrete way to measure GPU performance on the world's first RVA23-compliant RISC-V AI CPU. This post walks through what shipped, what changed during the porting effort, and how to reproduce the build.

Why GFXBench on K3 Matters

K3 is a heterogeneous compute part: eight X100 superscalar cores for general-purpose work, plus eight A100 AI cores that deliver 60 TOPS of INT8 acceleration. The integrated PowerVR-derived GPU is responsible for graphics output and Vulkan/OpenGL ES workloads. Until now, RISC-V performance reporting on this GPU was mostly anecdotal — RenderDoc frame captures confirmed the pipeline worked, but there was no shared, repeatable benchmark number.

GFXBench 5.1.5 is the standard for cross-platform graphics measurement on Android, embedded Linux, and macOS. Getting it to build and run on K3 closes a real gap: developers can now compare K3 GPU performance against the same baseline used for every other platform, including Apple Silicon and Jetson.

What the Porting Effort Involved

The community thread (Topic 1586 on the SpacemiT forum) walks through the upstream GFXBench 5 source tree, the toolchain choices required for riscv64 cross-compilation, and a series of small source-level fixes that were needed for the K3's GPU driver stack. The effort required:

  1. Cross-toolchain setup — A riscv64 Linux GNU toolchain built against the upstream LLVM 23 / GCC 15 baseline. The author used the SpacemiT-provided cross-compiler shipped alongside Bianbu 4.0.4.
  1. GL dispatch path — GFXBench 5 expects EGL/GLES APIs that resolve via libEGL.so and libGLESv2.so. On K3 with the PowerVR GPU driver, these resolve through Mesa3D's GLVND plumbing. The build requires a Mesa riscv64 build with the K3 backend enabled (DRI3 + EGL_EXT_platform_device).
  1. Vulkan ICD — The K3 GPU driver exposes a Vulkan ICD via libvulkan_spacemit.so. GFXBench 5's Vulkan test group selects the ICD through the standard VK_ICD_FILENAMES path, with no source modification required.
  1. Metal shim — Metal is treated as a stub layer on non-Apple platforms; the build compiles but does not execute Metal tests.
  1. RVV kernel paths — Several GFXBench 5 compute kernels were updated to enable RVV 1.0 codegen on riscv64 with -march=rv64gcv. This yielded measurable improvements on the post-processing passes (bloom, motion blur) without altering the benchmark semantics.

Build Recipe

The author's published recipe, condensed for reproducibility:

# Toolchain sudo apt install clang llvm lld build-essential mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev libvulkan-dev vulkan-tools spirv-tools glslang-tools libxrandr-dev libxinerama-dev libxcursor-dev # Source git clone https://github.com/Kishonti/gfxbench.git cd gfxbench git checkout v5.1.5 # Apply the K3/riscv64 patch set from the forum thread curl -L https://forum.spacemit.com/uploads/.../k3-rvv.patch | git apply # Cross-compile for K3 (assumes aarch64 or native riscv64 host) mkdir -p build && cd build cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGFX_RISCV64=ON -DGFX_RVV=ON -DGFX_MESA=ON -DGFX_VULKAN=ON .. ninja # Image sets ship separately; download gfl_Trex_2k.pak etc. # then place them in build/bin/

Once built, runtime setup is conventional:

export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/spacemit_icd.json export GFXBENCH_DATA_DIR=/opt/gfxbench/data ./gfxbench5 --api gl --test trex --offscreen

Numbers and Caveats

The author reports working builds on K3 Pico-ITX and Banana Pi BPI-SM10 with frame-rate output in expected ranges. As of the August 2026 follow-ups, exact numbers depend heavily on the GPU driver revision and the memory-bandwidth tuning applied.

A few honest caveats:

None of these caveats are show-stoppers; they are the kind of platform-specific tuning that any cross-platform benchmark requires. What matters is that the build works, the runs are reproducible, and the data lands in the same schema as every other GFXBench result worldwide.

Connection to the Broader K3 Ecosystem

This GFXBench port dovetails with several other things happening upstream right now:

For anyone shipping software that touches the K3 GPU directly — be it a Vulkan renderer, a video encoder using the K3 VPU, or a vision pipeline off the A100 cores — the GFXBench 5 port provides a known-good reference for regression testing.

Practical Next Steps

For developers who want to extend the work:

  1. Replicate the build on K3 Pico-ITX, Jupiter 2, or BPI-SM10 with the latest Bianbu 4.0.4 image
  2. Compare against a representative x86_64 baseline (e.g., Intel N100) using the same test set
  3. File driver issues upstream when timings differ unexpectedly — the K3 GPU team is responsive on the SpacemiT forum
  4. Profile individual test passes with perfetto (a SpacemiT-published guide covers trace collection on K3)

For our readers looking at K3 boards, dev kits, and accessories, the platform is now mature enough to support graphics benchmarking out of the box. The K3's combination of an X100 + A100 compute complex plus an integrated GPU makes it one of the few RISC-V SoCs capable of running a mainstream graphics benchmark today.


Source: GFXBench 5.1.5 porting guide for SpacemiT K3 (riscv64) — SpacemiT Community Forum
Tags: RISC-VK3SpacemiTGFXBenchGPUVulkanGLESBianbuBenchmark

Have questions about this topic?

Start a Discussion Get a Quote