mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
WrapMode=3 behaves the same as Clamp
This commit is contained in:
parent
b515786c8d
commit
19332575aa
@ -713,6 +713,8 @@ enum class WrapMode : u32
|
|||||||
Clamp = 0,
|
Clamp = 0,
|
||||||
Repeat = 1,
|
Repeat = 1,
|
||||||
Mirror = 2,
|
Mirror = 2,
|
||||||
|
// Hardware testing indicates that WrapMode set to 3 behaves the same as clamp, though this is an
|
||||||
|
// invalid value
|
||||||
};
|
};
|
||||||
template <>
|
template <>
|
||||||
struct fmt::formatter<WrapMode> : EnumFormatter<WrapMode::Mirror>
|
struct fmt::formatter<WrapMode> : EnumFormatter<WrapMode::Mirror>
|
||||||
|
@ -240,8 +240,9 @@ void SamplerState::Generate(const BPMemory& bp, u32 index)
|
|||||||
lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias * (256 / 32) : 0;
|
lod_bias = SamplerCommon::AreBpTexMode0MipmapsEnabled(tm0) ? tm0.lod_bias * (256 / 32) : 0;
|
||||||
|
|
||||||
// Address modes
|
// Address modes
|
||||||
|
// Hardware testing indicates that wrap_mode set to 3 behaves the same as clamp.
|
||||||
static constexpr std::array<AddressMode, 4> address_modes = {
|
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_u = address_modes[u32(tm0.wrap_s.Value())];
|
||||||
wrap_v = address_modes[u32(tm0.wrap_t.Value())];
|
wrap_v = address_modes[u32(tm0.wrap_t.Value())];
|
||||||
anisotropic_filtering = 0;
|
anisotropic_filtering = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user