[Fix] (MG_Backend/DirectVulkan): remove weird texture binding fallback

This commit is contained in:
2026-02-27 16:22:19 +08:00
parent 963e88943c
commit 918b39bb63
2 changed files with 2 additions and 16 deletions
@@ -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;
}
@@ -180,6 +180,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
void ShutdownSwapchain();
// Static functions
static Int GetPresentQueueFamilyIndex(const PhysicalDevice& physicalDevice, VkSurfaceKHR surface,
const Vector<VkQueueFamilyProperties>& queueFamilies,
Int preferredFamilyIndex = -1);