[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]; const TextureTarget preferredTarget = layout.samplerTextureTargetByBinding[binding];
auto texture = textureUnit.GetBindingSlot(preferredTarget).GetBoundObject(); auto texture = textureUnit.GetBindingSlot(preferredTarget).GetBoundObject();
if (!texture) {
auto& slots = textureUnit.GetAllBindingSlots();
for (auto& slot : slots) {
texture = slot.GetBoundObject();
if (texture) {
break;
}
}
}
if (!texture) { if (!texture) {
return false; return false;
} }
const MG_State::GLState::SamplerObject* samplerToUse = samplerOverride ? samplerOverride.get() : nullptr; const MG_State::GLState::SamplerObject* samplerToUse = samplerOverride ? samplerOverride.get() : texture->GetSamplerObject().get();
if (!samplerToUse) {
auto textureSampler = texture->GetSamplerObject();
if (textureSampler) {
samplerToUse = textureSampler.get();
}
}
if (!samplerToUse) { if (!samplerToUse) {
return false; return false;
} }
@@ -180,6 +180,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
void ShutdownSwapchain(); void ShutdownSwapchain();
// Static functions
static Int GetPresentQueueFamilyIndex(const PhysicalDevice& physicalDevice, VkSurfaceKHR surface, static Int GetPresentQueueFamilyIndex(const PhysicalDevice& physicalDevice, VkSurfaceKHR surface,
const Vector<VkQueueFamilyProperties>& queueFamilies, const Vector<VkQueueFamilyProperties>& queueFamilies,
Int preferredFamilyIndex = -1); Int preferredFamilyIndex = -1);