added Daryll's patches for texture alignment
This commit is contained in:
parent
780c4e057b
commit
ca1f44b401
|
@ -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;
|
||||
|
|
|
@ -480,6 +480,7 @@ struct tfxMesaContext {
|
|||
GLfloat fogDensity;
|
||||
GLfloat fogStart, fogEnd;
|
||||
GrFog_t *fogTable;
|
||||
GLint textureAlign;
|
||||
|
||||
/* Acc. functions */
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue