summaryrefslogtreecommitdiff
path: root/src/video_core/macro/macro.cpp
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2022-11-18 00:21:13 +0100
committerGravatar Fernando Sahmkow2023-01-01 16:43:57 -0500
commitce448ce770b6c329caec7ad1ae00e01dddb67b03 (patch)
tree88a76a0416244c89d1031551b1a419a606324004 /src/video_core/macro/macro.cpp
parentMacroHLE: Reduce massive calculations on sizing estimation. (diff)
downloadyuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.gz
yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.tar.xz
yuzu-ce448ce770b6c329caec7ad1ae00e01dddb67b03.zip
Revert Buffer cache changes and setup additional macros.
Diffstat (limited to 'src/video_core/macro/macro.cpp')
-rw-r--r--src/video_core/macro/macro.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp
index 01dd25f95..49c47dafe 100644
--- a/src/video_core/macro/macro.cpp
+++ b/src/video_core/macro/macro.cpp
@@ -12,6 +12,7 @@
12#include "common/assert.h" 12#include "common/assert.h"
13#include "common/fs/fs.h" 13#include "common/fs/fs.h"
14#include "common/fs/path_util.h" 14#include "common/fs/path_util.h"
15#include "common/microprofile.h"
15#include "common/settings.h" 16#include "common/settings.h"
16#include "video_core/engines/maxwell_3d.h" 17#include "video_core/engines/maxwell_3d.h"
17#include "video_core/macro/macro.h" 18#include "video_core/macro/macro.h"
@@ -22,6 +23,8 @@
22#include "video_core/macro/macro_jit_x64.h" 23#include "video_core/macro/macro_jit_x64.h"
23#endif 24#endif
24 25
26MICROPROFILE_DEFINE(MacroHLE, "GPU", "Execute macro hle", MP_RGB(128, 192, 192));
27
25namespace Tegra { 28namespace Tegra {
26 29
27static void Dump(u64 hash, std::span<const u32> code) { 30static void Dump(u64 hash, std::span<const u32> code) {
@@ -60,6 +63,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
60 if (compiled_macro != macro_cache.end()) { 63 if (compiled_macro != macro_cache.end()) {
61 const auto& cache_info = compiled_macro->second; 64 const auto& cache_info = compiled_macro->second;
62 if (cache_info.has_hle_program) { 65 if (cache_info.has_hle_program) {
66 MICROPROFILE_SCOPE(MacroHLE);
63 cache_info.hle_program->Execute(parameters, method); 67 cache_info.hle_program->Execute(parameters, method);
64 } else { 68 } else {
65 maxwell3d.RefreshParameters(); 69 maxwell3d.RefreshParameters();
@@ -106,6 +110,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
106 if (auto hle_program = hle_macros->GetHLEProgram(cache_info.hash)) { 110 if (auto hle_program = hle_macros->GetHLEProgram(cache_info.hash)) {
107 cache_info.has_hle_program = true; 111 cache_info.has_hle_program = true;
108 cache_info.hle_program = std::move(hle_program); 112 cache_info.hle_program = std::move(hle_program);
113 MICROPROFILE_SCOPE(MacroHLE);
109 cache_info.hle_program->Execute(parameters, method); 114 cache_info.hle_program->Execute(parameters, method);
110 } else { 115 } else {
111 maxwell3d.RefreshParameters(); 116 maxwell3d.RefreshParameters();