Merge pull request #15371 from unknownbrackets/flushbefore

softgpu: Avoid flush on END
This commit is contained in:
Henrik Rydgård
2022-02-01 08:03:03 +01:00
committed by GitHub
3 changed files with 8 additions and 2 deletions
+4 -2
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;
+1
View File
@@ -318,6 +318,7 @@ protected:
TextureCacheCommon *textureCache_ = nullptr;
DrawEngineCommon *drawEngineCommon_ = nullptr;
ShaderManagerCommon *shaderManager_ = nullptr;
bool flushOnParams_ = true;
GraphicsContext *gfxCtx_;
Draw::DrawContext *draw_;
+3
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);