mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
app/internal/egl: adjust alpha bit depth to enable sRGB on some GPUs
On my setup:
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Intel (0x8086)
Device: Mesa Intel(R) HD Graphics 530 (SKL GT2) (0x1912)
Version: 20.1.5
Accelerated: yes
Video memory: 3072MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
eglCreateWindowSurface with the sRGB flag fails with EGL_BAD_MATCH.
Bumping the ALPHA_SIZE from 1 to 8 seems to make the driver happy
again.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -219,7 +219,7 @@ func createContext(disp _EGLDisplay) (*eglContext, error) {
|
||||
// https://bugs.freedesktop.org/show_bug.cgi?id=107782.
|
||||
//
|
||||
// Also, some Android devices (Samsung S9) needs alpha for sRGB to work.
|
||||
attribs = append(attribs, _EGL_ALPHA_SIZE, 1)
|
||||
attribs = append(attribs, _EGL_ALPHA_SIZE, 8)
|
||||
}
|
||||
// Only request a depth buffer if we're going to render directly to the framebuffer.
|
||||
attribs = append(attribs, _EGL_DEPTH_SIZE, 16)
|
||||
|
||||
Reference in New Issue
Block a user