summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderState.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-07-20 12:53:32 -0700
committerPokechu22 <Pokechu022@gmail.com>2021-07-20 19:23:23 -0700
commit19332575aa37def859de4bb7bc6f65f7395b2b33 (patch)
tree191510df417fdd76ab7d04b099c2272ee7aefc73 /Source/Core/VideoCommon/RenderState.cpp
parentb515786c8dd94aac73e59003d9c232bd319ae1bd (diff)
WrapMode=3 behaves the same as Clamp
Diffstat (limited to 'Source/Core/VideoCommon/RenderState.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderState.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/RenderState.cpp b/Source/Core/VideoCommon/RenderState.cpp
index 52aed4613d..291aa9ce91 100644
--- a/Source/Core/VideoCommon/RenderState.cpp
+++ b/Source/Core/VideoCommon/RenderState.cpp
@@ -240,8 +240,9 @@ void SamplerState::Generate(const BPMemory& bp, u32 index)
lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias * (256 / 32) : 0;
// Address modes
+ // Hardware testing indicates that wrap_mode set to 3 behaves the same as clamp.
static constexpr std::array<AddressMode, 4> address_modes = {
- {AddressMode::Clamp, AddressMode::Repeat, AddressMode::MirroredRepeat, AddressMode::Repeat}};
+ {AddressMode::Clamp, AddressMode::Repeat, AddressMode::MirroredRepeat, AddressMode::Clamp}};
wrap_u = address_modes[u32(tm0.wrap_s.Value())];
wrap_v = address_modes[u32(tm0.wrap_t.Value())];
anisotropic_filtering = 0;