mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-14 19:08:08 +00:00
More moves
This commit is contained in:
parent
f3ce685b0e
commit
dce7dde5e6
@ -150,12 +150,15 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, u32 texAddr)
|
||||
SamplerCacheKey key;
|
||||
|
||||
int minFilt = gstate.texfilter & 0x7;
|
||||
int magFilt = gstate.isMagnifyFilteringEnabled();
|
||||
bool sClamp = gstate.isTexCoordClampedS();
|
||||
bool tClamp = gstate.isTexCoordClampedT();
|
||||
key.minFilt = minFilt & 1;
|
||||
key.mipEnable = (minFilt >> 2) & 1;
|
||||
key.mipFilt = (minFilt >> 1) & 1;
|
||||
key.magFilt = gstate.isMagnifyFilteringEnabled();
|
||||
key.sClamp = gstate.isTexCoordClampedS();
|
||||
key.tClamp = gstate.isTexCoordClampedT();
|
||||
key.aniso = false;
|
||||
|
||||
GETexLevelMode mipMode = gstate.getTexLevelMode();
|
||||
|
||||
bool autoMip = mipMode == GE_TEXLEVEL_MODE_AUTO;
|
||||
|
||||
// TODO: Slope mipmap bias is still not well understood.
|
||||
@ -172,18 +175,11 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, u32 texAddr)
|
||||
|
||||
if (noMip) {
|
||||
// Enforce no mip filtering, for safety.
|
||||
minFilt &= 1; // no mipmaps yet
|
||||
key.mipEnable = false;
|
||||
key.mipFilt = 0;
|
||||
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) {
|
||||
key.maxLevel = 0;
|
||||
key.minLevel = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user