diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-04-09 10:58:48 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-04-12 21:42:14 -0700 |
commit | 1760d2bef9f5b248cb2332f6ebf0220eb02bab42 (patch) | |
tree | d1384cc21f57558d6c24370e28581a3696c60270 | |
parent | ab60975fe28cb135b4183c57b7f50d3615921c1f (diff) |
glx: Set the pbuffer bit for dri2 fbconfigs
They've been implemented for a while, but we never advertised them. All we
need to do is set the GLX_PBUFFER_BIT in the drawable type fbconfig
field when we're using DRI2.
https://bugs.freedesktop.org/show_bug.cgi?id=26581
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | glx/glxdri.c | 7 | ||||
-rw-r--r-- | glx/glxdri2.c | 5 | ||||
-rw-r--r-- | glx/glxdricommon.c | 13 | ||||
-rw-r--r-- | glx/glxdricommon.h | 3 | ||||
-rw-r--r-- | glx/glxdriswrast.c | 5 |
5 files changed, 21 insertions, 12 deletions
diff --git a/glx/glxdri.c b/glx/glxdri.c index 21e44d12d..9810a73a7 100644 --- a/glx/glxdri.c +++ b/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/glx/glxdri2.c b/glx/glxdri2.c index e791bf6bf..4c9f381c6 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -748,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/glx/glxdricommon.c b/glx/glxdricommon.c index faaa3b7ae..454aa5587 100644 --- a/glx/glxdricommon.c +++ b/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/glx/glxdricommon.h b/glx/glxdricommon.h index f88964b36..41e2d2770 100644 --- a/glx/glxdricommon.h +++ b/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/glx/glxdriswrast.c b/glx/glxdriswrast.c index c647d83ca..918383cf0 100644 --- a/glx/glxdriswrast.c +++ b/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); |