glx/drirc: add a force_direct_glx_context option
Some applications may request an indirect context but this feature is disabled by default on Xorg and thus context creation will fail. This commit adds a drirc setting to force the creation of direct glx context, regardless of what the app is requesting. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13246>
This commit is contained in:
@@ -1014,6 +1014,14 @@ dri3_create_screen(int screen, struct glx_display * priv)
|
||||
&tmp) == 0)
|
||||
__IndirectGlParseExtensionOverride(&psc->base, tmp);
|
||||
|
||||
if (psc->config->base.version > 1) {
|
||||
uint8_t force = false;
|
||||
if (psc->config->configQueryb(psc->driScreen, "force_direct_glx_context",
|
||||
&force) == 0) {
|
||||
psc->base.force_direct_context = force;
|
||||
}
|
||||
}
|
||||
|
||||
free(driverName);
|
||||
|
||||
tmp = getenv("LIBGL_SHOW_FPS");
|
||||
|
Reference in New Issue
Block a user