Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
56ab33c
pvr: a powervr context whose job submission fails with EIO is lost
brkosebay Nov 15, 2026
5ddf515
pvr: a lost device reports DEVICE_LOST from waits and fails new memor…
brkosebay Nov 15, 2026
40ec197
pvr: silence repeated unmap errors after device loss
brkosebay Nov 15, 2026
6c1f29b
pvr: a failed VM_MAP returns an out-of-memory code
brkosebay Nov 16, 2026
7556db6
pvr: detect a loss from job fence errors on Apple GPUs
brkosebay Nov 15, 2026
428301f
pvr/g5p: a lost queue keeps signalling its submissions
brkosebay Nov 15, 2026
19deaf4
vulkan: allow pending submits when stopping a lost submit thread
brkosebay Nov 16, 2026
3a558db
pvr: log error origins with PVR_DEBUG=errors
brkosebay Nov 16, 2026
938a6d9
pvr/g5p: a CPU transfer the A9 path cannot do is named and skipped
brkosebay Nov 15, 2026
72f325e
pvr/g5p: add a 3D image's slice offset once in its transfer surface
brkosebay Nov 15, 2026
e4e5ab6
pvr/g5p: 256-lane compute workgroups
brkosebay Nov 15, 2026
c127ec7
g9p: texture samples, loads and sizes in A9 compute shaders
brkosebay Nov 15, 2026
672d214
g9p: A9 compute values above r31 in bank 0
brkosebay Nov 15, 2026
8cca758
g9p: the A9 kernel record's register field counts bank 1 only
brkosebay Nov 15, 2026
8f57955
g9p: name the A9 kernel record's bank-1 register field
brkosebay Nov 15, 2026
3169b09
g9p: A9 compute pops keep the last-read bit for the last stack operat…
brkosebay Nov 15, 2026
cd0ec06
pvr/g5p: refuse A9 compute workgroups above Apple's per-pipeline limit
brkosebay Nov 15, 2026
921ef51
pvr/g5p: compute bind slots for gl_NumWorkGroups, buffer array elemen…
brkosebay Nov 15, 2026
f13e53d
g9p: A9 compute keeps one task of bank-1 capacity free per workgroup
brkosebay Nov 15, 2026
77eb344
g9p: A9 compute homes within the bank-0 limit of the workgroup
brkosebay Nov 15, 2026
c363255
g9p: enforce the A9 compute bank-1 cap in every low-register allocator
brkosebay Nov 15, 2026
6493c42
pvr/g5p: write the workgroup ID z on the A9 as Apple does
brkosebay Nov 16, 2026
a6a1bb2
pvr/g5p: capture shaders and diagnostic stubs with PVR_DEBUG
brkosebay Nov 15, 2026
7f5c0a1
pvr/g5p: name each refused draw, pass and pipeline; skip them only on…
brkosebay Nov 15, 2026
3b559c1
pvr/g5p: driconf pvr_skip_refused_work for applications that cannot s…
brkosebay Nov 15, 2026
7adf3e6
pvr: generate the error-result wrappers from vk.xml
brkosebay Nov 16, 2026
0d94475
pvr/g5p: eight and more storage buffers per stage, dynamic offsets, v…
brkosebay Nov 15, 2026
94430e8
pvr/g5p: 64 KiB uniform buffers; register-indexed vec2/vec3 UBO reads
brkosebay Nov 15, 2026
2729022
pvr/g5p: up to 13 uniform buffers in a stage's common-store plan
brkosebay Nov 15, 2026
c8fbd42
pvr/g5p: accept a register UBO index whose bound NIR has proven
brkosebay Nov 15, 2026
ce7eeba
pvr/g5p: compile 28 fragment varying locations
brkosebay Nov 15, 2026
7fa38ba
pvr/g5p: five to eight colour targets, compact UNORM8
brkosebay Nov 15, 2026
4aacf1e
pvr/g5p: 8192-texel images, framebuffers and viewports
brkosebay Nov 15, 2026
a78ab70
pvr/g5p: ASTC LDR, all 14 block sizes
brkosebay Nov 15, 2026
0b1dd95
pvr/g5p: draw layer-0 array samples as 2D
brkosebay Nov 15, 2026
0e8e4fe
pvr/g5p: write user clip distances to the A9 TA user planes
brkosebay Nov 15, 2026
dcd83e1
pvr/g5p: do not advertise shaderCullDistance
brkosebay Nov 15, 2026
8bd125c
pvr/g5p: honour a render pass's dependencies on commands outside it
brkosebay Nov 15, 2026
5c8fba2
pvr/g5p: launch vertex programs that read no attribute and no vertex …
brkosebay Nov 15, 2026
aab4d14
pco/g5p: arrayLength, saturating add/sub, bank-0 operands of vertex b…
brkosebay Nov 15, 2026
2a0bb4d
pvr/g5p: sample 4-sample colour images (sampler2DMS)
brkosebay Nov 15, 2026
b8610a6
pvr: don't pack Rogue texture words that an Apple descriptor replaces
brkosebay Nov 16, 2026
004018a
pco/g5p: GLSL's packing built-ins
brkosebay Nov 15, 2026
535a77f
pvr/g5p: flat varyings from the draw's provoking vertex; flat fans
brkosebay Nov 15, 2026
809d31e
pco/g5p: explicit gradients in vertex programs as an explicit level
brkosebay Nov 15, 2026
c47f2f0
pvr/g5p: no VK_EXT_non_seamless_cube_map on the A9
brkosebay Nov 15, 2026
590277b
pco/g5p: textureSize() at a non-constant level in vertex programs
brkosebay Nov 15, 2026
b6f8c0e
pvr/g5p: 8- and 16-bit integer vertex attributes; unbound inputs read…
brkosebay Nov 15, 2026
6ecfb56
pvr/g5p: vertex bindings off dwords draw from one aligned copy per su…
brkosebay Nov 15, 2026
4fd2d1b
pvr/g5p: log unbound vertex inputs and substitute (0, 0, 0, 1)
brkosebay Nov 15, 2026
ed6485f
pvr/g5p: vertex formats of 1, 2, 3 and 6 bytes, through the aligned copy
brkosebay Nov 15, 2026
4192e46
pvr/g5p: retain narrow integer formats as unadvertised probes
brkosebay Nov 15, 2026
d5ed9b6
pvr/g5p: 16-bit packed textures from Apple's A9 format table
brkosebay Nov 15, 2026
593db1c
pvr/g5p: fetch 10:10:10:2 vertex formats
brkosebay Nov 16, 2026
8445a71
pco/g5p: preserve the qualified kill order for tile-reading programs
brkosebay Nov 15, 2026
3c434ba
pvr/g5p: Apple's masked form for an RGB write mask, by default
brkosebay Nov 15, 2026
97f25fd
pco/g5p: the 2D-multisample sample, its own-sample operand and the 4x…
brkosebay Nov 15, 2026
ad4d268
pvr/g5p: 4x LOAD, 4x depth/stencil load and store, 4x discard, as Apple
brkosebay Nov 15, 2026
1a2fc7b
pco/g5p: vertex attributes above r31, as Apple
brkosebay Nov 15, 2026
2f286bd
pco/g5p: general-blend discards in Apple's order
brkosebay Nov 15, 2026
46a7457
g9p: native vector shared-memory accesses on the A9
brkosebay Nov 15, 2026
dbb4ae8
pvr/g5p: expose and lower single-invocation subgroups
brkosebay Nov 15, 2026
e65f5b5
g9p: shared atomics with Apple's LL/SC loop on the A9
brkosebay Nov 15, 2026
6017514
g9p: lower the integer and packing ops the G9P backend has no emitter…
brkosebay Nov 15, 2026
49529a7
g9p: compute image stores for the A9's packed and raw formats
brkosebay Nov 15, 2026
1113ab9
pvr/g5p: storage image formats; cube storage as face arrays
brkosebay Nov 15, 2026
af708e0
g9p: array fetches and explicit array and cube samples in A9 compute
brkosebay Nov 15, 2026
afdaf50
g9p: keep the final compute refusal reason across allocator retries
brkosebay Nov 15, 2026
5c8891c
pvr/g5p: identify compute dispatches with PVR_DEBUG=compute_log
brkosebay Nov 15, 2026
1db4927
g9p: register LOD for A9 compute arrays and cubes, as Apple
brkosebay Nov 15, 2026
ab93615
pvr/g5p: spill workgroup memory above 16 KiB to a per-dispatch buffer
brkosebay Nov 15, 2026
da1a0a5
g9p: grow loop, exit and code storage; size loop records to the program
brkosebay Nov 15, 2026
9a09e52
g9p: A9 barrier ids wrap every 15 sites, as Apple
brkosebay Nov 15, 2026
455ffc1
g9p: A9 compute pressure retry
brkosebay Nov 15, 2026
b7ab4a6
g9p: give A9 compute Apple's register budget when the pressure retry …
brkosebay Nov 15, 2026
a4d6841
pvr/g5p: bound barriered compute workgroups by Apple's A9 residency l…
brkosebay Nov 15, 2026
f8c5f72
pvr/g5p: decide compute workgroup residency by device feature
brkosebay Nov 15, 2026
c696402
g9p: defer A9 compute refusal logs until the final verdict
brkosebay Nov 15, 2026
4742332
pvr: bind dynamic buffers in compute dispatches from their bound state
brkosebay Nov 15, 2026
2a5bf5c
pvr/g5p: keep 4x for input-attachment usage
brkosebay Nov 16, 2026
8fa588f
pvr: log buffer object allocations with PVR_DEBUG=bo_log
brkosebay Nov 15, 2026
ba991a3
pvr: do not keep oversize buffer objects in allocator caches
brkosebay Nov 15, 2026
f048c57
pvr: drop the 1 GiB minimum heap size
brkosebay Nov 16, 2026
05f7e3f
pvr/g5p: size the A9 heap at two thirds of RAM
brkosebay Nov 16, 2026
b70ae51
glapi: EXT_semaphore entry points from GLES 2.0, EXT_memory_object fr…
brkosebay Nov 15, 2026
7c3a052
egl/wayland: driconf cap on window-surface colour buffers
brkosebay Nov 15, 2026
3015106
util/astc: a void-extent block without its reserved bits set is the e…
brkosebay Nov 15, 2026
ddaabb4
zink: 16 varyings on Imagination between 64 and 120 output components
brkosebay Nov 16, 2026
7211300
pvr/g5p: report 112 vertex output and fragment input components
brkosebay Nov 15, 2026
6b5fa91
zink: order buffer copies after earlier batches' reads
brkosebay Nov 16, 2026
4960a8a
zink: retry multisampled images without SAMPLED the device cannot sample
brkosebay Nov 16, 2026
465c42d
util/tc: don't full_copy an rp info that has ended
zmike Oct 31, 2026
f68475f
util/tc: only set end_call for a blit that ends the info
zmike Oct 31, 2026
108617f
util/tc: advance the driver rp info before the first draw or clear
zmike Oct 31, 2026
06f5242
util/tc: advance the driver rp info for indirect and vstate draws
zmike Oct 31, 2026
88b2f60
util/tc: move the driver rp info advance call list into a helper
zmike Oct 31, 2026
3824640
util/tc: write the resolve geometry before enqueueing the resolve
zmike Oct 31, 2026
c7dec20
util/tc: don't merge a resolve into a different target
zmike Oct 31, 2026
65d103d
util/tc: parse the rp info for mesh draws
zmike Oct 31, 2026
dc7f2e3
util/tc: don't end the rp info without an end_call
zmike Oct 31, 2026
b00232e
util/tc: reset the new rp info fence before linking it
zmike Oct 31, 2026
d5e6d73
gallium/dri: let the swap throttle keep more than one frame in flight
brkosebay Nov 15, 2026
f94c885
zink: keep two frames in flight on Imagination GPUs
brkosebay Nov 15, 2026
0531d86
vulkan/wsi/wayland: support pre-rotated swapchains
brkosebay Nov 16, 2026
9e86574
zink: present unrotated swapchains
brkosebay Nov 16, 2026
a2907b7
vulkan/wsi/wayland: list 8-bit formats first
brkosebay Nov 16, 2026
7e35507
pco/g5p: vertex constant UBO loads write and address bank 1
brkosebay Nov 16, 2026
6823deb
pco/g5p: move vertex attributes out of bank 1 when bank-1-only loads …
brkosebay Nov 16, 2026
7c0ad8c
Merge pull request #10 follow-ups from brkosebay
henrikklee Nov 17, 2026
d306c0e
Merge pull request #14 from brkosebay
henrikklee Nov 17, 2026
9177f66
ci: build the shipped drivers on pull requests and main
henrikklee Nov 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 91 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build
# Compiles the drivers OrchardLinux ships from this fork, the way its package
# builds them: the build() and package() of OrchardLinux/packages'
# packages/mesa/pacman/PKGBUILD, run on this checkout instead of the commit the
# package pins, in the same Arch Linux ARM container the package is built in.
# That is the Imagination PowerVR Vulkan driver (Wayland) and OpenGL through
# Zink, llvmpipe and softpipe (X11 and Wayland), with exactly the package's
# meson options; package() then checks that the drivers the image needs are
# there. Build only: nothing is tested on a GPU or published.
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
aarch64:
runs-on: ubuntu-24.04-arm
timeout-minutes: 120
# The image OrchardLinux/packages pins for aarch64 (ci/containers.json).
container: docker.io/arch4edu/archlinuxarm@sha256:1db43d1af9917db5fd34af3dab64e2b229a21240e81bb765e3d2d3c34739d587
env:
ORCHARD_ARCH: aarch64
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_MAXSIZE: 2G
defaults:
run:
shell: bash
steps:
# The package's recipe and the packages repository's container setup. The
# image has no git yet, so this comes as an archive: the whole small repository.
- uses: actions/checkout@v4
with:
repository: OrchardLinux/packages
path: packages
persist-credentials: false
# pacman made usable in a container and the system brought up to date, as
# for every package build there; then the recipe's dependencies.
- name: Prepare the build system
run: |
bash packages/ci/prepare-pacman
pacman -S --noconfirm --needed git ccache
# shellcheck disable=SC1091
source packages/packages/mesa/pacman/PKGBUILD
pacman -S --noconfirm --needed --asdeps "${depends[@]}" "${makedepends[@]}"
- uses: actions/checkout@v4
with:
path: mesa
persist-credentials: false
# main keeps the compiler cache of its last build; a pull request only reads it.
- uses: actions/cache@v4
if: github.event_name != 'pull_request'
with:
path: .ccache
key: mesa-ccache-v1-aarch64-${{ github.sha }}
restore-keys: mesa-ccache-v1-aarch64-
- uses: actions/cache/restore@v4
if: github.event_name == 'pull_request'
with:
path: .ccache
key: mesa-ccache-v1-aarch64-${{ github.sha }}
restore-keys: mesa-ccache-v1-aarch64-
- name: Build as the package does
run: |
# makepkg's compiler flags; the recipe's options leave out LTO and debug.
# shellcheck disable=SC1091
source /etc/makepkg.conf
export CFLAGS CXXFLAGS LDFLAGS
# shellcheck disable=SC1091
source packages/packages/mesa/pacman/PKGBUILD
# The recipe builds the source directory mesa-$_commit: this checkout.
work=$PWD/work
mkdir -p "$work"
ln -s "$GITHUB_WORKSPACE/mesa" "$work/mesa-${_commit}"
cp packages/packages/mesa/gpu-probe.c "$work/"
mkdir -p "$CCACHE_DIR"
ccache --zero-stats >/dev/null
started=$(date +%s)
# meson compiles through ccache when it finds it.
(cd "$work" && build)
export srcdir=$work pkgdir=$work/pkg
(cd "$work" && package)
# Keep only what this build used, so the saved cache stays one build large.
ccache --evict-older-than "$(( $(date +%s) - started + 60 ))s" >/dev/null
{ echo 'Compiler cache:'; echo '```'; ccache --show-stats; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
ls -l "$work/pkg/usr/lib/libvulkan_powervr_mesa.so" "$work"/pkg/usr/lib/libgallium-*.so
60 changes: 0 additions & 60 deletions .github/workflows/macos.yml

This file was deleted.

12 changes: 12 additions & 0 deletions docs/drivers/zink.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,18 @@ changing the descriptor manager may improve performance:
``db``
Use EXT_descriptor_buffer when possible.

The ``zink_frames_in_flight`` driconf option controls the swap throttle depth.
It accepts integers from 0 to 3. The default, 0, selects two frames for
``VK_DRIVER_ID_IMAGINATION_OPEN_SOURCE_MESA`` and one frame for other drivers.
Values 1 through 3 explicitly select that many frames. Mesa also accepts the
same-named environment variable, for example ``zink_frames_in_flight=1`` to
restore the previous-frame throttle.

Two frames allow a tile-based GPU to overlap geometry and fragment work from
successive frames. When GPU-bound, this can add one frame of input latency
and requires one more swapchain image per window (12 MiB at 2048x1536 RGBA8),
subject to the surface's maximum image count.

Debugging
---------

Expand Down
3 changes: 3 additions & 0 deletions docs/gallium/screen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ Capability about the features and limits of the driver/GPU.
* ``pipe_caps.image_store_formatted``: True if a format for image stores does not need to be specified in the shader IR
* ``pipe_caps.throttle``: Whether or not gallium frontends should throttle pipe_context
execution. 0 = throttling is disabled.
* ``pipe_caps.throttle_frames``: How many frames a throttling frontend lets be
in flight: a swap waits for the frame that many swaps back. 0 and 1 wait for
the previous frame. The default is 1; the DRI frontend supports up to 3.
* ``pipe_caps.dmabuf``: Whether Linux DMABUF handles are supported by
resource_from_handle and resource_get_handle.
Possible bit field values:
Expand Down
3 changes: 3 additions & 0 deletions src/egl/drivers/dri2/egl_dri2.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ struct dri2_egl_surface {
bool locked;
int age;
} color_buffers[4], *back, *current;
/* Wayland: how many of color_buffers this surface may use (2..4,
* MESA_EGL_WAYLAND_MAX_BUFFERS). */
unsigned max_color_buffers;
#endif

#ifdef HAVE_ANDROID_PLATFORM
Expand Down
17 changes: 16 additions & 1 deletion src/egl/drivers/dri2/platform_wayland.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <vulkan/vulkan_wayland.h>

#include "util/anon_file.h"
#include "util/u_debug.h"
#include "util/perf/cpu_trace.h"
#include "util/u_vector.h"
#include "util/format/u_formats.h"
Expand Down Expand Up @@ -758,6 +759,18 @@ dri2_wl_create_window_surface(_EGLDisplay *disp, _EGLConfig *conf,
dri2_surf->base.Width = window->width;
dri2_surf->base.Height = window->height;

/* A surface takes a third (and fourth) color buffer while the compositor
* holds two, and frees a spare only after it has gone unused for
* BUFFER_TRIM_AGE_HYSTERESIS frames. A surface that stops drawing, such as
* a desktop shell's wallpaper after its first frames, keeps the spare for
* good: a whole surface-sized buffer. A client that redraws rarely can
* stay double buffered instead and wait for a release when it draws. */
int max_buffers = ARRAY_SIZE(dri2_surf->color_buffers);
dri2GalliumConfigQueryi(dri2_dpy->dri_screen_render_gpu,
"egl_wayland_max_buffers", &max_buffers);
dri2_surf->max_color_buffers =
CLAMP(max_buffers, 2, ARRAY_SIZE(dri2_surf->color_buffers));

visual_idx = dri2_wl_visual_idx_from_config(config);
assert(visual_idx != -1);
assert(dri2_wl_visuals[visual_idx].pipe_format != PIPE_FORMAT_NONE);
Expand Down Expand Up @@ -1292,8 +1305,10 @@ wait_for_free_buffer(struct dri2_egl_display *dri2_dpy,
/* There might be a buffer release already queued that wasn't processed */
wl_display_dispatch_queue_pending(dri2_dpy->wl_dpy, dri2_surf->wl_queue);

const unsigned max_buffers = dri2_surf->max_color_buffers;

while (dri2_surf->back == NULL) {
for (int i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) {
for (int i = 0; i < max_buffers; i++) {
/* Get an unlocked buffer, preferably one with a dri_buffer
* already allocated and with minimum age.
*/
Expand Down
1 change: 1 addition & 0 deletions src/gallium/auxiliary/util/u_screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ u_init_pipe_screen_caps(struct pipe_screen *pscreen, int accel)
VARYING_BIT_BOUNDING_BOX1;

caps->throttle = true;
caps->throttle_frames = 1;

#if defined(HAVE_LIBDRM) && (DETECT_OS_LINUX || DETECT_OS_BSD || DETECT_OS_MANAGARM)
if (pscreen->get_screen_fd) {
Expand Down
Loading
Loading