glx: Remove excess screen parameter from CreateContext

This is effectively looked up from the config anyway, which we're
already passing in.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17422>
This commit is contained in:
Adam Jackson 2022-07-01 11:50:04 -04:00 committed by Marge Bot
parent 215200d8f1
commit 1255d370b7
1 changed files with 8 additions and 10 deletions

View File

@ -318,7 +318,7 @@ __glXIsDirect(Display * dpy, GLXContextID contextID, Bool *error)
static GLXContext static GLXContext
CreateContext(Display *dpy, int generic_id, struct glx_config *config, CreateContext(Display *dpy, int generic_id, struct glx_config *config,
GLXContext shareList_user, Bool allowDirect, GLXContext shareList_user, Bool allowDirect,
unsigned code, int renderType, int screen) unsigned code, int renderType)
{ {
struct glx_context *gc; struct glx_context *gc;
struct glx_screen *psc; struct glx_screen *psc;
@ -326,7 +326,7 @@ CreateContext(Display *dpy, int generic_id, struct glx_config *config,
if (dpy == NULL) if (dpy == NULL)
return NULL; return NULL;
psc = GetGLXScreenConfigs(dpy, screen); psc = GetGLXScreenConfigs(dpy, config->screen);
if (psc == NULL) if (psc == NULL)
return NULL; return NULL;
@ -364,7 +364,7 @@ CreateContext(Display *dpy, int generic_id, struct glx_config *config,
req->glxCode = X_GLXCreateContext; req->glxCode = X_GLXCreateContext;
req->context = gc->xid = XAllocID(dpy); req->context = gc->xid = XAllocID(dpy);
req->visual = generic_id; req->visual = generic_id;
req->screen = screen; req->screen = config->screen;
req->shareList = shareList ? shareList->xid : None; req->shareList = shareList ? shareList->xid : None;
req->isDirect = gc->isDirect; req->isDirect = gc->isDirect;
break; break;
@ -379,7 +379,7 @@ CreateContext(Display *dpy, int generic_id, struct glx_config *config,
req->glxCode = X_GLXCreateNewContext; req->glxCode = X_GLXCreateNewContext;
req->context = gc->xid = XAllocID(dpy); req->context = gc->xid = XAllocID(dpy);
req->fbconfig = generic_id; req->fbconfig = generic_id;
req->screen = screen; req->screen = config->screen;
req->renderType = renderType; req->renderType = renderType;
req->shareList = shareList ? shareList->xid : None; req->shareList = shareList ? shareList->xid : None;
req->isDirect = gc->isDirect; req->isDirect = gc->isDirect;
@ -400,7 +400,7 @@ CreateContext(Display *dpy, int generic_id, struct glx_config *config,
req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX; req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX;
req->context = gc->xid = XAllocID(dpy); req->context = gc->xid = XAllocID(dpy);
req->fbconfig = generic_id; req->fbconfig = generic_id;
req->screen = screen; req->screen = config->screen;
req->renderType = renderType; req->renderType = renderType;
req->shareList = shareList ? shareList->xid : None; req->shareList = shareList ? shareList->xid : None;
req->isDirect = gc->isDirect; req->isDirect = gc->isDirect;
@ -472,7 +472,7 @@ glXCreateContext(Display * dpy, XVisualInfo * vis,
#endif #endif
return CreateContext(dpy, vis->visualid, config, shareList, allowDirect, return CreateContext(dpy, vis->visualid, config, shareList, allowDirect,
X_GLXCreateContext, renderType, vis->screen); X_GLXCreateContext, renderType);
} }
static void static void
@ -1645,8 +1645,7 @@ glXCreateNewContext(Display * dpy, GLXFBConfig fbconfig,
} }
return CreateContext(dpy, config->fbconfigID, config, shareList, return CreateContext(dpy, config->fbconfigID, config, shareList,
allowDirect, X_GLXCreateNewContext, renderType, allowDirect, X_GLXCreateNewContext, renderType);
config->screen);
} }
@ -2045,8 +2044,7 @@ glXCreateContextWithConfigSGIX(Display * dpy,
&& __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit)) { && __glXExtensionBitIsEnabled(psc, SGIX_fbconfig_bit)) {
gc = CreateContext(dpy, config->fbconfigID, config, shareList, gc = CreateContext(dpy, config->fbconfigID, config, shareList,
allowDirect, allowDirect,
X_GLXvop_CreateContextWithConfigSGIX, renderType, X_GLXvop_CreateContextWithConfigSGIX, renderType);
config->screen);
} }
return gc; return gc;