aboutsummaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glcontextmodes.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2008-06-12 00:11:54 +0100
committerAlan Hourihane <[email protected]>2008-06-12 00:11:54 +0100
commit6f7ed99b306990f284f9d57c0b66efaa7f2277e1 (patch)
tree23819c5863553573f6cf70de8e5ee127a875b63b /src/glx/x11/glcontextmodes.c
parent2161b0fafcdc16703162dd489d2ec1e7114cce4c (diff)
revert the DRI2 commits
Diffstat (limited to 'src/glx/x11/glcontextmodes.c')
-rw-r--r--src/glx/x11/glcontextmodes.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/glx/x11/glcontextmodes.c b/src/glx/x11/glcontextmodes.c
index 326c8b2357c..788ecf6a3aa 100644
--- a/src/glx/x11/glcontextmodes.c
+++ b/src/glx/x11/glcontextmodes.c
@@ -336,8 +336,7 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
*value_return = mode->bindToTextureRgba;
return 0;
case GLX_BIND_TO_MIPMAP_TEXTURE_EXT:
- *value_return = mode->bindToMipmapTexture == GL_TRUE ? GL_TRUE :
- GL_FALSE;
+ *value_return = mode->bindToMipmapTexture;
return 0;
case GLX_BIND_TO_TEXTURE_TARGETS_EXT:
*value_return = mode->bindToTextureTargets;
@@ -418,7 +417,7 @@ _gl_context_modes_create( unsigned count, size_t minimum_size )
(*next)->bindToTextureRgb = GLX_DONT_CARE;
(*next)->bindToTextureRgba = GLX_DONT_CARE;
(*next)->bindToMipmapTexture = GLX_DONT_CARE;
- (*next)->bindToTextureTargets = GLX_DONT_CARE;
+ (*next)->bindToTextureTargets = 0;
(*next)->yInverted = GLX_DONT_CARE;
next = & ((*next)->next);
@@ -457,28 +456,19 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
*/
__GLcontextModes *
-_gl_context_modes_find_visual(__GLcontextModes *modes, int vid)
+_gl_context_modes_find_visual( __GLcontextModes * modes, int vid )
{
- __GLcontextModes *m;
+ while ( modes != NULL ) {
+ if ( modes->visualID == vid ) {
+ break;
+ }
- for (m = modes; m != NULL; m = m->next)
- if (m->visualID == vid)
- return m;
+ modes = modes->next;
+ }
- return NULL;
+ return modes;
}
-__GLcontextModes *
-_gl_context_modes_find_fbconfig(__GLcontextModes *modes, int fbid)
-{
- __GLcontextModes *m;
-
- for (m = modes; m != NULL; m = m->next)
- if (m->fbconfigID == fbid)
- return m;
-
- return NULL;
-}
/**
* Determine if two context-modes are the same. This is intended to be used