[Video] Rename grTexColorCombineExt to gfxTexColorCombineExt

This commit is contained in:
zilmar 2017-05-25 08:12:59 +10:00
parent d4e61af937
commit 48744883c3
5 changed files with 21 additions and 33 deletions

View File

@ -2051,19 +2051,13 @@ void gfxAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, GrACUColor_t b,
need_to_compile = 1;
}
FX_ENTRY void FX_CALL
grTexColorCombineExt(GrChipID_t tmu,
GrTCCUColor_t a, GrCombineMode_t a_mode,
GrTCCUColor_t b, GrCombineMode_t b_mode,
GrTCCUColor_t c, FxBool c_invert,
GrTCCUColor_t d, FxBool d_invert,
FxU32 shift, FxBool invert)
void gfxTexColorCombineExt(GrChipID_t tmu, GrTCCUColor_t a, GrCombineMode_t a_mode, GrTCCUColor_t b, GrCombineMode_t b_mode, GrTCCUColor_t c, FxBool c_invert, GrTCCUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert)
{
int num_tex;
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", tmu, a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert);
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : shift = %d", shift);
if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : shift = %d", shift);
if (tmu == GR_TMU0) num_tex = 1;
else num_tex = 0;
@ -2144,7 +2138,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(ccolor1.a); \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : a = %x", a);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : a = %x", a);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n");
else
@ -2178,7 +2172,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_a = -ctex1s_a; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : a_mode = %x", a_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : a_mode = %x", a_mode);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_a = vec4(0.0); \n");
else
@ -2242,7 +2236,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1s_b = ccolor1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : b = %x", b);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : b = %x", b);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n");
else
@ -2276,7 +2270,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_b = -ctex1s_b; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : b_mode = %x", b_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : b_mode = %x", b_mode);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_b = vec4(0.0); \n");
else
@ -2352,7 +2346,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_c = ccolor1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : c = %x", c);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : c = %x", c);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n");
else
@ -2394,7 +2388,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_d = vec4(readtex1.a); \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : d = %x", d);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : d = %x", d);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(0.0); \n");
else

View File

