Skip to content

Releases

V3DRender 0.33

Choose a tag to compare

@adyoull adyoull released this 23 Nov 21:18

V3DRender 0.33

Everything since 0.28, the last version on GitHub.

New

  • GPU windows for EGL (0.31, DRM_IOCTL_RISCOS_PRESENT):
    • The GPU copies a program's finished frame into its window's visible rectangles, in the screen's own format.
    • On a Pi 4, a 640x400 window runs at about 565 frames a second, against 66 with the CPU plot.
    • Menus and other windows stay on top.
    • Works in 16M, 64K and 32K colour desktops, in either RGB order (64K colours fixed in 0.32).
    • Needs riscos-mesa 20.3.5-24 or later.
  • The full buffer area (0.30): RISC OS 5.30 can clamp it to 128 MB. V3DRender now lifts the clamp just for its own area, so it gets the 256 MB asked for. *V3DRender says if RISC OS gave less.
  • Up to 65,535 buffers (0.30): the tables grow as needed, where before there was a fixed 4,096 a program. Doom 3 needs about 5,300. Refused buffers are counted, with the reason.
  • Z-layer complex overlays (0.29): Configure's RISC3D window shows whether video overlays sit behind the desktop's windows and menus, and what's missing when they don't.
  • Start-up diagnosis (0.33):
    • V3DRender$Options gives the diagnostic options when RISC3D loads V3DRender at boot.
    • The start-up log carries on past "ready", noting the first of each later event.

Thanks to David Sharp for his Quake 3, Mupen64Plus and Doom 3 ports, which found the buffer limits, and to riscos-mesa for testing PRESENT on the Pi.

Files

  • V3DRender-0.33.zip: the module, Licence and Notice.

V3DRender 0.26

Choose a tag to compare

@adyoull adyoull released this 22 Nov 20:45

V3DRender 0.26

A native RISC OS driver for the Raspberry Pi 4's GPU (Broadcom V3D 4.2), following Linux's v3d driver. Programs reach it through RISC3D.

This release covers everything since 0.16, the last one published: 0.17 to 0.26. The big new feature is desktop 2D on the GPU, which is Rob Heaton's V3DDriver acceleration written again inside V3DRender. It also fixes the web browser's corrupted GPU drawing and makes buffers cheaper to create.

Benchmark: RISCOSmark

RISCOSmark 2.06 on the owner's Pi 4, 22 November 2026:

  • native RISC OS 5.31, ARM at 1800 MHz;
  • 1920x1200 in 16M colours, SDFS;
  • run once with *V3DRender 2D off and once with it on, one run each.
Test 2D off 2D on
Rectangle Copy - graphics acceleration 519 (214%) 3,679 (1520%) 7.1x
Icon Plotting - 16 colour sprite with mask 23,304 (1165%) 26,119 (1305%) +12%

Percentages are of RISCOSmark's RiscPC baseline (StrongARM 202 MHz, RISC OS 4.02, 800x600 in 256 colours).

  • Only Rectangle Copy uses the GPU. It is OS_Plot 190, a 301x237 block copy, which the kernel offers to GraphicsV 13. Every copy of that size is the GPU's.
  • Icon Plotting and the Draw tests don't use it. Icon Plotting is OS_SpriteOp, and the Draw module draws through the kernel's line routine directly, so neither goes through GraphicsV and the GPU can't change them. Their small differences, and FS Write's, are most likely the run-to-run spread; one run each can't tell.
  • Compared with Rob's driver: Rob's V3DDriver 0.11 went from 1,333 to 7,750 (5.8x) in RISCOSmark 2.04 at 1920x1080. The figures aren't directly comparable: different version, smaller screen.

Measured on the Pi (0.19, Time2D, 1920x1200 at 32bpp)

  • V3DRender's own cost: about 5 us an op. Building the list takes under 1 us and submitting it 1 us.
  • The GPU's job: about 5 us plus 4 us a 64x64 tile. The V3D clock (250 or 500 MHz) makes no difference.
  • Large copies and fills are limited by memory bandwidth. The GPU is 1.3 to 2 times the CPU, which copies the screen at about 4 GB/s itself. It is level with the CPU at 16x16 and ahead above that.
  • Not waited for (2D async): a copy or fill costs the caller 4 to 7 us, whatever its size.
  • Correct on hardware: Desk2D's copies, scrolls (overlapping copies) and fills at 32 and 16bpp, waited for and not, are pixel-identical to the CPU's.

