2022-04-23 08:59:50 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2020-06-04 15:42:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
namespace Tegra {
|
|
|
|
|
|
|
|
namespace Engines {
|
|
|
|
class Maxwell3D;
|
|
|
|
}
|
|
|
|
|
|
|
|
class HLEMacro {
|
|
|
|
public:
|
2020-12-04 19:39:12 +00:00
|
|
|
explicit HLEMacro(Engines::Maxwell3D& maxwell3d_);
|
2020-06-04 15:42:19 +00:00
|
|
|
~HLEMacro();
|
2020-06-24 02:18:33 +00:00
|
|
|
|
2022-01-25 18:50:10 +00:00
|
|
|
// Allocates and returns a cached macro if the hash matches a known function.
|
|
|
|
// Returns nullptr otherwise.
|
|
|
|
[[nodiscard]] std::unique_ptr<CachedMacro> GetHLEProgram(u64 hash) const;
|
2020-06-04 15:42:19 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Engines::Maxwell3D& maxwell3d;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Tegra
|