summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/Render.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2015-03-01 13:04:48 +0100
committerdegasus <wickmarkus@web.de>2015-03-02 00:09:09 +0100
commit35373c5185d586602a44c51544f85fb6acde10f1 (patch)
tree0c58693ca9355db8bbd1542fe5dc71cadf2d3e9e /Source/Core/VideoBackends/D3D/Render.cpp
parent8c46bd2d1df048d23479fc3e9e4aa8262cfb6c66 (diff)
TextureCache: load all mipmap levels from custom textures
This drops the "feature" to load level 0 from the custom texture and all other levels from the native one if the size matches. But in my opinion, when a custom texture only provide one level, no more should be used at all.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/Render.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/Render.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp
index 23f9ceae2d..c7204257bd 100644
--- a/Source/Core/VideoBackends/D3D/Render.cpp
+++ b/Source/Core/VideoBackends/D3D/Render.cpp
@@ -1154,7 +1154,7 @@ void Renderer::SetDitherMode()
// TODO: Set dither mode to bpmem.blendmode.dither
}
-void Renderer::SetSamplerState(int stage, int texindex)
+void Renderer::SetSamplerState(int stage, int texindex, bool custom_tex)
{
const FourTexUnits &tex = bpmem.tex[texindex];
const TexMode0 &tm0 = tex.texMode0[stage];
@@ -1179,6 +1179,12 @@ void Renderer::SetSamplerState(int stage, int texindex)
gx_state.sampler[stage].max_lod = (u32)tm1.max_lod;
gx_state.sampler[stage].min_lod = (u32)tm1.min_lod;
gx_state.sampler[stage].lod_bias = (s32)tm0.lod_bias;
+
+ // custom textures may have higher resolution, so disable the max_lod
+ if (custom_tex)
+ {
+ gx_state.sampler[stage].max_lod = 255;
+ }
}
void Renderer::SetInterlacingMode()