aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
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
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')
-rw-r--r--xorg-server/glx/glxdri2.c23
-rw-r--r--xorg-server/glx/glxext.c3
-rw-r--r--xorg-server/glx/glxserver.h2
-rw-r--r--xorg-server/hw/xfree86/common/xf86AutoConfig.c1
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.c15
-rw-r--r--xorg-server/hw/xfree86/dri2/dri2.h7
-rw-r--r--xorg-server/hw/xfree86/sdksyms.sh2
-rw-r--r--xorg-server/hw/xquartz/pseudoramiX.c4
-rw-r--r--xorg-server/hw/xquartz/xpr/dri.h3
-rw-r--r--xorg-server/hw/xwin/InitOutput.c23
-rw-r--r--xorg-server/test/xtest.c1
11 files changed, 64 insertions, 20 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);
diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c
index 271ce86b6..95d58fe43 100644
--- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c
+++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c
@@ -39,6 +39,7 @@
#include "xf86Config.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
+#include "xf86platformBus.h"
#include "xf86pciBus.h"
#ifdef __sparc__
#include "xf86sbusBus.h"
diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c
index 2ea0c331e..63feed51a 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.c
+++ b/xorg-server/hw/xfree86/dri2/dri2.c
@@ -333,8 +333,9 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id,
}
int
-DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
- DRI2InvalidateProcPtr invalidate, void *priv)
+DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id,
+ DRI2InvalidateProcPtr invalidate, void *priv,
+ XID *dri2_id_out)
{
DRI2DrawablePtr pPriv;
DRI2ClientPtr dri2_client = dri2ClientPrivate(client);
@@ -354,9 +355,19 @@ DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
if (rc != Success)
return rc;
+ if (dri2_id_out)
+ *dri2_id_out = dri2_id;
+
return Success;
}
+int
+DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id,
+ DRI2InvalidateProcPtr invalidate, void *priv)
+{
+ return DRI2CreateDrawable2(client, pDraw, id, invalidate, priv, NULL);
+}
+
static int
DRI2DrawableGone(pointer p, XID id)
{
diff --git a/xorg-server/hw/xfree86/dri2/dri2.h b/xorg-server/hw/xfree86/dri2/dri2.h
index da7825e09..1e7afddbd 100644
--- a/xorg-server/hw/xfree86/dri2/dri2.h
+++ b/xorg-server/hw/xfree86/dri2/dri2.h
@@ -274,6 +274,13 @@ extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client,
DRI2InvalidateProcPtr invalidate,
void *priv);
+extern _X_EXPORT int DRI2CreateDrawable2(ClientPtr client,
+ DrawablePtr pDraw,
+ XID id,
+ DRI2InvalidateProcPtr invalidate,
+ void *priv,
+ XID *dri2_id_out);
+
extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw,
int *width,
int *height,
diff --git a/xorg-server/hw/xfree86/sdksyms.sh b/xorg-server/hw/xfree86/sdksyms.sh
index c0398da18..07372ad1c 100644
--- a/xorg-server/hw/xfree86/sdksyms.sh
+++ b/xorg-server/hw/xfree86/sdksyms.sh
@@ -46,8 +46,10 @@ cat > sdksyms.c << EOF
#include "misyncstr.h"
/* Xext/Makefile.am -- half is module, half is builtin */
+#ifdef XV
#include "xvdix.h"
#include "xvmcext.h"
+#endif
#include "geext.h"
#include "geint.h"
#ifdef MITSHM
diff --git a/xorg-server/hw/xquartz/pseudoramiX.c b/xorg-server/hw/xquartz/pseudoramiX.c
index 3e1050047..c650dd723 100644
--- a/xorg-server/hw/xquartz/pseudoramiX.c
+++ b/xorg-server/hw/xquartz/pseudoramiX.c
@@ -126,7 +126,7 @@ PseudoramiXAddScreen(int x, int y, int w, int h)
// Initialize PseudoramiX.
// Copied from PanoramiXExtensionInit
void
-PseudoramiXExtensionInit(int argc, char *argv[])
+PseudoramiXExtensionInit(void)
{
Bool success = FALSE;
ExtensionEntry *extEntry;
@@ -257,7 +257,7 @@ ProcPseudoramiXGetScreenSize(ClientPtr client)
REQUEST(xPanoramiXGetScreenSizeReq);
WindowPtr pWin;
xPanoramiXGetScreenSizeReply rep;
- register int n, rc;
+ register int rc;
TRACE();
diff --git a/xorg-server/hw/xquartz/xpr/dri.h b/xorg-server/hw/xquartz/xpr/dri.h
index 7d1c4f212..8717a5186 100644
--- a/xorg-server/hw/xquartz/xpr/dri.h
+++ b/xorg-server/hw/xquartz/xpr/dri.h
@@ -72,6 +72,9 @@ DRIFinishScreenInit(ScreenPtr pScreen);
extern void
DRICloseScreen(ScreenPtr pScreen);
+extern Bool
+DRIExtensionInit(void);
+
extern void
DRIReset(void);
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 4d0df110f..538b2e101 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -147,15 +147,30 @@ winClipboardShutdown(void)
}
#endif
-void
-ddxPushProviders(void)
+static const ExtensionModule xwinExtensions[] = {
+#ifdef GLXEXT
+ { GlxExtensionInit, "GLX", &noGlxExtension },
+#endif
+};
+
+/*
+ * XwinExtensionInit
+ * Initialises Xwin-specific extensions.
+ */
+static
+void XwinExtensionInit(void)
{
+ int i;
+
#ifdef XWIN_GLX_WINDOWS
- if (g_fNativeGl) {
+ if ((g_fNativeGl) && (serverGeneration == 1)) {
/* install the native GL provider */
glxWinPushNativeProvider();
}
#endif
+
+ for (i = 0; i < ARRAY_SIZE(xwinExtensions); i++)
+ LoadExtension(&xwinExtensions[i], TRUE);
}
#if defined(DDXBEFORERESET)
@@ -885,6 +900,8 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[])
{
int i;
+ XwinExtensionInit();
+
/* Log the command line */
winLogCommandLine(argc, argv);
diff --git a/xorg-server/test/xtest.c b/xorg-server/test/xtest.c
index 402d9ceba..e5e5241b7 100644
--- a/xorg-server/test/xtest.c
+++ b/xorg-server/test/xtest.c
@@ -30,6 +30,7 @@
#include "inputstr.h"
#include "scrnintstr.h"
#include "exevents.h"
+#include "extinit.h"
#include "xkbsrv.h"
#include "xserver-properties.h"
#include "syncsrv.h"