Skip to content

Commit

Permalink
Merge pull request #9725 from hrydgard/remove-mipmap-setting
Browse files Browse the repository at this point in the history
Remove the Mipmap setting. One step forward for #8171
  • Loading branch information
unknownbrackets committed May 26, 2017
2 parents 4b46bb4 + 1b05a54 commit ba48385
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 40 deletions.
1 change: 0 additions & 1 deletion Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,6 @@ static ConfigSetting graphicsSettings[] = {
ConfigSetting("ImmersiveMode", &g_Config.bImmersiveMode, false, true, true),

ReportedConfigSetting("TrueColor", &g_Config.bTrueColor, true, true, true),
ReportedConfigSetting("MipMap", &g_Config.bMipMap, true, true, true),
ReportedConfigSetting("ReplaceTextures", &g_Config.bReplaceTextures, true, true, true),
ReportedConfigSetting("SaveNewTextures", &g_Config.bSaveNewTextures, false, true, true),

Expand Down
1 change: 0 additions & 1 deletion Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ struct Config {
int iAnisotropyLevel; // 0 - 5, powers of 2: 0 = 1x = no aniso
int bHighQualityDepth;
bool bTrueColor;
bool bMipMap;
bool bReplaceTextures;
bool bSaveNewTextures;
int iTexScalingLevel; // 1 = off, 2 = 2x, ..., 5 = 5x
Expand Down
2 changes: 1 addition & 1 deletion GPU/Common/TextureCacheCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void TextureCacheCommon::GetSamplingParams(int &minFilt, int &magFilt, bool &sCl
}

// If mip level is forced to zero, disable mipmapping.
bool noMip = !g_Config.bMipMap || maxLevel == 0 || (!autoMip && lodBias <= 0.0f);
bool noMip = maxLevel == 0 || (!autoMip && lodBias <= 0.0f);
if (IsFakeMipmapChange())
noMip = noMip || !autoMip;

Expand Down
11 changes: 2 additions & 9 deletions GPU/D3D11/TextureCacheD3D11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,6 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma
}
}

// In addition, simply don't load more than level 0 if g_Config.bMipMap is false.
if (!g_Config.bMipMap) {
maxLevel = 0;
}

// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
DXGI_FORMAT dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());

Expand All @@ -539,10 +534,8 @@ void TextureCacheD3D11::BuildTexture(TexCacheEntry *const entry, bool replaceIma
// We're replacing, so we won't scale.
scaleFactor = 1;
entry->status |= TexCacheEntry::STATUS_IS_SCALED;
if (g_Config.bMipMap) {
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}

// Don't scale the PPGe texture.
Expand Down
11 changes: 2 additions & 9 deletions GPU/Directx9/TextureCacheDX9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,6 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage
}
}

// In addition, simply don't load more than level 0 if g_Config.bMipMap is false.
if (!g_Config.bMipMap) {
maxLevel = 0;
}

// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
D3DFORMAT dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());

Expand All @@ -544,10 +539,8 @@ void TextureCacheDX9::BuildTexture(TexCacheEntry *const entry, bool replaceImage
// We're replacing, so we won't scale.
scaleFactor = 1;
entry->status |= TexCacheEntry::STATUS_IS_SCALED;
if (g_Config.bMipMap) {
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}

// Don't scale the PPGe texture.
Expand Down
11 changes: 2 additions & 9 deletions GPU/GLES/TextureCacheGLES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,6 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
}
}

// In addition, simply don't load more than level 0 if g_Config.bMipMap is false.
if (!g_Config.bMipMap) {
maxLevel = 0;
}

// If GLES3 is available, we can preallocate the storage, which makes texture loading more efficient.
GLenum dstFmt = GetDestFormat(GETextureFormat(entry->format), gstate.getClutPaletteFormat());

Expand All @@ -626,10 +621,8 @@ void TextureCacheGLES::BuildTexture(TexCacheEntry *const entry, bool replaceImag
// We're replacing, so we won't scale.
scaleFactor = 1;
entry->status |= TexCacheEntry::STATUS_IS_SCALED;
if (g_Config.bMipMap) {
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}

// Don't scale the PPGe texture.
Expand Down
6 changes: 3 additions & 3 deletions GPU/Software/Rasterizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ void DrawTriangleSlice(
int maxTexLevel = gstate.getTextureMaxLevel();
u8 *texptr[8] = {NULL};

if ((gstate.texfilter & 4) == 0 || !g_Config.bMipMap) {
if ((gstate.texfilter & 4) == 0) {
// No mipmapping enabled
maxTexLevel = 0;
}
Expand Down Expand Up @@ -1570,7 +1570,7 @@ void DrawPoint(const VertexData &v0)
magFilt = 1;
}
}
if ((gstate.texfilter & 4) == 0 || !g_Config.bMipMap) {
if ((gstate.texfilter & 4) == 0) {
// No mipmapping enabled
maxTexLevel = 0;
}
Expand Down Expand Up @@ -1643,7 +1643,7 @@ void DrawLine(const VertexData &v0, const VertexData &v1)
int maxTexLevel = gstate.getTextureMaxLevel();
u8 *texptr[8] = {NULL};

if ((gstate.texfilter & 4) == 0 || !g_Config.bMipMap) {
if ((gstate.texfilter & 4) == 0) {
// No mipmapping enabled
maxTexLevel = 0;
}
Expand Down
8 changes: 3 additions & 5 deletions GPU/Vulkan/TextureCacheVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
}

// In addition, simply don't load more than level 0 if g_Config.bMipMap is false.
if (!g_Config.bMipMap || badMipSizes) {
if (badMipSizes) {
maxLevel = 0;
}

Expand All @@ -538,10 +538,8 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry, bool replaceIm
// We're replacing, so we won't scale.
scaleFactor = 1;
entry->status |= TexCacheEntry::STATUS_IS_SCALED;
if (g_Config.bMipMap) {
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}
maxLevel = replaced.MaxLevel();
badMipSizes = false;
}

// Don't scale the PPGe texture.
Expand Down
1 change: 0 additions & 1 deletion UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ void GameSettingsScreen::CreateViews() {
#ifdef _WIN32
graphicsSettings->Add(new CheckBox(&g_Config.bVSync, gr->T("VSync")));
#endif
graphicsSettings->Add(new CheckBox(&g_Config.bMipMap, gr->T("Mipmapping")));

CheckBox *hwTransform = graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gr->T("Hardware Transform")));
hwTransform->OnClick.Handle(this, &GameSettingsScreen::OnHardwareTransform);
Expand Down
1 change: 0 additions & 1 deletion headless/Headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ int main(int argc, const char* argv[])
g_Config.bVertexDecoderJit = true;
g_Config.bBlockTransferGPU = true;
g_Config.iSplineBezierQuality = 2;
g_Config.bMipMap = true;

#ifdef _WIN32
InitSysDirectories();
Expand Down

0 comments on commit ba48385

Please sign in to comment.