diff options
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/mini/Makefile | 2 | ||||
-rw-r--r-- | src/glx/x11/.gitignore | 1 | ||||
-rw-r--r-- | src/glx/x11/Makefile | 2 | ||||
-rw-r--r-- | src/glx/x11/dri2_glx.c | 2 | ||||
-rw-r--r-- | src/glx/x11/dri_common.c | 4 | ||||
-rw-r--r-- | src/glx/x11/dri_common.h | 2 | ||||
-rw-r--r-- | src/glx/x11/dri_glx.c | 2 | ||||
-rw-r--r-- | src/glx/x11/drisw_glx.c | 2 | ||||
-rw-r--r-- | src/glx/x11/glxext.c | 11 | ||||
-rw-r--r-- | src/glx/x11/indirect_vertex_array.c | 14 |
10 files changed, 26 insertions, 16 deletions
diff --git a/src/glx/mini/Makefile b/src/glx/mini/Makefile index 69c3d683e8..aabc1d2be3 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 ffc14ab766..0000000000 --- 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 c45c7de6d6..121f3dfac0 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 b679c72c10..0be65bce62 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 b159d193a5..8175f46c54 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 3556510335..15f6cc87b9 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 d53f2d9854..82653f1625 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 f7ff001121..bcf7e144ef 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 777828569f..d13d636699 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 09d7244ba9..15e3ece148 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 <idr@us.ibm.com> + * \author Ian Romanick <ian.d.romanick@intel.com> */ 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 ); |