mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 22:38:34 +00:00
VideoCommon: Refactor TexMode0 mipmaps disabled test into a helper function
This commit is contained in:
parent
902e5cddf7
commit
0b9a72a62d
8 changed files with 35 additions and 15 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "VideoCommon/FramebufferManagerBase.h"
|
||||
#include "VideoCommon/HiresTextures.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/SamplerCommon.h"
|
||||
#include "VideoCommon/Statistics.h"
|
||||
#include "VideoCommon/TextureCacheBase.h"
|
||||
#include "VideoCommon/TextureDecoder.h"
|
||||
|
@ -440,7 +441,7 @@ TextureCacheBase::TCacheEntryBase* TextureCacheBase::Load(const u32 stage)
|
|||
const int texformat = tex.texImage0[id].format;
|
||||
const u32 tlutaddr = tex.texTlut[id].tmem_offset << 9;
|
||||
const u32 tlutfmt = tex.texTlut[id].tlut_format;
|
||||
const bool use_mipmaps = (tex.texMode0[id].min_filter & 3) != 0;
|
||||
const bool use_mipmaps = SamplerCommon::AreBpTexMode0MipmapsEnabled(tex.texMode0[id]);
|
||||
u32 tex_levels = use_mipmaps ? ((tex.texMode1[id].max_lod + 0xf) / 0x10 + 1) : 1;
|
||||
const bool from_tmem = tex.texImage1[id].image_type != 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue