diff options
author | marha <marha@users.sourceforge.net> | 2012-07-13 12:16:00 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-07-13 12:16:00 +0200 |
commit | dcf9ae77854778629cabd0d6943dda3678eb91fa (patch) | |
tree | 087d3bb4beb55bcc0c5857b41d2b5b10edd0e2f3 /xorg-server/glx/glxdri2.c | |
parent | 2c8d7aa6bda138693fa1827852ba6b75d1721ff8 (diff) | |
parent | f0a7d1d88be0c31bd471f4428c4493a93f2d9321 (diff) | |
download | vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.gz vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.tar.bz2 vcxsrv-dcf9ae77854778629cabd0d6943dda3678eb91fa.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
xorg-server/glx/glxext.c
xorg-server/hw/xwin/InitOutput.c
Diffstat (limited to 'xorg-server/glx/glxdri2.c')
-rw-r--r-- | xorg-server/glx/glxdri2.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c index 909de706a..bce1bfa4b 100644 --- a/xorg-server/glx/glxdri2.c +++ b/xorg-server/glx/glxdri2.c @@ -106,6 +106,7 @@ struct __GLXDRIdrawable { int height; __DRIbuffer buffers[MAX_DRAWABLE_BUFFERS]; int count; + XID dri2_id; }; static void @@ -114,6 +115,8 @@ __glXDRIdrawableDestroy(__GLXdrawable * drawable) __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; const __DRIcoreExtension *core = private->screen->core; + FreeResource(private->dri2_id, FALSE); + (*core->destroyDrawable) (private->driDrawable); __glXDrawableRelease(drawable); @@ -390,7 +393,8 @@ __glXDRIscreenDestroy(__GLXscreen * baseScreen) } static Bool -dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs, +dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs, + const uint32_t *attribs, unsigned *major_ver, unsigned *minor_ver, uint32_t *flags, int *api, int *reset, unsigned *error) { @@ -482,8 +486,8 @@ dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs, * don't support OpenGL 3.2 may fail the request for a core profile. */ if (*api == __DRI_API_OPENGL_CORE - && (*major_ver < 3 || (*major_ver < 3 && *minor_ver < 2))) { - *api == __DRI_API_OPENGL; + && (*major_ver < 3 || (*major_ver == 3 && *minor_ver < 2))) { + *api = __DRI_API_OPENGL; } *error = Success; @@ -513,11 +517,11 @@ create_driver_context(__GLXDRIcontext * context, int api; if (num_attribs != 0) { - if (!dri2_convert_glx_attribs(num_attribs, attribs, + if (!dri2_convert_glx_attribs(screen, num_attribs, attribs, &major_ver, &minor_ver, &flags, &api, &reset, (unsigned *) error)) - return NULL; + return; ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION; ctx_attribs[num_ctx_attribs++] = major_ver; @@ -534,9 +538,9 @@ create_driver_context(__GLXDRIcontext * context, } #ifdef __DRI2_ROBUSTNESS - if (reset != __DRI_CTX_NO_RESET_NOTIFICATION) { + if (reset != __DRI_CTX_RESET_NO_NOTIFICATION) { ctx_attribs[num_ctx_attribs++] = - __DRI_CTX_ATTRIB_RESET_NOTIFICATION; + __DRI_CTX_ATTRIB_RESET_STRATEGY; ctx_attribs[num_ctx_attribs++] = reset; } #endif @@ -670,8 +674,9 @@ __glXDRIscreenCreateDrawable(ClientPtr client, private->base.waitGL = __glXDRIdrawableWaitGL; private->base.waitX = __glXDRIdrawableWaitX; - if (DRI2CreateDrawable(client, pDraw, drawId, - __glXDRIinvalidateBuffers, private)) { + if (DRI2CreateDrawable2(client, pDraw, drawId, + __glXDRIinvalidateBuffers, private, + &private->dri2_id)) { free(private); return NULL; } |