mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Unify UpdateCmdInfo
This commit is contained in:
parent
8cef1f0f8d
commit
6a2f45c2e1
@ -123,18 +123,6 @@ GPU_D3D11::~GPU_D3D11() {
|
||||
stockD3D11.Destroy();
|
||||
}
|
||||
|
||||
void GPU_D3D11::UpdateCmdInfo() {
|
||||
if (g_Config.bSoftwareSkinning) {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags &= ~FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexTypeSkinning;
|
||||
} else {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags |= FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexType;
|
||||
}
|
||||
|
||||
CheckGPUFeatures();
|
||||
}
|
||||
|
||||
void GPU_D3D11::CheckGPUFeatures() {
|
||||
u32 features = 0;
|
||||
|
||||
|
@ -70,8 +70,6 @@ protected:
|
||||
void FinishDeferred() override;
|
||||
|
||||
private:
|
||||
void UpdateCmdInfo();
|
||||
|
||||
void Flush() {
|
||||
drawEngine_.Flush();
|
||||
}
|
||||
|
@ -103,18 +103,6 @@ GPU_DX9::GPU_DX9(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_DX9::UpdateCmdInfo() {
|
||||
if (g_Config.bSoftwareSkinning) {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags &= ~FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexTypeSkinning;
|
||||
} else {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags |= FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexType;
|
||||
}
|
||||
|
||||
CheckGPUFeatures();
|
||||
}
|
||||
|
||||
void GPU_DX9::CheckGPUFeatures() {
|
||||
u32 features = 0;
|
||||
|
||||
|
@ -70,8 +70,6 @@ protected:
|
||||
void FinishDeferred() override;
|
||||
|
||||
private:
|
||||
void UpdateCmdInfo();
|
||||
|
||||
void Flush() {
|
||||
drawEngine_.Flush();
|
||||
}
|
||||
|
@ -407,16 +407,6 @@ inline void GPU_GLES::UpdateVsyncInterval(bool force) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void GPU_GLES::UpdateCmdInfo() {
|
||||
if (g_Config.bSoftwareSkinning) {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags &= ~FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexTypeSkinning;
|
||||
} else {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags |= FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexType;
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_GLES::ReapplyGfxState() {
|
||||
GPUCommon::ReapplyGfxState();
|
||||
}
|
||||
|
@ -87,7 +87,6 @@ private:
|
||||
void Reinitialize() override;
|
||||
|
||||
inline void UpdateVsyncInterval(bool force);
|
||||
void UpdateCmdInfo();
|
||||
|
||||
FramebufferManagerGLES *framebufferManagerGL_;
|
||||
TextureCacheGLES *textureCacheGL_;
|
||||
|
@ -402,11 +402,23 @@ GPUCommon::GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw) :
|
||||
ERROR_LOG(G3D, "Command missing from table: %02x (%i)", i, i);
|
||||
}
|
||||
}
|
||||
|
||||
UpdateCmdInfo();
|
||||
}
|
||||
|
||||
GPUCommon::~GPUCommon() {
|
||||
}
|
||||
|
||||
void GPUCommon::UpdateCmdInfo() {
|
||||
if (g_Config.bSoftwareSkinning) {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags &= ~FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexTypeSkinning;
|
||||
} else {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags |= FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexType;
|
||||
}
|
||||
}
|
||||
|
||||
void GPUCommon::BeginHostFrame() {
|
||||
ReapplyGfxState();
|
||||
|
||||
|
@ -72,6 +72,8 @@ public:
|
||||
}
|
||||
virtual void CheckGPUFeatures() = 0;
|
||||
|
||||
void UpdateCmdInfo();
|
||||
|
||||
bool IsReady() override {
|
||||
return true;
|
||||
}
|
||||
|
@ -86,8 +86,6 @@ GPU_Vulkan::GPU_Vulkan(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
||||
ERROR_LOG(G3D, "gstate has drifted out of sync!");
|
||||
}
|
||||
|
||||
UpdateCmdInfo();
|
||||
|
||||
BuildReportingInfo();
|
||||
// Update again after init to be sure of any silly driver problems.
|
||||
UpdateVsyncInterval(true);
|
||||
@ -342,16 +340,6 @@ void GPU_Vulkan::UpdateVsyncInterval(bool force) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void GPU_Vulkan::UpdateCmdInfo() {
|
||||
if (g_Config.bSoftwareSkinning) {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags &= ~FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexTypeSkinning;
|
||||
} else {
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].flags |= FLAG_FLUSHBEFOREONCHANGE;
|
||||
cmdInfo_[GE_CMD_VERTEXTYPE].func = &GPUCommon::Execute_VertexType;
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_Vulkan::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) {
|
||||
host->GPUNotifyDisplay(framebuf, stride, format);
|
||||
framebufferManager_->SetDisplayFramebuffer(framebuf, stride, format);
|
||||
|
@ -84,7 +84,6 @@ private:
|
||||
void CopyDisplayToOutput() override;
|
||||
void Reinitialize() override;
|
||||
inline void UpdateVsyncInterval(bool force);
|
||||
void UpdateCmdInfo();
|
||||
|
||||
void InitDeviceObjects();
|
||||
void DestroyDeviceObjects();
|
||||
|
Loading…
Reference in New Issue
Block a user