From 6b148e8ccbd68453379fabafe2115ecb3243c76d Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 20 Jul 2017 18:01:37 +1000 Subject: [PATCH] [Video[ Rename grTexDetailControl to gfxTexDetailControl --- Source/Project64-video/Renderer/OGLEStextures.cpp | 10 ++-------- Source/Project64-video/Renderer/OGLtextures.cpp | 10 ++-------- Source/Project64-video/Renderer/Renderer.h | 1 + Source/Project64-video/TexCache.cpp | 4 ++-- Source/Project64-video/Util.cpp | 4 ++-- 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/Source/Project64-video/Renderer/OGLEStextures.cpp b/Source/Project64-video/Renderer/OGLEStextures.cpp index 9185e7719..ea7021381 100644 --- a/Source/Project64-video/Renderer/OGLEStextures.cpp +++ b/Source/Project64-video/Renderer/OGLEStextures.cpp @@ -700,20 +700,14 @@ void gfxTexSource(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo * } } -FX_ENTRY void FX_CALL -grTexDetailControl( - GrChipID_t tmu, - int lod_bias, - FxU8 detail_scale, - float detail_max -) +void gfxTexDetailControl(GrChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max) { WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, lod_bias: %d detail_scale: %d detail_max: %d", tmu, lod_bias, detail_scale, detail_max); if (lod_bias != 31 && detail_scale != 7) { if (!lod_bias && !detail_scale && !detail_max) return; else - WriteTrace(TraceGlitch, TraceWarning, "grTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max); + WriteTrace(TraceGlitch, TraceWarning, "gfxTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max); } lambda = detail_max; if (lambda > 1.0f) diff --git a/Source/Project64-video/Renderer/OGLtextures.cpp b/Source/Project64-video/Renderer/OGLtextures.cpp index bcf9360d7..11964afb7 100644 --- a/Source/Project64-video/Renderer/OGLtextures.cpp +++ b/Source/Project64-video/Renderer/OGLtextures.cpp @@ -698,20 +698,14 @@ void gfxTexSource(GrChipID_t tmu, FxU32 startAddress, FxU32 evenOdd, GrTexInfo * grDisplayGLError("gfxTexSource"); } -FX_ENTRY void FX_CALL -grTexDetailControl( - GrChipID_t tmu, - int lod_bias, - FxU8 detail_scale, - float detail_max -) +void gfxTexDetailControl(GrChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max) { WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, lod_bias: %d detail_scale: %d detail_max: %d", tmu, lod_bias, detail_scale, detail_max); if (lod_bias != 31 && detail_scale != 7) { if (!lod_bias && !detail_scale && !detail_max) return; else - WriteTrace(TraceGlitch, TraceWarning, "grTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max); + WriteTrace(TraceGlitch, TraceWarning, "gfxTexDetailControl : %d, %d, %f", lod_bias, detail_scale, detail_max); } lambda = detail_max; if (lambda > 1.0f) diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index 5d566a76e..911319ac2 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -70,6 +70,7 @@ void gfxGetGammaTableExt(FxU32 /*nentries*/, FxU32 *red, FxU32 *green, FxU32 *bl 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); +void gfxTexDetailControl(GrChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max); 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/TexCache.cpp b/Source/Project64-video/TexCache.cpp index f3b8448ca..b4208a3a8 100644 --- a/Source/Project64-video/TexCache.cpp +++ b/Source/Project64-video/TexCache.cpp @@ -712,7 +712,7 @@ void TexCache() gfxConstantColorValueExt(tmu_1, 0); } } - grTexDetailControl(tmu_1, cmb.dc1_lodbias, cmb.dc1_detailscale, cmb.dc1_detailmax); + gfxTexDetailControl(tmu_1, cmb.dc1_lodbias, cmb.dc1_detailscale, cmb.dc1_detailmax); grTexLodBiasValue(tmu_1, cmb.lodbias1); } if (tmu_0 < (nbTextureUnits > 2 ? 2 : 1)) @@ -740,7 +740,7 @@ void TexCache() gfxConstantColorValueExt(tmu_0, 0); } } - grTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax); + gfxTexDetailControl(tmu_0, cmb.dc0_lodbias, cmb.dc0_detailscale, cmb.dc0_detailmax); grTexLodBiasValue(tmu_0, cmb.lodbias0); } } diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index 988e7959c..67ad199de 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -977,9 +977,9 @@ static void CalculateLOD(VERTEX *v, int n) detailmax = lod_fraction; else detailmax = 1.0f - lod_fraction; - grTexDetailControl(GR_TMU0, cmb.dc0_lodbias, cmb.dc0_detailscale, detailmax); + gfxTexDetailControl(GR_TMU0, cmb.dc0_lodbias, cmb.dc0_detailscale, detailmax); if ((nbTextureUnits > 2 ? 2 : 1) == 2) - grTexDetailControl(GR_TMU1, cmb.dc1_lodbias, cmb.dc1_detailscale, detailmax); + gfxTexDetailControl(GR_TMU1, cmb.dc1_lodbias, cmb.dc1_detailscale, detailmax); WriteTrace(TraceRDP, TraceDebug, "CalculateLOD factor: %f, tile: %d, lod_fraction: %f", (float)lodFactor, lod_tile, lod_fraction); }