[Video] Rename GrTextureClampMode_t to gfxTextureClampMode_t
This commit is contained in:
parent
dce36114b8
commit
81302b6e36
|
@ -49,8 +49,8 @@ static gfxChipID_t SetupFBtoScreenCombiner(uint32_t texture_size, uint32_t opaqu
|
||||||
int filter = (rdp.filter_mode != 2) ? GR_TEXTUREFILTER_POINT_SAMPLED : GR_TEXTUREFILTER_BILINEAR;
|
int filter = (rdp.filter_mode != 2) ? GR_TEXTUREFILTER_POINT_SAMPLED : GR_TEXTUREFILTER_BILINEAR;
|
||||||
gfxTexFilterMode(tmu, filter, filter);
|
gfxTexFilterMode(tmu, filter, filter);
|
||||||
gfxTexClampMode(tmu,
|
gfxTexClampMode(tmu,
|
||||||
GR_TEXTURECLAMP_CLAMP,
|
GFX_TEXTURECLAMP_CLAMP,
|
||||||
GR_TEXTURECLAMP_CLAMP);
|
GFX_TEXTURECLAMP_CLAMP);
|
||||||
// gfxConstantColorValue (0xFFFFFFFF);
|
// gfxConstantColorValue (0xFFFFFFFF);
|
||||||
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
gfxColorCombine(GFX_COMBINE_FUNCTION_SCALE_OTHER,
|
||||||
GFX_COMBINE_FACTOR_ONE,
|
GFX_COMBINE_FACTOR_ONE,
|
||||||
|
|
|
@ -550,8 +550,8 @@ int InitGfx()
|
||||||
gfxDepthMask(FXFALSE);
|
gfxDepthMask(FXFALSE);
|
||||||
gfxTexFilterMode(GFX_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
gfxTexFilterMode(GFX_TMU0, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
||||||
gfxTexFilterMode(GFX_TMU1, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
gfxTexFilterMode(GFX_TMU1, GR_TEXTUREFILTER_BILINEAR, GR_TEXTUREFILTER_BILINEAR);
|
||||||
gfxTexClampMode(GFX_TMU0, GR_TEXTURECLAMP_CLAMP, GR_TEXTURECLAMP_CLAMP);
|
gfxTexClampMode(GFX_TMU0, GFX_TEXTURECLAMP_CLAMP, GFX_TEXTURECLAMP_CLAMP);
|
||||||
gfxTexClampMode(GFX_TMU1, GR_TEXTURECLAMP_CLAMP, GR_TEXTURECLAMP_CLAMP);
|
gfxTexClampMode(GFX_TMU1, GFX_TEXTURECLAMP_CLAMP, GFX_TEXTURECLAMP_CLAMP);
|
||||||
gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y);
|
gfxClipWindow(0, 0, g_scr_res_x, g_scr_res_y);
|
||||||
rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
|
rdp.update |= UPDATE_SCISSOR | UPDATE_COMBINE | UPDATE_ZBUF_ENABLED | UPDATE_CULL_MODE;
|
||||||
|
|
||||||
|
|
|
@ -742,20 +742,20 @@ void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextureClampMode_t t_clampmode)
|
void gfxTexClampMode(gfxChipID_t tmu, gfxTextureClampMode_t s_clampmode, gfxTextureClampMode_t t_clampmode)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, s_clampmode: %d t_clampmode: %d", tmu, s_clampmode, t_clampmode);
|
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, s_clampmode: %d t_clampmode: %d", tmu, s_clampmode, t_clampmode);
|
||||||
if (tmu == GFX_TMU1)
|
if (tmu == GFX_TMU1)
|
||||||
{
|
{
|
||||||
switch (s_clampmode)
|
switch (s_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_s0 = GL_REPEAT;
|
wrap_s0 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_s0 = GL_CLAMP_TO_EDGE;
|
wrap_s0 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_s0 = GL_MIRRORED_REPEAT;
|
wrap_s0 = GL_MIRRORED_REPEAT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -763,13 +763,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
}
|
}
|
||||||
switch (t_clampmode)
|
switch (t_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_t0 = GL_REPEAT;
|
wrap_t0 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_t0 = GL_CLAMP_TO_EDGE;
|
wrap_t0 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_t0 = GL_MIRRORED_REPEAT;
|
wrap_t0 = GL_MIRRORED_REPEAT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -783,13 +783,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
{
|
{
|
||||||
switch (s_clampmode)
|
switch (s_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_s1 = GL_REPEAT;
|
wrap_s1 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_s1 = GL_CLAMP_TO_EDGE;
|
wrap_s1 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_s1 = GL_MIRRORED_REPEAT;
|
wrap_s1 = GL_MIRRORED_REPEAT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -797,13 +797,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
}
|
}
|
||||||
switch (t_clampmode)
|
switch (t_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_t1 = GL_REPEAT;
|
wrap_t1 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_t1 = GL_CLAMP_TO_EDGE;
|
wrap_t1 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_t1 = GL_MIRRORED_REPEAT;
|
wrap_t1 = GL_MIRRORED_REPEAT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -742,7 +742,7 @@ void gfxTexFilterMode(gfxChipID_t tmu, GrTextureFilterMode_t minfilter_mode, GrT
|
||||||
grDisplayGLError("gfxTexFilterMode");
|
grDisplayGLError("gfxTexFilterMode");
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextureClampMode_t t_clampmode)
|
void gfxTexClampMode(gfxChipID_t tmu, gfxTextureClampMode_t s_clampmode, gfxTextureClampMode_t t_clampmode)
|
||||||
{
|
{
|
||||||
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, s_clampmode: %d t_clampmode: %d", tmu, s_clampmode, t_clampmode);
|
WriteTrace(TraceGlitch, TraceDebug, "tmu = %d, s_clampmode: %d t_clampmode: %d", tmu, s_clampmode, t_clampmode);
|
||||||
if (tmu == GFX_TMU1 || nbTextureUnits <= 2)
|
if (tmu == GFX_TMU1 || nbTextureUnits <= 2)
|
||||||
|
@ -750,13 +750,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
if (tmu == GFX_TMU1 && nbTextureUnits <= 2) return;
|
if (tmu == GFX_TMU1 && nbTextureUnits <= 2) return;
|
||||||
switch (s_clampmode)
|
switch (s_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_s0 = GL_REPEAT;
|
wrap_s0 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_s0 = GL_CLAMP_TO_EDGE;
|
wrap_s0 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_s0 = GL_MIRRORED_REPEAT_ARB;
|
wrap_s0 = GL_MIRRORED_REPEAT_ARB;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -764,13 +764,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
}
|
}
|
||||||
switch (t_clampmode)
|
switch (t_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_t0 = GL_REPEAT;
|
wrap_t0 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_t0 = GL_CLAMP_TO_EDGE;
|
wrap_t0 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_t0 = GL_MIRRORED_REPEAT_ARB;
|
wrap_t0 = GL_MIRRORED_REPEAT_ARB;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -784,13 +784,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
{
|
{
|
||||||
switch (s_clampmode)
|
switch (s_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_s1 = GL_REPEAT;
|
wrap_s1 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_s1 = GL_CLAMP_TO_EDGE;
|
wrap_s1 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_s1 = GL_MIRRORED_REPEAT_ARB;
|
wrap_s1 = GL_MIRRORED_REPEAT_ARB;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -798,13 +798,13 @@ void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextur
|
||||||
}
|
}
|
||||||
switch (t_clampmode)
|
switch (t_clampmode)
|
||||||
{
|
{
|
||||||
case GR_TEXTURECLAMP_WRAP:
|
case GFX_TEXTURECLAMP_WRAP:
|
||||||
wrap_t1 = GL_REPEAT;
|
wrap_t1 = GL_REPEAT;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_CLAMP:
|
case GFX_TEXTURECLAMP_CLAMP:
|
||||||
wrap_t1 = GL_CLAMP_TO_EDGE;
|
wrap_t1 = GL_CLAMP_TO_EDGE;
|
||||||
break;
|
break;
|
||||||
case GR_TEXTURECLAMP_MIRROR_EXT:
|
case GFX_TEXTURECLAMP_MIRROR_EXT:
|
||||||
wrap_t1 = GL_MIRRORED_REPEAT_ARB;
|
wrap_t1 = GL_MIRRORED_REPEAT_ARB;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -68,7 +68,7 @@ void gfxGammaCorrectionRGB(FxFloat gammaR, FxFloat gammaG, FxFloat gammaB);
|
||||||
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
void gfxTexDownloadMipMap(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
||||||
void gfxTexSource(gfxChipID_t tmu, uint32_t startAddress, uint32_t evenOdd, gfxTexInfo *info);
|
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 gfxTexDetailControl(gfxChipID_t tmu, int lod_bias, FxU8 detail_scale, float detail_max);
|
||||||
void gfxTexClampMode(gfxChipID_t tmu, GrTextureClampMode_t s_clampmode, GrTextureClampMode_t t_clampmode);
|
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, GrTextureFilterMode_t minfilter_mode, GrTextureFilterMode_t magfilter_mode);
|
||||||
|
|
||||||
extern uint32_t nbTextureUnits;
|
extern uint32_t nbTextureUnits;
|
||||||
|
|
|
@ -299,6 +299,13 @@ enum gfxOriginLocation_t
|
||||||
GFX_ORIGIN_ANY = 0xFF,
|
GFX_ORIGIN_ANY = 0xFF,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum gfxTextureClampMode_t
|
||||||
|
{
|
||||||
|
GFX_TEXTURECLAMP_WRAP = 0x0,
|
||||||
|
GFX_TEXTURECLAMP_CLAMP = 0x1,
|
||||||
|
GFX_TEXTURECLAMP_MIRROR_EXT = 0x2,
|
||||||
|
};
|
||||||
|
|
||||||
enum gfxLfbSrcFmt_t
|
enum gfxLfbSrcFmt_t
|
||||||
{
|
{
|
||||||
GFX_LFB_SRC_FMT_565 = 0x00,
|
GFX_LFB_SRC_FMT_565 = 0x00,
|
||||||
|
|
|
@ -826,7 +826,7 @@ void TexCache()
|
||||||
|
|
||||||
if (rdp.cur_cache[i])
|
if (rdp.cur_cache[i])
|
||||||
{
|
{
|
||||||
uint32_t mode_s, mode_t;
|
gfxTextureClampMode_t mode_s, mode_t;
|
||||||
int clamp_s, clamp_t;
|
int clamp_s, clamp_t;
|
||||||
if (rdp.force_wrap && !rdp.texrecting)
|
if (rdp.force_wrap && !rdp.texrecting)
|
||||||
{
|
{
|
||||||
|
@ -842,31 +842,31 @@ void TexCache()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rdp.cur_cache[i]->f_mirror_s)
|
if (rdp.cur_cache[i]->f_mirror_s)
|
||||||
mode_s = GR_TEXTURECLAMP_MIRROR_EXT;
|
mode_s = GFX_TEXTURECLAMP_MIRROR_EXT;
|
||||||
else if (rdp.cur_cache[i]->f_wrap_s)
|
else if (rdp.cur_cache[i]->f_wrap_s)
|
||||||
mode_s = GR_TEXTURECLAMP_WRAP;
|
mode_s = GFX_TEXTURECLAMP_WRAP;
|
||||||
else if (clamp_s)
|
else if (clamp_s)
|
||||||
mode_s = GR_TEXTURECLAMP_CLAMP;
|
mode_s = GFX_TEXTURECLAMP_CLAMP;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (rdp.tiles(tile).mirror_s && voodoo.sup_mirroring)
|
if (rdp.tiles(tile).mirror_s && voodoo.sup_mirroring)
|
||||||
mode_s = GR_TEXTURECLAMP_MIRROR_EXT;
|
mode_s = GFX_TEXTURECLAMP_MIRROR_EXT;
|
||||||
else
|
else
|
||||||
mode_s = GR_TEXTURECLAMP_WRAP;
|
mode_s = GFX_TEXTURECLAMP_WRAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rdp.cur_cache[i]->f_mirror_t)
|
if (rdp.cur_cache[i]->f_mirror_t)
|
||||||
mode_t = GR_TEXTURECLAMP_MIRROR_EXT;
|
mode_t = GFX_TEXTURECLAMP_MIRROR_EXT;
|
||||||
else if (rdp.cur_cache[i]->f_wrap_t)
|
else if (rdp.cur_cache[i]->f_wrap_t)
|
||||||
mode_t = GR_TEXTURECLAMP_WRAP;
|
mode_t = GFX_TEXTURECLAMP_WRAP;
|
||||||
else if (clamp_t)
|
else if (clamp_t)
|
||||||
mode_t = GR_TEXTURECLAMP_CLAMP;
|
mode_t = GFX_TEXTURECLAMP_CLAMP;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (rdp.tiles(tile).mirror_t && voodoo.sup_mirroring)
|
if (rdp.tiles(tile).mirror_t && voodoo.sup_mirroring)
|
||||||
mode_t = GR_TEXTURECLAMP_MIRROR_EXT;
|
mode_t = GFX_TEXTURECLAMP_MIRROR_EXT;
|
||||||
else
|
else
|
||||||
mode_t = GR_TEXTURECLAMP_WRAP;
|
mode_t = GFX_TEXTURECLAMP_WRAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfxTexClampMode(tmu,
|
gfxTexClampMode(tmu,
|
||||||
|
@ -1677,4 +1677,4 @@ void LoadTex(int id, gfxChipID_t tmu)
|
||||||
gfxTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
gfxTexSource(tmu, tex_addr, GR_MIPMAPLEVELMASK_BOTH, t_info);
|
||||||
}
|
}
|
||||||
WriteTrace(TraceRDP, TraceDebug, " | | +- LoadTex end");
|
WriteTrace(TraceRDP, TraceDebug, " | | +- LoadTex end");
|
||||||
}
|
}
|
Loading…
Reference in New Issue