Skip to content

gl: route feathers to atlas on Mali-G52 to avoid PLS corruption#105

Open
harrynron wants to merge 1 commit into
rive-app:mainfrom
harrynron:mali-g52-feather-to-atlas
Open

gl: route feathers to atlas on Mali-G52 to avoid PLS corruption#105
harrynron wants to merge 1 commit into
rive-app:mainfrom
harrynron:mali-g52-feather-to-atlas

Conversation

@harrynron
Copy link
Copy Markdown

Problem

On Mali-G52 (Panfrost driver, e.g. MediaTek MT8169), shapes rendered with a
feather come out with corrupted/fringed edges, and the corruption can spread to
other geometry rendered in the same pixel-local-storage (PLS) pass.

Root cause

When a complex feather is rasterized directly into pixel local storage (the
CoverageType::pixelLocalStorage path selected in PathDraw::SelectCoverageType),
the Mali-G52 driver corrupts the PLS planes. This is the same class of failure
already documented and worked around for PowerVR in RenderContextGLImpl
(alwaysFeatherToAtlas). Small feathers are unaffected because they already
route to the atlas via the atlasScaleFactor <= 0.5 check; only larger feathers
fall through to the direct-to-PLS path.

Fix

Extend the existing alwaysFeatherToAtlas workaround (previously PowerVR-only) to
Mali-G52, forcing feathers through the offscreen atlas instead of PLS.

Verification

Reproduced on a Mali-G52 device. The corruption is deterministic and appears only
on frames that render a feather; feather-free frames are unaffected. Setting
alwaysFeatherToAtlas = true eliminates the corruption, confirmed with an
on-device build.

@chealy
Copy link
Copy Markdown

chealy commented Jun 4, 2026

What is the version of the driver used in this case and is the problem unique to G52 or common to other variants of ARM Mali? Is this reproducible with the Mali DDK driver for the G52?

// storage when rendering a complex feather. For now, feather directly
// to the screen on PowerVR; always go offscreen.
// PowerVR (Vivo Y21, Rogue GE8320; OpenGL ES 3.2 build 1.13@5776728a)
// and Mali-G52 (Panfrost, e.g. MediaTek MT8169) hit a reset condition
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should list the specific driver version.

@chealy
Copy link
Copy Markdown

chealy commented Jun 4, 2026

For the reproduction step, please detail specific method of reproducing the failure. Is there a test app that uses rive that can reproduce this? If so, please document here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants