[Video] Rename grColorCombine to gfxColorCombine
This commit is contained in:
parent
706e9221bd
commit
078c3e809a
|
@ -45,7 +45,7 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
uint32_t ccolor; // constant color to set at the end, color and alpha
|
uint32_t ccolor; // constant color to set at the end, color and alpha
|
||||||
uint32_t c_fnc, c_fac, c_loc, c_oth; // grColorCombine flags
|
uint32_t c_fnc, c_fac, c_loc, c_oth; // gfxColorCombine flags
|
||||||
uint32_t a_fnc, a_fac, a_loc, a_oth; // grAlphaCombine flags
|
uint32_t a_fnc, a_fac, a_loc, a_oth; // grAlphaCombine flags
|
||||||
uint32_t tex, tmu0_func, tmu0_fac, tmu0_invert, tmu1_func, tmu1_fac, tmu1_invert;
|
uint32_t tex, tmu0_func, tmu0_fac, tmu0_invert, tmu1_func, tmu1_fac, tmu1_invert;
|
||||||
uint32_t tmu0_a_func, tmu0_a_fac, tmu0_a_invert, tmu1_a_func, tmu1_a_fac, tmu1_a_invert;
|
uint32_t tmu0_a_func, tmu0_a_fac, tmu0_a_invert, tmu1_a_func, tmu1_a_fac, tmu1_a_invert;
|
||||||
|
|
|
@ -64,7 +64,7 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque)
|
||||||
GR_TEXTURECLAMP_CLAMP,
|
GR_TEXTURECLAMP_CLAMP,
|
||||||
GR_TEXTURECLAMP_CLAMP);
|
GR_TEXTURECLAMP_CLAMP);
|
||||||
// gfxConstantColorValue (0xFFFFFFFF);
|
// gfxConstantColorValue (0xFFFFFFFF);
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_TEXTURE,
|
GR_COMBINE_OTHER_TEXTURE,
|
||||||
|
@ -415,7 +415,7 @@ static void DrawDepthBufferToScreen256(FB_TO_SCREEN_INFO & fb_info)
|
||||||
uint32_t tex_size = gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
uint32_t tex_size = gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info);
|
||||||
int tmu = SetupFBtoScreenCombiner(tex_size*width256*height256, fb_info.opaque);
|
int tmu = SetupFBtoScreenCombiner(tex_size*width256*height256, fb_info.opaque);
|
||||||
gfxConstantColorValue(rdp.fog_color);
|
gfxConstantColorValue(rdp.fog_color);
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_CONSTANT,
|
GR_COMBINE_OTHER_CONSTANT,
|
||||||
|
@ -485,7 +485,7 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
||||||
t_info.smallLodLog2 = t_info.largeLodLog2 = LOD;
|
t_info.smallLodLog2 = t_info.largeLodLog2 = LOD;
|
||||||
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
t_info.aspectRatioLog2 = GR_ASPECT_LOG2_1x1;
|
||||||
gfxConstantColorValue(rdp.fog_color);
|
gfxConstantColorValue(rdp.fog_color);
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
gfxColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||||
GR_COMBINE_FACTOR_NONE,
|
GR_COMBINE_FACTOR_NONE,
|
||||||
GR_COMBINE_LOCAL_CONSTANT,
|
GR_COMBINE_LOCAL_CONSTANT,
|
||||||
GR_COMBINE_OTHER_NONE,
|
GR_COMBINE_OTHER_NONE,
|
||||||
|
@ -597,7 +597,7 @@ void DrawDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
|
||||||
|
|
||||||
int tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
int tmu = SetupFBtoScreenCombiner(gfxTexTextureMemRequired(GR_MIPMAPLEVELMASK_BOTH, &t_info), fb_info.opaque);
|
||||||
gfxConstantColorValue(rdp.fog_color);
|
gfxConstantColorValue(rdp.fog_color);
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_CONSTANT,
|
GR_COMBINE_OTHER_CONSTANT,
|
||||||
|
|
|
@ -784,11 +784,7 @@ void writeGLSLColorFactor(int factor, int local, int need_local, int other, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FX_ENTRY void FX_CALL
|
void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert)
|
||||||
grColorCombine(
|
|
||||||
GrCombineFunction_t function, GrCombineFactor_t factor,
|
|
||||||
GrCombineLocal_t local, GrCombineOther_t other,
|
|
||||||
FxBool invert)
|
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "function: %d factor: %d local: %d other: %d invert: %d", function, factor, local, other, invert);
|
WriteTrace(TraceGlitch, TraceDebug, "function: %d factor: %d local: %d other: %d invert: %d", function, factor, local, other, invert);
|
||||||
static int last_function = 0;
|
static int last_function = 0;
|
||||||
|
@ -806,7 +802,7 @@ grColorCombine(
|
||||||
last_local = local;
|
last_local = local;
|
||||||
last_other = other;
|
last_other = other;
|
||||||
|
|
||||||
if (invert) WriteTrace(TraceGlitch, TraceWarning, "grColorCombine : inverted result");
|
if (invert) WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombine : inverted result");
|
||||||
|
|
||||||
color_combiner_key = function | (factor << 4) | (local << 8) | (other << 10);
|
color_combiner_key = function | (factor << 4) | (local << 8) | (other << 10);
|
||||||
chroma_other_color = other;
|
chroma_other_color = other;
|
||||||
|
@ -872,7 +868,7 @@ grColorCombine(
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
strcpy(fragment_shader_color_combiner, g_fragment_shader_default);
|
strcpy(fragment_shader_color_combiner, g_fragment_shader_default);
|
||||||
WriteTrace(TraceGlitch, TraceWarning, "grColorCombine : unknown function : %x", function);
|
WriteTrace(TraceGlitch, TraceWarning, "gfxColorCombine : unknown function : %x", function);
|
||||||
}
|
}
|
||||||
//compile_shader();
|
//compile_shader();
|
||||||
need_to_compile = 1;
|
need_to_compile = 1;
|
||||||
|
|
|
@ -722,11 +722,7 @@ void writeGLSLColorFactor(int factor, int local, int need_local, int other, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FX_ENTRY void FX_CALL
|
void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert)
|
||||||
grColorCombine(
|
|
||||||
GrCombineFunction_t function, GrCombineFactor_t factor,
|
|
||||||
GrCombineLocal_t local, GrCombineOther_t other,
|
|
||||||
FxBool invert)
|
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "function: %d factor: %d local: %d other: %d invert: %d", function, factor, local, other, invert);
|
WriteTrace(TraceGlitch, TraceDebug, "function: %d factor: %d local: %d other: %d invert: %d", function, factor, local, other, invert);
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ void gfxTextureBufferExt(GrChipID_t tmu, FxU32 startAddress, GrLOD_t lodmin, GrL
|
||||||
FxU32 gfxTexMaxAddress(GrChipID_t tmu);
|
FxU32 gfxTexMaxAddress(GrChipID_t tmu);
|
||||||
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info);
|
FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info);
|
||||||
void gfxConstantColorValue(GrColor_t value);
|
void gfxConstantColorValue(GrColor_t value);
|
||||||
|
void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
|
||||||
|
|
||||||
extern uint32_t nbTextureUnits;
|
extern uint32_t nbTextureUnits;
|
||||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||||
|
|
|
@ -323,7 +323,7 @@ int OpenTextureBuffer(COLOR_IMAGE & cimage)
|
||||||
|
|
||||||
static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
|
||||||
{
|
{
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_TEXTURE,
|
GR_COMBINE_OTHER_TEXTURE,
|
||||||
|
|
|
@ -682,7 +682,7 @@ void TexCache()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
grColorCombine(cmb.c_fnc, cmb.c_fac, cmb.c_loc, cmb.c_oth, FXFALSE);
|
gfxColorCombine(cmb.c_fnc, cmb.c_fac, cmb.c_loc, cmb.c_oth, FXFALSE);
|
||||||
grAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE);
|
grAlphaCombine(cmb.a_fnc, cmb.a_fac, cmb.a_loc, cmb.a_oth, FXFALSE);
|
||||||
}
|
}
|
||||||
gfxConstantColorValue(cmb.ccolor);
|
gfxConstantColorValue(cmb.ccolor);
|
||||||
|
|
|
@ -1952,7 +1952,7 @@ void update()
|
||||||
|
|
||||||
void set_message_combiner()
|
void set_message_combiner()
|
||||||
{
|
{
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_TEXTURE,
|
GR_COMBINE_OTHER_TEXTURE,
|
||||||
|
|
|
@ -2502,7 +2502,7 @@ void rdp_fillrect()
|
||||||
|
|
||||||
gfxConstantColorValue(color);
|
gfxConstantColorValue(color);
|
||||||
|
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
gfxColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||||
GR_COMBINE_FACTOR_NONE,
|
GR_COMBINE_FACTOR_NONE,
|
||||||
GR_COMBINE_LOCAL_CONSTANT,
|
GR_COMBINE_LOCAL_CONSTANT,
|
||||||
GR_COMBINE_OTHER_NONE,
|
GR_COMBINE_OTHER_NONE,
|
||||||
|
@ -3133,7 +3133,7 @@ void SetWireframeCol()
|
||||||
{
|
{
|
||||||
//case CSettings::wfmode_NormalColors: // normal colors, don't do anything
|
//case CSettings::wfmode_NormalColors: // normal colors, don't do anything
|
||||||
case CSettings::wfmode_VertexColors:
|
case CSettings::wfmode_VertexColors:
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
gfxColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||||
GR_COMBINE_FACTOR_NONE,
|
GR_COMBINE_FACTOR_NONE,
|
||||||
GR_COMBINE_LOCAL_ITERATED,
|
GR_COMBINE_LOCAL_ITERATED,
|
||||||
GR_COMBINE_OTHER_NONE,
|
GR_COMBINE_OTHER_NONE,
|
||||||
|
@ -3161,7 +3161,7 @@ void SetWireframeCol()
|
||||||
FXFALSE, FXFALSE);
|
FXFALSE, FXFALSE);
|
||||||
break;
|
break;
|
||||||
case CSettings::wfmode_RedOnly:
|
case CSettings::wfmode_RedOnly:
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
gfxColorCombine(GR_COMBINE_FUNCTION_LOCAL,
|
||||||
GR_COMBINE_FACTOR_NONE,
|
GR_COMBINE_FACTOR_NONE,
|
||||||
GR_COMBINE_LOCAL_CONSTANT,
|
GR_COMBINE_LOCAL_CONSTANT,
|
||||||
GR_COMBINE_OTHER_NONE,
|
GR_COMBINE_OTHER_NONE,
|
||||||
|
|
|
@ -72,7 +72,7 @@ float set_sprite_combine_mode()
|
||||||
|
|
||||||
if (rdp.cycle_mode == 2)
|
if (rdp.cycle_mode == 2)
|
||||||
{
|
{
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_TEXTURE,
|
GR_COMBINE_OTHER_TEXTURE,
|
||||||
|
@ -158,7 +158,7 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
FXFALSE,
|
FXFALSE,
|
||||||
FXFALSE);
|
FXFALSE);
|
||||||
grColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GR_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GR_COMBINE_FACTOR_ONE,
|
GR_COMBINE_FACTOR_ONE,
|
||||||
GR_COMBINE_LOCAL_NONE,
|
GR_COMBINE_LOCAL_NONE,
|
||||||
GR_COMBINE_OTHER_TEXTURE,
|
GR_COMBINE_OTHER_TEXTURE,
|
||||||
|
|
Loading…
Reference in New Issue