xorg: initialize glamor provider
This allows Xorg to use Glamor GLX when Glamor is requested, and eliminates usage of DRI2 in case of Glamor. Signed-off-by: Konstantin Pugin <ria.freelander@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Emma Anholt <emma@anholt.net>
This commit is contained in:
parent
a563f530f6
commit
a987fc7c36
|
@ -46,6 +46,7 @@
|
||||||
|
|
||||||
#include "glamor.h"
|
#include "glamor.h"
|
||||||
#include "glamor_priv.h"
|
#include "glamor_priv.h"
|
||||||
|
#include "glamor_glx_provider.h"
|
||||||
#include "dri3.h"
|
#include "dri3.h"
|
||||||
|
|
||||||
struct glamor_egl_screen_private {
|
struct glamor_egl_screen_private {
|
||||||
|
@ -886,6 +887,9 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
|
||||||
glamor_egl_get_screen_private(scrn);
|
glamor_egl_get_screen_private(scrn);
|
||||||
#ifdef DRI3
|
#ifdef DRI3
|
||||||
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
||||||
|
#endif
|
||||||
|
#ifdef GLXEXT
|
||||||
|
static Bool vendor_initialized = FALSE;
|
||||||
#endif
|
#endif
|
||||||
const char *gbm_backend_name;
|
const char *gbm_backend_name;
|
||||||
|
|
||||||
|
@ -927,6 +931,13 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GLXEXT
|
||||||
|
if (!vendor_initialized) {
|
||||||
|
GlxPushProvider(&glamor_provider);
|
||||||
|
xorgGlxCreateVendor();
|
||||||
|
vendor_initialized = TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void glamor_egl_cleanup(struct glamor_egl_screen_private *glamor_egl)
|
static void glamor_egl_cleanup(struct glamor_egl_screen_private *glamor_egl)
|
||||||
|
|
|
@ -15,7 +15,7 @@ shared_module(
|
||||||
dependency('libdrm', version: '>= 2.4.46'),
|
dependency('libdrm', version: '>= 2.4.46'),
|
||||||
gbm_dep,
|
gbm_dep,
|
||||||
],
|
],
|
||||||
link_with: glamor,
|
link_with: [glamor, libxserver_glx],
|
||||||
|
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: module_dir,
|
install_dir: module_dir,
|
||||||
|
|
Loading…
Reference in New Issue