You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RASSERT(eglBindAPI(EGL_OPENGL_ES_API) != EGL_FALSE, "Couldn't bind to EGL's opengl ES API. This means your gpu driver f'd up. This is not a hyprland issue.");
204
258
205
-
// if (m_sProc.eglQueryDevicesEXT) {
206
-
// // TODO:
207
-
// }
259
+
bool success = false;
260
+
if (EGLEXTENSIONS.contains("EXT_platform_device") || !m_sProc.eglQueryDevicesEXT || !m_sProc.eglQueryDeviceStringEXT) {
261
+
m_pEglDevice = eglDeviceFromDRMFD(m_iDRMFD);
208
262
209
-
if (EGLEXTENSIONS.contains("KHR_platform_gbm")) {
210
-
m_iGBMFD = openRenderNode(m_iDRMFD);
211
-
if (m_iGBMFD < 0)
212
-
RASSERT(false, "Couldn't open a gbm fd");
263
+
if (m_pEglDevice != EGL_NO_DEVICE_EXT) {
264
+
success = true;
265
+
initEGL(false);
266
+
}
267
+
}
213
268
214
-
m_pGbmDevice = gbm_create_device(m_iGBMFD);
215
-
if (!m_pGbmDevice)
216
-
RASSERT(false, "Couldn't open a gbm device");
269
+
if (!success) {
270
+
Debug::log(WARN, "EGL: EXT_platform_device or EGL_EXT_device_query not supported, using gbm");
271
+
if (EGLEXTENSIONS.contains("KHR_platform_gbm")) {
272
+
success = true;
273
+
m_iGBMFD = openRenderNode(m_iDRMFD);
274
+
if (m_iGBMFD < 0)
275
+
RASSERT(false, "Couldn't open a gbm fd");
217
276
218
-
initEGL(true);
219
-
} else
220
-
RASSERT(false, "EGL does not support KHR_platform_gbm, this is an issue with your gpu driver.");
277
+
m_pGbmDevice = gbm_create_device(m_iGBMFD);
278
+
if (!m_pGbmDevice)
279
+
RASSERT(false, "Couldn't open a gbm device");
280
+
281
+
initEGL(true);
282
+
}
283
+
}
284
+
285
+
RASSERT(success, "EGL does not support KHR_platform_gbm or EXT_platform_device, this is an issue with your gpu driver.");
0 commit comments