summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2008-07-25 18:31:44 -0700
committerIan Romanick <[email protected]>2008-07-25 18:31:44 -0700
commit1e645b365900cf1c71ca5594bd6b549a1f203040 (patch)
treed114e55df428550c9829acf929b9fb7bcb89c429 /src/glx
parente5022c3fdf9888857f22f9a1690035ff3f90d36b (diff)
parent9bc9e0ecb0fb2069b2c123e665eb2118e358098f (diff)
Merge branch 'master' into drm-gem
Conflicts: src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/i965/brw_wm_surface_state.c
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/mini/Makefile2
-rw-r--r--src/glx/x11/.gitignore1
-rw-r--r--src/glx/x11/Makefile2
-rw-r--r--src/glx/x11/dri2_glx.c2
-rw-r--r--src/glx/x11/dri_common.c4
-rw-r--r--src/glx/x11/dri_common.h2
-rw-r--r--src/glx/x11/dri_glx.c2
-rw-r--r--src/glx/x11/drisw_glx.c2
-rw-r--r--src/glx/x11/glxext.c11
-rw-r--r--src/glx/x11/indirect_vertex_array.c14
10 files changed, 26 insertions, 16 deletions
diff --git a/src/glx/mini/Makefile b/src/glx/mini/Makefile
index 69c3d683e8c..aabc1d2be30 100644
--- a/src/glx/mini/Makefile
+++ b/src/glx/mini/Makefile
@@ -49,7 +49,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/miniglx.conf
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
- @ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ @ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) \
$(LIBDRM_LIB) $(PCIACCESS_LIB)
diff --git a/src/glx/x11/.gitignore b/src/glx/x11/.gitignore
deleted file mode 100644
index ffc14ab7660..00000000000
--- a/src/glx/x11/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-glcontextmodes.c
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index c45c7de6d6d..121f3dfac00 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -71,7 +71,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
- $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index b679c72c103..0be65bce624 100644
--- a/src/glx/x11/dri2_glx.c
+++ b/src/glx/x11/dri2_glx.c
@@ -308,7 +308,7 @@ static __GLXDRIscreen *dri2CreateScreen(__GLXscreenConfigs *psc, int screen,
return NULL;
}
- driBindExtensions(psc);
+ driBindExtensions(psc, 1);
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
diff --git a/src/glx/x11/dri_common.c b/src/glx/x11/dri_common.c
index b159d193a51..8175f46c547 100644
--- a/src/glx/x11/dri_common.c
+++ b/src/glx/x11/dri_common.c
@@ -329,7 +329,7 @@ driConvertConfigs(const __DRIcoreExtension *core,
}
_X_HIDDEN void
-driBindExtensions(__GLXscreenConfigs *psc)
+driBindExtensions(__GLXscreenConfigs *psc, int dri2)
{
const __DRIextension **extensions;
int i;
@@ -386,7 +386,7 @@ driBindExtensions(__GLXscreenConfigs *psc)
#endif
#ifdef __DRI_TEX_BUFFER
- if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) {
+ if ((strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) && dri2) {
psc->texBuffer = (__DRItexBufferExtension *) extensions[i];
__glXEnableDirectExtension(psc, "GLX_EXT_texture_from_pixmap");
}
diff --git a/src/glx/x11/dri_common.h b/src/glx/x11/dri_common.h
index 3556510335a..15f6cc87b9f 100644
--- a/src/glx/x11/dri_common.h
+++ b/src/glx/x11/dri_common.h
@@ -55,6 +55,6 @@ extern void ErrorMessageF(const char *f, ...);
extern void *driOpenDriver(const char *driverName);
-extern void driBindExtensions(__GLXscreenConfigs *psc);
+extern void driBindExtensions(__GLXscreenConfigs *psc, int dri2);
#endif /* _DRI_COMMON_H */
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index d53f2d98541..82653f1625b 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -635,7 +635,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
return NULL;
}
- driBindExtensions(psc);
+ driBindExtensions(psc, 0);
psp->destroyScreen = driDestroyScreen;
psp->createContext = driCreateContext;
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index f7ff0011216..bcf7e144ef6 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -390,7 +390,7 @@ static __GLXDRIscreen *driCreateScreen(__GLXscreenConfigs *psc, int screen,
goto handle_error;
}
- driBindExtensions(psc);
+ driBindExtensions(psc, 0);
psc->configs = driConvertConfigs(psc->core, psc->configs, driver_configs);
psc->visuals = driConvertConfigs(psc->core, psc->visuals, driver_configs);
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 777828569f4..d13d636699e 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -631,6 +631,9 @@ _X_HIDDEN __GLXdisplayPrivate *__glXInitialize(Display* dpy)
__GLXdisplayPrivate *dpyPriv;
XEDataObject dataObj;
int major, minor;
+#ifdef GLX_DIRECT_RENDERING
+ Bool glx_direct, glx_accel;
+#endif
#if defined(USE_XTHREADS)
{
@@ -698,16 +701,20 @@ _X_HIDDEN __GLXdisplayPrivate *__glXInitialize(Display* dpy)
dpyPriv->serverGLXversion = 0x0;
#ifdef GLX_DIRECT_RENDERING
+ glx_direct = (getenv("LIBGL_ALWAYS_INDIRECT") == NULL);
+ glx_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL);
+
/*
** Initialize the direct rendering per display data and functions.
** Note: This _must_ be done before calling any other DRI routines
** (e.g., those called in AllocAndFetchScreenConfigs).
*/
- if (getenv("LIBGL_ALWAYS_INDIRECT") == NULL) {
+ if (glx_direct && glx_accel) {
dpyPriv->dri2Display = dri2CreateDisplay(dpy);
dpyPriv->driDisplay = driCreateDisplay(dpy);
- dpyPriv->driswDisplay = driswCreateDisplay(dpy);
}
+ if (glx_direct)
+ dpyPriv->driswDisplay = driswCreateDisplay(dpy);
#endif
if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) {
diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c
index 09d7244ba92..15e3ece1487 100644
--- a/src/glx/x11/indirect_vertex_array.c
+++ b/src/glx/x11/indirect_vertex_array.c
@@ -62,7 +62,7 @@
* "vbo", to support multiple texture coordinate arrays, generic attributes,
* and vertex buffer objects.
*
- * \author Ian Romanick <[email protected]>
+ * \author Ian Romanick <[email protected]>
*/
static void emit_DrawArrays_none( GLenum mode, GLint first, GLsizei count );
@@ -1601,17 +1601,21 @@ void __indirect_glClientActiveTextureARB(GLenum texture)
/**
+ * Modify the enable state for the selected array
*/
GLboolean
-__glXSetArrayEnable( __GLXattribute * state,
- GLenum key, unsigned index, GLboolean enable )
+__glXSetArrayEnable(__GLXattribute *state, GLenum key, unsigned index,
+ GLboolean enable)
{
struct array_state_vector * arrays = state->array_state;
struct array_state * a;
- if ( key == GL_TEXTURE_COORD_ARRAY ) {
- index = arrays->active_texture_unit;
+ /* Texture coordinate arrays have an implict index set when the
+ * application calls glClientActiveTexture.
+ */
+ if (key == GL_TEXTURE_COORD_ARRAY) {
+ index = arrays->active_texture_unit;
}
a = get_array_entry( arrays, key, index );