mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 15:48:36 +02:00
egl,glx,wgl: Fixes stapi->createContext usage
Fixed the build failure, fixed a warning where attributs and error arguments had been inverted and fixed another call that was missing an argument. Signed-off-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
e71375d375
commit
3258cd9e61
3 changed files with 9 additions and 6 deletions
|
|
@ -150,6 +150,7 @@ egl_g3d_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
|
|||
struct egl_g3d_config *gconf = egl_g3d_config(conf);
|
||||
struct egl_g3d_context *gctx;
|
||||
struct st_context_attribs stattribs;
|
||||
enum st_context_error ctx_err = 0;
|
||||
|
||||
gctx = CALLOC_STRUCT(egl_g3d_context);
|
||||
if (!gctx) {
|
||||
|
|
@ -172,8 +173,8 @@ egl_g3d_create_context(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
gctx->stctxi = gctx->stapi->create_context(gctx->stapi, gdpy->smapi,
|
||||
&stattribs, (gshare) ? gshare->stctxi : NULL);
|
||||
gctx->stctxi = gctx->stapi->create_context(gctx->stapi, gdpy->smapi,
|
||||
&stattribs, &ctx_err, (gshare) ? gshare->stctxi : NULL);
|
||||
if (!gctx->stctxi) {
|
||||
FREE(gctx);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -863,6 +863,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
|
|||
{
|
||||
XMesaDisplay xmdpy = xmesa_init_display(v->display);
|
||||
struct st_context_attribs attribs;
|
||||
enum st_context_error ctx_err = 0;
|
||||
XMesaContext c;
|
||||
|
||||
if (!xmdpy)
|
||||
|
|
@ -905,8 +906,8 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list,
|
|||
&& ((profileMask & GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB) == 0))
|
||||
attribs.profile = ST_PROFILE_OPENGL_CORE;
|
||||
|
||||
c->st = stapi->create_context(stapi, xmdpy->smapi,
|
||||
&attribs, (share_list) ? share_list->st : NULL);
|
||||
c->st = stapi->create_context(stapi, xmdpy->smapi, &attribs,
|
||||
&ctx_err, (share_list) ? share_list->st : NULL);
|
||||
if (c->st == NULL)
|
||||
goto fail;
|
||||
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ stw_create_context_attribs(
|
|||
struct st_context_attribs attribs;
|
||||
struct stw_context *ctx = NULL;
|
||||
struct stw_context *shareCtx = NULL;
|
||||
enum st_context_error ctx_err = 0;
|
||||
|
||||
if (!stw_dev)
|
||||
return 0;
|
||||
|
|
@ -190,12 +191,12 @@ stw_create_context_attribs(
|
|||
* WGL_CONTEXT_CORE_PROFILE_BIT_ARB."
|
||||
*/
|
||||
attribs.profile = ST_PROFILE_DEFAULT;
|
||||
if ((major > 3 || (major == 3 && minor >= 2))
|
||||
if ((majorVersion > 3 || (majorVersion == 3 && minorVersion >= 2))
|
||||
&& ((profileMask & WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB) == 0))
|
||||
attribs.profile = ST_PROFILE_OPENGL_CORE;
|
||||
|
||||
ctx->st = stw_dev->stapi->create_context(stw_dev->stapi,
|
||||
stw_dev->smapi, &attribs, shareCtx ? shareCtx->st : NULL);
|
||||
stw_dev->smapi, &attribs, &ctx_err, shareCtx ? shareCtx->st : NULL);
|
||||
if (ctx->st == NULL)
|
||||
goto no_st_ctx;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue