From: Brian Paul Date: Wed, 22 Mar 2000 23:21:27 +0000 (+0000) Subject: added Daryll's patches for texture alignment X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca1f44b401bcc6b06017d32905a1a6f133a598db;p=mesa.git added Daryll's patches for texture alignment --- diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index 4d5920f3f29..cb8ae09335f 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 2e8321547ed..fb009535ad0 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 b3cc6e70923..5d24e14ea31 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 614949f71f7..28556d8c58d 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 /*