Commit bb26de88 authored by Keith Packard's avatar Keith Packard
Browse files

Fallback to driver glX functions when libGL wrappers don't exist



If a driver supplies a glX function, but the libGL wrapper code
doesn't exist (possibly due to an un-supported architecture), then
just return the driver function as that will at least work for
applications using a single driver.

This wasa found on RISC-V, which doesn't have native libglvnd support
yet, and when applications request glX functions that are provided by
libGL, like glXSwapIntervalEXT. I think the problem is that on RISC-V,
we cannot generate wrappers on the fly for these, and so we end up
with a NULL libGL wrapper function, which causes applications to crash.

Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 1457209a
Pipeline #259159 passed with stages
in 3 minutes and 50 seconds
......@@ -207,7 +207,9 @@ __GLXextFuncPtr __glXGetGLXDispatchAddress(const GLubyte *procName)
if (addr != NULL) {
// This is a GL function, so get a dispatch stub from
// libGLdispatch.
addr = __glDispatchGetProcAddress((const char *) procName);
__GLXextFuncPtr naddr = __glDispatchGetProcAddress((const char *) procName);
if (naddr)
addr = naddr;
isGLX = False;
} else {
// None of the vendor libraries provide the function in either
......
Supports Markdown
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