mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
Vulkan: Consistently init the graphicsContext.
This was only happening properly on Windows before.
This commit is contained in:
parent
8b5693b4d7
commit
1c3e048070
@ -60,6 +60,7 @@ static bool powerSaving = false;
|
||||
|
||||
void Core_SetGraphicsContext(GraphicsContext *ctx) {
|
||||
graphicsContext = ctx;
|
||||
PSP_CoreParameter().graphicsContext = graphicsContext;
|
||||
}
|
||||
|
||||
void Core_NotifyWindowHidden(bool hidden) {
|
||||
|
@ -66,6 +66,10 @@ bool GPU_Init(GraphicsContext *ctx, Thin3DContext *thin3d) {
|
||||
return false;
|
||||
case GPUCORE_VULKAN:
|
||||
#ifndef NO_VULKAN
|
||||
if (!ctx) {
|
||||
ERROR_LOG(G3D, "Unable to init Vulkan GPU backend, no context");
|
||||
break;
|
||||
}
|
||||
SetGPU(new GPU_Vulkan(ctx));
|
||||
#endif
|
||||
break;
|
||||
|
@ -401,7 +401,7 @@ GPU_Vulkan::GPU_Vulkan(GraphicsContext *ctx)
|
||||
|
||||
shaderManager_ = new ShaderManagerVulkan(vulkan_);
|
||||
pipelineManager_ = new PipelineManagerVulkan(vulkan_);
|
||||
framebufferManager_ = new FramebufferManagerVulkan(vulkan_),
|
||||
framebufferManager_ = new FramebufferManagerVulkan(vulkan_);
|
||||
drawEngine_.SetTextureCache(&textureCache_);
|
||||
drawEngine_.SetFramebufferManager(framebufferManager_);
|
||||
drawEngine_.SetShaderManager(shaderManager_);
|
||||
|
@ -165,8 +165,6 @@ unsigned int WINAPI TheThread(void *)
|
||||
ExitProcess(1);
|
||||
}
|
||||
|
||||
PSP_CoreParameter().graphicsContext = graphicsContext;
|
||||
|
||||
NativeInitGraphics(graphicsContext);
|
||||
NativeResized();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user