[video] rename grTexCombine to gfxTexCombine

This commit is contained in:
zilmar 2017-05-24 08:21:02 +10:00
parent 0df7507ff7
commit 83c03738a4
9 changed files with 23 additions and 40 deletions

View File

@ -23,14 +23,14 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque)
if (voodoo.tmem_ptr[GR_TMU0] + texture_size < voodoo.tex_max_addr[0])
{
tmu = GR_TMU0;
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
FXFALSE,
FXFALSE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,
@ -43,14 +43,14 @@ static int SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaque)
if (voodoo.tmem_ptr[GR_TMU1] + texture_size >= voodoo.tex_max_addr[1])
ClearCache();
tmu = GR_TMU1;
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
FXFALSE,
FXFALSE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_SCALE_OTHER,
GR_COMBINE_FACTOR_ONE,
GR_COMBINE_FUNCTION_SCALE_OTHER,
@ -502,14 +502,14 @@ static void DrawHiresDepthBufferToScreen(FB_TO_SCREEN_INFO & fb_info)
grDepthBufferFunction(GR_CMP_ALWAYS);
grDepthMask(FXFALSE);
grCullMode(GR_CULL_DISABLE);
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
FXFALSE,
FXFALSE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,

View File

@ -1218,16 +1218,7 @@ void writeGLSLTextureAlphaFactor(int num_tex, int factor)
}
}
FX_ENTRY void FX_CALL
grTexCombine(
GrChipID_t tmu,
GrCombineFunction_t rgb_function,
GrCombineFactor_t rgb_factor,
GrCombineFunction_t alpha_function,
GrCombineFactor_t alpha_factor,
FxBool rgb_invert,
FxBool alpha_invert
)
void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert)
{
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d rgb_function: %d rgb_factor: %d alpha_function: %d alpha_factor: %d rgb_invert: %d alpha_invert: %d", tmu, rgb_function, rgb_factor, alpha_function, alpha_factor, rgb_invert, alpha_invert);
int num_tex;

View File

@ -1155,16 +1155,7 @@ void writeGLSLTextureAlphaFactor(int num_tex, int factor)
}
}
FX_ENTRY void FX_CALL
grTexCombine(
GrChipID_t tmu,
GrCombineFunction_t rgb_function,
GrCombineFactor_t rgb_factor,
GrCombineFunction_t alpha_function,
GrCombineFactor_t alpha_factor,
FxBool rgb_invert,
FxBool alpha_invert
)
void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert)
{
WriteTrace(TraceGlitch, TraceDebug, "tmu: %d rgb_function: %d rgb_factor: %d alpha_function: %d alpha_factor: %d rgb_invert: %d alpha_invert: %d", tmu, rgb_function, rgb_factor, alpha_function, alpha_factor, rgb_invert, alpha_invert);
int num_tex;

View File

@ -26,6 +26,7 @@ FxU32 gfxTexTextureMemRequired(FxU32 evenOdd, GrTexInfo *info);
void gfxConstantColorValue(GrColor_t value);
void gfxColorCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
void gfxAlphaCombine(GrCombineFunction_t function, GrCombineFactor_t factor, GrCombineLocal_t local, GrCombineOther_t other, FxBool invert);
void gfxTexCombine(GrChipID_t tmu, GrCombineFunction_t rgb_function, GrCombineFactor_t rgb_factor, GrCombineFunction_t alpha_function, GrCombineFactor_t alpha_factor, FxBool rgb_invert, FxBool alpha_invert);
extern uint32_t nbTextureUnits;
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;

View File

@ -353,14 +353,14 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
}
if (rdp.tbuff_tex->tmu == GR_TMU0)
{
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
FXFALSE,
FXFALSE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
color_source,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_ZERO,
@ -370,14 +370,14 @@ static GrTextureFormat_t TexBufSetupCombiner(int force_rgb = FALSE)
}
else
{
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
color_source,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
FXFALSE,
FXTRUE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_SCALE_OTHER,
GR_COMBINE_FACTOR_ONE,
GR_COMBINE_FUNCTION_SCALE_OTHER,

View File

@ -706,7 +706,7 @@ void TexCache()
}
else
{
grTexCombine(tmu_1, cmb.tmu1_func, cmb.tmu1_fac, cmb.tmu1_a_func, cmb.tmu1_a_fac, cmb.tmu1_invert, cmb.tmu1_a_invert);
gfxTexCombine(tmu_1, cmb.tmu1_func, cmb.tmu1_fac, cmb.tmu1_a_func, cmb.tmu1_a_fac, cmb.tmu1_invert, cmb.tmu1_a_invert);
if (cmb.combine_ext)
{
grConstantColorValueExt(tmu_1, 0);
@ -734,7 +734,7 @@ void TexCache()
}
else
{
grTexCombine(tmu_0, cmb.tmu0_func, cmb.tmu0_fac, cmb.tmu0_a_func, cmb.tmu0_a_fac, cmb.tmu0_invert, cmb.tmu0_a_invert);
gfxTexCombine(tmu_0, cmb.tmu0_func, cmb.tmu0_fac, cmb.tmu0_a_func, cmb.tmu0_a_fac, cmb.tmu0_invert, cmb.tmu0_a_invert);
if (cmb.combine_ext)
{
grConstantColorValueExt(tmu_0, 0);

View File

@ -1969,13 +1969,13 @@ void set_message_combiner()
grAlphaTestFunction(GR_CMP_ALWAYS);
grStippleMode(GR_STIPPLE_DISABLE);
grTexFilterMode(0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_NONE,
GR_COMBINE_FACTOR_NONE,
FXFALSE, FXFALSE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,

View File

@ -3147,13 +3147,13 @@ void SetWireframeCol()
GR_BLEND_ZERO,
GR_BLEND_ZERO,
GR_BLEND_ZERO);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
FXFALSE, FXFALSE);
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_ZERO,
@ -3176,13 +3176,13 @@ void SetWireframeCol()
GR_BLEND_ZERO,
GR_BLEND_ZERO,
GR_BLEND_ZERO);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
FXFALSE, FXFALSE);
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_ZERO,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_ZERO,

View File

@ -144,14 +144,14 @@ void DrawHiresDepthImage(const DRAWIMAGE & d)
rdp.texbufs[1].begin,
GR_MIPMAPLEVELMASK_BOTH,
&t_info);
grTexCombine(GR_TMU1,
gfxTexCombine(GR_TMU1,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
GR_COMBINE_FUNCTION_LOCAL,
GR_COMBINE_FACTOR_NONE,
FXFALSE,
FXFALSE);
grTexCombine(GR_TMU0,
gfxTexCombine(GR_TMU0,
GR_COMBINE_FUNCTION_SCALE_OTHER,
GR_COMBINE_FACTOR_ONE,
GR_COMBINE_FUNCTION_SCALE_OTHER,