[Video] Rename grTexSource to gfxTexSource

This commit is contained in:
zilmar 2017-07-20 17:58:16 +10:00
parent 628b9ade98
commit e78abaf38d
8 changed files with 20 additions and 27 deletions

View File

@ -152,7 +152,7 @@ static void DrawRE2Video256(FB_TO_SCREEN_INFO & fb_info)
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
grTexSource(tmu,
gfxTexSource(tmu,
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
@ -244,7 +244,7 @@ static void DrawFrameBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
}
}
gfxTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
grTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
gfxTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
tex_adr += tex_size;
float ul_x = (float)(fb_info.ul_x + 256 * w);
float ul_y = (float)(fb_info.ul_y + 256 * h);
@ -369,7 +369,7 @@ bool DrawFrameBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
grTexSource(tmu,
gfxTexSource(tmu,
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
@ -447,7 +447,7 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
dst += cur_tail;
}
gfxTexDownloadMipMap(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
grTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
gfxTexSource(tmu, tex_adr, GR_MIPMAPLEVELMASK_BOTH, &t_info);
tex_adr += tex_size;
float ul_x = (float)(fb_info.ul_x + 256 * w);
float ul_y = (float)(fb_info.ul_y + 256 * h);
@ -517,7 +517,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
FXFALSE,
FXFALSE);
// gfxAuxBufferExt( GR_BUFFER_AUXBUFFER );
grTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(t_info));
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(t_info));
float ul_x = (float)rdp.scissor.ul_x;
float ul_y = (float)rdp.scissor.ul_y;
float lr_x = (float)rdp.scissor.lr_x;
@ -606,7 +606,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
grTexSource(tmu,
gfxTexSource(tmu,
voodoo.tex_min_addr[tmu] + voodoo.tmem_ptr[tmu],
GR_MIPMAPLEVELMASK_BOTH,
&t_info);

View File

@ -639,11 +639,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
FX_ENTRY void FX_CALL
grTexSource(GrChipID_t tmu,
FxU32 startAddress,
FxU32 evenOdd,
GrTexInfo *info)
void gfxTexSource(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info)
{
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, startAddress: %d evenOdd: %d", tmu, startAddress, evenOdd);

View File

@ -635,11 +635,7 @@ void gfxTexDownloadMipMap(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrT
int CheckTextureBufferFormat(GrChipID_t tmu, FxU32 startAddress, GrTexInfo *info);
FX_ENTRY void FX_CALL
grTexSource(GrChipID_t tmu,
FxU32 startAddress,
FxU32 evenOdd,
GrTexInfo *info)
void gfxTexSource(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo *info)
{
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, startAddress: %d evenOdd: %d", tmu, startAddress, evenOdd);
@ -699,7 +695,7 @@ grTexSource(GrChipID_t tmu,
need_to_compile = 1;
}
}
grDisplayGLError("grTexSource");
grDisplayGLError("gfxTexSource");
}
FX_ENTRY void FX_CALL

View File

@ -69,6 +69,7 @@ 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);
void gfxTexSource(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;

View File

@ -426,7 +426,7 @@ int CloseTextureBuffer(int draw)
{ lr_x, lr_y, 1, 1, lr_u, lr_v, lr_u, lr_v, { lr_u, lr_v, lr_u, lr_v } }
};
grTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxClipWindow(0, 0, g_res_x, g_res_y);
gfxDrawTriangle(&v[0], &v[2], &v[1]);
gfxDrawTriangle(&v[2], &v[3], &v[1]);
@ -481,7 +481,7 @@ int CopyTextureBuffer(COLOR_IMAGE & fb_from, COLOR_IMAGE & fb_to)
{ lr_x, lr_y, 1, 1, lr_u, lr_v, lr_u, lr_v, { lr_u, lr_v, lr_u, lr_v } }
};
grTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxDrawTriangle(&v[0], &v[2], &v[1]);
gfxDrawTriangle(&v[2], &v[3], &v[1]);
gfxRenderBuffer(GR_BUFFER_BACKBUFFER);
@ -538,7 +538,7 @@ int CopyDepthBuffer()
};
gfxAuxBufferExt(GR_BUFFER_AUXBUFFER);
grTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxTexSource(rdp.texbufs[0].tmu, rdp.texbufs[0].begin, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxRenderBuffer(GR_BUFFER_TEXTUREBUFFER_EXT);
gfxTextureBufferExt(rdp.texbufs[1].tmu, rdp.texbufs[1].begin, LOD, LOD,
GR_ASPECT_LOG2_1x1, GFX_TEXFMT_RGB_565, GR_MIPMAPLEVELMASK_BOTH);
@ -592,7 +592,7 @@ int SwapTextureBuffer()
{ lr_x, lr_y, 1, 1, lr_u, lr_v, lr_u, lr_v, { lr_u, lr_v, lr_u, lr_v } }
};
grTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
gfxTexSource(rdp.tbuff_tex->tmu, rdp.tbuff_tex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(rdp.tbuff_tex->info));
texbuf->tile_uls = rdp.tbuff_tex->tile_uls;
texbuf->tile_ult = rdp.tbuff_tex->tile_ult;
texbuf->v_shift = rdp.tbuff_tex->v_shift;

