diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-11-18 13:08:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 13:08:23 -0500 |
| commit | 6f4bbac528682389e34a1a4985820ee5137619c7 (patch) | |
| tree | 9f07e21fa1da14c7485fddac611a2618888afcf0 /Source/Core/VideoBackends/Vulkan/VKRenderer.cpp | |
| parent | 8b57aad8edd82ccc414775d22e96d896bcac6176 (diff) | |
| parent | 95b99410443e7ae47df1f3e9436e275c80dd3678 (diff) | |
Merge pull request #9956 from Pokechu22/non-power-of-2-wrap-2
VideoCommon: Manually handle texture wrapping and sampling
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/VKRenderer.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKRenderer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp b/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp index 06a3f09518..35c092c147 100644 --- a/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKRenderer.cpp @@ -49,7 +49,7 @@ Renderer::Renderer(std::unique_ptr<SwapChain> swap_chain, float backbuffer_scale { UpdateActiveConfig(); for (SamplerState& m_sampler_state : m_sampler_states) - m_sampler_state.hex = RenderState::GetPointSamplerState().hex; + m_sampler_state = RenderState::GetPointSamplerState(); } Renderer::~Renderer() = default; @@ -545,7 +545,7 @@ void Renderer::SetTexture(u32 index, const AbstractTexture* texture) void Renderer::SetSamplerState(u32 index, const SamplerState& state) { // Skip lookup if the state hasn't changed. - if (m_sampler_states[index].hex == state.hex) + if (m_sampler_states[index] == state) return; // Look up new state and replace in state tracker. @@ -557,7 +557,7 @@ void Renderer::SetSamplerState(u32 index, const SamplerState& state) } StateTracker::GetInstance()->SetSampler(index, sampler); - m_sampler_states[index].hex = state.hex; + m_sampler_states[index] = state; } void Renderer::SetComputeImageTexture(AbstractTexture* texture, bool read, bool write) @@ -588,7 +588,7 @@ void Renderer::ResetSamplerStates() // Invalidate all sampler states, next draw will re-initialize them. for (u32 i = 0; i < m_sampler_states.size(); i++) { - m_sampler_states[i].hex = RenderState::GetPointSamplerState().hex; + m_sampler_states[i] = RenderState::GetPointSamplerState(); StateTracker::GetInstance()->SetSampler(i, g_object_cache->GetPointSampler()); } |
