From e78abaf38d0d293371aea6bed85fe723f5ea06c4 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 20 Jul 2017 17:58:16 +1000 Subject: [PATCH] [Video] Rename grTexSource to gfxTexSource --- Source/Project64-video/FBtoScreen.cpp | 12 ++++++------ Source/Project64-video/Renderer/OGLEStextures.cpp | 6 +----- Source/Project64-video/Renderer/OGLtextures.cpp | 8 ++------ Source/Project64-video/Renderer/Renderer.h | 1 + Source/Project64-video/TexBuffer.cpp | 8 ++++---- Source/Project64-video/TexCache.cpp | 8 ++++---- Source/Project64-video/Util.cpp | 2 +- Source/Project64-video/ucode06.cpp | 2 +- 8 files changed, 20 insertions(+), 27 deletions(-) diff --git a/Source/Project64-video/FBtoScreen.cpp b/Source/Project64-video/FBtoScreen.cpp index 8020a8226..b0369e1f2 100644 --- a/Source/Project64-video/FBtoScreen.cpp +++ b/Source/Project64-video/FBtoScreen.cpp @@ -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); diff --git a/Source/Project64-video/Renderer/OGLEStextures.cpp b/Source/Project64-video/Renderer/OGLEStextures.cpp index a17833807..9185e7719 100644 --- a/Source/Project64-video/Renderer/OGLEStextures.cpp +++ b/Source/Project64-video/Renderer/OGLEStextures.cpp @@ -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); diff --git a/Source/Project64-video/Renderer/OGLtextures.cpp b/Source/Project64-video/Renderer/OGLtextures.cpp index 15bc0e99c..bcf9360d7 100644 --- a/Source/Project64-video/Renderer/OGLtextures.cpp +++ b/Source/Project64-video/Renderer/OGLtextures.cpp @@ -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 diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index 688a38ec1..5d566a76e 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -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; diff --git a/Source/Project64-video/TexBuffer.cpp b/Source/Project64-video/TexBuffer.cpp index 4c4cc9d18..bd538d6e3 100644 --- a/Source/Project64-video/TexBuffer.cpp +++ b/Source/Project64-video/TexBuffer.cpp @@ -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; diff --git a/Source/Project64-video/TexCache.cpp b/Source/Project64-video/TexCache.cpp index 2a7d90955..f3b8448ca 100644 --- a/Source/Project64-video/TexCache.cpp +++ b/Source/Project64-video/TexCache.cpp @@ -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"); } \ No newline at end of file diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index 387014dd2..988e7959c 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -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); diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index 22522e424..5cb89986e 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -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);