aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-13 10:11:58 +0200
committermarha <marha@users.sourceforge.net>2012-07-13 10:11:58 +0200
commitf0a7d1d88be0c31bd471f4428c4493a93f2d9321 (patch)
tree15b5078011dc751f9c1a1bb21e51dc2e600ee205 /xorg-server/glx
parent165450290d6c26756ede118f52ba2164abce7c9a (diff)
downloadvcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.tar.gz
vcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.tar.bz2
vcxsrv-f0a7d1d88be0c31bd471f4428c4493a93f2d9321.zip
xserver mesa git update 13 Jul 2012
Diffstat (limited to 'xorg-server/glx')
-rw-r--r--xorg-server/glx/glxdri2.c23
-rw-r--r--xorg-server/glx/glxext.c3
-rw-r--r--xorg-server/glx/glxserver.h2
3 files changed, 15 insertions, 13 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;
}
diff --git a/xorg-server/glx/glxext.c b/xorg-server/glx/glxext.c
index a1f9d42e9..70f0df892 100644
--- a/xorg-server/glx/glxext.c
+++ b/xorg-server/glx/glxext.c
@@ -339,9 +339,6 @@ GlxExtensionInit(void)
if (!__glXContextRes || !__glXDrawableRes)
return;
- if (serverGeneration == 1)
- GlxPushProvider(&__glXDRISWRastProvider);
-
if (!dixRegisterPrivateKey
(&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState)))
return;
diff --git a/xorg-server/glx/glxserver.h b/xorg-server/glx/glxserver.h
index d9b106b82..1021aec80 100644
--- a/xorg-server/glx/glxserver.h
+++ b/xorg-server/glx/glxserver.h
@@ -97,7 +97,7 @@ struct __GLXprovider {
const char *name;
__GLXprovider *next;
};
-__GLXprovider __glXDRISWRastProvider;
+extern __GLXprovider __glXDRISWRastProvider;
void GlxPushProvider(__GLXprovider * provider);