We had an old fallback to the EGL GL loop in the Vulkan init. Remove it.

This commit is contained in:
Henrik Rydgård 2019-09-17 10:52:02 +02:00
parent 4cebea6a14
commit 309d6562d5
2 changed files with 19 additions and 4 deletions

View File

@ -141,8 +141,18 @@ bool AndroidVulkanContext::InitAPI() {
}
bool AndroidVulkanContext::InitFromRenderThread(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) {
ILOG("InitSurfaceAndroid: desiredwidth=%d desiredheight=%d", desiredBackbufferSizeX, desiredBackbufferSizeY);
g_Vulkan->InitSurface(WINDOWSYSTEM_ANDROID, (void *)wnd, nullptr);
ILOG("AndroidVulkanContext::InitFromRenderThread: desiredwidth=%d desiredheight=%d", desiredBackbufferSizeX, desiredBackbufferSizeY);
if (!g_Vulkan) {
ELOG("AndroidVulkanContext::InitFromRenderThread: No Vulkan context");
return false;
}
VkResult res = g_Vulkan->InitSurface(WINDOWSYSTEM_ANDROID, (void *)wnd, nullptr);
if (res != VK_SUCCESS) {
ELOG("g_Vulkan->InitSurface failed: '%s'", VulkanResultToString(res));
return false;
}
if (g_validate_) {
int bits = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
g_Vulkan->InitDebugMsgCallback(&Vulkan_Dbg, bits, &g_LogOptions);

View File

@ -974,8 +974,13 @@ retry:
ILOG("Trying again, this time with OpenGL.");
g_Config.iGPUBackend = (int)GPUBackend::OPENGL;
SetGPUBackend((GPUBackend)g_Config.iGPUBackend);
tries++;
goto retry;
// If we were still supporting EGL for GL:
// tries++;
// goto retry;
delete graphicsContext;
graphicsContext = nullptr;
renderLoopRunning = false;
return false;
}
delete graphicsContext;