Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions packages/mesa/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ epoch=1
# Mesa's version, the commit's number on the fork's main branch (so that a
# newer commit is a newer package), and the commit.
pkgver=27.0.0.4
pkgrel=3
pkgrel=4
pkgdesc="Mesa from the OrchardLinux fork: OpenGL through Zink or in software, the asahi drivers (OpenGL and Vulkan) for the Apple A12 GPU, the Vulkan driver for the Apple PowerVR GPUs, and the desktop's GPU probe"
url="https://github.com/OrchardLinux/mesa"
license=('MIT')
Expand All @@ -51,7 +51,7 @@ conflicts=('mesa-libgl' 'mesa-orchard' 'vulkan-powervr' 'vulkan-powervr-orchard'
replaces=('mesa-orchard' 'vulkan-powervr-orchard')
source=("mesa-${_commit}.tar.gz::${url}/archive/${_commit}.tar.gz" gpu-probe.c)
sha256sums=('3cd0a985ee428de98eadd6ae6e1d6fefa0df4ca0ebd58aaedc34a7778f26af30'
'8b6622bdd9bba6f8bdcc7bf407e98078517e8823a7ce22416774ca88481864f2')
'1b66ca2329b729632ed2670d86b9504d22a2839ebea5b7aef3bc829356191a51')

build() {
# Not arch-meson: its --auto-features=enabled turns on Mesa features this
Expand Down
14 changes: 11 additions & 3 deletions packages/mesa/gpu-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Does what Labwc's GLES2 renderer does for one frame, without modesetting:
* opens EGL on the render node, allocates one output buffer of the display's
* size there, draws into it and reads it back. Exits 0 only if all of that
* worked and the renderer is not a software one. It then also offers the
* worked and the renderer is a GPU (Zink on one where the desktop asks for it),
* not a software one. It then also offers the
* buffer to the display controller as a framebuffer and says so in a
* "GPU-PROBE NOTE" when the controller does not take it: that does not fail
* the probe, because wlroots copies to the display where direct import is
Expand All @@ -22,6 +23,7 @@
#include <fcntl.h>
#include <gbm.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <xf86drm.h>
Expand Down Expand Up @@ -111,8 +113,14 @@ int main(int argc, char **argv)
CHECK(ctx != EGL_NO_CONTEXT);
const char *renderer = (const char *)glGetString(GL_RENDERER);
CHECK(renderer);
if (!strstr(renderer, "zink") || strstr(renderer, "llvmpipe") || strstr(renderer, "softpipe")) {
fprintf(stderr, "GPU-PROBE FAIL: not Zink on a GPU: renderer=%s\n", renderer);
/* A GPU, not Mesa's software rasterizers: Zink on a Vulkan driver (the
* PowerVR GPUs, which have no OpenGL driver of their own) or a GPU's own
* OpenGL driver (asahi on the A12). */
const char *zink = getenv("MESA_LOADER_DRIVER_OVERRIDE");
int want_zink = zink && !strcmp(zink, "zink");
if ((want_zink && !strstr(renderer, "zink")) || strstr(renderer, "llvmpipe") ||
strstr(renderer, "softpipe") || strstr(renderer, "swrast")) {
fprintf(stderr, "GPU-PROBE FAIL: not %s: renderer=%s\n", want_zink ? "Zink on a GPU" : "a GPU", renderer);
return 1;
}

Expand Down
Loading