Avoid the most common virtual call when possible.

This commit is contained in:
Henrik Rydgård committed 2018-02-26 13:51:14 +01:00
1 parent 64ec46e705
commit 0b4b2bfe9c
2 files changed
+6 -1

No files matched your search

+3
View File
@@ -79,6 +79,9 @@ public:
bool IsCodePtrVertexDecoder(const u8 *ptr) const {
return decJitCache_->IsInSpace(ptr);
}
int GetNumDrawCalls() const {
return numDrawCalls;
}
protected:
virtual void ClearTrackedVertexArrays() {}
+3 -1
View File
@@ -985,7 +985,9 @@ void GPUCommon::FastRunLoop(DisplayList &list) {
} else {
uint64_t flags = info.flags;
if (flags & FLAG_FLUSHBEFOREONCHANGE) {
drawEngineCommon_->DispatchFlush();
if (drawEngineCommon_->GetNumDrawCalls()) {
drawEngineCommon_->DispatchFlush();
}
}
gstate.cmdmem[cmd] = op;
if (flags & (FLAG_EXECUTE | FLAG_EXECUTEONCHANGE)) {