From e936e7498a714e481a5525613cd45a9c6af9fe09 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 10 Apr 2024 12:14:29 +1000 Subject: [PATCH] VulkanDevice: Fix incorrect null texture bind condition --- src/util/vulkan_device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/vulkan_device.cpp b/src/util/vulkan_device.cpp index 739fe80da..272f303a9 100644 --- a/src/util/vulkan_device.cpp +++ b/src/util/vulkan_device.cpp @@ -3532,14 +3532,14 @@ void VulkanDevice::SetTextureSampler(u32 slot, GPUTexture* texture, GPUSampler* { VulkanTexture* T = texture ? static_cast(texture) : m_null_texture.get(); const VkSampler vsampler = static_cast(sampler ? sampler : m_nearest_sampler.get())->GetSampler(); - if (m_current_textures[slot] != texture || m_current_samplers[slot] != vsampler) + if (m_current_textures[slot] != T || m_current_samplers[slot] != vsampler) { m_current_textures[slot] = T; m_current_samplers[slot] = vsampler; m_dirty_flags |= DIRTY_FLAG_TEXTURES_OR_SAMPLERS; } - if (T) + if (texture) { T->CommitClear(); T->SetUseFenceCounter(GetCurrentFenceCounter());