Revert Buffer cache changes and setup additional macros.

This commit is contained in:
Fernando Sahmkow 2022-11-18 00:21:13 +01:00
parent 18637766ef
commit ce448ce770
7 changed files with 179 additions and 128 deletions

View file

@ -12,6 +12,7 @@
#include "common/assert.h"
#include "common/fs/fs.h"
#include "common/fs/path_util.h"
#include "common/microprofile.h"
#include "common/settings.h"
#include "video_core/engines/maxwell_3d.h"
#include "video_core/macro/macro.h"
@ -22,6 +23,8 @@
#include "video_core/macro/macro_jit_x64.h"
#endif
MICROPROFILE_DEFINE(MacroHLE, "GPU", "Execute macro hle", MP_RGB(128, 192, 192));
namespace Tegra {
static void Dump(u64 hash, std::span<const u32> code) {
@ -60,6 +63,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
if (compiled_macro != macro_cache.end()) {
const auto& cache_info = compiled_macro->second;
if (cache_info.has_hle_program) {
MICROPROFILE_SCOPE(MacroHLE);
cache_info.hle_program->Execute(parameters, method);
} else {
maxwell3d.RefreshParameters();
@ -106,6 +110,7 @@ void MacroEngine::Execute(u32 method, const std::vector<u32>& parameters) {
if (auto hle_program = hle_macros->GetHLEProgram(cache_info.hash)) {
cache_info.has_hle_program = true;
cache_info.hle_program = std::move(hle_program);
MICROPROFILE_SCOPE(MacroHLE);
cache_info.hle_program->Execute(parameters, method);
} else {
maxwell3d.RefreshParameters();