aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/macro.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/macro.cpp')
-rw-r--r--src/video_core/macro.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/video_core/macro.cpp b/src/video_core/macro.cpp
index 4364204740..86f528af15 100644
--- a/src/video_core/macro.cpp
+++ b/src/video_core/macro.cpp
@@ -4,8 +4,6 @@
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <cstdlib>
-#include <unordered_set>
#include <cstring>
#include <fstream>
#include <optional>
@@ -1341,42 +1339,6 @@ static void Dump(u64 hash, std::span<const u32> code, bool decompiled = false) {
void MacroEngine::Execute(Core::System& system, Engines::Maxwell3D& maxwell3d, u32 method,
std::span<const u32> parameters) {
- if (native_turing) {
- maxwell3d.RefreshParameters();
- const auto context = reinterpret_cast<std::uintptr_t>(this);
- static std::unordered_set<std::uintptr_t> captured_contexts;
- if (std::getenv("EDEN_NATIVE_FRAME_CAPTURE") && captured_contexts.insert(context).second) {
- std::ofstream dump("native-graphics-mme-" + std::to_string(context) + ".bin", std::ios::binary);
- dump.write(reinterpret_cast<const char*>(native_code.data()), sizeof(native_code));
- }
- LOG_DEBUG(HW_GPU, "Native MME context={:#x}", context);
- LOG_DEBUG(HW_GPU, "Native MME start={:#x}, parameters={}, data={:08x}", method, parameters.size(), fmt::join(parameters, ","));
- u32 dma_count{};
- const auto result = native_interpreter.Execute(native_code, method, parameters,
- [&](u32 address) { return address < Maxwell3D::Regs::NUM_REGS ? maxwell3d.GetRegisterValue(address) : 0U; },
- [&](u32 address, u32 value) {
- if (address >= 0xe00) return false;
- if (address == 0x158) dma_count = value; // MME_DMA_READ_FIFOED
- maxwell3d.CallMethod(system, address, value, true);
- return true;
- }, [&]() -> std::optional<std::vector<u32>> {
- if (dma_count > 0x10000) return std::nullopt;
- std::vector<u32> data(dma_count);
- const GPUVAddr address = (u64{maxwell3d.GetRegisterValue(0x154) & 0xff} << 32) |
- maxwell3d.GetRegisterValue(0x155);
- if (dma_count && !maxwell3d.ReadMacroMemory(address, data)) return std::nullopt;
- dma_count = 0;
- return data;
- });
- if (!result.success) {
- native_execution_failed = true;
- std::ofstream dump("native-mme-" + std::to_string(method) + ".bin", std::ios::binary);
- dump.write(reinterpret_cast<const char*>(native_code.data()), sizeof(native_code));
- LOG_ERROR(HW_GPU, "Native MME failed: start={:#x}, pc={:#x}, consumed={}/{}, error={}",
- method, result.pc, result.consumed, parameters.size(), result.error);
- }
- return;
- }
const auto execute_variant = [&system, &maxwell3d, &parameters,
method](AnyCachedMacro& cached) {
if (std::holds_alternative<MacroInterpreterImpl>(cached) ||