glx: proposed fix for setSwapInterval

When mesa gets a DRI2 1.1 connection (as experienced with
vmwware DDX) we don't get a pointer for this.

Don't explode just keep going.

Fixes: 60ebeb4608 ("glx: Implement GLX_EXT_swap_control for DRI2 and DRI3")
Reviewed-by: Adam Jackson <ajaX@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9184>
(cherry picked from commit 279d170552)
This commit is contained in:
Dave Airlie 2021-02-22 15:57:01 +10:00 committed by Dylan Baker
parent 5f4d7d99d7
commit c96144f04d
2 changed files with 3 additions and 3 deletions

View file

@ -2353,7 +2353,7 @@
"description": "glx: proposed fix for setSwapInterval",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "60ebeb4608a871ba89ba081c1c6e7ebdd5efec9a"
},

View file

@ -1863,8 +1863,8 @@ glXSwapIntervalEXT(Display *dpy, GLXDrawable drawable, int interval)
__glXSendError(dpy, BadValue, interval, 0, True);
return;
}
pdraw->psc->driScreen->setSwapInterval(pdraw, interval);
if (pdraw->psc->driScreen->setSwapInterval)
pdraw->psc->driScreen->setSwapInterval(pdraw, interval);
#endif
}