Force Mesa to use its own call
Mesa does not support adaptive swapping but will sometimes report that it does. This prevents Mesa drivers from testing (and segfaulting) the limits of their call Fixes https://gitlab.com/kicad/code/kicad/issues/10069
This commit is contained in:
parent
76f21d950d
commit
100cf757fe
|
@ -47,12 +47,16 @@ public:
|
|||
|
||||
Display *dpy = glXGetCurrentDisplay();
|
||||
GLXDrawable drawable = glXGetCurrentDrawable();
|
||||
std::string vendor( reinterpret_cast<const char*>( glGetString( GL_VENDOR ) ) );
|
||||
bool is_mesa = ( vendor.find( "Mesa" ) != std::string::npos );
|
||||
|
||||
if( glXSwapIntervalEXT && glXQueryDrawable && dpy && drawable )
|
||||
if( !is_mesa && glXSwapIntervalEXT && glXQueryDrawable && dpy && drawable )
|
||||
{
|
||||
std::string exts( glXQueryExtensionsString( dpy, DefaultScreen( dpy ) ) );
|
||||
|
||||
if( aVal < 0 )
|
||||
{
|
||||
if( !wxGLCanvas::IsExtensionSupported( "GLX_EXT_swap_control_tear" ) )
|
||||
if( exts.find( "GLX_EXT_swap_control_tear" ) == std::string::npos )
|
||||
{
|
||||
aVal = 0;
|
||||
}
|
||||
|
@ -62,7 +66,7 @@ public:
|
|||
// we need to be sure that late/adaptive swaps are
|
||||
// enabled on the drawable.
|
||||
|
||||
unsigned lateSwapsEnabled;
|
||||
unsigned lateSwapsEnabled = 0;
|
||||
glXQueryDrawable( dpy, drawable, GLX_LATE_SWAPS_TEAR_EXT, &lateSwapsEnabled );
|
||||
|
||||
if( !lateSwapsEnabled )
|
||||
|
|
Loading…
Reference in New Issue