mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Chore] (MG_Test/Backend/DirectVulkan/TestExec): get rid of necessary check
This commit is contained in:
@@ -429,10 +429,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto drawFbo =
|
const auto drawFbo = MG_State::pGLContext->GetFramebufferBindingSlot(FramebufferTarget::Draw).GetBoundObject();
|
||||||
MG_State::pGLContext
|
|
||||||
? MG_State::pGLContext->GetFramebufferBindingSlot(FramebufferTarget::Draw).GetBoundObject()
|
|
||||||
: nullptr;
|
|
||||||
const auto defaultFboInfo = MG_Impl::GLImpl::FramebufferImpl::pDefaultFramebufferInfo;
|
const auto defaultFboInfo = MG_Impl::GLImpl::FramebufferImpl::pDefaultFramebufferInfo;
|
||||||
const auto defaultFbo = defaultFboInfo ? defaultFboInfo->defaultFBO : nullptr;
|
const auto defaultFbo = defaultFboInfo ? defaultFboInfo->defaultFBO : nullptr;
|
||||||
const Bool drawTargetsDefault = (drawFbo == defaultFbo) || (drawFbo == nullptr && defaultFbo != nullptr);
|
const Bool drawTargetsDefault = (drawFbo == defaultFbo) || (drawFbo == nullptr && defaultFbo != nullptr);
|
||||||
@@ -1273,7 +1270,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_renderPassManager->EndRenderPass(commandBuffer);
|
m_renderPassManager->EndRenderPass(commandBuffer);
|
||||||
} else if (MG_State::pGLContext) {
|
} else {
|
||||||
const auto targetFbo = MG_State::pGLContext->GetFramebufferObject(targetFboExternalIndex);
|
const auto targetFbo = MG_State::pGLContext->GetFramebufferObject(targetFboExternalIndex);
|
||||||
VkRenderPass offscreenRenderPass = VK_NULL_HANDLE;
|
VkRenderPass offscreenRenderPass = VK_NULL_HANDLE;
|
||||||
VkFramebuffer offscreenFramebuffer = VK_NULL_HANDLE;
|
VkFramebuffer offscreenFramebuffer = VK_NULL_HANDLE;
|
||||||
@@ -1387,10 +1384,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
srcImage = m_swapchainObject.GetImage(m_imageIndexAcquired);
|
srcImage = m_swapchainObject.GetImage(m_imageIndexAcquired);
|
||||||
srcExtent = m_swapchainObject.GetExtent();
|
srcExtent = m_swapchainObject.GetExtent();
|
||||||
} else {
|
} else {
|
||||||
if (!MG_State::pGLContext) {
|
|
||||||
MGLOG_W("BlitFramebuffer skipped: GL context unavailable for read FBO");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const auto readFbo = MG_State::pGLContext->GetFramebufferObject(readFboExternalIndex);
|
const auto readFbo = MG_State::pGLContext->GetFramebufferObject(readFboExternalIndex);
|
||||||
if (!readFbo) {
|
if (!readFbo) {
|
||||||
MGLOG_W("BlitFramebuffer skipped: read FBO %u not found", readFboExternalIndex);
|
MGLOG_W("BlitFramebuffer skipped: read FBO %u not found", readFboExternalIndex);
|
||||||
@@ -1410,10 +1403,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
dstImage = m_swapchainObject.GetImage(m_imageIndexAcquired);
|
dstImage = m_swapchainObject.GetImage(m_imageIndexAcquired);
|
||||||
dstExtent = m_swapchainObject.GetExtent();
|
dstExtent = m_swapchainObject.GetExtent();
|
||||||
} else {
|
} else {
|
||||||
if (!MG_State::pGLContext) {
|
|
||||||
MGLOG_W("BlitFramebuffer skipped: GL context unavailable for draw FBO");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const auto drawFbo = MG_State::pGLContext->GetFramebufferObject(drawFboExternalIndex);
|
const auto drawFbo = MG_State::pGLContext->GetFramebufferObject(drawFboExternalIndex);
|
||||||
if (!drawFbo) {
|
if (!drawFbo) {
|
||||||
MGLOG_W("BlitFramebuffer skipped: draw FBO %u not found", drawFboExternalIndex);
|
MGLOG_W("BlitFramebuffer skipped: draw FBO %u not found", drawFboExternalIndex);
|
||||||
@@ -1556,9 +1545,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
srcDepthExtent = m_swapchainObject.GetExtent();
|
srcDepthExtent = m_swapchainObject.GetExtent();
|
||||||
srcDepthFormat = m_depthStencilFormat;
|
srcDepthFormat = m_depthStencilFormat;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (!MG_State::pGLContext) {
|
|
||||||
MGLOG_W("BlitFramebuffer: GL context unavailable for read depth/stencil FBO");
|
|
||||||
} else {
|
} else {
|
||||||
const auto readFbo = MG_State::pGLContext->GetFramebufferObject(readFboExternalIndex);
|
const auto readFbo = MG_State::pGLContext->GetFramebufferObject(readFboExternalIndex);
|
||||||
if (!readFbo) {
|
if (!readFbo) {
|
||||||
@@ -1571,7 +1557,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
MGLOG_W("BlitFramebuffer: read FBO %u has no depth/stencil image", readFboExternalIndex);
|
MGLOG_W("BlitFramebuffer: read FBO %u has no depth/stencil image", readFboExternalIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (drawIsDefaultFramebuffer) {
|
if (drawIsDefaultFramebuffer) {
|
||||||
if (m_depthStencilImages.empty() || m_depthStencilFormat == VK_FORMAT_UNDEFINED) {
|
if (m_depthStencilImages.empty() || m_depthStencilFormat == VK_FORMAT_UNDEFINED) {
|
||||||
@@ -1852,9 +1837,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MOBILEGL_ASSERT(m_framebufferManager != nullptr, "Present: framebuffer manager is null");
|
MOBILEGL_ASSERT(m_framebufferManager != nullptr, "Present: framebuffer manager is null");
|
||||||
if (!MG_State::pGLContext) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
const auto pendingFbo = MG_State::pGLContext->GetFramebufferObject(targetFboExternalIndex);
|
const auto pendingFbo = MG_State::pGLContext->GetFramebufferObject(targetFboExternalIndex);
|
||||||
if (!pendingFbo) {
|
if (!pendingFbo) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user