summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-04-02 19:04:57 -0400
committerKristian Høgsberg <krh@redhat.com>2008-04-02 19:05:43 -0400
commitdc836edf49a08a7fd77fc1f127818b0550558581 (patch)
tree893fd63c6bb1ef8549799da8e1dacf031b1fdb7b /src/mesa/drivers/dri
parent28dfb0613b51c51d5f09010ea38d050a9ec817d7 (diff)
Initialize GLX_EXT_texture_from_pixmap attributes correctly.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c11
-rw-r--r--src/mesa/drivers/dri/common/utils.c9
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index daf1d56feb..b7718f50fd 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -1006,6 +1006,7 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb),
__ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba),
__ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture),
+ __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, bindToTextureTargets),
__ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
/* The struct field doesn't matter here, these are handled by the
@@ -1013,7 +1014,6 @@ static const struct { unsigned int attrib, offset; } attribMap[] = {
* so the iterator includes them though.*/
__ATTRIB(__DRI_ATTRIB_RENDER_TYPE, level),
__ATTRIB(__DRI_ATTRIB_CONFIG_CAVEAT, level),
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, level),
__ATTRIB(__DRI_ATTRIB_SWAP_METHOD, level)
};
@@ -1038,15 +1038,6 @@ driGetConfigAttribIndex(const __DRIconfig *config,
else
*value = 0;
break;
- case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS:
- *value = 0;
- if (config->modes.bindToTextureTargets & GLX_TEXTURE_1D_BIT_EXT)
- *value |= __DRI_ATTRIB_TEXTURE_1D_BIT;
- if (config->modes.bindToTextureTargets & GLX_TEXTURE_2D_BIT_EXT)
- *value |= __DRI_ATTRIB_TEXTURE_2D_BIT;
- if (config->modes.bindToTextureTargets & GLX_TEXTURE_RECTANGLE_BIT_EXT)
- *value |= __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
- break;
case __DRI_ATTRIB_SWAP_METHOD:
break;
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 1839ef935a..237d51cf22 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -713,6 +713,15 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
modes->accumAlphaBits) > 0);
modes->haveDepthBuffer = (modes->depthBits > 0);
modes->haveStencilBuffer = (modes->stencilBits > 0);
+
+ modes->bindToTextureRgb = GL_TRUE;
+ modes->bindToTextureRgba = GL_TRUE;
+ modes->bindToMipmapTexture = GL_FALSE;
+ modes->bindToTextureTargets = modes->rgbMode ?
+ __DRI_ATTRIB_TEXTURE_1D_BIT |
+ __DRI_ATTRIB_TEXTURE_2D_BIT |
+ __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT :
+ 0;
}
}
}