From 15d179fd6dddbd4e9713eea2a92b49e2a25dde58 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 25 May 2017 17:31:29 +1000 Subject: [PATCH] [Video] Rename gfxDepthBiasLevel to grDepthBiasLevel --- Source/Project64-video/Renderer/OGLESgeometry.cpp | 3 +-- Source/Project64-video/Renderer/OGLgeometry.cpp | 5 ++--- Source/Project64-video/Renderer/Renderer.h | 1 + Source/Project64-video/Util.cpp | 14 +++++++------- Source/Project64-video/ucode06.cpp | 2 +- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Source/Project64-video/Renderer/OGLESgeometry.cpp b/Source/Project64-video/Renderer/OGLESgeometry.cpp index 31e04c981..39caacb63 100644 --- a/Source/Project64-video/Renderer/OGLESgeometry.cpp +++ b/Source/Project64-video/Renderer/OGLESgeometry.cpp @@ -294,8 +294,7 @@ void gfxDepthMask(FxBool mask) } float biasFactor = 0; -FX_ENTRY void FX_CALL -grDepthBiasLevel(FxI32 level) +void gfxDepthBiasLevel(FxI32 level) { WriteTrace(TraceGlitch, TraceDebug, "level: %d", level); if (level) diff --git a/Source/Project64-video/Renderer/OGLgeometry.cpp b/Source/Project64-video/Renderer/OGLgeometry.cpp index ad9769ba8..6d0f60086 100644 --- a/Source/Project64-video/Renderer/OGLgeometry.cpp +++ b/Source/Project64-video/Renderer/OGLgeometry.cpp @@ -286,8 +286,7 @@ void FindBestDepthBias() grDisplayGLError("FindBestDepthBias"); } -FX_ENTRY void FX_CALL -grDepthBiasLevel(FxI32 level) +void gfxDepthBiasLevel(FxI32 level) { WriteTrace(TraceGlitch, TraceDebug, "level: %d", level); if (level) @@ -303,7 +302,7 @@ grDepthBiasLevel(FxI32 level) glPolygonOffset(0, 0); glDisable(GL_POLYGON_OFFSET_FILL); } - grDisplayGLError("grDepthBiasLevel"); + grDisplayGLError("gfxDepthBiasLevel"); } // draw diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index e01170694..cef9b6d30 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -47,6 +47,7 @@ void gfxDepthBufferMode(GrDepthBufferMode_t mode); void gfxDepthBufferFunction(GrCmpFnc_t function); void gfxDepthMask(FxBool mask); void gfxDrawTriangle(const void *a, const void *b, const void *c); +void gfxDepthBiasLevel(FxI32 level); 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/Util.cpp b/Source/Project64-video/Util.cpp index 4dc14f5ce..c41e5f90a 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1603,7 +1603,7 @@ static void render_tri(uint16_t linew, int old_interpolate) { DepthBuffer(rdp.vtxbuf, n); if ((rdp.rm & 0xC10) == 0xC10) - grDepthBiasLevel(-deltaZ); + gfxDepthBiasLevel(-deltaZ); grDrawVertexArray(GR_TRIANGLE_FAN, n, rdp.vtx_buffer ? (&vtx_list2) : (&vtx_list1)); } } @@ -1751,27 +1751,27 @@ void update() { switch ((rdp.rm & 0xC00) >> 10) { case 0: - grDepthBiasLevel(0); + gfxDepthBiasLevel(0); gfxDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL); break; case 1: - grDepthBiasLevel(-4); + gfxDepthBiasLevel(-4); gfxDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL); break; case 2: - grDepthBiasLevel(g_settings->ucode() == CSettings::ucode_PerfectDark ? -4 : 0); + gfxDepthBiasLevel(g_settings->ucode() == CSettings::ucode_PerfectDark ? -4 : 0); gfxDepthBufferFunction(GR_CMP_LESS); break; case 3: // will be set dynamically per polygon - //grDepthBiasLevel(-deltaZ); + //gfxDepthBiasLevel(-deltaZ); gfxDepthBufferFunction(GR_CMP_LEQUAL); break; } } else { - grDepthBiasLevel(0); + gfxDepthBiasLevel(0); gfxDepthBufferFunction(GR_CMP_ALWAYS); } @@ -1782,7 +1782,7 @@ void update() } else { - grDepthBiasLevel(0); + gfxDepthBiasLevel(0); gfxDepthBufferFunction(GR_CMP_ALWAYS); gfxDepthMask(FXFALSE); } diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index 8618dec16..72ba4fd47 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -59,7 +59,7 @@ float set_sprite_combine_mode() Z = ScaleZ(Z); if (rdp.othermode_l & 0x00000400) - grDepthBiasLevel(rdp.prim_dz); + gfxDepthBiasLevel(rdp.prim_dz); } else {