mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_Backend/DirectVulkan): remove weird texture binding fallback
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user