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>
This commit is contained in:
parent
ab60975fe2
commit
1760d2bef9
|
@ -35,6 +35,7 @@
|
||||||
#include <drm.h>
|
#include <drm.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/internal/dri_interface.h>
|
#include <GL/internal/dri_interface.h>
|
||||||
|
#include <GL/glxtokens.h>
|
||||||
|
|
||||||
#include <windowstr.h>
|
#include <windowstr.h>
|
||||||
#include <os.h>
|
#include <os.h>
|
||||||
|
@ -939,9 +940,6 @@ initializeExtensions(__GLXDRIscreen *screen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern __GLXconfig *
|
|
||||||
glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
|
|
||||||
|
|
||||||
static __GLXscreen *
|
static __GLXscreen *
|
||||||
__glXDRIscreenProbe(ScreenPtr pScreen)
|
__glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
|
@ -1131,7 +1129,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
goto handle_error;
|
goto handle_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs);
|
screen->base.fbconfigs = glxConvertConfigs(screen->core,
|
||||||
|
driConfigs, GLX_WINDOW_BIT);
|
||||||
|
|
||||||
initializeExtensions(screen);
|
initializeExtensions(screen);
|
||||||
|
|
||||||
|
|
|
@ -748,7 +748,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
|
|
||||||
initializeExtensions(screen);
|
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);
|
__glXScreenInit(&screen->base, pScreen);
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ setScalar(__GLXconfig *config, unsigned int attrib, unsigned int value)
|
||||||
static __GLXconfig *
|
static __GLXconfig *
|
||||||
createModeFromConfig(const __DRIcoreExtension *core,
|
createModeFromConfig(const __DRIcoreExtension *core,
|
||||||
const __DRIconfig *driConfig,
|
const __DRIconfig *driConfig,
|
||||||
unsigned int visualType)
|
unsigned int visualType, unsigned int drawableType)
|
||||||
{
|
{
|
||||||
__GLXDRIconfig *config;
|
__GLXDRIconfig *config;
|
||||||
unsigned int attrib, value;
|
unsigned int attrib, value;
|
||||||
|
@ -167,13 +167,14 @@ createModeFromConfig(const __DRIcoreExtension *core,
|
||||||
config->config.next = NULL;
|
config->config.next = NULL;
|
||||||
config->config.xRenderable = GL_TRUE;
|
config->config.xRenderable = GL_TRUE;
|
||||||
config->config.visualType = visualType;
|
config->config.visualType = visualType;
|
||||||
config->config.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT;
|
config->config.drawableType = drawableType;
|
||||||
|
|
||||||
return &config->config;
|
return &config->config;
|
||||||
}
|
}
|
||||||
|
|
||||||
__GLXconfig *
|
__GLXconfig *
|
||||||
glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
|
glxConvertConfigs(const __DRIcoreExtension *core,
|
||||||
|
const __DRIconfig **configs, unsigned int drawableType)
|
||||||
{
|
{
|
||||||
__GLXconfig head, *tail;
|
__GLXconfig head, *tail;
|
||||||
int i;
|
int i;
|
||||||
|
@ -183,7 +184,8 @@ glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
|
||||||
|
|
||||||
for (i = 0; configs[i]; i++) {
|
for (i = 0; configs[i]; i++) {
|
||||||
tail->next = createModeFromConfig(core,
|
tail->next = createModeFromConfig(core,
|
||||||
configs[i], GLX_TRUE_COLOR);
|
configs[i], GLX_TRUE_COLOR,
|
||||||
|
drawableType);
|
||||||
if (tail->next == NULL)
|
if (tail->next == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -192,7 +194,8 @@ glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs)
|
||||||
|
|
||||||
for (i = 0; configs[i]; i++) {
|
for (i = 0; configs[i]; i++) {
|
||||||
tail->next = createModeFromConfig(core,
|
tail->next = createModeFromConfig(core,
|
||||||
configs[i], GLX_DIRECT_COLOR);
|
configs[i], GLX_DIRECT_COLOR,
|
||||||
|
drawableType);
|
||||||
if (tail->next == NULL)
|
if (tail->next == NULL)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,8 @@ struct __GLXDRIconfig {
|
||||||
};
|
};
|
||||||
|
|
||||||
__GLXconfig *
|
__GLXconfig *
|
||||||
glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs);
|
glxConvertConfigs(const __DRIcoreExtension *core,
|
||||||
|
const __DRIconfig **configs, unsigned int drawableType);
|
||||||
|
|
||||||
extern const __DRIsystemTimeExtension systemTimeExtension;
|
extern const __DRIsystemTimeExtension systemTimeExtension;
|
||||||
|
|
||||||
|
|
|
@ -506,7 +506,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
|
||||||
|
|
||||||
initializeExtensions(screen);
|
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);
|
__glXScreenInit(&screen->base, pScreen);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user