[Video] Remove voodoo.max_tex_size

This commit is contained in:
zilmar 2017-08-18 08:27:54 +10:00
parent bddf192160
commit c33e862b8a
5 changed files with 8 additions and 17 deletions

View File

@ -266,7 +266,7 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
return false;
uint32_t width = fb_info.lr_x - fb_info.ul_x + 1;
uint32_t height = fb_info.lr_y - fb_info.ul_y + 1;
uint32_t max_size = minval(voodoo.max_tex_size, 512);
uint32_t max_size = 512;
if (width > (uint32_t)max_size || height > (uint32_t)max_size)
{
DrawFrameBufferToScreen256(fb_info);
@ -525,7 +525,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
{
uint32_t width = fb_info.lr_x - fb_info.ul_x + 1;
uint32_t height = fb_info.lr_y - fb_info.ul_y + 1;
if (width > (uint32_t)voodoo.max_tex_size || height > (uint32_t)voodoo.max_tex_size || width > 512)
if (width > (uint32_t)2048 || height > (uint32_t)2048 || width > 512)
{
DrawDepthBufferToScreen256(fb_info);
return;

View File

@ -219,14 +219,7 @@ int GetTexAddrNonUMA(int tmu, int texsize)
void guLoadTextures()
{
int tbuf_size = 0;
if (voodoo.max_tex_size <= 256)
{
gfxTextureBufferExt(GFX_TMU1, voodoo.tex_min_addr[GFX_TMU1], GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
tbuf_size = 8 * gfxTexCalcMemRequired(GFX_LOD_LOG2_256, GFX_LOD_LOG2_256,
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565);
}
else if (g_scr_res_x <= 1024)
if (g_scr_res_x <= 1024)
{
gfxTextureBufferExt(GFX_TMU0, voodoo.tex_min_addr[GFX_TMU0], GFX_LOD_LOG2_1024, GFX_LOD_LOG2_1024,
GFX_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GFX_MIPMAPLEVELMASK_BOTH);
@ -464,8 +457,7 @@ int InitGfx()
to_fullscreen = FALSE;
// get maximal texture size
voodoo.max_tex_size = 2048;
voodoo.sup_large_tex = (voodoo.max_tex_size > 256 && !g_settings->hacks(CSettings::hack_PPL));
voodoo.sup_large_tex = !g_settings->hacks(CSettings::hack_PPL);
voodoo.tex_min_addr[0] = voodoo.tex_min_addr[1] = gfxTexMinAddress(GFX_TMU0);
voodoo.tex_max_addr[0] = voodoo.tex_max_addr[1] = gfxTexMaxAddress(GFX_TMU0);
@ -566,8 +558,8 @@ int InitGfx()
options |= DUMP_TEX;
}
g_ghq_use = (int)ext_ghq_init(voodoo.max_tex_size, // max texture width supported by hardware
voodoo.max_tex_size, // max texture height supported by hardware
g_ghq_use = (int)ext_ghq_init(2048, // max texture width supported by hardware
2048, // max texture height supported by hardware
voodoo.sup_32bit_tex ? 32 : 16, // max texture bpp supported by hardware
options,
g_settings->ghq_cache_size() * 1024 * 1024, // cache texture to system memory

View File

@ -35,7 +35,7 @@ static TBUFF_COLOR_IMAGE * AllocateTextureBuffer(COLOR_IMAGE & cimage)
// texbuf.scr_height = texbuf.height * rdp.scale_y;
uint16_t max_size = maxval((uint16_t)texbuf.scr_width, (uint16_t)texbuf.scr_height);
if (max_size > voodoo.max_tex_size) //texture size is too large
if (max_size > 2048) //texture size is too large
return 0;
uint32_t tex_size;
//calculate LOD

View File

@ -1548,7 +1548,7 @@ void LoadTex(int id, gfxChipID_t tmu)
int splits = cache->splits;
if (ghqTexInfo.is_hires_tex)
{
if (ghqTexInfo.tiles/*ghqTexInfo.untiled_width > max_tex_size*/)
if (ghqTexInfo.tiles)
{
cache->scale = 1.0f;
cache->c_off = 0.5f;

View File

@ -120,7 +120,6 @@ typedef struct {
typedef struct
{
int max_tex_size;
int sup_large_tex;
int sup_mirroring;
int sup_32bit_tex;