[Video] Rename grColorCombineExt to gfxColorCombineExt

This commit is contained in:
zilmar 2017-05-24 20:41:38 +10:00
parent 938cd4e7c8
commit 3aeab8fb77
4 changed files with 19 additions and 28 deletions

View File

@ -1727,16 +1727,11 @@ void gfxStippleMode(GrStippleMode_t mode)
need_to_compile = 1;
}
FX_ENTRY void FX_CALL
grColorCombineExt(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 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)
{
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, "grColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : shift = %d", shift);
if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : shift = %d", shift);
color_combiner_key = 0x80000000 | (a & 0x1F) | ((a_mode & 3) << 5) |
((b & 0x1F) << 7) | ((b_mode & 3) << 12) |
@ -1769,7 +1764,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 cs_a = ctexture1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : a = %x", a);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : a = %x", a);
strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(0.0); \n");
}
@ -1788,7 +1783,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_a = -cs_a; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : a_mode = %x", a_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : a_mode = %x", a_mode);
strcat(fragment_shader_color_combiner, "vec4 c_a = vec4(0.0); \n");
}
@ -1816,7 +1811,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 cs_b = ctexture1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : b = %x", b);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : b = %x", b);
strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(0.0); \n");
}
@ -1835,7 +1830,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_b = -cs_b; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : b_mode = %x", b_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : b_mode = %x", b_mode);
strcat(fragment_shader_color_combiner, "vec4 c_b = vec4(0.0); \n");
}
@ -1872,7 +1867,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_c = ctexture1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : c = %x", c);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : c = %x", c);
strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(0.0); \n");
}
@ -1897,7 +1892,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_d = vFrontColor; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : d = %x", d);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : d = %x", d);
strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(0.0); \n");
}

View File

@ -1690,16 +1690,11 @@ void gfxStippleMode(GrStippleMode_t mode)
grDisplayGLError("gfxStippleMode");
}
FX_ENTRY void FX_CALL
grColorCombineExt(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 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)
{
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, "grColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : shift = %d", shift);
if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : inverted result");
if (shift) WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : shift = %d", shift);
color_combiner_key = 0x80000000 | (a & 0x1F) | ((a_mode & 3) << 5) |
((b & 0x1F) << 7) | ((b_mode & 3) << 12) |
@ -1732,7 +1727,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 cs_a = ctexture1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : a = %x", a);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : a = %x", a);
strcat(fragment_shader_color_combiner, "vec4 cs_a = vec4(0.0); \n");
}
@ -1779,7 +1774,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 cs_b = ctexture1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : b = %x", b);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : b = %x", b);
strcat(fragment_shader_color_combiner, "vec4 cs_b = vec4(0.0); \n");
}
@ -1798,7 +1793,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_b = -cs_b; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : b_mode = %x", b_mode);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : b_mode = %x", b_mode);
strcat(fragment_shader_color_combiner, "vec4 c_b = vec4(0.0); \n");
}
@ -1835,7 +1830,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_c = ctexture1; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : c = %x", c);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : c = %x", c);
strcat(fragment_shader_color_combiner, "vec4 c_c = vec4(0.0); \n");
}
@ -1860,7 +1855,7 @@ grColorCombineExt(GrCCUColor_t a, GrCombineMode_t a_mode,
strcat(fragment_shader_color_combiner, "vec4 c_d = gl_Color; \n");
break;
default:
WriteTrace(TraceGlitch, TraceWarning, "grColorCombineExt : d = %x", d);
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombineExt : d = %x", d);
strcat(fragment_shader_color_combiner, "vec4 c_d = vec4(0.0); \n");
}

View File

@ -36,6 +36,7 @@ void gfxFogColorValue(GrColor_t fogcolor);
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);
extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -677,7 +677,7 @@ void TexCache()
ColorCombinerToExtension();
if (!(cmb.cmb_ext_use & COMBINE_EXT_ALPHA))
AlphaCombinerToExtension();
grColorCombineExt(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);
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);
}
else