summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordok666 <dok666>2003-05-20 17:15:33 +0000
committerdok666 <dok666>2003-05-20 17:15:33 +0000
commitb5b1632c3895c0d9fda9d9cb7ff0991192b0e068 (patch)
tree8db786e10c03edd1a1173b78f0d8aeaff422f70c
parentb163b02263f5a8f2f477644948465a3b2e24d33d (diff)
Applied patch from Ville Syrjälä <syrjala@sci.fi>, thanks!
- Fix pitch setup for > 1024x1024 textures - G200 should support textures up to 2048x2048 too
-rw-r--r--src/mesa/drivers/dri/mga/mga_texstate.c11
-rw-r--r--src/mesa/drivers/dri/mga/mga_xmesa.c2
2 files changed, 5 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/mga/mga_texstate.c b/src/mesa/drivers/dri/mga/mga_texstate.c
index d925a9f46de..b9163ffe789 100644
--- a/src/mesa/drivers/dri/mga/mga_texstate.c
+++ b/src/mesa/drivers/dri/mga/mga_texstate.c
@@ -150,15 +150,12 @@ mgaSetTexImages( mgaContextPtr mmesa,
t->base.totalSize = totalSize;
/* setup hardware register values */
- t->setup.texctl &= (TMC_tformat_MASK & TMC_tpitch_MASK
- & TMC_tpitchext_MASK);
+ t->setup.texctl &= (TMC_tformat_MASK & TMC_tpitchext_MASK);
t->setup.texctl |= txformat;
- if ( baseImage->WidthLog2 >= 3 )
- t->setup.texctl |= ((baseImage->WidthLog2 - 3) << TMC_tpitch_SHIFT);
- else
- t->setup.texctl |= (TMC_tpitchlin_enable |
- (baseImage->Width << TMC_tpitchext_SHIFT));
+ t->setup.texctl |= TMC_tpitchlin_enable;
+ if ( baseImage->Width < 2048 )
+ t->setup.texctl |= (baseImage->Width << TMC_tpitchext_SHIFT);
/* G400 specifies the number of mip levels in a strange way. Since there
* are up to 12 levels, it requires 4 bits. Three of the bits are at the
diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c
index ef080b77e51..2ea5e54b4b2 100644
--- a/src/mesa/drivers/dri/mga/mga_xmesa.c
+++ b/src/mesa/drivers/dri/mga/mga_xmesa.c
@@ -367,7 +367,7 @@ mgaCreateContext( const __GLcontextModes *mesaVis,
mmesa->nr_heaps,
& ctx->Const,
4,
- 10, /* max 2D texture size is 1024x1024 */
+ 11, /* max 2D texture size is 2048x2048 */
0, /* 3D textures unsupported. */
0, /* cube textures unsupported. */
0, /* texture rectangles unsupported. */