diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-04-01 21:40:20 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-01 21:40:20 +1000 |
| commit | 8e1fb126d711f7dcecbf16725d35b06cdc8f18b9 (patch) | |
| tree | 033aa6183d883efbc2ebc86e772840ecb98cdc9e /Source/Core/VideoCommon/PerfQueryBase.h | |
| parent | 42964e8531340bbf89345d9f2b23f72e9b497764 (diff) | |
| parent | 474500f07e450eaf9287b6ee7f70389e8f119656 (diff) | |
Merge pull request #7953 from stenzek/lazy-d3d12-perf-queries
D3D12: Fix case where perf queries weren't flushed
Diffstat (limited to 'Source/Core/VideoCommon/PerfQueryBase.h')
| -rw-r--r-- | Source/Core/VideoCommon/PerfQueryBase.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/PerfQueryBase.h b/Source/Core/VideoCommon/PerfQueryBase.h index 449b86cc1b..de99b215c9 100644 --- a/Source/Core/VideoCommon/PerfQueryBase.h +++ b/Source/Core/VideoCommon/PerfQueryBase.h @@ -31,22 +31,31 @@ class PerfQueryBase public: PerfQueryBase() : m_query_count(0) {} virtual ~PerfQueryBase() {} + // Checks if performance queries are enabled in the gameini configuration. // NOTE: Called from CPU+GPU thread static bool ShouldEmulate(); // Begin querying the specified value for the following host GPU commands + // The call to EnableQuery() should be placed immediately before the draw command, otherwise + // there is a risk of GPU resets if the query is left open and the buffer is submitted during + // resource binding (D3D12/Vulkan). virtual void EnableQuery(PerfQueryGroup type) {} + // Stop querying the specified value for the following host GPU commands virtual void DisableQuery(PerfQueryGroup type) {} + // Reset query counters to zero and drop any pending queries virtual void ResetQuery() {} + // Return the measured value for the specified query type // NOTE: Called from CPU thread virtual u32 GetQueryResult(PerfQueryType type) { return 0; } + // Request the value of any pending queries - causes a pipeline flush and thus should be used // carefully! virtual void FlushResults() {} + // True if there are no further pending query results // NOTE: Called from CPU thread virtual bool IsFlushed() const { return true; } |
