diff options
| author | NeoBrainX <NeoBrainX@gmail.com> | 2013-03-02 00:04:44 +0100 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@gmail.com> | 2013-03-02 00:17:37 +0100 |
| commit | 008fdc73106a142212fc5cd4481d13535103b954 (patch) | |
| tree | bc7307aa6bca3b2f060762c014ef0d09e5e5d533 /Source/Core/VideoCommon/Src/BPStructs.cpp | |
| parent | ef7083d78cdeb9eb8881a0d1593164ad1dd04225 (diff) | |
| parent | cb1d21c032b92412d5d795705642189657db37e3 (diff) | |
Merge branch 'perfqueries'.
Adds support for PE performance metrics.
Used in Super Mario Sunshine's "Scrubbing Sirena Beach" level to determine when enough goop has been cleaned up to finish the level.
Also used in TimeSplitters: Future Perfect to determine the appearance of flares around light sources (e.g. sun).
OpenGL and D3D11 only. D3D9 support unlikely to be added unless anyone bothers to do the work.
Initial work and D3D11 support by me. Kudos go to Billiard for adding the OpenGL support and reviving development of this branch that way :D
Slightly (~7%) decreases performance when performance metrics are used (and only then).
Fixes issue 1498.
Fixes issue 5368.
Diffstat (limited to 'Source/Core/VideoCommon/Src/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/BPStructs.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/Src/BPStructs.cpp b/Source/Core/VideoCommon/Src/BPStructs.cpp index 0d7d741a92..fa6bc08966 100644 --- a/Source/Core/VideoCommon/Src/BPStructs.cpp +++ b/Source/Core/VideoCommon/Src/BPStructs.cpp @@ -31,6 +31,7 @@ #include "VertexShaderManager.h" #include "Thread.h" #include "HW/Memmap.h" +#include "PerfQueryBase.h" using namespace BPFunctions; @@ -62,7 +63,6 @@ void RenderToXFB(const BPCmd &bp, const EFBRectangle &rc, float yScale, float xf { Renderer::RenderToXFB(xfbAddr, dstWidth, dstHeight, rc, gamma); } - void BPWritten(const BPCmd& bp) { /* @@ -144,7 +144,8 @@ void BPWritten(const BPCmd& bp) || bp.address == BPMEM_LOADTLUT0 || bp.address == BPMEM_LOADTLUT1 || bp.address == BPMEM_TEXINVALIDATE - || bp.address == BPMEM_PRELOAD_MODE)) + || bp.address == BPMEM_PRELOAD_MODE + || bp.address == BPMEM_CLEAR_PIXEL_PERF)) { return; } @@ -484,9 +485,10 @@ void BPWritten(const BPCmd& bp) case BPMEM_IND_IMASK: // Index Mask ? case BPMEM_REVBITS: // Always set to 0x0F when GX_InitRevBits() is called. break; - - case BPMEM_UNKNOWN_57: // Sunshine alternates this register between values 0x000 and 0xAAA - DEBUG_LOG(VIDEO, "Unknown BP Reg 0x57: %08x", bp.newvalue); + + case BPMEM_CLEAR_PIXEL_PERF: + // GXClearPixMetric writes 0xAAA here, Sunshine alternates this register between values 0x000 and 0xAAA + g_perf_query->ResetQuery(); break; case BPMEM_PRELOAD_ADDR: |
