summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-06-24 04:18:33 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-06-24 04:18:33 +0200
commitf5e2aec4220ee2b72ec2986e0e60625897b2fd44 (patch)
treeaa80b16cd1b4d5937dc51f39a7d0b5908232eba1 /src/video_core
parentclear mme draw mode (diff)
downloadyuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar
yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.gz
yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.bz2
yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.lz
yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.xz
yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.tar.zst
yuzu-f5e2aec4220ee2b72ec2986e0e60625897b2fd44.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/macro/macro_hle.cpp10
-rw-r--r--src/video_core/macro/macro_hle.h1
2 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp
index 689533f6a..410f99018 100644
--- a/src/video_core/macro/macro_hle.cpp
+++ b/src/video_core/macro/macro_hle.cpp
@@ -10,6 +10,7 @@
namespace Tegra {
+namespace {
// HLE'd functions
static void HLE_771BB18C62444DA0(Engines::Maxwell3D& maxwell3d,
const std::vector<u32>& parameters) {
@@ -80,19 +81,20 @@ static void HLE_0217920100488FF7(Engines::Maxwell3D& maxwell3d,
maxwell3d.CallMethodFromMME(0x8e5, 0x0);
maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined;
}
+} // namespace
-static const std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{
+constexpr std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{{
std::make_pair<u64, HLEFunction>(0x771BB18C62444DA0, &HLE_771BB18C62444DA0),
std::make_pair<u64, HLEFunction>(0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD),
std::make_pair<u64, HLEFunction>(0x0217920100488FF7, &HLE_0217920100488FF7),
-};
+}};
HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d) : maxwell3d(maxwell3d) {}
HLEMacro::~HLEMacro() = default;
std::optional<std::unique_ptr<CachedMacro>> HLEMacro::GetHLEProgram(u64 hash) const {
- const auto it = std::find_if(hle_funcs.begin(), hle_funcs.end(),
- [hash](auto& pair) { return pair.first == hash; });
+ const auto it = std::find_if(hle_funcs.cbegin(), hle_funcs.cend(),
+ [hash](const auto& pair) { return pair.first == hash; });
if (it == hle_funcs.end()) {
return std::nullopt;
}
diff --git a/src/video_core/macro/macro_hle.h b/src/video_core/macro/macro_hle.h
index 7cd492a8f..37af875a0 100644
--- a/src/video_core/macro/macro_hle.h
+++ b/src/video_core/macro/macro_hle.h
@@ -22,6 +22,7 @@ class HLEMacro {
public:
explicit HLEMacro(Engines::Maxwell3D& maxwell3d);
~HLEMacro();
+
std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const;
private: