~eliasnaur/gio#36:
apps/hello fails with "eglCreateContext failed: 0x3005" on librem5 devkit

I thought I'd give gio a go on the librem5 devkit since it runs with wayland by default.

Attempting to run the apps/hello example fails with the error above.

purism@pureos:~$ go run gioui.org/apps/hello
2019/09/14 18:04:11 eglCreateContext failed: 0x3005
exit status 1

System background:

purism@pureos:~/go/src/gioui.org$ git rev-parse HEAD
37d5b947eb574da0688d6203f2dcd78b08dc0c9e
purism@pureos:~/go/src/gioui.org$ go version
go version go1.13 linux/arm64
purism@pureos:~/go/src/gioui.org$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/purism/.cache/go-build"
GOENV="/home/purism/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/purism/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build799492658=/tmp/go-build -gno-record-gcc-switches"
purism@pureos:~$ dpkg -l libwayland-dev libxkbcommon-dev libgles2-mesa-dev libegl1-mesa-dev
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version                                   Architecture Description
+++-=======================-=========================================-============-======================
ii  libegl1-mesa-dev:arm64  18.3.6-2pureos+librem5.3~118051.gbp615480 arm64        free implementation of
ii  libgles2-mesa-dev:arm64 18.3.6-2pureos+librem5.3~118051.gbp615480 arm64        free implementation of
ii  libwayland-dev:arm64    1.16.0-1                                  arm64        wayland compositor inf
ii  libxkbcommon-dev:arm64  0.8.2-1                                   arm64        library interface to t
Status
REPORTED
Submitter
~kortschak
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.

~eliasnaur a month ago

On Sat Sep 14, 2019 at 8:52 AM ~kortschak wrote:

I thought I'd give gio a go on the librem5 devkit since it runs with wayland by default.

Attempting to run the apps/hello example fails with the error above.

purism@pureos:~$ go run gioui.org/apps/hello
2019/09/14 18:04:11 eglCreateContext failed: 0x3005
exit status 1

It's a different error code, but otherwise the error reminds me of https://gioui.org/issue/35. Could you try the debug branch I made for #35 and run with LIBGL_DEBUG=verbose?

I'm very keen on seeing Gio on Librem 5 because I haven't had a chance to test Gio's wltouch support. Nor have I tried to implement zwptextinputmanager_v3 for soft keyboards.

~kortschak a month ago

