mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 20:46:39 +02:00
49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
Patch-Source: https://github.com/glfw/glfw/pull/2348
|
|
--
|
|
From c4d510cf34aec044eeb912054b8892d325d64c6d Mon Sep 17 00:00:00 2001
|
|
From: lo-v-ol <gh@oleg.uk>
|
|
Date: Mon, 5 Jun 2023 08:56:15 +0100
|
|
Subject: [PATCH] EGL: make a request for client version before no_error
|
|
|
|
mesa egl requires major version >= 2 for GL_CONTEXT_OPENGL_NO_ERROR_KHR,
|
|
so fulfill the request to set client version beforehand.
|
|
|
|
without this, a few pieces of software in the wild get
|
|
|
|
libEGL debug: bad context attribute 0x31b3
|
|
libEGL debug: EGL user error 0x3004 (EGL_BAD_ATTRIBUTE) in eglCreateContext
|
|
|
|
when running glfw under wayland.
|
|
---
|
|
src/egl_context.c | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/egl_context.c b/src/egl_context.c
|
|
index 58d9557..5c662cb 100644
|
|
--- a/src/egl_context.c
|
|
+++ b/src/egl_context.c
|
|
@@ -546,18 +546,18 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
|
|
flags |= EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR;
|
|
}
|
|
|
|
- if (ctxconfig->noerror)
|
|
- {
|
|
- if (_glfw.egl.KHR_create_context_no_error)
|
|
- setAttrib(EGL_CONTEXT_OPENGL_NO_ERROR_KHR, GLFW_TRUE);
|
|
- }
|
|
-
|
|
if (ctxconfig->major != 1 || ctxconfig->minor != 0)
|
|
{
|
|
setAttrib(EGL_CONTEXT_MAJOR_VERSION_KHR, ctxconfig->major);
|
|
setAttrib(EGL_CONTEXT_MINOR_VERSION_KHR, ctxconfig->minor);
|
|
}
|
|
|
|
+ if (ctxconfig->noerror)
|
|
+ {
|
|
+ if (_glfw.egl.KHR_create_context_no_error)
|
|
+ setAttrib(EGL_CONTEXT_OPENGL_NO_ERROR_KHR, GLFW_TRUE);
|
|
+ }
|
|
+
|
|
if (mask)
|
|
setAttrib(EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR, mask);
|
|
|