From ffb73f43e10aec69f6bff0a0dc8dcd9cc8c3a008 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Wed, 30 Nov 2022 21:11:37 -0600 Subject: [PATCH] VideoBackends:Metal: Fix min/max lod when setting non-zero-based samplers --- Source/Core/VideoBackends/Metal/MTLStateTracker.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoBackends/Metal/MTLStateTracker.mm b/Source/Core/VideoBackends/Metal/MTLStateTracker.mm index 7cfb37e751..b3a8251100 100644 --- a/Source/Core/VideoBackends/Metal/MTLStateTracker.mm +++ b/Source/Core/VideoBackends/Metal/MTLStateTracker.mm @@ -809,8 +809,8 @@ void Metal::StateTracker::PrepareRender() m_dirty_samplers &= ~pipe->GetSamplers(); NSRange range = RangeOfBits(dirty); [enc setFragmentSamplerStates:&m_state.samplers[range.location] - lodMinClamps:m_state.sampler_min_lod.data() - lodMaxClamps:m_state.sampler_max_lod.data() + lodMinClamps:&m_state.sampler_min_lod[range.location] + lodMaxClamps:&m_state.sampler_max_lod[range.location] withRange:range]; } if (m_state.perf_query_group != m_current.perf_query_group)