From 704e132ddc90355be92035b60173c5d8f14017eb Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 25 May 2017 08:49:39 +1000 Subject: [PATCH] [Video] Rename grDepthBufferFunction to gfxDepthBufferFunction --- Source/Project64-video/FBtoScreen.cpp | 4 ++-- Source/Project64-video/Main.cpp | 6 +++--- Source/Project64-video/Renderer/OGLESgeometry.cpp | 3 +-- Source/Project64-video/Renderer/OGLgeometry.cpp | 5 ++--- Source/Project64-video/Renderer/Renderer.h | 1 + Source/Project64-video/TexBuffer.cpp | 2 +- Source/Project64-video/Util.cpp | 12 ++++++------ Source/Project64-video/rdp.cpp | 2 +- Source/Project64-video/ucode06.cpp | 2 +- 9 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Source/Project64-video/FBtoScreen.cpp b/Source/Project64-video/FBtoScreen.cpp index 1a310066e..626f81aae 100644 --- a/Source/Project64-video/FBtoScreen.cpp +++ b/Source/Project64-video/FBtoScreen.cpp @@ -90,7 +90,7 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque) GR_BLEND_ONE, GR_BLEND_ZERO); } - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); gfxCullMode(GR_CULL_DISABLE); grDepthMask(FXFALSE); rdp.update |= UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE; @@ -499,7 +499,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info) GR_BLEND_ONE_MINUS_SRC_ALPHA, GR_BLEND_ONE, GR_BLEND_ZERO); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grDepthMask(FXFALSE); gfxCullMode(GR_CULL_DISABLE); gfxTexCombine(GR_TMU1, diff --git a/Source/Project64-video/Main.cpp b/Source/Project64-video/Main.cpp index d39f3d6d8..1d09f2f08 100644 --- a/Source/Project64-video/Main.cpp +++ b/Source/Project64-video/Main.cpp @@ -538,7 +538,7 @@ int InitGfx() } gfxDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); - grDepthBufferFunction(GR_CMP_LESS); + gfxDepthBufferFunction(GR_CMP_LESS); grDepthMask(FXTRUE); ChangeSize(); @@ -548,7 +548,7 @@ int InitGfx() gfxCullMode(GR_CULL_DISABLE); gfxDepthBufferMode(GR_DEPTHBUFFER_ZBUFFER); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grRenderBuffer(GR_BUFFER_BACKBUFFER); gfxColorMask(FXTRUE, FXTRUE); grDepthMask(FXTRUE); @@ -1318,7 +1318,7 @@ void newSwapBuffers() rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE; gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grDepthMask(FXFALSE); gfxCullMode(GR_CULL_DISABLE); diff --git a/Source/Project64-video/Renderer/OGLESgeometry.cpp b/Source/Project64-video/Renderer/OGLESgeometry.cpp index 0c408e437..1b7112038 100644 --- a/Source/Project64-video/Renderer/OGLESgeometry.cpp +++ b/Source/Project64-video/Renderer/OGLESgeometry.cpp @@ -240,8 +240,7 @@ void gfxDepthBufferMode(GrDepthBufferMode_t mode) } } -FX_ENTRY void FX_CALL -grDepthBufferFunction(GrCmpFnc_t function) +void gfxDepthBufferFunction(GrCmpFnc_t function) { WriteTrace(TraceGlitch, TraceDebug, "function: %d", function); switch (function) diff --git a/Source/Project64-video/Renderer/OGLgeometry.cpp b/Source/Project64-video/Renderer/OGLgeometry.cpp index 175de5b39..302d07fe6 100644 --- a/Source/Project64-video/Renderer/OGLgeometry.cpp +++ b/Source/Project64-video/Renderer/OGLgeometry.cpp @@ -171,8 +171,7 @@ void gfxDepthBufferMode(GrDepthBufferMode_t mode) grDisplayGLError("gfxDepthBufferMode"); } -FX_ENTRY void FX_CALL -grDepthBufferFunction(GrCmpFnc_t function) +void gfxDepthBufferFunction(GrCmpFnc_t function) { WriteTrace(TraceGlitch, TraceDebug, "function: %d", function); switch (function) @@ -217,7 +216,7 @@ grDepthBufferFunction(GrCmpFnc_t function) default: WriteTrace(TraceGlitch, TraceWarning, "unknown depth buffer function : %x", function); } - grDisplayGLError("grDepthBufferFunction"); + grDisplayGLError("gfxDepthBufferFunction"); } FX_ENTRY void FX_CALL diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index 31ca91e52..eb077c71d 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -44,6 +44,7 @@ void gfxConstantColorValueExt(GrChipID_t tmu, GrColor_t value); void gfxVertexLayout(FxU32 param, FxI32 offset, FxU32 mode); void gfxCullMode(GrCullMode_t mode); void gfxDepthBufferMode(GrDepthBufferMode_t mode); +void gfxDepthBufferFunction(GrCmpFnc_t function); 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 521d8b3f0..72b30ef87 100644 --- a/Source/Project64-video/TexBuffer.cpp +++ b/Source/Project64-video/TexBuffer.cpp @@ -340,7 +340,7 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE) GR_BLEND_ONE, GR_BLEND_ZERO); gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grDepthMask(FXFALSE); gfxCullMode(GR_CULL_DISABLE); gfxFogMode(GR_FOG_DISABLE); diff --git a/Source/Project64-video/Util.cpp b/Source/Project64-video/Util.cpp index d61be4e39..c895ffe86 100644 --- a/Source/Project64-video/Util.cpp +++ b/Source/Project64-video/Util.cpp @@ -1752,27 +1752,27 @@ void update() switch ((rdp.rm & 0xC00) >> 10) { case 0: grDepthBiasLevel(0); - grDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL); + gfxDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL); break; case 1: grDepthBiasLevel(-4); - grDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL); + gfxDepthBufferFunction(g_settings->zmode_compare_less() ? GR_CMP_LESS : GR_CMP_LEQUAL); break; case 2: grDepthBiasLevel(g_settings->ucode() == CSettings::ucode_PerfectDark ? -4 : 0); - grDepthBufferFunction(GR_CMP_LESS); + gfxDepthBufferFunction(GR_CMP_LESS); break; case 3: // will be set dynamically per polygon //grDepthBiasLevel(-deltaZ); - grDepthBufferFunction(GR_CMP_LEQUAL); + gfxDepthBufferFunction(GR_CMP_LEQUAL); break; } } else { grDepthBiasLevel(0); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); } if (rdp.flags & ZBUF_UPDATE) @@ -1783,7 +1783,7 @@ void update() else { grDepthBiasLevel(0); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grDepthMask(FXFALSE); } } diff --git a/Source/Project64-video/rdp.cpp b/Source/Project64-video/rdp.cpp index 8fda85452..75d62fb99 100644 --- a/Source/Project64-video/rdp.cpp +++ b/Source/Project64-video/rdp.cpp @@ -2521,7 +2521,7 @@ void rdp_fillrect() gfxCullMode(GR_CULL_DISABLE); gfxFogMode(GR_FOG_DISABLE); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grDepthMask(FXFALSE); rdp.update |= UPDATE_COMBINE | UPDATE_CULL_MODE | UPDATE_FOG_ENABLED | UPDATE_ZBUF_ENABLED; diff --git a/Source/Project64-video/ucode06.cpp b/Source/Project64-video/ucode06.cpp index 655e12994..2b886c75d 100644 --- a/Source/Project64-video/ucode06.cpp +++ b/Source/Project64-video/ucode06.cpp @@ -172,7 +172,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d) GR_BLEND_ZERO, GR_BLEND_ONE, GR_BLEND_ZERO); - grDepthBufferFunction(GR_CMP_ALWAYS); + gfxDepthBufferFunction(GR_CMP_ALWAYS); grDepthMask(FXFALSE); GrLOD_t LOD = g_scr_res_x > 1024 ? GFX_LOD_LOG2_2048 : GFX_LOD_LOG2_1024;