summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2020-03-12 12:14:03 -0400
committerGravatar GitHub2020-03-12 12:14:03 -0400
commitca2d228c9d72b7660b2a305674c1a25019e638cd (patch)
treee29cd00c2d0de9e1d35388aba070d0ef0b3b7f8f
parentMerge pull request #3496 from vitor-k/remove-enum (diff)
parentNVFlinger: Do the microprofile Flip after processing a valid frame. (diff)
downloadyuzu-ca2d228c9d72b7660b2a305674c1a25019e638cd.tar.gz
yuzu-ca2d228c9d72b7660b2a305674c1a25019e638cd.tar.xz
yuzu-ca2d228c9d72b7660b2a305674c1a25019e638cd.zip
Merge pull request #3497 from FernandoS27/microprogfile-extend
Small corrections and features to microprofile
-rw-r--r--externals/microprofile/microprofile.h1
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/externals/microprofile/microprofile.h b/externals/microprofile/microprofile.h
index cdb312b87..c1556d10c 100644
--- a/externals/microprofile/microprofile.h
+++ b/externals/microprofile/microprofile.h
@@ -243,6 +243,7 @@ typedef uint32_t ThreadIdType;
243#define MICROPROFILE_DEFINE_GPU(var, name, color) MicroProfileToken g_mp_##var = MicroProfileGetToken("GPU", name, color, MicroProfileTokenTypeGpu) 243#define MICROPROFILE_DEFINE_GPU(var, name, color) MicroProfileToken g_mp_##var = MicroProfileGetToken("GPU", name, color, MicroProfileTokenTypeGpu)
244#define MICROPROFILE_TOKEN_PASTE0(a, b) a ## b 244#define MICROPROFILE_TOKEN_PASTE0(a, b) a ## b
245#define MICROPROFILE_TOKEN_PASTE(a, b) MICROPROFILE_TOKEN_PASTE0(a,b) 245#define MICROPROFILE_TOKEN_PASTE(a, b) MICROPROFILE_TOKEN_PASTE0(a,b)
246#define MICROPROFILE_TOKEN(var) g_mp_##var
246#define MICROPROFILE_SCOPE(var) MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(g_mp_##var) 247#define MICROPROFILE_SCOPE(var) MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(g_mp_##var)
247#define MICROPROFILE_SCOPE_TOKEN(token) MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(token) 248#define MICROPROFILE_SCOPE_TOKEN(token) MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo, __LINE__)(token)
248#define MICROPROFILE_SCOPEI(group, name, color) static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp,__LINE__) = MicroProfileGetToken(group, name, color, MicroProfileTokenTypeCpu); MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo,__LINE__)( MICROPROFILE_TOKEN_PASTE(g_mp,__LINE__)) 249#define MICROPROFILE_SCOPEI(group, name, color) static MicroProfileToken MICROPROFILE_TOKEN_PASTE(g_mp,__LINE__) = MicroProfileGetToken(group, name, color, MicroProfileTokenTypeCpu); MicroProfileScopeHandler MICROPROFILE_TOKEN_PASTE(foo,__LINE__)( MICROPROFILE_TOKEN_PASTE(g_mp,__LINE__))
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 134152210..437bc5dee 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -191,8 +191,6 @@ void NVFlinger::Compose() {
191 // Search for a queued buffer and acquire it 191 // Search for a queued buffer and acquire it
192 auto buffer = buffer_queue.AcquireBuffer(); 192 auto buffer = buffer_queue.AcquireBuffer();
193 193
194 MicroProfileFlip();
195
196 if (!buffer) { 194 if (!buffer) {
197 continue; 195 continue;
198 } 196 }
@@ -206,6 +204,8 @@ void NVFlinger::Compose() {
206 gpu.WaitFence(fence.id, fence.value); 204 gpu.WaitFence(fence.id, fence.value);
207 } 205 }
208 206
207 MicroProfileFlip();
208
209 // Now send the buffer to the GPU for drawing. 209 // Now send the buffer to the GPU for drawing.
210 // TODO(Subv): Support more than just disp0. The display device selection is probably based 210 // TODO(Subv): Support more than just disp0. The display device selection is probably based
211 // on which display we're drawing (Default, Internal, External, etc) 211 // on which display we're drawing (Default, Internal, External, etc)