softgpu: Avoid flush on END.

We only, but always, flush when exiting list interp in FinishDeferred.
It's not necessary at END, and hurts for simple signals that don't stop
list processing.
This commit is contained in:
Unknown W. Brackets 2022-01-31 19:32:46 -08:00
parent 2a82d392e3
commit be8c74cabe
3 changed files with 8 additions and 2 deletions

View file

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

View file

@ -318,6 +318,7 @@ protected:
TextureCacheCommon *textureCache_ = nullptr;
DrawEngineCommon *drawEngineCommon_ = nullptr;
ShaderManagerCommon *shaderManager_ = nullptr;
bool flushOnParams_ = true;
GraphicsContext *gfxCtx_;
Draw::DrawContext *draw_;

View file

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