mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Plumb in a GPUCommon pointer in the draw engines. (Hopefully can get rid of this later)
This commit is contained in:
parent
b47c9b6dd2
commit
190af89d9f
6 changed files with 12 additions and 0 deletions
|
@ -82,6 +82,11 @@ public:
|
|||
virtual ~DrawEngineCommon();
|
||||
|
||||
void Init();
|
||||
|
||||
void SetGPUCommon(GPUCommon *gpuCommon) {
|
||||
gpuCommon_ = gpuCommon;
|
||||
}
|
||||
|
||||
virtual void DeviceLost() = 0;
|
||||
virtual void DeviceRestore(Draw::DrawContext *draw) = 0;
|
||||
|
||||
|
@ -330,4 +335,6 @@ protected:
|
|||
Vec2f minOffset_;
|
||||
Vec2f maxOffset_;
|
||||
bool offsetOutsideEdge_;
|
||||
|
||||
GPUCommon *gpuCommon_;
|
||||
};
|
||||
|
|
|
@ -58,6 +58,7 @@ GPU_D3D11::GPU_D3D11(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
textureCache_ = textureCacheD3D11_;
|
||||
drawEngineCommon_ = &drawEngine_;
|
||||
shaderManager_ = shaderManagerD3D11_;
|
||||
drawEngine_.SetGPUCommon(this);
|
||||
drawEngine_.SetShaderManager(shaderManagerD3D11_);
|
||||
drawEngine_.SetTextureCache(textureCacheD3D11_);
|
||||
drawEngine_.SetFramebufferManager(framebufferManagerD3D11_);
|
||||
|
|
|
@ -56,6 +56,7 @@ GPU_DX9::GPU_DX9(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
drawEngineCommon_ = &drawEngine_;
|
||||
shaderManager_ = shaderManagerDX9_;
|
||||
|
||||
drawEngine_.SetGPUCommon(this);
|
||||
drawEngine_.SetShaderManager(shaderManagerDX9_);
|
||||
drawEngine_.SetTextureCache(textureCacheDX9_);
|
||||
drawEngine_.SetFramebufferManager(framebufferManagerDX9_);
|
||||
|
|
|
@ -58,6 +58,7 @@ GPU_GLES::GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
drawEngineCommon_ = &drawEngine_;
|
||||
shaderManager_ = shaderManagerGL_;
|
||||
|
||||
drawEngine_.SetGPUCommon(this);
|
||||
drawEngine_.SetShaderManager(shaderManagerGL_);
|
||||
drawEngine_.SetTextureCache(textureCacheGL_);
|
||||
drawEngine_.SetFramebufferManager(framebufferManagerGL_);
|
||||
|
|
|
@ -436,6 +436,7 @@ SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
if (!drawEngine_)
|
||||
return;
|
||||
|
||||
drawEngine_->SetGPUCommon(this);
|
||||
drawEngine_->Init();
|
||||
drawEngineCommon_ = drawEngine_;
|
||||
|
||||
|
|
|
@ -64,6 +64,7 @@ GPU_Vulkan::GPU_Vulkan(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
|||
drawEngineCommon_ = &drawEngine_;
|
||||
shaderManager_ = shaderManagerVulkan_;
|
||||
|
||||
drawEngine_.SetGPUCommon(this);
|
||||
drawEngine_.SetTextureCache(textureCacheVulkan_);
|
||||
drawEngine_.SetFramebufferManager(framebufferManagerVulkan_);
|
||||
drawEngine_.SetShaderManager(shaderManagerVulkan_);
|
||||
|
|
Loading…
Add table
Reference in a new issue