Commit ab9c8e30 authored by Bastien Nocera's avatar Bastien Nocera

g-s-check-acceleration: Detect when NVidia renderer name is requested

Those 2 new envvars could be set by gnome-control-center to print the
renderer for non-Mesa cards, in particular NVidia cards running the
nvidia proprietary driver.
parent 60e619b8
......@@ -115,12 +115,14 @@ get_gtk_gles_renderer (void)
static gboolean
is_discrete_gpu_check (void)
{
const char *dri_prime;
const char *dri_prime, *nv_prime, *glx_vendor_name;
dri_prime = g_getenv ("DRI_PRIME");
if (!dri_prime)
return FALSE;
if (*dri_prime != '1')
nv_prime = g_getenv ("__NV_PRIME_RENDER_OFFLOAD");
glx_vendor_name = g_getenv ("__GLX_VENDOR_LIBRARY_NAME");
if (!dri_prime &&
!nv_prime &&
!glx_vendor_name)
return FALSE;
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment