[Video] Remove voodoo.has_2mb_tex_boundary
This commit is contained in:
parent
289ae755b1
commit
a91d336846
|
@ -70,7 +70,7 @@ CRDP rdp;
|
|||
|
||||
CSettings * g_settings = NULL;
|
||||
|
||||
VOODOO voodoo = { 0, 0, 0, 0,
|
||||
VOODOO voodoo = { 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
@ -436,11 +436,6 @@ int InitGfx()
|
|||
|
||||
WriteTrace(TraceGlide64, TraceDebug, "-");
|
||||
|
||||
// 2Mb Texture boundary
|
||||
voodoo.has_2mb_tex_boundary = false;
|
||||
// we get better texture cache hits with UMA on
|
||||
WriteTrace(TraceGlide64, TraceDebug, "Using TEXUMA extension");
|
||||
|
||||
ChangeSize();
|
||||
#ifndef ANDROID
|
||||
SetWindowDisplaySize((HWND)gfx.hWnd);
|
||||
|
@ -769,8 +764,6 @@ int CALL InitiateGFX(GFX_INFO Gfx_Info)
|
|||
CRC_BuildTable();
|
||||
CountCombine();
|
||||
ZLUT_init();
|
||||
|
||||
voodoo.has_2mb_tex_boundary = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1646,15 +1646,6 @@ void LoadTex(int id, gfxChipID_t tmu)
|
|||
|
||||
uint32_t texture_size = gfxTexTextureMemRequired(GFX_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
|
||||
// Check for 2mb boundary
|
||||
// Hiroshi Morii <koolsmoky@users.sourceforge.net> required only for V1,Rush, and V2
|
||||
if (voodoo.has_2mb_tex_boundary &&
|
||||
(voodoo.tmem_ptr[tmu] < TEXMEM_2MB_EDGE) && (voodoo.tmem_ptr[tmu] + texture_size > TEXMEM_2MB_EDGE))
|
||||
{
|
||||
voodoo.tmem_ptr[tmu] = TEXMEM_2MB_EDGE;
|
||||
cache->tmem_addr = voodoo.tmem_ptr[tmu];
|
||||
}
|
||||
|
||||
// Check for end of memory (too many textures to fit, clear cache)
|
||||
if (voodoo.tmem_ptr[tmu] + texture_size >= voodoo.tex_max_addr[tmu])
|
||||
{
|
||||
|
|
|
@ -671,15 +671,7 @@ bool TxHiResCache::loadHiResTextures(const char * dir_path, bool replace)
|
|||
/* XXX: only ARGB8888 for now. comeback to this later... */
|
||||
if (format == GFX_TEXFMT_ARGB_8888) {
|
||||
#if TEXTURE_TILING
|
||||
|
||||
/* Glide64 style texture tiling */
|
||||
/* NOTE: narrow wide textures can be tiled into 256x256 size textures */
|
||||
|
||||
/* adjust texture size to allow tiling for V1, Rush, V2, Banshee, V3 */
|
||||
/* NOTE: we skip this for palette textures that need minification
|
||||
* becasue it will look ugly. */
|
||||
|
||||
/* minification */
|
||||
/* minification */
|
||||
{
|
||||
int ratio = 1;
|
||||
|
||||
|
@ -901,7 +893,7 @@ bool TxHiResCache::loadHiResTextures(const char * dir_path, bool replace)
|
|||
case GFX_TEXFMT_ALPHA_8: /* no size benefit with dxtn */
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* compress it! */
|
||||
if (dataSize) {
|
||||
#if 0 /* TEST: dither before compression for better results with gradients */
|
||||
|
@ -923,13 +915,13 @@ bool TxHiResCache::loadHiResTextures(const char * dir_path, bool replace)
|
|||
width = tmpwidth;
|
||||
height = tmpheight;
|
||||
format = destformat = tmpformat;
|
||||
}
|
||||
}
|
||||
else {
|
||||
free(tmptex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if POW2_TEXTURES
|
||||
#if (POW2_TEXTURES == 2)
|
||||
|
@ -945,7 +937,7 @@ bool TxHiResCache::loadHiResTextures(const char * dir_path, bool replace)
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* quantize */
|
||||
{
|
||||
|
@ -990,9 +982,9 @@ bool TxHiResCache::loadHiResTextures(const char * dir_path, bool replace)
|
|||
free(tex);
|
||||
tex = tmptex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* last minute validations */
|
||||
if (!tex || !chksum || !width || !height || !format || width > _maxwidth || height > _maxheight) {
|
||||
|
@ -1061,8 +1053,8 @@ bool TxHiResCache::loadHiResTextures(const char * dir_path, bool replace)
|
|||
}
|
||||
free(tex);
|
||||
}
|
||||
} while (TextureDir.FindNext());
|
||||
}
|
||||
} while (TextureDir.FindNext());
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
}
|
|
@ -120,7 +120,6 @@ typedef struct {
|
|||
|
||||
typedef struct
|
||||
{
|
||||
int has_2mb_tex_boundary;
|
||||
int gamma_correction;
|
||||
int32_t gamma_table_size;
|
||||
uint32_t *gamma_table_r;
|
||||
|
|
Loading…
Reference in New Issue