added Daryll's patches for texture alignment
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 22 Mar 2000 23:21:27 +0000 (23:21 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 22 Mar 2000 23:21:27 +0000 (23:21 +0000)
src/mesa/drivers/glide/fxdd.c
src/mesa/drivers/glide/fxdrv.h
src/mesa/drivers/glide/fxglidew.c
src/mesa/drivers/glide/fxglidew.h

index 4d5920f3f29f3655b60d45c48093582c6d69258b..cb8ae09335fb3ab99937bc5c7536cfaf2e68f66a 100644 (file)
@@ -708,6 +708,7 @@ int fxDDInitFxMesaContext( fxMesaContext fxMesa )
    FX_grLfbWriteColorFormat(GR_COLORFORMAT_ABGR); /* Not every Glide has this */
 #endif
 
+   fxMesa->textureAlign=FX_grGetInteger(FX_TEXTURE_ALIGN);
    fxMesa->glCtx->Const.MaxTextureLevels=9;
    fxMesa->glCtx->Const.MaxTextureSize=256;
    fxMesa->glCtx->Const.MaxTextureUnits=fxMesa->emulateTwoTMUs ? 2 : 1;
index 2e8321547edb5d8090a884e7d1d07486ee1d9594..fb009535ad07c596e90c7f6baedb51c3695c843c 100644 (file)
@@ -480,6 +480,7 @@ struct tfxMesaContext {
   GLfloat fogDensity;
   GLfloat fogStart, fogEnd;
   GrFog_t *fogTable;
+  GLint textureAlign;
 
   /* Acc. functions */
 
index b3cc6e70923013fcd18d037f2ac1dac318b78967..5d24e14ea318fe12371aec2fc12bb8a358d2d3bf 100644 (file)
@@ -68,6 +68,9 @@ FxI32 FX_grGetInteger_NoLock(FxU32 pname)
        return FXFALSE;
     case FX_PENDING_BUFFERSWAPS:
        return grBufferNumPending();
+    case FX_TEXTURE_ALIGN:
+        /* This is a guess from reading the glide3 docs */
+        return 8;
     default:
        if (MESA_VERBOSE&VERBOSE_DRIVER) {
           fprintf(stderr,"Wrong parameter in FX_grGetInteger!\n");
@@ -84,6 +87,7 @@ FxI32 FX_grGetInteger_NoLock(FxU32 pname)
      case FX_GLIDE_STATE_SIZE:
      case FX_LFB_PIXEL_PIPE:
      case FX_PENDING_BUFFERSWAPS:
+     case FX_TEXTURE_ALIGN:
        grname = pname;
        break;
      default:
index 614949f71f79b363c56fda6ef0a04e83771b7f3a..28556d8c58deac061ffbce35988661c07d0ab07f 100644 (file)
        #define FX_GLIDE_STATE_SIZE             0x0006    /* Size of buffer, in bytes, needed to save Glide state. */
        #define FX_LFB_PIXEL_PIPE               0x0009    /* 1 if LFB writes can go through the 3D pixel pipe. */               
        #define FX_PENDING_BUFFERSWAPS          0x0014    /* The number of buffer swaps pending. */
+       #define FX_TEXTURE_ALIGN                0x0024    /* The required alignment for textures */
 #else
-        #define FX_FOG_TABLE_ENTRIES            GR_FOG_TABLE_ENTRIES  
+       #define FX_FOG_TABLE_ENTRIES            GR_FOG_TABLE_ENTRIES
        #define FX_GLIDE_STATE_SIZE             GR_GLIDE_STATE_SIZE
-       #define FX_LFB_PIXEL_PIPE               GR_LFB_PIXEL_PIPE               
-       #define FX_PENDING_BUFFERSWAPS          GR_PENDING_BUFFERSWAPS  
+       #define FX_LFB_PIXEL_PIPE               GR_LFB_PIXEL_PIPE
+       #define FX_PENDING_BUFFERSWAPS          GR_PENDING_BUFFERSWAPS
+       #define FX_TEXTURE_ALIGN                GR_TEXTURE_ALIGN
 #endif
 
 /*