mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
More moves
This commit is contained in:
parent
f3ce685b0e
commit
dce7dde5e6
1 changed files with 9 additions and 13 deletions
|
@ -150,12 +150,15 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, u32 texAddr)
|
||||||
SamplerCacheKey key;
|
SamplerCacheKey key;
|
||||||
|
|
||||||
int minFilt = gstate.texfilter & 0x7;
|
int minFilt = gstate.texfilter & 0x7;
|
||||||
int magFilt = gstate.isMagnifyFilteringEnabled();
|
key.minFilt = minFilt & 1;
|
||||||
bool sClamp = gstate.isTexCoordClampedS();
|
key.mipEnable = (minFilt >> 2) & 1;
|
||||||
bool tClamp = gstate.isTexCoordClampedT();
|
key.mipFilt = (minFilt >> 1) & 1;
|
||||||
|
key.magFilt = gstate.isMagnifyFilteringEnabled();
|
||||||
|
key.sClamp = gstate.isTexCoordClampedS();
|
||||||
|
key.tClamp = gstate.isTexCoordClampedT();
|
||||||
|
key.aniso = false;
|
||||||
|
|
||||||
GETexLevelMode mipMode = gstate.getTexLevelMode();
|
GETexLevelMode mipMode = gstate.getTexLevelMode();
|
||||||
|
|
||||||
bool autoMip = mipMode == GE_TEXLEVEL_MODE_AUTO;
|
bool autoMip = mipMode == GE_TEXLEVEL_MODE_AUTO;
|
||||||
|
|
||||||
// TODO: Slope mipmap bias is still not well understood.
|
// TODO: Slope mipmap bias is still not well understood.
|
||||||
|
@ -172,18 +175,11 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, u32 texAddr)
|
||||||
|
|
||||||
if (noMip) {
|
if (noMip) {
|
||||||
// Enforce no mip filtering, for safety.
|
// Enforce no mip filtering, for safety.
|
||||||
minFilt &= 1; // no mipmaps yet
|
key.mipEnable = false;
|
||||||
|
key.mipFilt = 0;
|
||||||
lodBias = 0.0f;
|
lodBias = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
key.minFilt = minFilt & 1;
|
|
||||||
key.mipEnable = (minFilt >> 2) & 1;
|
|
||||||
key.mipFilt = (minFilt >> 1) & 1;
|
|
||||||
key.magFilt = magFilt & 1;
|
|
||||||
key.sClamp = sClamp;
|
|
||||||
key.tClamp = tClamp;
|
|
||||||
key.aniso = false;
|
|
||||||
|
|
||||||
if (!key.mipEnable) {
|
if (!key.mipEnable) {
|
||||||
key.maxLevel = 0;
|
key.maxLevel = 0;
|
||||||
key.minLevel = 0;
|
key.minLevel = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue