Mesa EGL platform Mir does not implement environment variable LIBGL_ALWAYS_SOFTWARE

Bug #1543952 reported by Daniel van Vugt
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mir
Triaged
Medium
Unassigned
mesa (Ubuntu)
Won't Fix
Medium
Unassigned
mir (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Mir binaries ignore Mesa setting LIBGL_ALWAYS_SOFTWARE=1 and only ever try hardware acceleration.

See: http://mesa3d.org/envvars.html

tags: added: mesa
tags: added: egl-platform-mir
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

A quick grep seems to suggest it's the responsibility of each EGL platform to re-implement the environment check:

$ grep -r LIBGL_ALWAYS_SOFT src
src/glx/glxext.c: glx_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);
src/glx/apple/apple_visual.c: else if (getenv("LIBGL_ALWAYS_SOFTWARE") != NULL) {
src/egl/drivers/dri2/platform_wayland.c: int hw_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);
src/egl/drivers/dri2/platform_x11.c: int x11_dri2_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Accidentally found a workaround!

You can set environment GBM_ALWAYS_SOFTWARE=1 for Mir servers and clients, and they will then successfully render in software using LLVMpipe.

summary: - Mir binaries ignore Mesa setting LIBGL_ALWAYS_SOFTWARE=1 and only ever
- try hardware acceleration
+ EGL platform Mir does not implement environment variable
+ LIBGL_ALWAYS_SOFTWARE
summary: - EGL platform Mir does not implement environment variable
+ Mesa EGL platform Mir does not implement environment variable
LIBGL_ALWAYS_SOFTWARE
Changed in mir:
importance: Undecided → Medium
Changed in mesa (Ubuntu):
importance: Undecided → Medium
Changed in mir:
status: New → Triaged
Changed in mesa (Ubuntu):
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Note that GBM_ALWAYS_SOFTWARE=1 is not a solution, because using GBM buffers for software rendering seems to be a massive bottleneck -> bug 1576032

Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

I took a look at implementing LIBGL_ALWAYS_SOFTWARE=1, and it shouldn't be that difficult to do. You're right it will need to go in platform-mir. Only thing missing is a good motivation, or use-case to implement this.

Revision history for this message
Michał Sawicz (saviq) wrote :

Syncing task from Mir.

Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Mir EGL platform is gone

Changed in mesa (Ubuntu):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.