mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 01:34:11 +00:00
kdrive/fbdev: Allow forcing glamor to create GL/GLES contexts only
This brings Xfbdev's glamor code in line with glamor/glamor_egl.c Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
ebd217aafb
commit
04a30c2719
@@ -18,6 +18,9 @@
|
||||
|
||||
const char *fbdev_glvnd_provider = "mesa";
|
||||
|
||||
Bool es_allowed = TRUE;
|
||||
Bool force_es = FALSE;
|
||||
|
||||
static void
|
||||
fbdev_glamor_egl_cleanup(FbdevScrPriv *scrpriv)
|
||||
{
|
||||
@@ -310,11 +313,11 @@ fbdev_glamor_egl_try_gles_api(FbdevScrPriv *scrpriv)
|
||||
static Bool
|
||||
fbdev_glamor_bind_gl_api(FbdevScrPriv *scrpriv)
|
||||
{
|
||||
if (fbdev_glamor_egl_try_big_gl_api(scrpriv)) {
|
||||
if (!force_es && fbdev_glamor_egl_try_big_gl_api(scrpriv)) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return fbdev_glamor_egl_try_gles_api(scrpriv);
|
||||
return es_allowed && fbdev_glamor_egl_try_gles_api(scrpriv);
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
||||
@@ -64,6 +64,8 @@ extern Bool fbDisableShadow;
|
||||
|
||||
#if defined(GLAMOR) && defined(GLXEXT)
|
||||
extern const char *fbdev_glvnd_provider;
|
||||
extern Bool es_allowed;
|
||||
extern Bool force_es;
|
||||
#endif
|
||||
|
||||
Bool fbdevCardInit(KdCardInfo * card);
|
||||
|
||||
@@ -72,6 +72,10 @@ ddxUseMsg(void)
|
||||
("-noshadow Disable the ShadowFB layer if possible\n");
|
||||
ErrorF
|
||||
("-glvendor Suggest what glvnd vendor library should be used\n");
|
||||
ErrorF
|
||||
("-force-gl Force glamor to only use GL contexts\n");
|
||||
ErrorF
|
||||
("-force-es Force glamor to only use GLES contexts\n");
|
||||
ErrorF("\n");
|
||||
}
|
||||
|
||||
@@ -101,6 +105,16 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||
UseMsg();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[i], "-force-gl")) {
|
||||
es_allowed = FALSE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcmp(argv[i], "-force-es")) {
|
||||
force_es = TRUE;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return KdProcessArgument(argc, argv, i);
|
||||
|
||||
Reference in New Issue
Block a user