@ -2014,19 +2014,13 @@ void gfxAlphaCombineExt(GrACUColor_t a, GrCombineMode_t a_mode, GrACUColor_t b,
need_to_compile = 1;
}
FX_ENTRY void FX_CALL
grTexColorCombineExt(GrChipID_t tmu,
GrTCCUColor_t a, GrCombineMode_t a_mode,
GrTCCUColor_t b, GrCombineMode_t b_mode,
GrTCCUColor_t c, FxBool c_invert,
GrTCCUColor_t d, FxBool d_invert,
FxU32 shift, FxBool invert)
void gfxTexColorCombineExt(GrChipID_t tmu, GrTCCUColor_t a, GrCombineMode_t a_mode, GrTCCUColor_t b, GrCombineMode_t b_mode, GrTCCUColor_t c, FxBool c_invert, GrTCCUColor_t d, FxBool d_invert, FxU32 shift, FxBool invert)
{
int num_tex;
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d a: %d a_mode: %d b: %d b_mode: %d c: %d c_invert: %d d: %d d_invert: %d shift: %d invert: %d", tmu, a, a_mode, b, b_mode, c, c_invert, d, d_invert, shift, invert);
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : shift = %d", shift);
if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : shift = %d", shift);
if (tmu == GR_TMU0) num_tex = 1;
else num_tex = 0;
@ -2107,7 +2101,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1s_a = vec4(ccolor1.a); \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : a = %x", a);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : a = %x", a);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_a = vec4(0.0); \n");
else
@ -2141,7 +2135,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_a = -ctex1s_a; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : a_mode = %x", a_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : a_mode = %x", a_mode);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_a = vec4(0.0); \n");
else
@ -2205,7 +2199,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1s_b = ccolor1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : b = %x", b);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : b = %x", b);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0s_b = vec4(0.0); \n");
else
@ -2239,7 +2233,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_b = -ctex1s_b; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : b_mode = %x", b_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : b_mode = %x", b_mode);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_b = vec4(0.0); \n");
else
@ -2315,7 +2309,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_c = ccolor1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : c = %x", c);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : c = %x", c);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_c = vec4(0.0); \n");
else
@ -2357,7 +2351,7 @@ grTexColorCombineExt(GrChipID_t tmu,
strcat(fragment_shader_texture1, "vec4 ctex1_d = vec4(readtex1.a); \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grTexColorCombineExt : d = %x", d);
WriteTrace(TraceGlitch, TraceWarning, "gfxTexColorCombineExt : d = %x", d);
if (num_tex == 0)
strcat(fragment_shader_texture0, "vec4 ctex0_d = vec4(0.0); \n");
else

View File

@ -38,6 +38,7 @@ 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);
void gfxTexColorCombineExt(GrChipID_t tmu, GrTCCUColor_t a, GrCombineMode_t a_mode, GrTCCUColor_t b, GrCombineMode_t b_mode, GrTCCUColor_t c, FxBool c_invert, GrTCCUColor_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;

View File

@ -700,7 +700,7 @@ void TexCache()
TexColorCombinerToExtension(GR_TMU1);
if (!(cmb.tex_cmb_ext_use & TEX_COMBINE_EXT_ALPHA))
TexAlphaCombinerToExtension(GR_TMU1);
grTexColorCombineExt(tmu_1, cmb.t1c_ext_a, cmb.t1c_ext_a_mode, cmb.t1c_ext_b, cmb.t1c_ext_b_mode, cmb.t1c_ext_c, cmb.t1c_ext_c_invert, cmb.t1c_ext_d, cmb.t1c_ext_d_invert, 0, 0);
gfxTexColorCombineExt(tmu_1, cmb.t1c_ext_a, cmb.t1c_ext_a_mode, cmb.t1c_ext_b, cmb.t1c_ext_b_mode, cmb.t1c_ext_c, cmb.t1c_ext_c_invert, cmb.t1c_ext_d, cmb.t1c_ext_d_invert, 0, 0);
grTexAlphaCombineExt(tmu_1, cmb.t1a_ext_a, cmb.t1a_ext_a_mode, cmb.t1a_ext_b, cmb.t1a_ext_b_mode, cmb.t1a_ext_c, cmb.t1a_ext_c_invert, cmb.t1a_ext_d, cmb.t1a_ext_d_invert, 0, 0);
grConstantColorValueExt(tmu_1, cmb.tex_ccolor);
}
@ -728,7 +728,7 @@ void TexCache()
{
TexAlphaCombinerToExtension(GR_TMU0);
}
grTexColorCombineExt(tmu_0, cmb.t0c_ext_a, cmb.t0c_ext_a_mode, cmb.t0c_ext_b, cmb.t0c_ext_b_mode, cmb.t0c_ext_c, cmb.t0c_ext_c_invert, cmb.t0c_ext_d, cmb.t0c_ext_d_invert, 0, 0);
gfxTexColorCombineExt(tmu_0, cmb.t0c_ext_a, cmb.t0c_ext_a_mode, cmb.t0c_ext_b, cmb.t0c_ext_b_mode, cmb.t0c_ext_c, cmb.t0c_ext_c_invert, cmb.t0c_ext_d, cmb.t0c_ext_d_invert, 0, 0);
grTexAlphaCombineExt(tmu_0, cmb.t0a_ext_a, cmb.t0a_ext_a_mode, cmb.t0a_ext_b, cmb.t0a_ext_b_mode, cmb.t0a_ext_c, cmb.t0a_ext_c_invert, cmb.t0a_ext_d, cmb.t0a_ext_d_invert, 0, 0);
grConstantColorValueExt(tmu_0, cmb.tex_ccolor);
}

View File

@ -481,7 +481,6 @@ void DrawImage(DRAWIMAGE & d)
rdp_loadtile();
TexCache();
// **
ful_u = (float)nul_u - cb_u;
flr_u = (float)nlr_u - cb_u;