mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-04 20:06:51 +00:00
Merge pull request #10611 from hrydgard/vulkan-android-task-switch
Fix issue with Vulkan task switching and resolution changes on Android.
This commit is contained in:
commit
864eb5dcad
@ -448,7 +448,7 @@ retry:
|
||||
case (int)GPUBackend::VULKAN:
|
||||
ILOG("NativeApp.init() -- creating Vulkan context");
|
||||
useCPUThread = false; // The Vulkan render manager manages its own thread.
|
||||
graphicsContext = new AndroidVulkanContext();
|
||||
// We create and destroy the Vulkan graphics context in the "EGL" thread.
|
||||
break;
|
||||
default:
|
||||
ELOG("NativeApp.init(): iGPUBackend %d not supported. Switching to OpenGL.", (int)g_Config.iGPUBackend);
|
||||
@ -931,6 +931,12 @@ retry:
|
||||
|
||||
int tries = 0;
|
||||
|
||||
_assert_msg_(G3D, !graphicsContext, "Graphics context already exists entering runEGLRenderLoop - this is wrong.");
|
||||
|
||||
if (vulkan) {
|
||||
graphicsContext = new AndroidVulkanContext();
|
||||
}
|
||||
|
||||
if (!graphicsContext->InitFromRenderThread(wnd, desiredBackbufferSizeX, desiredBackbufferSizeY, backbuffer_format, androidVersion)) {
|
||||
ELOG("Failed to initialize graphics context.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user