summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar LC2020-07-17 05:20:41 -0400
committerGravatar GitHub2020-07-17 05:20:41 -0400
commit47956a3bbce228455da13e3f31ea457741b1169c (patch)
treecf9c56652fe8c98db39925905abd63255dd84042 /src
parentMerge pull request #4340 from lioncash/remove (diff)
parentmacro_hle: Remove unnecessary static keywords (diff)
downloadyuzu-47956a3bbce228455da13e3f31ea457741b1169c.tar.gz
yuzu-47956a3bbce228455da13e3f31ea457741b1169c.tar.xz
yuzu-47956a3bbce228455da13e3f31ea457741b1169c.zip
Merge pull request #4369 from lioncash/hle-macro
macro_hle: Remove unnecessary std::make_pair calls
Diffstat (limited to '')
-rw-r--r--src/video_core/macro/macro_hle.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp
index 37f784a35..0c9ff59a4 100644
--- a/src/video_core/macro/macro_hle.cpp
+++ b/src/video_core/macro/macro_hle.cpp
@@ -12,8 +12,7 @@ namespace Tegra {
12 12
13namespace { 13namespace {
14// HLE'd functions 14// HLE'd functions
15static void HLE_771BB18C62444DA0(Engines::Maxwell3D& maxwell3d, 15void HLE_771BB18C62444DA0(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) {
16 const std::vector<u32>& parameters) {
17 const u32 instance_count = parameters[2] & maxwell3d.GetRegisterValue(0xD1B); 16 const u32 instance_count = parameters[2] & maxwell3d.GetRegisterValue(0xD1B);
18 17
19 maxwell3d.regs.draw.topology.Assign( 18 maxwell3d.regs.draw.topology.Assign(
@@ -32,8 +31,7 @@ static void HLE_771BB18C62444DA0(Engines::Maxwell3D& maxwell3d,
32 maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined; 31 maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined;
33} 32}
34 33
35static void HLE_0D61FC9FAAC9FCAD(Engines::Maxwell3D& maxwell3d, 34void HLE_0D61FC9FAAC9FCAD(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) {
36 const std::vector<u32>& parameters) {
37 const u32 count = (maxwell3d.GetRegisterValue(0xD1B) & parameters[2]); 35 const u32 count = (maxwell3d.GetRegisterValue(0xD1B) & parameters[2]);
38 36
39 maxwell3d.regs.vertex_buffer.first = parameters[3]; 37 maxwell3d.regs.vertex_buffer.first = parameters[3];
@@ -51,8 +49,7 @@ static void HLE_0D61FC9FAAC9FCAD(Engines::Maxwell3D& maxwell3d,
51 maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined; 49 maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined;
52} 50}
53 51
54static void HLE_0217920100488FF7(Engines::Maxwell3D& maxwell3d, 52void HLE_0217920100488FF7(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& parameters) {
55 const std::vector<u32>& parameters) {
56 const u32 instance_count = (maxwell3d.GetRegisterValue(0xD1B) & parameters[2]); 53 const u32 instance_count = (maxwell3d.GetRegisterValue(0xD1B) & parameters[2]);
57 const u32 element_base = parameters[4]; 54 const u32 element_base = parameters[4];
58 const u32 base_instance = parameters[5]; 55 const u32 base_instance = parameters[5];
@@ -80,12 +77,12 @@ static void HLE_0217920100488FF7(Engines::Maxwell3D& maxwell3d,
80 maxwell3d.CallMethodFromMME(0x8e5, 0x0); 77 maxwell3d.CallMethodFromMME(0x8e5, 0x0);
81 maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined; 78 maxwell3d.mme_draw.current_mode = Engines::Maxwell3D::MMEDrawMode::Undefined;
82} 79}
83} // namespace 80} // Anonymous namespace
84 81
85constexpr std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{{ 82constexpr std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{{
86 std::make_pair<u64, HLEFunction>(0x771BB18C62444DA0, &HLE_771BB18C62444DA0), 83 {0x771BB18C62444DA0, &HLE_771BB18C62444DA0},
87 std::make_pair<u64, HLEFunction>(0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD), 84 {0x0D61FC9FAAC9FCAD, &HLE_0D61FC9FAAC9FCAD},
88 std::make_pair<u64, HLEFunction>(0x0217920100488FF7, &HLE_0217920100488FF7), 85 {0x0217920100488FF7, &HLE_0217920100488FF7},
89}}; 86}};
90 87
91HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d) : maxwell3d(maxwell3d) {} 88HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d) : maxwell3d(maxwell3d) {}