diff --git a/MobileGL/MG_Backend/DirectVulkan/Renderer/UniformDescriptorBinder.cpp b/MobileGL/MG_Backend/DirectVulkan/Renderer/UniformDescriptorBinder.cpp index 0b71972c..727a358f 100644 --- a/MobileGL/MG_Backend/DirectVulkan/Renderer/UniformDescriptorBinder.cpp +++ b/MobileGL/MG_Backend/DirectVulkan/Renderer/UniformDescriptorBinder.cpp @@ -472,26 +472,11 @@ namespace MobileGL::MG_Backend::DirectVulkan { const TextureTarget preferredTarget = layout.samplerTextureTargetByBinding[binding]; auto texture = textureUnit.GetBindingSlot(preferredTarget).GetBoundObject(); - if (!texture) { - auto& slots = textureUnit.GetAllBindingSlots(); - for (auto& slot : slots) { - texture = slot.GetBoundObject(); - if (texture) { - break; - } - } - } if (!texture) { return false; } - const MG_State::GLState::SamplerObject* samplerToUse = samplerOverride ? samplerOverride.get() : nullptr; - if (!samplerToUse) { - auto textureSampler = texture->GetSamplerObject(); - if (textureSampler) { - samplerToUse = textureSampler.get(); - } - } + const MG_State::GLState::SamplerObject* samplerToUse = samplerOverride ? samplerOverride.get() : texture->GetSamplerObject().get(); if (!samplerToUse) { return false; } diff --git a/MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.h b/MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.h index 71941e4c..e82ecaf4 100644 --- a/MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.h +++ b/MobileGL/MG_Backend/DirectVulkan/Renderer/VulkanRenderer.h @@ -180,6 +180,7 @@ namespace MobileGL::MG_Backend::DirectVulkan { void ShutdownSwapchain(); + // Static functions static Int GetPresentQueueFamilyIndex(const PhysicalDevice& physicalDevice, VkSurfaceKHR surface, const Vector& queueFamilies, Int preferredFamilyIndex = -1);