[Video] Rename grTexDownloadMipMap to gfxTexDownloadMipMap
This commit is contained in:
parent
ee38819a35
commit
628b9ade98
|
@ -148,7 +148,7 @@ static void DrawRE2Video256(FB_TO_SCREEN_INFO & fb_info)
|
|||
t_info.format = GFX_TEXFMT_RGB_565;
|
||||
t_info.data = tex;
|
||||
int tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
grTexDownloadMipMap(tmu,
|
||||
gfxTexDownloadMipMap(tmu,
|
||||
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
|
@ -243,7 +243,7 @@ static void DrawFrameBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
dst += cur_tail;
|
||||
}
|
||||
}
|
||||
grTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
grTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
tex_adr += tex_size;
|
||||
float ul_x = (float)(fb_info.ul_x + 256 * w);
|
||||
|
@ -365,7 +365,7 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
}
|
||||
|
||||
int tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||
grTexDownloadMipMap(tmu,
|
||||
gfxTexDownloadMipMap(tmu,
|
||||
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
|
@ -446,7 +446,7 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
|||
}
|
||||
dst += cur_tail;
|
||||
}
|
||||
grTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
gfxTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
grTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||
tex_adr += tex_size;
|
||||
float ul_x = (float)(fb_info.ul_x + 256 * w);
|
||||
|
@ -602,7 +602,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
|||
GR_COMBINE_LOCAL_NONE,
|
||||
GR_COMBINE_OTHER_CONSTANT,
|
||||
FXFALSE);
|
||||
grTexDownloadMipMap(tmu,
|
||||
gfxTexDownloadMipMap(tmu,
|
||||
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
|
|
|
@ -303,7 +303,7 @@ void guLoadTextures()
|
|||
}
|
||||
}
|
||||
|
||||
grTexDownloadMipMap(GR_TMU0,
|
||||
gfxTexDownloadMipMap(GR_TMU0,
|
||||
voodoo.tex_min_addr[GR_TMU0] + offset_font,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&fontTex);
|
||||
|
@ -331,7 +331,7 @@ void guLoadTextures()
|
|||
*(tex16++) = (uint16_t)(((cur & 0x00FF0000) >> 8) | ((cur & 0xFF000000) >> 24));
|
||||
}
|
||||
|
||||
grTexDownloadMipMap(GR_TMU0,
|
||||
gfxTexDownloadMipMap(GR_TMU0,
|
||||
voodoo.tex_min_addr[GR_TMU0] + offset_cursor,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&cursorTex);
|
||||
|
|
|
@ -381,18 +381,14 @@ int grTexFormat2GLPackedFmt(int fmt, int * gltexfmt, int * glpixfmt, int * glpac
|
|||
*/
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTexDownloadMipMap(GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
FxU32 evenOdd,
|
||||
GrTexInfo *info)
|
||||
void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, startAddress: %d evenOdd: %d", tmu, startAddress, evenOdd);
|
||||
int width, height, i, j;
|
||||
int factor;
|
||||
int glformat = 0;
|
||||
int gltexfmt, glpixfmt, glpackfmt;
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : loading more than one LOD");
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : loading more than one LOD");
|
||||
|
||||
if (info->aspectRatioLog2 < 0)
|
||||
{
|
||||
|
@ -595,7 +591,7 @@ grTexDownloadMipMap(GrChipID_t tmu,
|
|||
break;
|
||||
*/
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
factor = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -376,11 +376,7 @@ int grTexFormat2GLPackedFmt(int fmt, int * gltexfmt, int * glpixfmt, int * glpac
|
|||
return factor;
|
||||
}
|
||||
|
||||
FX_ENTRY void FX_CALL
|
||||
grTexDownloadMipMap(GrChipID_t tmu,
|
||||
FxU32 startAddress,
|
||||
FxU32 evenOdd,
|
||||
GrTexInfo *info)
|
||||
void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, startAddress: %d evenOdd: %d", tmu, startAddress, evenOdd);
|
||||
|
||||
|
@ -388,7 +384,7 @@ grTexDownloadMipMap(GrChipID_t tmu,
|
|||
int factor;
|
||||
int glformat = 0;
|
||||
int gltexfmt = 0, glpixfmt = 0, glpackfmt = 0;
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : loading more than one LOD");
|
||||
if (info->largeLodLog2 != info->smallLodLog2) WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : loading more than one LOD");
|
||||
|
||||
if (info->aspectRatioLog2 < 0)
|
||||
{
|
||||
|
@ -589,7 +585,7 @@ grTexDownloadMipMap(GrChipID_t tmu,
|
|||
glformat = GL_COMPRESSED_RGBA_FXT1_3DFX;
|
||||
break;
|
||||
default:
|
||||
WriteTrace(TraceGlitch, TraceWarning, "grTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
WriteTrace(TraceGlitch, TraceWarning, "gfxTexDownloadMipMap : unknown texture format: %x", info->format);
|
||||
factor = 0;
|
||||
}
|
||||
}
|
||||
|
@ -634,7 +630,7 @@ grTexDownloadMipMap(GrChipID_t tmu,
|
|||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, default_texture);
|
||||
grDisplayGLError("grTexDownloadMipMap");
|
||||
grDisplayGLError("gfxTexDownloadMipMap");
|
||||
}
|
||||
|
||||
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
|
||||
|
|
|
@ -68,6 +68,7 @@ void gfxEnable(GrEnableMode_t mode);
|
|||
void gfxLoadGammaTable(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 gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info);
|
||||
|
||||
extern uint32_t nbTextureUnits;
|
||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||
|
|
|
@ -1681,7 +1681,7 @@ void LoadTex(int id, int tmu)
|
|||
uint32_t tex_addr = voodoo.tex_min_addr[0] + voodoo.tmem_ptr[0];
|
||||
voodoo.tmem_ptr[0] += texture_size;
|
||||
voodoo.tmem_ptr[1] = voodoo.tmem_ptr[0];
|
||||
grTexDownloadMipMap(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
gfxTexDownloadMipMap(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
grTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||
}
|
||||
WriteTrace(TraceRDP, TraceDebug, " | | +- LoadTex end");
|
||||
|
|
|
@ -136,7 +136,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
|||
t_info.largeLodLog2 = GFX_LOD_LOG2_512;
|
||||
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
||||
|
||||
grTexDownloadMipMap(rdp.texbufs[1].tmu,
|
||||
gfxTexDownloadMipMap(rdp.texbufs[1].tmu,
|
||||
rdp.texbufs[1].begin,
|
||||
GR_MIPMAPLEVELMASK_BOTH,
|
||||
&t_info);
|
||||
|
|
Loading…
Reference in New Issue