Skip to content

Commit

Permalink
gl: even better test to detect the nouveau driver
Browse files Browse the repository at this point in the history
Issue #1373
  • Loading branch information
flyinghead committed Jan 29, 2024
1 parent e1537dd commit 57c88e0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/rend/gles/gles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,12 @@ void findGLVersion()
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &gl.max_anisotropy);
}
#endif
gl.mesa_nouveau = !stricmp((const char *)glGetString(GL_VENDOR), "nouveau")
|| !stricmp((const char *)glGetString(GL_RENDERER), "NVE4");
const char *vendor = (const char *)glGetString(GL_VENDOR);
const char *renderer = (const char *)glGetString(GL_RENDERER);
gl.mesa_nouveau = !stricmp(vendor, "nouveau")
|| (!stricmp(vendor, "Mesa") && !strncmp(renderer, "NV", 2));
NOTICE_LOG(RENDERER, "OpenGL%s version %d.%d", gl.is_gles ? " ES" : "", gl.gl_major, gl.gl_minor);
NOTICE_LOG(RENDERER, "Vendor '%s' Renderer '%s' Version '%s'", vendor, renderer, glGetString(GL_VERSION));
while (glGetError() != GL_NO_ERROR)
;
}
Expand Down

0 comments on commit 57c88e0

Please sign in to comment.