[Video] Rename gfxDepthBiasLevel to grDepthBiasLevel

This commit is contained in:
zilmar 2017-05-25 17:31:29 +10:00
parent 1af5c577ff
commit 15d179fd6d
5 changed files with 12 additions and 13 deletions

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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);
}

View File

@ -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
{