mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
move perfquery enable checks into videocommon (caller side)
This commit is contained in:
@ -423,7 +423,8 @@ void BPWritten(const BPCmd& bp)
|
||||
|
||||
case BPMEM_CLEAR_PIXEL_PERF:
|
||||
// GXClearPixMetric writes 0xAAA here, Sunshine alternates this register between values 0x000 and 0xAAA
|
||||
g_perf_query->ResetQuery();
|
||||
if(PerfQueryBase::ShouldEmulate())
|
||||
g_perf_query->ResetQuery();
|
||||
break;
|
||||
|
||||
case BPMEM_PRELOAD_ADDR:
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PerfQueryBase* g_perf_query = 0;
|
||||
|
||||
bool PerfQueryBase::ShouldEmulate() const
|
||||
bool PerfQueryBase::ShouldEmulate()
|
||||
{
|
||||
return g_ActiveConfig.bPerfQueriesEnable;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
|
||||
// Checks if performance queries are enabled in the gameini configuration.
|
||||
// NOTE: Called from CPU+GPU thread
|
||||
bool ShouldEmulate() const;
|
||||
static bool ShouldEmulate();
|
||||
|
||||
// Begin querying the specified value for the following host GPU commands
|
||||
virtual void EnableQuery(PerfQueryGroup type) {}
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "BPStructs.h"
|
||||
#include "XFMemory.h"
|
||||
#include "Debugger.h"
|
||||
#include "PerfQueryBase.h"
|
||||
|
||||
#include "VertexManagerBase.h"
|
||||
#include "MainBase.h"
|
||||
@ -220,8 +221,11 @@ void VertexManager::Flush()
|
||||
bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate
|
||||
&& bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24;
|
||||
|
||||
// TODO: need to merge more stuff into VideoCommon
|
||||
if(PerfQueryBase::ShouldEmulate())
|
||||
g_perf_query->EnableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
|
||||
g_vertex_manager->vFlush(useDstAlpha);
|
||||
if(PerfQueryBase::ShouldEmulate())
|
||||
g_perf_query->DisableQuery(bpmem.zcontrol.early_ztest ? PQG_ZCOMP_ZCOMPLOC : PQG_ZCOMP);
|
||||
|
||||
GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true);
|
||||
|
||||
|
Reference in New Issue
Block a user