mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
glx: Provide glvnd wrapper for glXSwapIntervalEXT
When using glvnd, this function needs to be exposed through
getDispatchAddress or libglvnd will not find it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fixes: 60ebeb4608 "glx: Implement GLX_EXT_swap_control for DRI2 and DRI3"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8621>
This commit is contained in:
parent
8588fb65d6
commit
d548d781ee
2 changed files with 21 additions and 0 deletions
|
|
@ -87,6 +87,7 @@ const char * const __glXDispatchTableStrings[DI_LAST_INDEX] = {
|
|||
__ATTRIB(SelectEventSGIX),
|
||||
// glXSwapBuffers implemented by libglvnd
|
||||
__ATTRIB(SwapBuffersMscOML),
|
||||
__ATTRIB(SwapIntervalEXT),
|
||||
__ATTRIB(SwapIntervalMESA),
|
||||
__ATTRIB(SwapIntervalSGI),
|
||||
// glXUseXFont implemented by libglvnd
|
||||
|
|
@ -893,6 +894,24 @@ static int dispatch_SwapIntervalMESA(unsigned int interval)
|
|||
|
||||
|
||||
|
||||
static void dispatch_SwapIntervalEXT(Display *dpy, GLXDrawable drawable, int interval)
|
||||
{
|
||||
PFNGLXSWAPINTERVALEXTPROC pSwapIntervalEXT;
|
||||
__GLXvendorInfo *dd;
|
||||
|
||||
dd = GetDispatchFromDrawable(dpy, drawable);
|
||||
if (dd == NULL)
|
||||
return;
|
||||
|
||||
__FETCH_FUNCTION_PTR(SwapIntervalEXT);
|
||||
if (pSwapIntervalEXT == NULL)
|
||||
return;
|
||||
|
||||
pSwapIntervalEXT(dpy, drawable, interval);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static Bool dispatch_WaitForMscOML(Display *dpy, GLXDrawable drawable,
|
||||
int64_t target_msc, int64_t divisor,
|
||||
int64_t remainder, int64_t *ust,
|
||||
|
|
@ -974,6 +993,7 @@ const void * const __glXDispatchFunctions[DI_LAST_INDEX + 1] = {
|
|||
__ATTRIB(ReleaseTexImageEXT),
|
||||
__ATTRIB(SelectEventSGIX),
|
||||
__ATTRIB(SwapBuffersMscOML),
|
||||
__ATTRIB(SwapIntervalEXT),
|
||||
__ATTRIB(SwapIntervalMESA),
|
||||
__ATTRIB(SwapIntervalSGI),
|
||||
__ATTRIB(WaitForMscOML),
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ typedef enum __GLXdispatchIndex {
|
|||
DI_SelectEventSGIX,
|
||||
// SwapBuffers implemented by libglvnd
|
||||
DI_SwapBuffersMscOML,
|
||||
DI_SwapIntervalEXT,
|
||||
DI_SwapIntervalMESA,
|
||||
DI_SwapIntervalSGI,
|
||||
// UseXFont implemented by libglvnd
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue