aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/radeon_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_context.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index abb2c72e79c..9ab6e676780 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -69,7 +69,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define need_GL_EXT_secondary_color
#include "extension_helper.h"
-#define DRIVER_DATE "20050831"
+#define DRIVER_DATE "20051008"
#include "vblank.h"
#include "utils.h"
@@ -327,9 +327,10 @@ radeonCreateContext( const __GLcontextModes *glVisual,
*/
ctx = rmesa->glCtx;
- ctx->Const.MaxTextureUnits = 2;
- ctx->Const.MaxTextureImageUnits = 2;
- ctx->Const.MaxTextureCoordUnits = 2;
+ ctx->Const.MaxTextureUnits = driQueryOptioni (&rmesa->optionCache,
+ "texture_units");
+ ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
+ ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureUnits;
driCalculateMaxTextureLevels( rmesa->texture_heaps,
rmesa->nr_heaps,
@@ -403,14 +404,12 @@ radeonCreateContext( const __GLcontextModes *glVisual,
_tnl_allow_vertex_fog( ctx, GL_TRUE );
- _math_matrix_ctr( &rmesa->TexGenMatrix[0] );
- _math_matrix_ctr( &rmesa->TexGenMatrix[1] );
- _math_matrix_ctr( &rmesa->tmpmat[0] );
- _math_matrix_ctr( &rmesa->tmpmat[1] );
- _math_matrix_set_identity( &rmesa->TexGenMatrix[0] );
- _math_matrix_set_identity( &rmesa->TexGenMatrix[1] );
- _math_matrix_set_identity( &rmesa->tmpmat[0] );
- _math_matrix_set_identity( &rmesa->tmpmat[1] );
+ for ( i = 0 ; i < RADEON_MAX_TEXTURE_UNITS ; i++ ) {
+ _math_matrix_ctr( &rmesa->TexGenMatrix[i] );
+ _math_matrix_ctr( &rmesa->tmpmat[i] );
+ _math_matrix_set_identity( &rmesa->TexGenMatrix[i] );
+ _math_matrix_set_identity( &rmesa->tmpmat[i] );
+ }
driInitExtensions( ctx, card_extensions, GL_TRUE );
if (rmesa->glCtx->Mesa_DXTn) {