View File

@ -477,7 +477,7 @@ int ChooseBestTmu(int tmu1, int tmu2)
static void SelectTBuffTex(TBUFF_COLOR_IMAGE * pTBuffTex)
{
WriteTrace(TraceRDP, TraceDebug, "SelectTBuffTex: tex: %d, tmu: %d, tile: %d", rdp.tex, pTBuffTex->tmu, pTBuffTex->tile);
grTexSource(pTBuffTex->tile, pTBuffTex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(pTBuffTex->info));
gfxTexSource(pTBuffTex->tile, pTBuffTex->tex_addr, GR_MIPMAPLEVELMASK_BOTH, &(pTBuffTex->info));
}
//****************************************************************
@ -767,7 +767,7 @@ void TexCache()
rdp.cur_cache[0] = cache;
rdp.cur_cache[0]->last_used = frame_count;
rdp.cur_cache[0]->uses = rdp.debug_n;
grTexSource(tmu_0,
gfxTexSource(tmu_0,
(voodoo.tex_min_addr[tmu_0] + cache->tmem_addr),
GR_MIPMAPLEVELMASK_BOTH,
&cache->t_info);
@ -798,7 +798,7 @@ void TexCache()
rdp.cur_cache[1] = cache;
rdp.cur_cache[1]->last_used = frame_count;
rdp.cur_cache[1]->uses = rdp.debug_n;
grTexSource(tmu_1,
gfxTexSource(tmu_1,
(voodoo.tex_min_addr[tmu_1] + cache->tmem_addr),
GR_MIPMAPLEVELMASK_BOTH,
&cache->t_info);
@ -1682,7 +1682,7 @@ void LoadTex(int id, int tmu)
voodoo.tmem_ptr[0] += texture_size;
voodoo.tmem_ptr[1] = voodoo.tmem_ptr[0];
gfxTexDownloadMipMap(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
grTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
gfxTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
}
WriteTrace(TraceRDP, TraceDebug, " | | +- LoadTex end");
}

View File

@ -1981,7 +1981,7 @@ void set_message_combiner()
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
FXFALSE, FXFALSE);
grTexSource(GR_TMU0,
gfxTexSource(GR_TMU0,
voodoo.tex_min_addr[GR_TMU0] + offset_font,
GR_MIPMAPLEVELMASK_BOTH,
&fontTex);

View File

@ -140,7 +140,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
rdp.texbufs[1].begin,
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
grTexSource(rdp.texbufs[1].tmu,
gfxTexSource(rdp.texbufs[1].tmu,
rdp.texbufs[1].begin,
GR_MIPMAPLEVELMASK_BOTH,
&t_info);