mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 13:13:24 +02:00
Merge pull request #15371 from unknownbrackets/flushbefore
softgpu: Avoid flush on END
This commit is contained in:
+4
-2
@@ -1348,7 +1348,8 @@ void GPUCommon::Execute_Ret(u32 op, u32 diff) {
|
||||
}
|
||||
|
||||
void GPUCommon::Execute_End(u32 op, u32 diff) {
|
||||
Flush();
|
||||
if (flushOnParams_)
|
||||
Flush();
|
||||
|
||||
const u32 prev = Memory::ReadUnchecked_U32(currentList->pc - 4);
|
||||
UpdatePC(currentList->pc, currentList->pc);
|
||||
@@ -2408,7 +2409,8 @@ void GPUCommon::FastLoadBoneMatrix(u32 target) {
|
||||
}
|
||||
|
||||
if (!g_Config.bSoftwareSkinning) {
|
||||
Flush();
|
||||
if (flushOnParams_)
|
||||
Flush();
|
||||
gstate_c.Dirty(uniformsToDirty);
|
||||
} else {
|
||||
gstate_c.deferredVertTypeDirty |= uniformsToDirty;
|
||||
|
||||
@@ -318,6 +318,7 @@ protected:
|
||||
TextureCacheCommon *textureCache_ = nullptr;
|
||||
DrawEngineCommon *drawEngineCommon_ = nullptr;
|
||||
ShaderManagerCommon *shaderManager_ = nullptr;
|
||||
bool flushOnParams_ = true;
|
||||
|
||||
GraphicsContext *gfxCtx_;
|
||||
Draw::DrawContext *draw_;
|
||||
|
||||
@@ -438,6 +438,9 @@ SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
||||
// Push the initial CLUT buffer in case it's all zero (we push only on change.)
|
||||
drawEngine_->transformUnit.NotifyClutUpdate(clut);
|
||||
|
||||
// No need to flush for simple parameter changes.
|
||||
flushOnParams_ = false;
|
||||
|
||||
if (gfxCtx && draw) {
|
||||
presentation_ = new PresentationCommon(draw_);
|
||||
presentation_->SetLanguage(draw_->GetShaderLanguageDesc().shaderLanguage);
|
||||
|
||||
Reference in New Issue
Block a user