[Video] GrTextureFilterMode_t to gfxTextureFilterMode_t
This commit is contained in:
parent
81302b6e36
commit
a361cf8947
|
@ -46,7 +46,7 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu
|
|||
FXFALSE,
|
||||
FXFALSE);
|
||||
}
|
||||
int filter = (rdp.filter_mode != 2) ? GR_TEXTUREFILTER_POINT_SAMPLED : GR_TEXTUREFILTER_BILINEAR;
|
||||
gfxTextureFilterMode_t filter = (rdp.filter_mode != 2) ? GFX_TEXTUREFILTER_POINT_SAMPLED : GFX_TEXTUREFILTER_BILINEAR;
|
||||
gfxTexFilterMode(tmu, filter, filter);
|
||||
gfxTexClampMode(tmu,
|
||||
GFX_TEXTURECLAMP_CLAMP,
|
||||
|
|
|
@ -548,8 +548,8 @@ int InitGfx()
|
|||
gfxBufferSwap(0);
|
||||
gfxBufferClear(0, 0, 0xFFFF);
|
||||
gfxDepthMask(FXFALSE);
|
||||
gfxTexFilterMode(GFX_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexFilterMode(GFX_TMU1, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexFilterMode(GFX_TMU0, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexFilterMode(GFX_TMU1, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexClampMode(GFX_TMU0, GFX_TEXTURECLAMP_CLAMP, GFX_TEXTURECLAMP_CLAMP);
|
||||
gfxTexClampMode(GFX_TMU1, GFX_TEXTURECLAMP_CLAMP, GFX_TEXTURECLAMP_CLAMP);
|
||||
gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y);
|
||||
|
|
|
@ -1250,7 +1250,7 @@ void gfxAuxBufferExt(gfxBuffer_t buffer)
|
|||
glDisable(GL_CULL_FACE);
|
||||
//glDisable(GL_ALPHA_TEST);
|
||||
glDepthMask(GL_TRUE);
|
||||
gfxTexFilterMode(GFX_TMU1, GR_TEXTUREFILTER_POINT_SAMPLED, GR_TEXTUREFILTER_POINT_SAMPLED);
|
||||
gfxTexFilterMode(GFX_TMU1, GFX_TEXTUREFILTER_POINT_SAMPLED, GFX_TEXTUREFILTER_POINT_SAMPLED);
|
||||
}
|
||||
else {
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
|
|
@ -713,15 +713,15 @@ void gfxTexDetailControl(gfxChipID_t tmu, int lod_bias, FxU8 detail_scale, float
|
|||
set_lambda();
|
||||
}
|
||||
|
||||
void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode)
|
||||
void gfxTexFilterMode(gfxChipID_t tmu, gfxTextureFilterMode_t minfilter_mode, gfxTextureFilterMode_t magfilter_mode)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, bias: %d magfilter_mode: %d", tmu, minfilter_mode, magfilter_mode);
|
||||
if (tmu == GFX_TMU1)
|
||||
{
|
||||
if (minfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) min_filter0 = GL_NEAREST;
|
||||
if (minfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) min_filter0 = GL_NEAREST;
|
||||
else min_filter0 = GL_LINEAR;
|
||||
|
||||
if (magfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) mag_filter0 = GL_NEAREST;
|
||||
if (magfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) mag_filter0 = GL_NEAREST;
|
||||
else mag_filter0 = GL_LINEAR;
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
|
@ -730,10 +730,10 @@ void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrT
|
|||
}
|
||||
else
|
||||
{
|
||||
if (minfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) min_filter1 = GL_NEAREST;
|
||||
if (minfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) min_filter1 = GL_NEAREST;
|
||||
else min_filter1 = GL_LINEAR;
|
||||
|
||||
if (magfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) mag_filter1 = GL_NEAREST;
|
||||
if (magfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) mag_filter1 = GL_NEAREST;
|
||||
else mag_filter1 = GL_LINEAR;
|
||||
|
||||
glActiveTexture(GL_TEXTURE1);
|
||||
|
|
|
@ -1541,7 +1541,7 @@ void gfxAuxBufferExt(gfxBuffer_t buffer)
|
|||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glDepthMask(GL_TRUE);
|
||||
gfxTexFilterMode(GFX_TMU1, GR_TEXTUREFILTER_POINT_SAMPLED, GR_TEXTUREFILTER_POINT_SAMPLED);
|
||||
gfxTexFilterMode(GFX_TMU1, GFX_TEXTUREFILTER_POINT_SAMPLED, GFX_TEXTUREFILTER_POINT_SAMPLED);
|
||||
}
|
||||
else {
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
|
|
@ -711,16 +711,16 @@ void gfxTexDetailControl(gfxChipID_t tmu, int lod_bias, FxU8 detail_scale, float
|
|||
set_lambda();
|
||||
}
|
||||
|
||||
void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode)
|
||||
void gfxTexFilterMode(gfxChipID_t tmu, gfxTextureFilterMode_t minfilter_mode, gfxTextureFilterMode_t magfilter_mode)
|
||||
{
|
||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, bias: %d magfilter_mode: %d", tmu, minfilter_mode, magfilter_mode);
|
||||
if (tmu == GFX_TMU1 || nbTextureUnits <= 2)
|
||||
{
|
||||
if (tmu == GFX_TMU1 && nbTextureUnits <= 2) return;
|
||||
if (minfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) min_filter0 = GL_NEAREST;
|
||||
if (minfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) min_filter0 = GL_NEAREST;
|
||||
else min_filter0 = GL_LINEAR;
|
||||
|
||||
if (magfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) mag_filter0 = GL_NEAREST;
|
||||
if (magfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) mag_filter0 = GL_NEAREST;
|
||||
else mag_filter0 = GL_LINEAR;
|
||||
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
|
@ -729,10 +729,10 @@ void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrT
|
|||
}
|
||||
else
|
||||
{
|
||||
if (minfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) min_filter1 = GL_NEAREST;
|
||||
if (minfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) min_filter1 = GL_NEAREST;
|
||||
else min_filter1 = GL_LINEAR;
|
||||
|
||||
if (magfilter_mode == GR_TEXTUREFILTER_POINT_SAMPLED) mag_filter1 = GL_NEAREST;
|
||||
if (magfilter_mode == GFX_TEXTUREFILTER_POINT_SAMPLED) mag_filter1 = GL_NEAREST;
|
||||
else mag_filter1 = GL_LINEAR;
|
||||
|
||||
glActiveTextureARB(GL_TEXTURE1_ARB);
|
||||
|
|
|
@ -69,7 +69,7 @@ void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenO
|
|||
void gfxTexSource(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
||||
void gfxTexDetailControl(gfxChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max);
|
||||
void gfxTexClampMode(gfxChipID_t tmu, gfxTextureClampMode_t s_clampmode, gfxTextureClampMode_t t_clampmode);
|
||||
void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode);
|
||||
void gfxTexFilterMode(gfxChipID_t tmu, gfxTextureFilterMode_t minfilter_mode, gfxTextureFilterMode_t magfilter_mode);
|
||||
|
||||
extern uint32_t nbTextureUnits;
|
||||
extern uint32_t g_scr_res_x, g_scr_res_y, g_res_x, g_res_y;
|
||||
|
|
|
@ -299,6 +299,12 @@ enum gfxOriginLocation_t
|
|||
GFX_ORIGIN_ANY = 0xFF,
|
||||
};
|
||||
|
||||
enum gfxTextureFilterMode_t
|
||||
{
|
||||
GFX_TEXTUREFILTER_POINT_SAMPLED = 0x0,
|
||||
GFX_TEXTUREFILTER_BILINEAR = 0x1,
|
||||
};
|
||||
|
||||
enum gfxTextureClampMode_t
|
||||
{
|
||||
GFX_TEXTURECLAMP_WRAP = 0x0,
|
||||
|
|
|
@ -815,12 +815,12 @@ void TexCache()
|
|||
|
||||
if (g_settings->filtering() == CSettings::Filter_Automatic)
|
||||
{
|
||||
int filter = (rdp.filter_mode != 2) ? GR_TEXTUREFILTER_POINT_SAMPLED : GR_TEXTUREFILTER_BILINEAR;
|
||||
gfxTextureFilterMode_t filter = (rdp.filter_mode != 2) ? GFX_TEXTUREFILTER_POINT_SAMPLED : GFX_TEXTUREFILTER_BILINEAR;
|
||||
gfxTexFilterMode(tmu, filter, filter);
|
||||
}
|
||||
else
|
||||
{
|
||||
int filter = (g_settings->filtering() == CSettings::Filter_ForceBilinear) ? GR_TEXTUREFILTER_BILINEAR : GR_TEXTUREFILTER_POINT_SAMPLED;
|
||||
gfxTextureFilterMode_t filter = (g_settings->filtering() == CSettings::Filter_ForceBilinear) ? GFX_TEXTUREFILTER_BILINEAR : GFX_TEXTUREFILTER_POINT_SAMPLED;
|
||||
gfxTexFilterMode(tmu, filter, filter);
|
||||
}
|
||||
|
||||
|
|
|
@ -1968,7 +1968,7 @@ void set_message_combiner()
|
|||
GFX_BLEND_ZERO);
|
||||
gfxAlphaTestFunction(GFX_CMP_ALWAYS);
|
||||
gfxStippleMode(GR_STIPPLE_DISABLE);
|
||||
gfxTexFilterMode(GFX_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexFilterMode(GFX_TMU0, GFX_TEXTUREFILTER_BILINEAR, GFX_TEXTUREFILTER_BILINEAR);
|
||||
gfxTexCombine(GFX_TMU1,
|
||||
GFX_COMBINE_FUNCTION_NONE,
|
||||
GFX_COMBINE_FACTOR_NONE,
|
||||
|
|
Loading…
Reference in New Issue