mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 14:18:31 +09:00
[Chore] (MG_Backend/DirectVulkan): hard assert instead of silently fallback
This commit is contained in:
@@ -480,8 +480,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_framebufferManager &&
|
||||
m_framebufferManager->Transition(commandBuffer,
|
||||
if (m_framebufferManager->Transition(commandBuffer,
|
||||
VkFramebufferManager::TransitionResource::OffscreenColorTexture,
|
||||
VkFramebufferManager::TransitionUsage::ShaderRead,
|
||||
texture->GetExternalIndex())) {
|
||||
|
||||
@@ -90,9 +90,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
Bool VkTextureSamplerManager::SyncTextureAndGetDescriptor(const MG_State::GLState::ITextureObject& texture,
|
||||
const MG_State::GLState::SamplerObject* samplerOverride,
|
||||
VkDescriptorImageInfo& outImageInfo) {
|
||||
if (m_device == VK_NULL_HANDLE) {
|
||||
return GetFallbackDescriptor(outImageInfo);
|
||||
}
|
||||
MOBILEGL_ASSERT(m_device != VK_NULL_HANDLE, "SyncTextureAndGetDescriptor: m_device == VK_NULL_HANDLE");
|
||||
|
||||
auto it = m_textureResources.find(texture.GetExternalIndex());
|
||||
if (it == m_textureResources.end()) {
|
||||
|
||||
@@ -160,7 +160,6 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
payload.renderPass = (m_activeRenderPass != VK_NULL_HANDLE) ? m_activeRenderPass : GetDefaultLoadRenderPass();
|
||||
payload.subpass = 0;
|
||||
payload.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
if (MG_State::pGLContext != nullptr) {
|
||||
const Bool depthTestEnabled = MG_State::pGLContext->IsCapabilityEnabled(CapabilityInput::DepthTest);
|
||||
payload.depthTestEnable = depthTestEnabled;
|
||||
payload.depthWriteEnable = depthTestEnabled && MG_State::pGLContext->GetDepthMask();
|
||||
@@ -183,7 +182,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
if (colorMask.y()) payload.colorWriteMask |= VK_COLOR_COMPONENT_G_BIT;
|
||||
if (colorMask.z()) payload.colorWriteMask |= VK_COLOR_COMPONENT_B_BIT;
|
||||
if (colorMask.w()) payload.colorWriteMask |= VK_COLOR_COMPONENT_A_BIT;
|
||||
}
|
||||
|
||||
payload.stages = &stages;
|
||||
payload.vertexInputState = &vertexInputState;
|
||||
return m_pipelineFactory->GetOrCreatePipeline(payload);
|
||||
|
||||
Reference in New Issue
Block a user