New since 0.16

Desktop copies and fills on the GPU (0.17-0.19, 0.21)

  • Copies (GraphicsV 13 op 1): window moves, scrolls and OS_Plot block copies. Each copy is one render-only job: load the tile buffer from the source and store it to the destination, tile by tile. Scrolls take one pass, visiting the tiles ahead of the move first (Rob's order).
  • Solid fills (op 2): the tile buffer is cleared once, and every tile then only stores it. That is half the GPU commands of clearing each tile. Patterned fills and other GCOL actions are left to the CPU.
  • Both screen depths: 32bpp (RGBA8) and the Pi's 16bpp (RGB565).
  • The screen is mapped into the GPU once a mode, in 1 MB pages. Bank flips through GraphicsV 6 cost nothing, and the mapping is forgotten at a mode change.
  • Lists built a word at a time into one 128 KB buffer, kept for good.
  • Not waited for: up to four lists are in flight at once.
  • Size limits measured on this driver: the CPU does copies under 1,024 bytes or 8 rows and fills under 4,096 bytes or 16 rows. *V3DRender 2D limits changes them.
  • Left to the CPU:
    • when hardware acceleration is off;
    • when the screen is cached by the CPU;
    • when interrupts are off;
    • (0.21) while a program has the GPU open, until the browser's report is fully closed (*V3DRender 2D alongside on allows it for testing).
  • Commands:
    • *V3DRender 2D on|async|off, 2D fills on|off, 2D limits, 2D zero;
    • at load: the 2D or 2DAsync option, or V3DRender$2D;
    • *V3DRender shows what was taken, what was left to the CPU and why, and the microseconds per op.
  • Off by default.

The web browser's broken GPU drawing, fixed (0.23)

  • The cause: RISC OS can move the physical pages of memory a program has imported into the GPU, for example when another dynamic area asks for specific pages. The GPU went on writing the old pages, which now belonged to someone else.
  • The fix: V3DRender now follows Service_PagesUnsafe and PagesSafe, in their 32- and 64-bit forms. It holds new jobs while a page moves, then rewrites the GPU's page table.
  • Confirmed on the Pi with the browser: 404,818 jobs; no timeouts, resets or MMU errors; 2,347 page moves followed.

Buffers cheaper to create (0.25)

  • A freed buffer's pages stay claimed, up to 16 MB, while a program has the GPU open. The next buffer that fits uses them with no RISC OS call. The browser's profile had found buffer creation the largest item in the GPU library.
  • New buffers are still zeroed, now in 64-byte bursts.
  • *V3DRender pool <MB> sets the limit (0 keeps none). *V3DRender shows how much is kept and what buffer creation costs.

Safety (0.20, 0.22, 0.24, 0.26)

  • (0.26) No RISC OS memory is claimed or freed inside a GraphicsV call. Each such call tells the Wimp memory moved in the middle of its redraw; Rob found that froze V3DDriver with the Task Manager open. The work is done from a callback afterwards.
  • (0.26) Cleaning the GPU's caches waits for a pending L2T flush first, as Linux now does (Broadcom erratum GFXH-1897).
  • (0.20) The V3D's power domain is turned on before any V3D register is read. This is a likely cause of a CM4 aborting at start-up.
  • (0.24) V3DRender$Step records how far start-up got. A start-up that fails part way is undone safely, and the interrupt handler never runs before the GPU is set up.
  • (0.22) *V3DRender no longer aborts when showing an MMU error.

For RISC3D (0.20)

  • Configure's RISC3D window shows the GPU, its clock, its memory, the largest image and the 2D state without a program running (RISC3D reason 4).

See CHANGELOG.md for the details of each version.

Tests

  • Host simulator: 2,129 checks, including 800 random copies and 600 random fills carried out tile by tile against the CPU's result.
  • The built module in an emulator: 54,154 checks.
  • Test kit (29): Check, Desk2D (2D correctness, CPU against GPU) and Time2D (2D timings).

Downloads

  • V3DRender-0.26.zip: the module, with its licence and notice.
  • V3DRenderTest-29.zip: the test kit.

Requirements

  • A Raspberry Pi 4, Pi 400 or CM4 with RISC OS 5.30 or later.
  • RISC3D 0.05 or later; reason 4 needs 0.09. Programs reach the GPU through RISC3D only.
  • Rob Heaton's V3DDriver not loaded: V3DRender does its 2D work itself.

SWI chunk &5AFC0 and error block &823E00, allocated by RISC OS Open.

Licence

GNU GPL version 2 or later, as the Linux v3d driver it follows. The desktop 2D code follows Rob Heaton's V3DDriver (GPL-2.0-or-later). See NOTICE.

V3DRender 0.16

Choose a tag to compare

@adyoull adyoull released this 18 Nov 18:02

V3DRender 0.16

A native RISC OS driver for the Raspberry Pi 4's GPU (Broadcom V3D 4.2), following Linux's v3d driver. Programs reach it through RISC3D.

New in 0.16: allocated numbers

RISC OS Open has allocated V3DRender's SWI chunk and error block.

  • SWIs at &5AFC0 (were the provisional &C3D40): V3DRender_Info &5AFC0, _Open &5AFC1, _Close &5AFC2, _Ioctl &5AFC3, _Reset &5AFC4, _Debug &5AFC5.
  • Errors at &823E00 (were &81D340), in the same order.
  • RISC3D_Register is found by name, so V3DRender registers with RISC3D 0.05 (its allocated chunk, &5AF80) and with older RISC3Ds.
  • The module and command names (V3DRender, *V3DClock, *V3DDump, *V3DPower, *V3DReset) are reserved for it.
  • Nothing changes for programs: they take the ioctl SWI from RISC3D_Info.

Use 0.16 with RISC3D 0.05. RISC3D 0.05 answers only its new numbers, so V3DRender 0.15 and earlier can't register with it.

Everything else is as 0.15. See CHANGELOG.md, and the 0.15 release for the cache work and 0.13's big pages, GPU time per program and uncached imports.

Downloads

  • V3DRender-0.16.zip: the module, with its licence.
  • V3DRenderTest-19.zip: the test kit, with RISC3D 0.05. Run Check, then read Results.

Requirements

  • A Raspberry Pi 4, Pi 400 or CM4 with RISC OS 5.30 or later.
  • RISC3D (0.05 for the allocated numbers). Programs reach the GPU through RISC3D only.
  • Rob Heaton's V3DDriver not loaded.

Licence

GNU GPL version 2 or later, as the Linux v3d driver it follows. See NOTICE.

V3DRender 0.15

Choose a tag to compare

@adyoull adyoull released this 16 Nov 16:03

V3DRender 0.15

A native RISC OS driver for the Raspberry Pi 4's GPU (Broadcom V3D 4.2), following Linux's v3d driver. Programs reach it through RISC3D.

This release is about speed in real programs. YSFlight's log showed it spent most of each frame in V3DRender's CPU cache work rather than on the GPU. 0.15 cuts that work. It includes 0.14 and 0.13 (0.13 was tagged but not published).

New in 0.15

  • Big buffers' cache work done by the whole cache. A program's window picture imported into the GPU's address space, or a cached buffer, had its CPU cache lines cleaned before every job and invalidated after it, line by line. That is hundreds of thousands of lines for a large window, several times a frame. Above the kernel's own threshold, V3DRender now uses the kernel's whole-cache routines (Cache_CleanAll, Cache_CleanInvalidateAll).
  • Invalidated once its last job is done: a buffer that more queued jobs will write is invalidated after the last of them, not after each one.
  • *V3DRender shows the cache work: cleans, invalidates, how many were put off, CPU time, and whole-cache counts.

New in 0.14

  • After a job, cached and imported buffers are cleaned and invalidated, not only invalidated. This is safe for a cached screen that other programs draw on meanwhile.
  • *V3DRender shows the ARM's clock and the firmware's maximum for it.

New in 0.13

  • Uncached imports: DRM_RISCOS_IMPORT_UNCACHED for screen memory and screen banks skips the cache work altogether.
  • Big pages, as Linux: buffers of 64 KB and 1 MB or more are aligned so that the GPU's MMU uses 64 KB and 1 MB entries.
  • GPU time per program: DRM_IOCTL_RISCOS_FILE_STATS, and totals in *V3DRender.
  • After a hang, only the guilty job fails; jobs on the other queues run again, as Linux does.
  • Refuses to start where there's no V3D 4.2, touching nothing else. RISC3D's package carries it to every machine.

See CHANGELOG.md for the details.

Status

  • 0.13 passed the full test kit on a Pi 4.
  • 0.15 runs ClassiCube and YSFlight on the Pi; its own kit (17) is the same as 0.13's plus the timing of CPU writes.
  • Programs now spend most of each frame outside the GPU: in the game, in Mesa, and in showing the frame on one CPU core. That work continues in riscos-mesa.

Downloads

  • V3DRender-0.15.zip: the module, with its licence.
  • V3DRenderTest-17.zip: the test kit. Run Check, then read Results.

Requirements

  • A Raspberry Pi 4, Pi 400 or CM4 with RISC OS 5.30 or later.
  • RISC3D 0.03 or later. Programs reach the GPU through RISC3D only.
  • Rob Heaton's V3DDriver not loaded.

The SWI chunk (&C3D40) and error block (&81D340) are provisional.

Licence

GNU GPL version 2 or later, as the Linux v3d driver it follows. See NOTICE.

V3DRender 0.12

Choose a tag to compare

@adyoull adyoull released this 16 Nov 09:27

V3DRender 0.12

A native RISC OS driver for the Raspberry Pi 4's GPU (Broadcom V3D 4.2), following Linux's v3d driver. Programs draw with Mesa's v3d driver, which reaches V3DRender through RISC3D.

This is the first public release. It has been tested on a Pi 4 under native RISC OS 5.

What works

  • Mesa draws with it. Mesa 26.1.6's v3d driver (through riscos-mesa and RISC3D) runs OpenGL 2.1 and GLES 2: 100 frames of 1920x1080 in 37 cs.
  • Every kind of GPU job: bin and render (control lists), the TFU (texture formatting), and compute (CSD) on every QPU.
  • The GPU's own MMU, its interrupt, sync objects and sync files, as Linux's driver.
  • Recovery: a job that stops making progress for half a second, or runs for 5 seconds, is ended and the GPU reset. *V3DReset [all] does it on demand.
  • Fast read-back: cached buffers (DRM_RISCOS_BO_CPU_CACHED) and the program's own memory (DRM_IOCTL_RISCOS_IMPORT_MEMORY) let the CPU read a frame at about 2.6–3.9 GB/s, against 151 MB/s from ordinary buffers. V3DRender does the cache maintenance.
  • Alongside the VideoCore: V3DRender takes its memory from above 1 GB where it can, so ReelHWAccel's H.264 decoding (which needs the first 1 GB) keeps working. Reel plays through the VideoCore with V3DRender loaded.
  • Diagnostics: *V3DRender (status, counters, memory placement, hang registers), *V3DDump (the first hung job's buffers), tools/v3ddump.py (decodes a dump) and the kit's V3DJob replay (re-runs a hung job without Mesa).

New in 0.12

Memory above 1 GB first: buffers and the GPU's page table come from between 1 GB and 4 GB (OS_Memory 12 with a range, RISC OS 5.29+), in contiguous runs where possible. *V3DRender shows how much is above and below 1 GB. See CHANGELOG.md for 0.01–0.11.

Downloads

  • V3DRender-0.12.zip: the module.
  • V3DRenderTest-14.zip: the test kit. Run Check, then read Results.

Requirements

  • A Raspberry Pi 4, Pi 400 or CM4 with RISC OS 5.30 or later.
  • RISC3D 0.03 or later. Programs reach the GPU through RISC3D only.
  • Rob Heaton's V3DDriver not loaded (both would drive the same GPU).

The SWI chunk (&C3D40) and error block (&81D340) are provisional.

Licence

GNU GPL version 2 or later, as the Linux v3d driver it follows. The Pi 4 power-up and reset sequences are Rob Heaton's (V3DDriver). See NOTICE.