Vulkan: Consistently init the graphicsContext.

This was only happening properly on Windows before.
This commit is contained in:
Unknown W. Brackets 2016-10-01 11:22:53 -07:00
parent 8b5693b4d7
commit 1c3e048070
4 changed files with 6 additions and 3 deletions

View File

@ -60,6 +60,7 @@ static bool powerSaving = false;
void Core_SetGraphicsContext(GraphicsContext *ctx) {
graphicsContext = ctx;
PSP_CoreParameter().graphicsContext = graphicsContext;
}
void Core_NotifyWindowHidden(bool hidden) {

View File

@ -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;

View File

@ -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_);

View File

@ -165,8 +165,6 @@ unsigned int WINAPI TheThread(void *)
ExitProcess(1);
}
PSP_CoreParameter().graphicsContext = graphicsContext;
NativeInitGraphics(graphicsContext);
NativeResized();