aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-15 07:50:39 +0000
committermarha <marha@users.sourceforge.net>2010-04-15 07:50:39 +0000
commit6412df1b3df28c6213b43821c4a98cc3857d9a3f (patch)
treed26e725c65f2166ac78d4ee4e56176712a563483 /xorg-server
parentb71f397671d4b467bfac21f208d54d2dc507969c (diff)
downloadvcxsrv-6412df1b3df28c6213b43821c4a98cc3857d9a3f.tar.gz
vcxsrv-6412df1b3df28c6213b43821c4a98cc3857d9a3f.tar.bz2
vcxsrv-6412df1b3df28c6213b43821c4a98cc3857d9a3f.zip
Git update 15/4/2010
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/Xext/geext.c13
-rw-r--r--xorg-server/Xext/geint.h3
-rw-r--r--xorg-server/dix/extension.c5
-rw-r--r--xorg-server/exa/exa_accel.c2
-rw-r--r--xorg-server/glx/glxdri.c7
-rw-r--r--xorg-server/glx/glxdri2.c28
-rw-r--r--xorg-server/glx/glxdricommon.c13
-rw-r--r--xorg-server/glx/glxdricommon.h3
-rw-r--r--xorg-server/glx/glxdriswrast.c5
-rw-r--r--xorg-server/include/protocol-versions.h4
10 files changed, 36 insertions, 47 deletions
diff --git a/xorg-server/Xext/geext.c b/xorg-server/Xext/geext.c
index 2ba0ca824..f0a3d8778 100644
--- a/xorg-server/Xext/geext.c
+++ b/xorg-server/Xext/geext.c
@@ -36,11 +36,8 @@
#define rClient(obj) (clients[CLIENT_ID((obj)->resource)])
-int GEEventBase;
-int GEErrorBase;
static int GEClientPrivateKeyIndex;
DevPrivateKey GEClientPrivateKey = &GEClientPrivateKeyIndex;
-int GEEventType; /* The opcode for all GenericEvents will have. */
int RT_GECLIENT = 0;
@@ -178,10 +175,6 @@ GEResetProc(ExtensionEntry *extEntry)
{
DeleteCallback(&ClientStateCallback, GEClientCallback, 0);
EventSwapVector[GenericEvent] = NotImplemented;
-
- GEEventBase = 0;
- GEErrorBase = 0;
- GEEventType = 0;
}
/* Calls the registered event swap function for the extension.
@@ -225,14 +218,10 @@ GEExtensionInit(void)
}
if((extEntry = AddExtension(GE_NAME,
- GENumberEvents, GENumberErrors,
+ 0, GENumberErrors,
ProcGEDispatch, SProcGEDispatch,
GEResetProc, StandardMinorOpcode)) != 0)
{
- GEEventBase = extEntry->eventBase;
- GEErrorBase = extEntry->errorBase;
- GEEventType = GEEventBase;
-
memset(GEExtensions, 0, sizeof(GEExtensions));
EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent;
diff --git a/xorg-server/Xext/geint.h b/xorg-server/Xext/geint.h
index 881d30661..10a33cea3 100644
--- a/xorg-server/Xext/geint.h
+++ b/xorg-server/Xext/geint.h
@@ -37,9 +37,6 @@
#include "extnsionst.h"
#include <X11/extensions/geproto.h>
-extern _X_EXPORT int GEEventType;
-extern _X_EXPORT int GEEventBase;
-extern _X_EXPORT int GEErrorBase;
extern _X_EXPORT DevPrivateKey GEClientPrivateKey;
typedef struct _GEClientInfo {
diff --git a/xorg-server/dix/extension.c b/xorg-server/dix/extension.c
index fb83af148..f34866586 100644
--- a/xorg-server/dix/extension.c
+++ b/xorg-server/dix/extension.c
@@ -83,8 +83,11 @@ AddExtension(char *name, int NumEvents, int NumErrors,
if (!MainProc || !SwappedMainProc || !MinorOpcodeProc)
return((ExtensionEntry *) NULL);
if ((lastEvent + NumEvents > LAST_EVENT) ||
- (unsigned)(lastError + NumErrors > LAST_ERROR))
+ (unsigned)(lastError + NumErrors > LAST_ERROR)) {
+ LogMessage(X_ERROR, "Not enabling extension %s: maximum number of "
+ "events or errors exceeded.\n", name);
return((ExtensionEntry *) NULL);
+ }
ext = xalloc(sizeof(ExtensionEntry));
if (!ext)
diff --git a/xorg-server/exa/exa_accel.c b/xorg-server/exa/exa_accel.c
index 4680c3709..57029fdc5 100644
--- a/xorg-server/exa/exa_accel.c
+++ b/xorg-server/exa/exa_accel.c
@@ -512,7 +512,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
*
* Only taking this path for directly accessible pixmaps.
*/
- } else if (!pDstExaPixmap->pDamage) {
+ } else if (!pDstExaPixmap->pDamage && pSrcExaPixmap->sys_ptr) {
int bpp = pSrcDrawable->bitsPerPixel;
int src_stride = exaGetPixmapPitch(pSrcPixmap);
CARD8 *src = NULL;
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c
index 21e44d12d..9810a73a7 100644
--- a/xorg-server/glx/glxdri.c
+++ b/xorg-server/glx/glxdri.c
@@ -35,6 +35,7 @@
#include <drm.h>
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
+#include <GL/glxtokens.h>
#include <windowstr.h>
#include <os.h>
@@ -939,9 +940,6 @@ initializeExtensions(__GLXDRIscreen *screen)
}
}
-extern __GLXconfig *
-glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
-
static __GLXscreen *
__glXDRIscreenProbe(ScreenPtr pScreen)
{
@@ -1131,7 +1129,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
goto handle_error;
}
- screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
+ screen->base.fbconfigs = glxConvertConfigs(screen->core,
+ driConfigs, GLX_WINDOW_BIT);
initializeExtensions(screen);
diff --git a/xorg-server/glx/glxdri2.c b/xorg-server/glx/glxdri2.c
index edd29b0e1..4c9f381c6 100644
--- a/xorg-server/glx/glxdri2.c
+++ b/xorg-server/glx/glxdri2.c
@@ -616,6 +616,7 @@ glxDRILeaveVT (int index, int flags)
static void
initializeExtensions(__GLXDRIscreen *screen)
{
+ ScreenPtr pScreen = screen->base.pScreen;
const __DRIextension **extensions;
int i;
@@ -625,10 +626,17 @@ initializeExtensions(__GLXDRIscreen *screen)
"GLX_MESA_copy_sub_buffer");
LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n");
- /* FIXME: only if DDX supports it */
__glXEnableExtension(screen->glx_enable_bits, "GLX_INTEL_swap_event");
LogMessage(X_INFO, "AIGLX: enabled GLX_INTEL_swap_event\n");
+ if (DRI2HasSwapControl(pScreen)) {
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_SGI_swap_control");
+ __glXEnableExtension(screen->glx_enable_bits,
+ "GLX_MESA_swap_control");
+ LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n");
+ }
+
for (i = 0; extensions[i]; i++) {
#ifdef __DRI_READ_DRAWABLE
if (strcmp(extensions[i]->name, __DRI_READ_DRAWABLE) == 0) {
@@ -639,19 +647,6 @@ initializeExtensions(__GLXDRIscreen *screen)
}
#endif
-#ifdef __DRI_SWAP_CONTROL
- if (strcmp(extensions[i]->name, __DRI_SWAP_CONTROL) == 0) {
- screen->swapControl =
- (const __DRIswapControlExtension *) extensions[i];
- __glXEnableExtension(screen->glx_enable_bits,
- "GLX_SGI_swap_control");
- __glXEnableExtension(screen->glx_enable_bits,
- "GLX_MESA_swap_control");
-
- LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n");
- }
-#endif
-
#ifdef __DRI_TEX_BUFFER
if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
screen->texBuffer =
@@ -753,7 +748,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
initializeExtensions(screen);
- screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
+ screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs,
+ GLX_WINDOW_BIT |
+ GLX_PIXMAP_BIT |
+ GLX_PBUFFER_BIT);
__glXScreenInit(&screen->base, pScreen);
diff --git a/xorg-server/glx/glxdricommon.c b/xorg-server/glx/glxdricommon.c
index faaa3b7ae..454aa5587 100644
--- a/xorg-server/glx/glxdricommon.c
+++ b/xorg-server/glx/glxdricommon.c
@@ -121,7 +121,7 @@ setScalar(__GLXconfig *config, unsigned int attrib, unsigned int value)
static __GLXconfig *
createModeFromConfig(const __DRIcoreExtension *core,
const __DRIconfig *driConfig,
- unsigned int visualType)
+ unsigned int visualType, unsigned int drawableType)
{
__GLXDRIconfig *config;
unsigned int attrib, value;
@@ -167,13 +167,14 @@ createModeFromConfig(const __DRIcoreExtension *core,
config->config.next = NULL;
config->config.xRenderable = GL_TRUE;
config->config.visualType = visualType;
- config->config.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT;
+ config->config.drawableType = drawableType;
return &config->config;
}
__GLXconfig *
-glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
+glxConvertConfigs(const __DRIcoreExtension *core,
+ const __DRIconfig **configs, unsigned int drawableType)
{
__GLXconfig head, *tail;
int i;
@@ -183,7 +184,8 @@ glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
for (i = 0; configs[i]; i++) {
tail->next = createModeFromConfig(core,
- configs[i], GLX_TRUE_COLOR);
+ configs[i], GLX_TRUE_COLOR,
+ drawableType);
if (tail->next == NULL)
break;
@@ -192,7 +194,8 @@ glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
for (i = 0; configs[i]; i++) {
tail->next = createModeFromConfig(core,
- configs[i], GLX_DIRECT_COLOR);
+ configs[i], GLX_DIRECT_COLOR,
+ drawableType);
if (tail->next == NULL)
break;
diff --git a/xorg-server/glx/glxdricommon.h b/xorg-server/glx/glxdricommon.h
index f88964b36..41e2d2770 100644
--- a/xorg-server/glx/glxdricommon.h
+++ b/xorg-server/glx/glxdricommon.h
@@ -33,7 +33,8 @@ struct __GLXDRIconfig {
};
__GLXconfig *
-glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
+glxConvertConfigs(const __DRIcoreExtension *core,
+ const __DRIconfig **configs, unsigned int drawableType);
extern const __DRIsystemTimeExtension systemTimeExtension;
diff --git a/xorg-server/glx/glxdriswrast.c b/xorg-server/glx/glxdriswrast.c
index c647d83ca..918383cf0 100644
--- a/xorg-server/glx/glxdriswrast.c
+++ b/xorg-server/glx/glxdriswrast.c
@@ -506,7 +506,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
initializeExtensions(screen);
- screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
+ screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs,
+ GLX_WINDOW_BIT |
+ GLX_PIXMAP_BIT |
+ GLX_PBUFFER_BIT);
__glXScreenInit(&screen->base, pScreen);
diff --git a/xorg-server/include/protocol-versions.h b/xorg-server/include/protocol-versions.h
index c74b7faf0..97ef5dad5 100644
--- a/xorg-server/include/protocol-versions.h
+++ b/xorg-server/include/protocol-versions.h
@@ -51,10 +51,6 @@
#define SERVER_DMX_MINOR_VERSION 2
#define SERVER_DMX_PATCH_VERSION 20040604
-/* DRI2 */
-#define SERVER_DRI2_MAJOR_VERSION 1
-#define SERVER_DRI2_MINOR_VERSION 2
-
/* Generic event extension */
#define SERVER_GE_MAJOR_VERSION 1
#define SERVER_GE_MINOR_VERSION 0