diff options
author | marha <marha@users.sourceforge.net> | 2010-04-15 12:37:07 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-15 12:37:07 +0000 |
commit | 8654ee514b4d79feec936501717a06892090d3b7 (patch) | |
tree | 2787608c117268bc6ed9e399ea57b8e1d0aeb8e3 /xorg-server/glx | |
parent | eb405babefc73e25ab8b7e6229709f85ef6a67b1 (diff) | |
download | vcxsrv-8654ee514b4d79feec936501717a06892090d3b7.tar.gz vcxsrv-8654ee514b4d79feec936501717a06892090d3b7.tar.bz2 vcxsrv-8654ee514b4d79feec936501717a06892090d3b7.zip |
svn merge -r530:HEAD "^/branches/released" .
Diffstat (limited to 'xorg-server/glx')
-rw-r--r-- | xorg-server/glx/glxdri.c | 7 | ||||
-rw-r--r-- | xorg-server/glx/glxdri2.c | 28 | ||||
-rw-r--r-- | xorg-server/glx/glxdricommon.c | 13 | ||||
-rw-r--r-- | xorg-server/glx/glxdricommon.h | 3 | ||||
-rw-r--r-- | xorg-server/glx/glxdriswrast.c | 5 |
5 files changed, 30 insertions, 26 deletions
diff --git a/xorg-server/glx/glxdri.c b/xorg-server/glx/glxdri.c index 910eb464e..7c5e781e6 100644 --- a/xorg-server/glx/glxdri.c +++ b/xorg-server/glx/glxdri.c @@ -38,6 +38,7 @@ #include <GL/gl.h>
#include <GL/internal/dri_interface.h>
+#include <GL/glxtokens.h>
#include <windowstr.h>
#include <os.h>
@@ -942,9 +943,6 @@ initializeExtensions(__GLXDRIscreen *screen) }
}
-extern __GLXconfig *
-glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
-
static __GLXscreen *
__glXDRIscreenProbe(ScreenPtr pScreen)
{
@@ -1134,7 +1132,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 028c77842..a68566c07 100644 --- a/xorg-server/glx/glxdricommon.c +++ b/xorg-server/glx/glxdricommon.c @@ -129,7 +129,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; @@ -175,13 +175,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; @@ -191,7 +192,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; @@ -200,7 +202,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 cf6c5ada9..cfac16133 100644 --- a/xorg-server/glx/glxdriswrast.c +++ b/xorg-server/glx/glxdriswrast.c @@ -534,7 +534,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);
|