From d4e61af93743de9eba26fe86ad41f427e317a460 Mon Sep 17 00:00:00 2001 From: zilmar Date: Wed, 24 May 2017 20:59:02 +1000 Subject: [PATCH] [Video] rename grAlphaCombineExt to gfxAlphaCombineExt --- .../Renderer/OGLEScombiner.cpp | 23 ++++++++----------- .../Project64-video/Renderer/OGLcombiner.cpp | 23 ++++++++----------- Source/Project64-video/Renderer/Renderer.h | 1 + Source/Project64-video/TexCache.cpp | 2 +- 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/Source/Project64-video/Renderer/OGLEScombiner.cpp b/Source/Project64-video/Renderer/OGLEScombiner.cpp index 9df39af1d..13b448fa2 100644 --- a/Source/Project64-video/Renderer/OGLEScombiner.cpp +++ b/Source/Project64-video/Renderer/OGLEScombiner.cpp @@ -1904,16 +1904,11 @@ void gfxColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode, GrCCUColor_t b, need_to_compile = 1; } -FX_ENTRY void FX_CALL -grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, - GrACUColor_t b, GrCombineMode_t b_mode, - GrACUColor_t c, FxBool c_invert, - GrACUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert) +void gfxAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, GrACUColor_t b, GrCombineMode_t b_mode, GrACUColor_t c, FxBool c_invert, GrACUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert) { WriteTrace(TraceGlitch, TraceDebug, "a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert); - if (invert) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : inverted result"); - if (shift) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : shift = %d", shift); + if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : inverted result"); + if (shift) WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : shift = %d", shift); alpha_combiner_key = 0x80000000 | (a & 0x1F) | ((a_mode & 3) << 5) | ((b & 0x1F) << 7) | ((b_mode & 3) << 12) | @@ -1937,7 +1932,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float as_a = vFrontColor.a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : a = %x", a); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : a = %x", a); strcat(fragment_shader_alpha_combiner, "float as_a = 0.0; \n"); } @@ -1956,7 +1951,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_a = -as_a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : a_mode = %x", a_mode); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : a_mode = %x", a_mode); strcat(fragment_shader_alpha_combiner, "float a_a = 0.0; \n"); } @@ -1975,7 +1970,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float as_b = vFrontColor.a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : b = %x", b); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : b = %x", b); strcat(fragment_shader_alpha_combiner, "float as_b = 0.0; \n"); } @@ -1994,7 +1989,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_b = -as_b; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : b_mode = %x", b_mode); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : b_mode = %x", b_mode); strcat(fragment_shader_alpha_combiner, "float a_b = 0.0; \n"); } @@ -2022,7 +2017,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_c = vFrontColor.a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : c = %x", c); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : c = %x", c); strcat(fragment_shader_alpha_combiner, "float a_c = 0.0; \n"); } @@ -2044,7 +2039,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : d = %x", d); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : d = %x", d); strcat(fragment_shader_alpha_combiner, "float a_d = 0.0; \n"); } diff --git a/Source/Project64-video/Renderer/OGLcombiner.cpp b/Source/Project64-video/Renderer/OGLcombiner.cpp index e5e5ac5ed..97a41cbd4 100644 --- a/Source/Project64-video/Renderer/OGLcombiner.cpp +++ b/Source/Project64-video/Renderer/OGLcombiner.cpp @@ -1867,16 +1867,11 @@ void gfxColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode, GrCCUColor_t b, need_to_compile = 1; } -FX_ENTRY void FX_CALL -grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, - GrACUColor_t b, GrCombineMode_t b_mode, - GrACUColor_t c, FxBool c_invert, - GrACUColor_t d, FxBool d_invert, - FxU32 shift, FxBool invert) +void gfxAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, GrACUColor_t b, GrCombineMode_t b_mode, GrACUColor_t c, FxBool c_invert, GrACUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert) { WriteTrace(TraceGlitch, TraceDebug, "a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert); - if (invert) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : inverted result"); - if (shift) WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : shift = %d", shift); + if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : inverted result"); + if (shift) WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : shift = %d", shift); alpha_combiner_key = 0x80000000 | (a & 0x1F) | ((a_mode & 3) << 5) | ((b & 0x1F) << 7) | ((b_mode & 3) << 12) | @@ -1900,7 +1895,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float as_a = gl_Color.a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : a = %x", a); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : a = %x", a); strcat(fragment_shader_alpha_combiner, "float as_a = 0.0; \n"); } @@ -1919,7 +1914,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_a = -as_a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : a_mode = %x", a_mode); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : a_mode = %x", a_mode); strcat(fragment_shader_alpha_combiner, "float a_a = 0.0; \n"); } @@ -1938,7 +1933,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float as_b = gl_Color.a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : b = %x", b); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : b = %x", b); strcat(fragment_shader_alpha_combiner, "float as_b = 0.0; \n"); } @@ -1957,7 +1952,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_b = -as_b; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : b_mode = %x", b_mode); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : b_mode = %x", b_mode); strcat(fragment_shader_alpha_combiner, "float a_b = 0.0; \n"); } @@ -1985,7 +1980,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_c = gl_Color.a; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : c = %x", c); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : c = %x", c); strcat(fragment_shader_alpha_combiner, "float a_c = 0.0; \n"); } @@ -2007,7 +2002,7 @@ grAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, strcat(fragment_shader_alpha_combiner, "float a_d = as_b; \n"); break; default: - WriteTrace(TraceGlitch, TraceWarning, "grAlphaCombineExt : d = %x", d); + WriteTrace(TraceGlitch, TraceWarning, "gfxAlphaCombineExt : d = %x", d); strcat(fragment_shader_alpha_combiner, "float a_d = 0.0; \n"); } diff --git a/Source/Project64-video/Renderer/Renderer.h b/Source/Project64-video/Renderer/Renderer.h index a72c68f5d..d0d49940e 100644 --- a/Source/Project64-video/Renderer/Renderer.h +++ b/Source/Project64-video/Renderer/Renderer.h @@ -37,6 +37,7 @@ void gfxChromakeyMode(GrChromakeyMode_t mode); void gfxChromakeyValue(GrColor_t value); void gfxStippleMode(GrStippleMode_t mode); void gfxColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode, GrCCUColor_t b, GrCombineMode_t b_mode, GrCCUColor_t c, FxBool c_invert, GrCCUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert); +void gfxAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, GrACUColor_t b, GrCombineMode_t b_mode, GrACUColor_t c, FxBool c_invert, GrACUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert); 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 23f23d19d..48935511c 100644 --- a/Source/Project64-video/TexCache.cpp +++ b/Source/Project64-video/TexCache.cpp @@ -678,7 +678,7 @@ void TexCache() if (!(cmb.cmb_ext_use & COMBINE_EXT_ALPHA)) AlphaCombinerToExtension(); gfxColorCombineExt(cmb.c_ext_a, cmb.c_ext_a_mode, cmb.c_ext_b, cmb.c_ext_b_mode, cmb.c_ext_c, cmb.c_ext_c_invert, cmb.c_ext_d, cmb.c_ext_d_invert, 0, 0); - grAlphaCombineExt(cmb.a_ext_a, cmb.a_ext_a_mode, cmb.a_ext_b, cmb.a_ext_b_mode, cmb.a_ext_c, cmb.a_ext_c_invert, cmb.a_ext_d, cmb.a_ext_d_invert, 0, 0); + gfxAlphaCombineExt(cmb.a_ext_a, cmb.a_ext_a_mode, cmb.a_ext_b, cmb.a_ext_b_mode, cmb.a_ext_c, cmb.a_ext_c_invert, cmb.a_ext_d, cmb.a_ext_d_invert, 0, 0); } else {