mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
kdrive/fbdev: Set glvnd vendor with glamor_set_glvnd_vendor
This makes it so that glamor glx can properly initialize and choose hw accelerated `FBConfig`s, instead of just using softpipe/llvmpipe. This commit fixes the issue described in https://github.com/X11Libre/xserver/pull/1832#issue-3827524680 Now, `FBConfig`s corresponding to the choosen accelerated `EGLDevice` are choosen by `glXChooseFBConfig`. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
069fc8f6bb
commit
c4b070319b
@@ -60,6 +60,17 @@ glamor_egl_make_current(struct glamor_context *glamor_ctx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
fbdev_glamor_set_glvnd_vendor(ScreenPtr screen)
|
||||||
|
{
|
||||||
|
if (fbdev_glvnd_provider &&
|
||||||
|
strstr(fbdev_glvnd_provider, "nvidia")) {
|
||||||
|
glamor_set_glvnd_vendor(screen, "nvidia");
|
||||||
|
} else {
|
||||||
|
glamor_set_glvnd_vendor(screen, "mesa");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static Bool fbdev_glamor_egl_init(ScreenPtr screen);
|
static Bool fbdev_glamor_egl_init(ScreenPtr screen);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
@@ -73,16 +84,16 @@ fbdevInitAccel(ScreenPtr pScreen)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!fbdev_glamor_egl_init(pScreen)) {
|
if (!fbdev_glamor_egl_init(pScreen)) {
|
||||||
screen->dumb = TRUE;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!glamor_init(pScreen, GLAMOR_USE_EGL_SCREEN | GLAMOR_NO_DRI3)) {
|
if (!glamor_init(pScreen, GLAMOR_USE_EGL_SCREEN | GLAMOR_NO_DRI3)) {
|
||||||
fbdev_glamor_egl_cleanup(scrpriv);
|
fbdev_glamor_egl_cleanup(scrpriv);
|
||||||
screen->dumb = TRUE;
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fbdev_glamor_set_glvnd_vendor(pScreen);
|
||||||
|
|
||||||
#ifdef GLXEXT
|
#ifdef GLXEXT
|
||||||
if (!vendor_initialized) {
|
if (!vendor_initialized) {
|
||||||
GlxPushProvider(&glamor_provider);
|
GlxPushProvider(&glamor_provider);
|
||||||
|
|||||||
Reference in New Issue
Block a user