mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +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);
|
||||
|
||||
Bool
|
||||
@@ -73,16 +84,16 @@ fbdevInitAccel(ScreenPtr pScreen)
|
||||
#endif
|
||||
|
||||
if (!fbdev_glamor_egl_init(pScreen)) {
|
||||
screen->dumb = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!glamor_init(pScreen, GLAMOR_USE_EGL_SCREEN | GLAMOR_NO_DRI3)) {
|
||||
fbdev_glamor_egl_cleanup(scrpriv);
|
||||
screen->dumb = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fbdev_glamor_set_glvnd_vendor(pScreen);
|
||||
|
||||
#ifdef GLXEXT
|
||||
if (!vendor_initialized) {
|
||||
GlxPushProvider(&glamor_provider);
|
||||
|
||||
Reference in New Issue
Block a user