purism@pureos:~/go/src/gioui.org$ LIBGL_DEBUG=verbose go run gioui.org/apps/hello >fail.log 2&>1
purism@pureos:~/go/src/gioui.org$ cat fail.log 
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
[I]  GPU model:          0x7000 (rev 6214) (etna_drm_gpu_new:66)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 0 (etna_drm_perfmon_query_domains:88)
[I] name       = HI (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 5 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_CYCLES (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = IDLE_CYCLES (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = AXI_CYCLES_READ_REQUEST_STALLED (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = AXI_CYCLES_WRITE_REQUEST_STALLED (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = AXI_CYCLES_WRITE_DATA_STALLED (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 1 (etna_drm_perfmon_query_domains:88)
[I] name       = PE (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 4 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_KILLED_BY_COLOR_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_KILLED_BY_DEPTH_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_DRAWN_BY_COLOR_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 2 (etna_drm_perfmon_query_domains:88)
[I] name       = SH (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 9 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = SHADER_CYCLES (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = PS_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = RENDERED_PIXEL_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = VS_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = RENDERED_VERTICE_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = VTX_BRANCH_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 6 (etna_drm_perfmon_query_signals:51)
[I] name       = VTX_TEXLD_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 7 (etna_drm_perfmon_query_signals:51)
[I] name       = PXL_BRANCH_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 8 (etna_drm_perfmon_query_signals:51)
[I] name       = PXL_TEXLD_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 3 (etna_drm_perfmon_query_domains:88)
[I] name       = PA (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 6 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = INPUT_VTX_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = INPUT_PRIM_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = OUTPUT_PRIM_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = DEPTH_CLIPPED_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = TRIVIAL_REJECTED_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 4 (etna_drm_perfmon_query_domains:88)
[I] name       = SE (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 2 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_TRIANGLE_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_LINES_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 5 (etna_drm_perfmon_query_domains:88)
[I] name       = RA (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 7 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = VALID_PIXEL_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_QUAD_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = VALID_QUAD_COUNT_AFTER_EARLY_Z (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_PRIMITIVE_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = PIPE_CACHE_MISS_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = PREFETCH_CACHE_MISS_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 6 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_QUAD_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 6 (etna_drm_perfmon_query_domains:88)
[I] name       = TX (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 9 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_BILINEAR_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_TRILINEAR_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_DISCARDED_TEXTURE_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_TEXTURE_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = MEM_READ_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = MEM_READ_IN_8B_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 6 (etna_drm_perfmon_query_signals:51)
[I] name       = CACHE_MISS_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 7 (etna_drm_perfmon_query_signals:51)
[I] name       = CACHE_HIT_TEXEL_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 8 (etna_drm_perfmon_query_signals:51)
[I] name       = CACHE_MISS_TEXEL_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 7 (etna_drm_perfmon_query_domains:88)
[I] name       = MC (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 3 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_READ_REQ_8B_FROM_PIPELINE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_READ_REQ_8B_FROM_IP (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_WRITE_REQ_8B_FROM_PIPELINE (etna_drm_perfmon_query_signals:52)
2019/09/14 20:06:00 eglCreateContext failed: 0x3005
exit status 1

~eliasnaur a month ago

I see. From a cursory glance at the Librem 5 specs, the GPU does support GL ES 3, but the etnaviv driver doesn't. Please try

diff --git a/ui/app/egl.go b/ui/app/egl.go
index ee07993..0658015 100644
--- a/ui/app/egl.go
+++ b/ui/app/egl.go
@@ -229,7 +229,7 @@ func createContext(disp _EGLNativeDisplayType) (*eglContext, error) {
        }
        var eglCtx _EGLContext
        ctxAttribs := []_EGLint{
-               _EGL_CONTEXT_CLIENT_VERSION, 3,
+               _EGL_CONTEXT_CLIENT_VERSION, 2,
                _EGL_NONE,
        }
        eglCtx = eglCreateContext(eglDisp, eglCfg, nilEGLContext, ctxAttribs)

You might run into an error later on because I don't test Gio on ES 2 contexts.

~kortschak a month ago

libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/purism/.drirc: No such file or directory.
[I]  GPU model:          0x7000 (rev 6214) (etna_drm_gpu_new:66)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 0 (etna_drm_perfmon_query_domains:88)
[I] name       = HI (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 5 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_CYCLES (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = IDLE_CYCLES (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = AXI_CYCLES_READ_REQUEST_STALLED (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = AXI_CYCLES_WRITE_REQUEST_STALLED (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = AXI_CYCLES_WRITE_DATA_STALLED (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 1 (etna_drm_perfmon_query_domains:88)
[I] name       = PE (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 4 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_KILLED_BY_COLOR_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_KILLED_BY_DEPTH_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_DRAWN_BY_COLOR_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 2 (etna_drm_perfmon_query_domains:88)
[I] name       = SH (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 9 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = SHADER_CYCLES (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = PS_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = RENDERED_PIXEL_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = VS_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = RENDERED_VERTICE_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = VTX_BRANCH_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 6 (etna_drm_perfmon_query_signals:51)
[I] name       = VTX_TEXLD_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 7 (etna_drm_perfmon_query_signals:51)
[I] name       = PXL_BRANCH_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 8 (etna_drm_perfmon_query_signals:51)
[I] name       = PXL_TEXLD_INST_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 3 (etna_drm_perfmon_query_domains:88)
[I] name       = PA (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 6 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = INPUT_VTX_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = INPUT_PRIM_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = OUTPUT_PRIM_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = DEPTH_CLIPPED_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = TRIVIAL_REJECTED_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 4 (etna_drm_perfmon_query_domains:88)
[I] name       = SE (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 2 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_TRIANGLE_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_LINES_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 5 (etna_drm_perfmon_query_domains:88)
[I] name       = RA (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 7 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = VALID_PIXEL_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_QUAD_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = VALID_QUAD_COUNT_AFTER_EARLY_Z (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_PRIMITIVE_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = PIPE_CACHE_MISS_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = PREFETCH_CACHE_MISS_COUNTER (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 6 (etna_drm_perfmon_query_signals:51)
[I] name       = CULLED_QUAD_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 6 (etna_drm_perfmon_query_domains:88)
[I] name       = TX (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 9 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_BILINEAR_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_TRILINEAR_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_DISCARDED_TEXTURE_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 3 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_TEXTURE_REQUESTS (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 4 (etna_drm_perfmon_query_signals:51)
[I] name       = MEM_READ_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 5 (etna_drm_perfmon_query_signals:51)
[I] name       = MEM_READ_IN_8B_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 6 (etna_drm_perfmon_query_signals:51)
[I] name       = CACHE_MISS_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 7 (etna_drm_perfmon_query_signals:51)
[I] name       = CACHE_HIT_TEXEL_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 8 (etna_drm_perfmon_query_signals:51)
[I] name       = CACHE_MISS_TEXEL_COUNT (etna_drm_perfmon_query_signals:52)
[I] perfmon domain: (etna_drm_perfmon_query_domains:87)
[I] id         = 7 (etna_drm_perfmon_query_domains:88)
[I] name       = MC (etna_drm_perfmon_query_domains:89)
[I] nr_signals = 3 (etna_drm_perfmon_query_domains:90)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 0 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_READ_REQ_8B_FROM_PIPELINE (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 1 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_READ_REQ_8B_FROM_IP (etna_drm_perfmon_query_signals:52)
[I] perfmon signal: (etna_drm_perfmon_query_signals:50)
[I] id         = 2 (etna_drm_perfmon_query_signals:51)
[I] name       = TOTAL_WRITE_REQ_8B_FROM_PIPELINE (etna_drm_perfmon_query_signals:52)
2019/09/14 21:00:22 no support for OpenGL ES 3 nor EXT_sRGB
exit status 1

~eliasnaur a month ago

On Sat Sep 14, 2019 at 11:31 AM ~kortschak wrote:

2019/09/14 21:00:22 no support for OpenGL ES 3 nor EXT_sRGB exit status 1 ```

That's unfortunate. Gio currently relies on GPU sRGB support, so it probably won't run on the Librem 5 in the near future.

-- elias

~kortschak a month ago

What GLES3.0 features are used by gio?

There is this https://mesamatrix.net/ that has a running scoreboard for feature completion for the different implementations.

~eliasnaur a month ago

Gio could run on GL ES 2 with GLEXTsRGB and GLEXTcolorbufferhalf_float (or similar). It's unfortunate that GPU vendors are so hostile to open source drivers, because it seems the Librem 5 hardware is more than capable.

~sircmpwn a month ago

Same problem on sway on x86+AMDGPU, sRGB is not supported. Got things to start up by setting srgb to false in ui/app/egl.go, though.

~sircmpwn a month ago

~kortschak, can you run drm_info on your device?

https://drmdb.emersion.fr/

~eliasnaur a month ago

On Wed Sep 18, 2019 at 4:10 PM ~sircmpwn wrote:

Same problem on sway on x86+AMDGPU, sRGB is not supported. Got things to start up by setting srgb to false in ui/app/egl.go, though.

Can you elaborate? If everything works by setting srgb to false, I believe you're seeing a different problem than the Librem 5 error.

Confusingly, sRGB can be supported for the framebuffer in EGL (EGLKHRglcolorspace or EGL 1.5 builtin), and for textures and blending in OpenGL ES (EXTsRGB or ES 3 builtin). Gio uses both, but only requires the OpenGL ES support; it can emulate an sRGB framebuffer by an extra blit.

It seems from the Librem 5 error that etnaviv does not support EXT_sRGB (nor OpenGL ES 3). That's currently a hard error.

However, from your description, it sounds like you're disabling the use of EGL sRGB support, which indicates that there is an error in how EGL sRGB is detected, or AMDGPU is lying to us.

The interesting line is:

srgb := major > 1 || minor >= 5 || hasExtension(exts, "EGL_KHR_gl_colorspace")

I assume that's the srgb variable you disable? If so, can you tell whether your driver actually support EGL 1.5 or the EGLKHRgl_colorspace extension?

~sircmpwn a month ago

The extension is present, but I'm not sure if that implies that SRGB surfaces is actually supported, too. I explained in more detail in my patch:

https://lists.sr.ht/~eliasnaur/gio/patches/8249

But I don't have any good answers.

~kortschak a month ago

$ drm_info
Node: /dev/dri/card1
├───Driver: imx-drm (i.MX DRM graphics) version 1.0.0 (20120507)
│   ├───DRM_CLIENT_CAP_STEREO_3D supported
│   ├───DRM_CLIENT_CAP_UNIVERSAL_PLANES supported
│   ├───DRM_CLIENT_CAP_ATOMIC supported
│   ├───DRM_CLIENT_CAP_ASPECT_RATIO supported
│   ├───DRM_CLIENT_CAP_WRITEBACK_CONNECTORS supported
│   ├───DRM_CAP_DUMB_BUFFER = 1
│   ├───DRM_CAP_VBLANK_HIGH_CRTC = 1
│   ├───DRM_CAP_DUMB_PREFERRED_DEPTH = 0
│   ├───DRM_CAP_DUMB_PREFER_SHADOW = 0
│   ├───DRM_CAP_PRIME = 3
│   ├───DRM_CAP_TIMESTAMP_MONOTONIC = 1
│   ├───DRM_CAP_ASYNC_PAGE_FLIP = 0
│   ├───DRM_CAP_CURSOR_WIDTH = 64
│   ├───DRM_CAP_CURSOR_HEIGHT = 64
│   ├───DRM_CAP_ADDFB2_MODIFIERS = 1
│   ├───DRM_CAP_PAGE_FLIP_TARGET = 0
│   ├───DRM_CAP_CRTC_IN_VBLANK_EVENT = 1
│   ├───DRM_CAP_SYNCOBJ = 0
│   └───DRM_CAP_SYNCOBJ_TIMELINE = 0
├───Device: platform fsl,imx-display-subsystem
├───Framebuffer size
│   ├───Width: [64, 4096]
│   └───Height: [64, 4096]
├───Connectors
│   └───Connector 0
│       ├───Object ID: 44
│       ├───Type: DSI
│       ├───Status: connected
│       ├───Physical size: 65x130 mm
│       ├───Subpixel: unknown
│       ├───Encoders: {0}
│       ├───Modes
│       │   └───720x1440@60.00 preferred driver nhsync nvsync 
│       └───Properties
│           ├───"EDID" (immutable): blob = 0
│           ├───"DPMS": enum {On, Standby, Suspend, Off} = On
│           ├───"link-status": enum {Good, Bad} = Good
│           ├───"non-desktop" (immutable): range [0, 1] = 0
│           ├───"TILE" (immutable): blob = 0
│           └───"CRTC_ID" (atomic): object CRTC = 33
├───Encoders
│   └───Encoder 0
│       ├───Object ID: 43
│       ├───Type: DSI
│       ├───CRTCS: {0}
│       └───Clones: {}
├───CRTCs
│   └───CRTC 0
│       ├───Object ID: 33
│       ├───Mode: 720x1440@60.00 preferred driver nhsync nvsync 
│       └───Properties
│           ├───"ACTIVE" (atomic): range [0, 1] = 1
│           ├───"MODE_ID" (atomic): blob = 47
│           │   └───720x1440@60.00 preferred driver nhsync nvsync 
│           ├───"OUT_FENCE_PTR" (atomic): range [0, UINT64_MAX] = 0
│           └───"VRR_ENABLED": range [0, 1] = 0
└───Planes
    ├───Plane 0
    │   ├───Object ID: 30
    │   ├───CRTCs: {0}
    │   ├───Formats:
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───RGBA8888 (0x34324152)
    │   │   ├───RGBX8888 (0x34325852)
    │   │   ├───BGRA8888 (0x34324142)
    │   │   ├───BGRX8888 (0x34325842)
    │   │   ├───XRGB2101010 (0x30335258)
    │   │   ├───XBGR2101010 (0x30334258)
    │   │   ├───RGBX1010102 (0x30335852)
    │   │   ├───BGRX1010102 (0x30335842)
    │   │   ├───ARGB2101010 (0x30335241)
    │   │   ├───ABGR2101010 (0x30334241)
    │   │   ├───RGBA1010102 (0x30334152)
    │   │   ├───BGRA1010102 (0x30334142)
    │   │   ├───AYUV (0x56555941)
    │   │   ├───UYVY (0x59565955)
    │   │   ├───VYUY (0x59555956)
    │   │   ├───YUYV (0x56595559)
    │   │   ├───YVYU (0x55595659)
    │   │   ├───NV12 (0x3231564e)
    │   │   └───NV21 (0x3132564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
    │       ├───"FB_ID" (atomic): object framebuffer = 48
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 33
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 720
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 1440
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 720
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 1440
    │       ├───"IN_FORMATS" (immutable): blob = 31
    │       │   ├───DRM_FORMAT_MOD_VIVANTE_TILED (0x600000000000001)
    │       │   │   ├───ARGB8888 (0x34325241)
    │       │   │   ├───XRGB8888 (0x34325258)
    │       │   │   └───ARGB2101010 (0x30335241)
    │       │   ├───DRM_FORMAT_MOD_VIVANTE_SUPER_TILED (0x600000000000002)
    │       │   │   ├───ARGB8888 (0x34325241)
    │       │   │   ├───XRGB8888 (0x34325258)
    │       │   │   └───ARGB2101010 (0x30335241)
    │       │   └───DRM_FORMAT_MOD_LINEAR (0x0)
    │       │       ├───ARGB8888 (0x34325241)
    │       │       ├───XRGB8888 (0x34325258)
    │       │       ├───ABGR8888 (0x34324241)
    │       │       ├───XBGR8888 (0x34324258)
    │       │       ├───RGBA8888 (0x34324152)
    │       │       ├───RGBX8888 (0x34325852)
    │       │       ├───BGRA8888 (0x34324142)
    │       │       ├───BGRX8888 (0x34325842)
    │       │       ├───XRGB2101010 (0x30335258)
    │       │       ├───XBGR2101010 (0x30334258)
    │       │       ├───RGBX1010102 (0x30335852)
    │       │       ├───BGRX1010102 (0x30335842)
    │       │       ├───ARGB2101010 (0x30335241)
    │       │       ├───ABGR2101010 (0x30334241)
    │       │       ├───RGBA1010102 (0x30334152)
    │       │       ├───BGRA1010102 (0x30334142)
    │       │       ├───AYUV (0x56555941)
    │       │       ├───UYVY (0x59565955)
    │       │       ├───VYUY (0x59555956)
    │       │       ├───YUYV (0x56595559)
    │       │       ├───YVYU (0x55595659)
    │       │       ├───NV12 (0x3231564e)
    │       │       └───NV21 (0x3132564e)
    │       ├───"zpos" (immutable): range [2, 2] = 2
    │       ├───"alpha": range [0, UINT8_MAX] = 255
    │       └───"use_global_alpha": range [0, 1] = 0
    ├───Plane 1
    │   ├───Object ID: 34
    │   ├───CRTCs: {0}
    │   ├───Formats:
    │   │   ├───ARGB8888 (0x34325241)
    │   │   ├───XRGB8888 (0x34325258)
    │   │   ├───ABGR8888 (0x34324241)
    │   │   ├───XBGR8888 (0x34324258)
    │   │   ├───RGBA8888 (0x34324152)
    │   │   ├───RGBX8888 (0x34325852)
    │   │   ├───BGRA8888 (0x34324142)
    │   │   ├───BGRX8888 (0x34325842)
    │   │   ├───XRGB2101010 (0x30335258)
    │   │   ├───XBGR2101010 (0x30334258)
    │   │   ├───RGBX1010102 (0x30335852)
    │   │   ├───BGRX1010102 (0x30335842)
    │   │   ├───ARGB2101010 (0x30335241)
    │   │   ├───ABGR2101010 (0x30334241)
    │   │   ├───RGBA1010102 (0x30334152)
    │   │   ├───BGRA1010102 (0x30334142)
    │   │   ├───AYUV (0x56555941)
    │   │   ├───UYVY (0x59565955)
    │   │   ├───VYUY (0x59555956)
    │   │   ├───YUYV (0x56595559)
    │   │   ├───YVYU (0x55595659)
    │   │   ├───NV12 (0x3231564e)
    │   │   └───NV21 (0x3132564e)
    │   └───Properties
    │       ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Overlay
    │       ├───"FB_ID" (atomic): object framebuffer = 0
    │       ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
    │       ├───"CRTC_ID" (atomic): object CRTC = 0
    │       ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
    │       ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
    │       ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
    │       ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
    │       ├───"IN_FORMATS" (immutable): blob = 35
    │       ├───"zpos" (immutable): range [1, 1] = 1
    │       └───"dtrc_table_ofs": range [0, UINT64_MAX] = 0
    └───Plane 2
        ├───Object ID: 37
        ├───CRTCs: {0}
        ├───Formats:
        │   ├───ARGB8888 (0x34325241)
        │   ├───XRGB8888 (0x34325258)
        │   ├───ABGR8888 (0x34324241)
        │   ├───XBGR8888 (0x34324258)
        │   ├───RGBA8888 (0x34324152)
        │   ├───RGBX8888 (0x34325852)
        │   ├───BGRA8888 (0x34324142)
        │   ├───BGRX8888 (0x34325842)
        │   ├───XRGB2101010 (0x30335258)
        │   ├───XBGR2101010 (0x30334258)
        │   ├───RGBX1010102 (0x30335852)
        │   ├───BGRX1010102 (0x30335842)
        │   ├───ARGB2101010 (0x30335241)
        │   ├───ABGR2101010 (0x30334241)
        │   ├───RGBA1010102 (0x30334152)
        │   ├───BGRA1010102 (0x30334142)
        │   ├───AYUV (0x56555941)
        │   ├───UYVY (0x59565955)
        │   ├───VYUY (0x59555956)
        │   ├───YUYV (0x56595559)
        │   ├───YVYU (0x55595659)
        │   ├───NV12 (0x3231564e)
        │   └───NV21 (0x3132564e)
        └───Properties
            ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Overlay
            ├───"FB_ID" (atomic): object framebuffer = 0
            ├───"IN_FENCE_FD" (atomic): srange [-1, INT32_MAX] = -1
            ├───"CRTC_ID" (atomic): object CRTC = 0
            ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
            ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
            ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 0
            ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 0
            ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 0
            ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 0
            ├───"IN_FORMATS" (immutable): blob = 38
            ├───"zpos" (immutable): range [0, 0] = 0
            └───"dtrc_table_ofs": range [0, UINT64_MAX] = 0

Setting srgb to false does not change the behaviour.

Register here or Log in to comment, or comment via email.