[Video] Remove UMAmode
This commit is contained in:
parent
1d26f5b0c1
commit
5a42c92eaf
|
@ -473,7 +473,6 @@ int InitGfx()
|
||||||
// 2Mb Texture boundary
|
// 2Mb Texture boundary
|
||||||
voodoo.has_2mb_tex_boundary = (SST_type < GR_SSTTYPE_Banshee) && !evoodoo;
|
voodoo.has_2mb_tex_boundary = (SST_type < GR_SSTTYPE_Banshee) && !evoodoo;
|
||||||
// we get better texture cache hits with UMA on
|
// we get better texture cache hits with UMA on
|
||||||
gfxEnable(GR_TEXTURE_UMA_EXT);
|
|
||||||
WriteTrace(TraceGlide64, TraceDebug, "Using TEXUMA extension");
|
WriteTrace(TraceGlide64, TraceDebug, "Using TEXUMA extension");
|
||||||
|
|
||||||
ChangeSize();
|
ChangeSize();
|
||||||
|
|
|
@ -155,8 +155,6 @@ int viewport_width, viewport_height, g_viewport_offset = 0, nvidia_viewport_hack
|
||||||
int save_w, save_h;
|
int save_w, save_h;
|
||||||
int lfb_color_fmt;
|
int lfb_color_fmt;
|
||||||
float invtex[2];
|
float invtex[2];
|
||||||
//Gonetz
|
|
||||||
int UMAmode = 0; //support for VSA-100 UMA mode;
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static HDC hDC = NULL;
|
static HDC hDC = NULL;
|
||||||
|
@ -1667,13 +1665,6 @@ void grConfigWrapperExt(FxI32 vram, FxBool fbo, FxBool aniso)
|
||||||
config.anisofilter = aniso;
|
config.anisofilter = aniso;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxEnable(GrEnableMode_t mode)
|
|
||||||
{
|
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "-");
|
|
||||||
if (mode == GR_TEXTURE_UMA_EXT)
|
|
||||||
UMAmode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void gfxLoadGammaTable(FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue)
|
void gfxLoadGammaTable(FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,19 +141,13 @@ void free_textures()
|
||||||
FxU32 gfxTexMinAddress(GrChipID_t tmu)
|
FxU32 gfxTexMinAddress(GrChipID_t tmu)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
||||||
if (UMAmode)
|
return 0;
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return tmu*TMU_SIZE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FxU32 gfxTexMaxAddress(GrChipID_t tmu)
|
FxU32 gfxTexMaxAddress(GrChipID_t tmu)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
||||||
if (UMAmode)
|
return TMU_SIZE * 2 - 1;
|
||||||
return TMU_SIZE * 2 - 1;
|
|
||||||
else
|
|
||||||
return tmu*TMU_SIZE + TMU_SIZE - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info)
|
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info)
|
||||||
|
@ -488,7 +482,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
m++;
|
m++;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
factor = 2;
|
factor = 2;
|
||||||
glformat = GL_RGB;
|
glformat = GL_RGB;
|
||||||
break;
|
break;
|
||||||
|
@ -511,7 +505,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
m++;
|
m++;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
factor = 2;
|
factor = 2;
|
||||||
glformat = GL_RGBA;
|
glformat = GL_RGBA;
|
||||||
break;
|
break;
|
||||||
|
@ -550,7 +544,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
m++;
|
m++;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
factor = 2;
|
factor = 2;
|
||||||
glformat = GL_RGBA;
|
glformat = GL_RGBA;
|
||||||
break;
|
break;
|
||||||
|
@ -593,8 +587,8 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
default:
|
default:
|
||||||
WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : unknown texture format: %x", info->format);
|
WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||||
factor = 0;
|
factor = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE2);
|
glActiveTexture(GL_TEXTURE2);
|
||||||
|
|
||||||
|
@ -635,7 +629,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, default_texture);
|
glBindTexture(GL_TEXTURE_2D, default_texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
|
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
|
||||||
|
|
||||||
|
|
|
@ -298,8 +298,6 @@ int viewport_width, viewport_height, g_viewport_offset = 0, nvidia_viewport_hack
|
||||||
int save_w, save_h;
|
int save_w, save_h;
|
||||||
int lfb_color_fmt;
|
int lfb_color_fmt;
|
||||||
float invtex[2];
|
float invtex[2];
|
||||||
//Gonetz
|
|
||||||
int UMAmode = 0; //support for VSA-100 UMA mode;
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static HDC hDC = NULL;
|
static HDC hDC = NULL;
|
||||||
|
@ -1932,13 +1930,6 @@ void grConfigWrapperExt(FxI32 vram, FxBool fbo, FxBool aniso)
|
||||||
config.anisofilter = aniso;
|
config.anisofilter = aniso;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxEnable(GrEnableMode_t mode)
|
|
||||||
{
|
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "-");
|
|
||||||
if (mode == GR_TEXTURE_UMA_EXT)
|
|
||||||
UMAmode = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static void CorrectGamma(LPVOID apGammaRamp)
|
static void CorrectGamma(LPVOID apGammaRamp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,19 +142,13 @@ void free_textures()
|
||||||
FxU32 gfxTexMinAddress(GrChipID_t tmu)
|
FxU32 gfxTexMinAddress(GrChipID_t tmu)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
||||||
if (UMAmode)
|
return 0;
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return tmu*TMU_SIZE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FxU32 gfxTexMaxAddress(GrChipID_t tmu)
|
FxU32 gfxTexMaxAddress(GrChipID_t tmu)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d", tmu);
|
||||||
if (UMAmode)
|
return TMU_SIZE * 2 - 1;
|
||||||
return TMU_SIZE * 2 - 1;
|
|
||||||
else
|
|
||||||
return tmu*TMU_SIZE + TMU_SIZE - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info)
|
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info)
|
||||||
|
@ -484,7 +478,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
m++;
|
m++;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
factor = 2;
|
factor = 2;
|
||||||
glformat = GL_RGB;
|
glformat = GL_RGB;
|
||||||
break;
|
break;
|
||||||
|
@ -507,7 +501,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
m++;
|
m++;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
factor = 2;
|
factor = 2;
|
||||||
glformat = GL_RGB5_A1;
|
glformat = GL_RGB5_A1;
|
||||||
break;
|
break;
|
||||||
|
@ -546,7 +540,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
m++;
|
m++;
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
factor = 2;
|
factor = 2;
|
||||||
glformat = GL_RGBA4;
|
glformat = GL_RGBA4;
|
||||||
break;
|
break;
|
||||||
|
@ -587,8 +581,8 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
default:
|
default:
|
||||||
WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : unknown texture format: %x", info->format);
|
WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||||
factor = 0;
|
factor = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbTextureUnits <= 2)
|
if (nbTextureUnits <= 2)
|
||||||
glActiveTextureARB(GL_TEXTURE1_ARB);
|
glActiveTextureARB(GL_TEXTURE1_ARB);
|
||||||
|
@ -631,7 +625,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, default_texture);
|
glBindTexture(GL_TEXTURE_2D, default_texture);
|
||||||
grDisplayGLError("gfxTexDownloadMipMap");
|
grDisplayGLError("gfxTexDownloadMipMap");
|
||||||
}
|
}
|
||||||
|
|
||||||
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
|
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,6 @@ FxBool gfxLfbUnlock(GrLock_t type, GrBuffer_t buffer);
|
||||||
FxBool gfxLfbReadRegion(GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 dst_stride, void *dst_data);
|
FxBool gfxLfbReadRegion(GrBuffer_t src_buffer, FxU32 src_x, FxU32 src_y, FxU32 src_width, FxU32 src_height, FxU32 dst_stride, void *dst_data);
|
||||||
FxBool gfxLfbWriteRegion(GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data);
|
FxBool gfxLfbWriteRegion(GrBuffer_t dst_buffer, FxU32 dst_x, FxU32 dst_y, GrLfbSrcFmt_t src_format, FxU32 src_width, FxU32 src_height, FxBool pixelPipeline, FxI32 src_stride, void *src_data);
|
||||||
FxU32 gfxTexCalcMemRequired(GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt);
|
FxU32 gfxTexCalcMemRequired(GrLOD_t lodmin, GrLOD_t lodmax, GrAspectRatio_t aspect, GrTextureFormat_t fmt);
|
||||||
void gfxEnable(GrEnableMode_t mode);
|
|
||||||
void gfxLoadGammaTable(FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue);
|
void gfxLoadGammaTable(FxU32 nentries, FxU32 *red, FxU32 *green, FxU32 *blue);
|
||||||
void gfxGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue);
|
void gfxGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *blue);
|
||||||
void gfxGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB);
|
void gfxGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB);
|
||||||
|
|
Loading…
Reference in New Issue