summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/glide/fxdd.c1
-rw-r--r--src/mesa/drivers/glide/fxdrv.h1
-rw-r--r--src/mesa/drivers/glide/fxglidew.c4
-rw-r--r--src/mesa/drivers/glide/fxglidew.h8
4 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 4d5920f3f2..cb8ae09335 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -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;
diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h
index 2e8321547e..fb009535ad 100644
--- a/src/mesa/drivers/glide/fxdrv.h
+++ b/src/mesa/drivers/glide/fxdrv.h
@@ -480,6 +480,7 @@ struct tfxMesaContext {
GLfloat fogDensity;
GLfloat fogStart, fogEnd;
GrFog_t *fogTable;
+ GLint textureAlign;
/* Acc. functions */
diff --git a/src/mesa/drivers/glide/fxglidew.c b/src/mesa/drivers/glide/fxglidew.c
index b3cc6e7092..5d24e14ea3 100644
--- a/src/mesa/drivers/glide/fxglidew.c
+++ b/src/mesa/drivers/glide/fxglidew.c
@@ -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:
diff --git a/src/mesa/drivers/glide/fxglidew.h b/src/mesa/drivers/glide/fxglidew.h
index 614949f71f..28556d8c58 100644
--- a/src/mesa/drivers/glide/fxglidew.h
+++ b/src/mesa/drivers/glide/fxglidew.h
@@ -66,11 +66,13 @@
#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
/*