summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2020-12-04 14:39:12 -0500
committerGravatar Lioncash2020-12-04 16:19:09 -0500
commit677a8b208d47d0d2397197ce74c7039a8ea79d20 (patch)
tree51f6cc58b69b42c7af300c6c56abd0af37e0c748
parentMerge pull request #5064 from lioncash/node-shadow (diff)
downloadyuzu-677a8b208d47d0d2397197ce74c7039a8ea79d20.tar.gz
yuzu-677a8b208d47d0d2397197ce74c7039a8ea79d20.tar.xz
yuzu-677a8b208d47d0d2397197ce74c7039a8ea79d20.zip
video_core: Resolve more variable shadowing scenarios
Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
-rw-r--r--src/video_core/cdma_pusher.cpp30
-rw-r--r--src/video_core/cdma_pusher.h16
-rw-r--r--src/video_core/command_classes/codecs/vp9.cpp2
-rw-r--r--src/video_core/command_classes/codecs/vp9.h2
-rw-r--r--src/video_core/dma_pusher.cpp9
-rw-r--r--src/video_core/dma_pusher.h14
-rw-r--r--src/video_core/engines/engine_upload.cpp8
-rw-r--r--src/video_core/engines/engine_upload.h4
-rw-r--r--src/video_core/engines/kepler_memory.cpp4
-rw-r--r--src/video_core/engines/kepler_memory.h2
-rw-r--r--src/video_core/engines/maxwell_dma.cpp6
-rw-r--r--src/video_core/engines/maxwell_dma.h4
-rw-r--r--src/video_core/fence_manager.h8
-rw-r--r--src/video_core/gpu.cpp8
-rw-r--r--src/video_core/gpu.h12
-rw-r--r--src/video_core/gpu_asynch.cpp4
-rw-r--r--src/video_core/gpu_asynch.h2
-rw-r--r--src/video_core/gpu_synch.cpp2
-rw-r--r--src/video_core/gpu_synch.h2
-rw-r--r--src/video_core/gpu_thread.cpp16
-rw-r--r--src/video_core/gpu_thread.h25
-rw-r--r--src/video_core/guest_driver.h4
-rw-r--r--src/video_core/macro/macro_hle.cpp6
-rw-r--r--src/video_core/macro/macro_hle.h2
-rw-r--r--src/video_core/macro/macro_interpreter.cpp20
-rw-r--r--src/video_core/macro/macro_interpreter.h10
-rw-r--r--src/video_core/macro/macro_jit_x64.cpp16
-rw-r--r--src/video_core/macro/macro_jit_x64.h4
-rw-r--r--src/video_core/memory_manager.h4
-rw-r--r--src/video_core/renderer_opengl/gl_arb_decompiler.cpp48
-rw-r--r--src/video_core/renderer_opengl/gl_fence_manager.cpp14
-rw-r--r--src/video_core/renderer_opengl/gl_fence_manager.h10
-rw-r--r--src/video_core/renderer_opengl/gl_query_cache.cpp15
-rw-r--r--src/video_core/renderer_opengl/gl_query_cache.h6
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp6
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.h2
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp35
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.h12
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp20
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h5
-rw-r--r--src/video_core/renderer_vulkan/vk_command_pool.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_command_pool.h2
42 files changed, 219 insertions, 206 deletions
diff --git a/src/video_core/cdma_pusher.cpp b/src/video_core/cdma_pusher.cpp
index b60f86260..e3e7432f7 100644
--- a/src/video_core/cdma_pusher.cpp
+++ b/src/video_core/cdma_pusher.cpp
@@ -29,8 +29,8 @@
29#include "video_core/memory_manager.h" 29#include "video_core/memory_manager.h"
30 30
31namespace Tegra { 31namespace Tegra {
32CDmaPusher::CDmaPusher(GPU& gpu) 32CDmaPusher::CDmaPusher(GPU& gpu_)
33 : gpu(gpu), nvdec_processor(std::make_shared<Nvdec>(gpu)), 33 : gpu{gpu_}, nvdec_processor(std::make_shared<Nvdec>(gpu)),
34 vic_processor(std::make_unique<Vic>(gpu, nvdec_processor)), 34 vic_processor(std::make_unique<Vic>(gpu, nvdec_processor)),
35 host1x_processor(std::make_unique<Host1x>(gpu)), 35 host1x_processor(std::make_unique<Host1x>(gpu)),
36 nvdec_sync(std::make_unique<SyncptIncrManager>(gpu)), 36 nvdec_sync(std::make_unique<SyncptIncrManager>(gpu)),
@@ -100,11 +100,11 @@ void CDmaPusher::Step() {
100 } 100 }
101} 101}
102 102
103void CDmaPusher::ExecuteCommand(u32 offset, u32 data) { 103void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) {
104 switch (current_class) { 104 switch (current_class) {
105 case ChClassId::NvDec: 105 case ChClassId::NvDec:
106 ThiStateWrite(nvdec_thi_state, offset, {data}); 106 ThiStateWrite(nvdec_thi_state, state_offset, {data});
107 switch (static_cast<ThiMethod>(offset)) { 107 switch (static_cast<ThiMethod>(state_offset)) {
108 case ThiMethod::IncSyncpt: { 108 case ThiMethod::IncSyncpt: {
109 LOG_DEBUG(Service_NVDRV, "NVDEC Class IncSyncpt Method"); 109 LOG_DEBUG(Service_NVDRV, "NVDEC Class IncSyncpt Method");
110 const auto syncpoint_id = static_cast<u32>(data & 0xFF); 110 const auto syncpoint_id = static_cast<u32>(data & 0xFF);
@@ -120,16 +120,16 @@ void CDmaPusher::ExecuteCommand(u32 offset, u32 data) {
120 case ThiMethod::SetMethod1: 120 case ThiMethod::SetMethod1:
121 LOG_DEBUG(Service_NVDRV, "NVDEC method 0x{:X}", 121 LOG_DEBUG(Service_NVDRV, "NVDEC method 0x{:X}",
122 static_cast<u32>(nvdec_thi_state.method_0)); 122 static_cast<u32>(nvdec_thi_state.method_0));
123 nvdec_processor->ProcessMethod( 123 nvdec_processor->ProcessMethod(static_cast<Nvdec::Method>(nvdec_thi_state.method_0),
124 static_cast<Tegra::Nvdec::Method>(nvdec_thi_state.method_0), {data}); 124 {data});
125 break; 125 break;
126 default: 126 default:
127 break; 127 break;
128 } 128 }
129 break; 129 break;
130 case ChClassId::GraphicsVic: 130 case ChClassId::GraphicsVic:
131 ThiStateWrite(vic_thi_state, static_cast<u32>(offset), {data}); 131 ThiStateWrite(vic_thi_state, static_cast<u32>(state_offset), {data});
132 switch (static_cast<ThiMethod>(offset)) { 132 switch (static_cast<ThiMethod>(state_offset)) {
133 case ThiMethod::IncSyncpt: { 133 case ThiMethod::IncSyncpt: {
134 LOG_DEBUG(Service_NVDRV, "VIC Class IncSyncpt Method"); 134 LOG_DEBUG(Service_NVDRV, "VIC Class IncSyncpt Method");
135 const auto syncpoint_id = static_cast<u32>(data & 0xFF); 135 const auto syncpoint_id = static_cast<u32>(data & 0xFF);
@@ -145,8 +145,7 @@ void CDmaPusher::ExecuteCommand(u32 offset, u32 data) {
145 case ThiMethod::SetMethod1: 145 case ThiMethod::SetMethod1:
146 LOG_DEBUG(Service_NVDRV, "VIC method 0x{:X}, Args=({})", 146 LOG_DEBUG(Service_NVDRV, "VIC method 0x{:X}, Args=({})",
147 static_cast<u32>(vic_thi_state.method_0), data); 147 static_cast<u32>(vic_thi_state.method_0), data);
148 vic_processor->ProcessMethod(static_cast<Tegra::Vic::Method>(vic_thi_state.method_0), 148 vic_processor->ProcessMethod(static_cast<Vic::Method>(vic_thi_state.method_0), {data});
149 {data});
150 break; 149 break;
151 default: 150 default:
152 break; 151 break;
@@ -155,7 +154,7 @@ void CDmaPusher::ExecuteCommand(u32 offset, u32 data) {
155 case ChClassId::Host1x: 154 case ChClassId::Host1x:
156 // This device is mainly for syncpoint synchronization 155 // This device is mainly for syncpoint synchronization
157 LOG_DEBUG(Service_NVDRV, "Host1X Class Method"); 156 LOG_DEBUG(Service_NVDRV, "Host1X Class Method");
158 host1x_processor->ProcessMethod(static_cast<Tegra::Host1x::Method>(offset), {data}); 157 host1x_processor->ProcessMethod(static_cast<Host1x::Method>(state_offset), {data});
159 break; 158 break;
160 default: 159 default:
161 UNIMPLEMENTED_MSG("Current class not implemented {:X}", static_cast<u32>(current_class)); 160 UNIMPLEMENTED_MSG("Current class not implemented {:X}", static_cast<u32>(current_class));
@@ -163,9 +162,10 @@ void CDmaPusher::ExecuteCommand(u32 offset, u32 data) {
163 } 162 }
164} 163}
165 164
166void CDmaPusher::ThiStateWrite(ThiRegisters& state, u32 offset, const std::vector<u32>& arguments) { 165void CDmaPusher::ThiStateWrite(ThiRegisters& state, u32 state_offset,
167 u8* const state_offset = reinterpret_cast<u8*>(&state) + sizeof(u32) * offset; 166 const std::vector<u32>& arguments) {
168 std::memcpy(state_offset, arguments.data(), sizeof(u32) * arguments.size()); 167 u8* const state_offset_ptr = reinterpret_cast<u8*>(&state) + sizeof(u32) * state_offset;
168 std::memcpy(state_offset_ptr, arguments.data(), sizeof(u32) * arguments.size());
169} 169}
170 170
171} // namespace Tegra 171} // namespace Tegra
diff --git a/src/video_core/cdma_pusher.h b/src/video_core/cdma_pusher.h
index 982f309c5..0db1cd646 100644
--- a/src/video_core/cdma_pusher.h
+++ b/src/video_core/cdma_pusher.h
@@ -68,8 +68,8 @@ struct ChCommand {
68 std::vector<u32> arguments; 68 std::vector<u32> arguments;
69}; 69};
70 70
71using ChCommandHeaderList = std::vector<Tegra::ChCommandHeader>; 71using ChCommandHeaderList = std::vector<ChCommandHeader>;
72using ChCommandList = std::vector<Tegra::ChCommand>; 72using ChCommandList = std::vector<ChCommand>;
73 73
74struct ThiRegisters { 74struct ThiRegisters {
75 u32_le increment_syncpt{}; 75 u32_le increment_syncpt{};
@@ -96,7 +96,7 @@ enum class ThiMethod : u32 {
96 96
97class CDmaPusher { 97class CDmaPusher {
98public: 98public:
99 explicit CDmaPusher(GPU& gpu); 99 explicit CDmaPusher(GPU& gpu_);
100 ~CDmaPusher(); 100 ~CDmaPusher();
101 101
102 /// Push NVDEC command buffer entries into queue 102 /// Push NVDEC command buffer entries into queue
@@ -109,17 +109,17 @@ public:
109 void Step(); 109 void Step();
110 110
111 /// Invoke command class devices to execute the command based on the current state 111 /// Invoke command class devices to execute the command based on the current state
112 void ExecuteCommand(u32 offset, u32 data); 112 void ExecuteCommand(u32 state_offset, u32 data);
113 113
114private: 114private:
115 /// Write arguments value to the ThiRegisters member at the specified offset 115 /// Write arguments value to the ThiRegisters member at the specified offset
116 void ThiStateWrite(ThiRegisters& state, u32 offset, const std::vector<u32>& arguments); 116 void ThiStateWrite(ThiRegisters& state, u32 state_offset, const std::vector<u32>& arguments);
117 117
118 GPU& gpu; 118 GPU& gpu;
119 119
120 std::shared_ptr<Tegra::Nvdec> nvdec_processor; 120 std::shared_ptr<Nvdec> nvdec_processor;
121 std::unique_ptr<Tegra::Vic> vic_processor; 121 std::unique_ptr<Vic> vic_processor;
122 std::unique_ptr<Tegra::Host1x> host1x_processor; 122 std::unique_ptr<Host1x> host1x_processor;
123 std::unique_ptr<SyncptIncrManager> nvdec_sync; 123 std::unique_ptr<SyncptIncrManager> nvdec_sync;
124 std::unique_ptr<SyncptIncrManager> vic_sync; 124 std::unique_ptr<SyncptIncrManager> vic_sync;
125 ChClassId current_class{}; 125 ChClassId current_class{};
diff --git a/src/video_core/command_classes/codecs/vp9.cpp b/src/video_core/command_classes/codecs/vp9.cpp
index 7d8d6ee3c..1771bc939 100644
--- a/src/video_core/command_classes/codecs/vp9.cpp
+++ b/src/video_core/command_classes/codecs/vp9.cpp
@@ -233,7 +233,7 @@ constexpr std::array<s32, 254> map_lut{
233} 233}
234} // Anonymous namespace 234} // Anonymous namespace
235 235
236VP9::VP9(GPU& gpu) : gpu(gpu) {} 236VP9::VP9(GPU& gpu_) : gpu{gpu_} {}
237 237
238VP9::~VP9() = default; 238VP9::~VP9() = default;
239 239
diff --git a/src/video_core/command_classes/codecs/vp9.h b/src/video_core/command_classes/codecs/vp9.h
index 9ebbbf59e..8396c8105 100644
--- a/src/video_core/command_classes/codecs/vp9.h
+++ b/src/video_core/command_classes/codecs/vp9.h
@@ -108,7 +108,7 @@ private:
108 108
109class VP9 { 109class VP9 {
110public: 110public:
111 explicit VP9(GPU& gpu); 111 explicit VP9(GPU& gpu_);
112 ~VP9(); 112 ~VP9();
113 113
114 VP9(const VP9&) = delete; 114 VP9(const VP9&) = delete;
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index d8801b1f5..2c8b20024 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -13,7 +13,7 @@
13 13
14namespace Tegra { 14namespace Tegra {
15 15
16DmaPusher::DmaPusher(Core::System& system, GPU& gpu) : gpu{gpu}, system{system} {} 16DmaPusher::DmaPusher(Core::System& system_, GPU& gpu_) : gpu{gpu_}, system{system_} {}
17 17
18DmaPusher::~DmaPusher() = default; 18DmaPusher::~DmaPusher() = default;
19 19
@@ -152,7 +152,12 @@ void DmaPusher::SetState(const CommandHeader& command_header) {
152 152
153void DmaPusher::CallMethod(u32 argument) const { 153void DmaPusher::CallMethod(u32 argument) const {
154 if (dma_state.method < non_puller_methods) { 154 if (dma_state.method < non_puller_methods) {
155 gpu.CallMethod({dma_state.method, argument, dma_state.subchannel, dma_state.method_count}); 155 gpu.CallMethod(GPU::MethodCall{
156 dma_state.method,
157 argument,
158 dma_state.subchannel,
159 dma_state.method_count,
160 });
156 } else { 161 } else {
157 subchannels[dma_state.subchannel]->CallMethod(dma_state.method, argument, 162 subchannels[dma_state.subchannel]->CallMethod(dma_state.method, argument,
158 dma_state.is_last_call); 163 dma_state.is_last_call);
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h
index 96ac267f7..19f286fa7 100644
--- a/src/video_core/dma_pusher.h
+++ b/src/video_core/dma_pusher.h
@@ -87,11 +87,11 @@ inline CommandHeader BuildCommandHeader(BufferMethods method, u32 arg_count, Sub
87struct CommandList final { 87struct CommandList final {
88 CommandList() = default; 88 CommandList() = default;
89 explicit CommandList(std::size_t size) : command_lists(size) {} 89 explicit CommandList(std::size_t size) : command_lists(size) {}
90 explicit CommandList(std::vector<Tegra::CommandHeader>&& prefetch_command_list) 90 explicit CommandList(std::vector<CommandHeader>&& prefetch_command_list_)
91 : prefetch_command_list{std::move(prefetch_command_list)} {} 91 : prefetch_command_list{std::move(prefetch_command_list_)} {}
92 92
93 std::vector<Tegra::CommandListHeader> command_lists; 93 std::vector<CommandListHeader> command_lists;
94 std::vector<Tegra::CommandHeader> prefetch_command_list; 94 std::vector<CommandHeader> prefetch_command_list;
95}; 95};
96 96
97/** 97/**
@@ -103,7 +103,7 @@ struct CommandList final {
103 */ 103 */
104class DmaPusher final { 104class DmaPusher final {
105public: 105public:
106 explicit DmaPusher(Core::System& system, GPU& gpu); 106 explicit DmaPusher(Core::System& system_, GPU& gpu_);
107 ~DmaPusher(); 107 ~DmaPusher();
108 108
109 void Push(CommandList&& entries) { 109 void Push(CommandList&& entries) {
@@ -112,7 +112,7 @@ public:
112 112
113 void DispatchCalls(); 113 void DispatchCalls();
114 114
115 void BindSubchannel(Tegra::Engines::EngineInterface* engine, u32 subchannel_id) { 115 void BindSubchannel(Engines::EngineInterface* engine, u32 subchannel_id) {
116 subchannels[subchannel_id] = engine; 116 subchannels[subchannel_id] = engine;
117 } 117 }
118 118
@@ -145,7 +145,7 @@ private:
145 145
146 bool ib_enable{true}; ///< IB mode enabled 146 bool ib_enable{true}; ///< IB mode enabled
147 147
148 std::array<Tegra::Engines::EngineInterface*, max_subchannels> subchannels{}; 148 std::array<Engines::EngineInterface*, max_subchannels> subchannels{};
149 149
150 GPU& gpu; 150 GPU& gpu;
151 Core::System& system; 151 Core::System& system;
diff --git a/src/video_core/engines/engine_upload.cpp b/src/video_core/engines/engine_upload.cpp
index d44ad0cd8..71d7e1473 100644
--- a/src/video_core/engines/engine_upload.cpp
+++ b/src/video_core/engines/engine_upload.cpp
@@ -11,16 +11,16 @@
11 11
12namespace Tegra::Engines::Upload { 12namespace Tegra::Engines::Upload {
13 13
14State::State(MemoryManager& memory_manager, Registers& regs) 14State::State(MemoryManager& memory_manager_, Registers& regs_)
15 : regs{regs}, memory_manager{memory_manager} {} 15 : regs{regs_}, memory_manager{memory_manager_} {}
16 16
17State::~State() = default; 17State::~State() = default;
18 18
19void State::ProcessExec(const bool is_linear) { 19void State::ProcessExec(const bool is_linear_) {
20 write_offset = 0; 20 write_offset = 0;
21 copy_size = regs.line_length_in * regs.line_count; 21 copy_size = regs.line_length_in * regs.line_count;
22 inner_buffer.resize(copy_size); 22 inner_buffer.resize(copy_size);
23 this->is_linear = is_linear; 23 is_linear = is_linear_;
24} 24}
25 25
26void State::ProcessData(const u32 data, const bool is_last_call) { 26void State::ProcessData(const u32 data, const bool is_last_call) {
diff --git a/src/video_core/engines/engine_upload.h b/src/video_core/engines/engine_upload.h
index 462da419e..1c7f1effa 100644
--- a/src/video_core/engines/engine_upload.h
+++ b/src/video_core/engines/engine_upload.h
@@ -54,10 +54,10 @@ struct Registers {
54 54
55class State { 55class State {
56public: 56public:
57 State(MemoryManager& memory_manager, Registers& regs); 57 explicit State(MemoryManager& memory_manager_, Registers& regs_);
58 ~State(); 58 ~State();
59 59
60 void ProcessExec(bool is_linear); 60 void ProcessExec(bool is_linear_);
61 void ProcessData(u32 data, bool is_last_call); 61 void ProcessData(u32 data, bool is_last_call);
62 62
63private: 63private:
diff --git a/src/video_core/engines/kepler_memory.cpp b/src/video_core/engines/kepler_memory.cpp
index dc71b2eec..9911140e9 100644
--- a/src/video_core/engines/kepler_memory.cpp
+++ b/src/video_core/engines/kepler_memory.cpp
@@ -14,8 +14,8 @@
14 14
15namespace Tegra::Engines { 15namespace Tegra::Engines {
16 16
17KeplerMemory::KeplerMemory(Core::System& system, MemoryManager& memory_manager) 17KeplerMemory::KeplerMemory(Core::System& system_, MemoryManager& memory_manager)
18 : system{system}, upload_state{memory_manager, regs.upload} {} 18 : system{system_}, upload_state{memory_manager, regs.upload} {}
19 19
20KeplerMemory::~KeplerMemory() = default; 20KeplerMemory::~KeplerMemory() = default;
21 21
diff --git a/src/video_core/engines/kepler_memory.h b/src/video_core/engines/kepler_memory.h
index 5b7f71a00..62483589e 100644
--- a/src/video_core/engines/kepler_memory.h
+++ b/src/video_core/engines/kepler_memory.h
@@ -35,7 +35,7 @@ namespace Tegra::Engines {
35 35
36class KeplerMemory final : public EngineInterface { 36class KeplerMemory final : public EngineInterface {
37public: 37public:
38 KeplerMemory(Core::System& system, MemoryManager& memory_manager); 38 explicit KeplerMemory(Core::System& system_, MemoryManager& memory_manager);
39 ~KeplerMemory(); 39 ~KeplerMemory();
40 40
41 /// Write the value to the register identified by method. 41 /// Write the value to the register identified by method.
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index 8fa359d0a..1c29e895e 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -16,8 +16,10 @@ namespace Tegra::Engines {
16 16
17using namespace Texture; 17using namespace Texture;
18 18
19MaxwellDMA::MaxwellDMA(Core::System& system, MemoryManager& memory_manager) 19MaxwellDMA::MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_)
20 : system{system}, memory_manager{memory_manager} {} 20 : system{system_}, memory_manager{memory_manager_} {}
21
22MaxwellDMA::~MaxwellDMA() = default;
21 23
22void MaxwellDMA::CallMethod(u32 method, u32 method_argument, bool is_last_call) { 24void MaxwellDMA::CallMethod(u32 method, u32 method_argument, bool is_last_call) {
23 ASSERT_MSG(method < NUM_REGS, "Invalid MaxwellDMA register"); 25 ASSERT_MSG(method < NUM_REGS, "Invalid MaxwellDMA register");
diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h
index 50f445efc..17bd280c4 100644
--- a/src/video_core/engines/maxwell_dma.h
+++ b/src/video_core/engines/maxwell_dma.h
@@ -185,8 +185,8 @@ public:
185 }; 185 };
186 static_assert(sizeof(RemapConst) == 12); 186 static_assert(sizeof(RemapConst) == 12);
187 187
188 explicit MaxwellDMA(Core::System& system, MemoryManager& memory_manager); 188 explicit MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_);
189 ~MaxwellDMA() = default; 189 ~MaxwellDMA();
190 190
191 /// Write the value to the register identified by method. 191 /// Write the value to the register identified by method.
192 void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; 192 void CallMethod(u32 method, u32 method_argument, bool is_last_call) override;
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h
index de6991ef6..c5f26896e 100644
--- a/src/video_core/fence_manager.h
+++ b/src/video_core/fence_manager.h
@@ -17,11 +17,11 @@ namespace VideoCommon {
17 17
18class FenceBase { 18class FenceBase {
19public: 19public:
20 FenceBase(u32 payload, bool is_stubbed) 20 explicit FenceBase(u32 payload_, bool is_stubbed_)
21 : address{}, payload{payload}, is_semaphore{false}, is_stubbed{is_stubbed} {} 21 : address{}, payload{payload_}, is_semaphore{false}, is_stubbed{is_stubbed_} {}
22 22
23 FenceBase(GPUVAddr address, u32 payload, bool is_stubbed) 23 explicit FenceBase(GPUVAddr address_, u32 payload_, bool is_stubbed_)
24 : address{address}, payload{payload}, is_semaphore{true}, is_stubbed{is_stubbed} {} 24 : address{address_}, payload{payload_}, is_semaphore{true}, is_stubbed{is_stubbed_} {}
25 25
26 GPUVAddr GetAddress() const { 26 GPUVAddr GetAddress() const {
27 return address; 27 return address;
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index e91f52938..964b3f3dc 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -232,8 +232,12 @@ void GPU::CallMultiMethod(u32 method, u32 subchannel, const u32* base_start, u32
232 CallEngineMultiMethod(method, subchannel, base_start, amount, methods_pending); 232 CallEngineMultiMethod(method, subchannel, base_start, amount, methods_pending);
233 } else { 233 } else {
234 for (std::size_t i = 0; i < amount; i++) { 234 for (std::size_t i = 0; i < amount; i++) {
235 CallPullerMethod( 235 CallPullerMethod(MethodCall{
236 {method, base_start[i], subchannel, methods_pending - static_cast<u32>(i)}); 236 method,
237 base_start[i],
238 subchannel,
239 methods_pending - static_cast<u32>(i),
240 });
237 } 241 }
238 } 242 }
239} 243}
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 21410e125..660641d04 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -149,16 +149,16 @@ public:
149 u32 subchannel{}; 149 u32 subchannel{};
150 u32 method_count{}; 150 u32 method_count{};
151 151
152 MethodCall(u32 method, u32 argument, u32 subchannel = 0, u32 method_count = 0) 152 explicit MethodCall(u32 method_, u32 argument_, u32 subchannel_ = 0, u32 method_count_ = 0)
153 : method(method), argument(argument), subchannel(subchannel), 153 : method(method_), argument(argument_), subchannel(subchannel_),
154 method_count(method_count) {} 154 method_count(method_count_) {}
155 155
156 [[nodiscard]] bool IsLastCall() const { 156 [[nodiscard]] bool IsLastCall() const {
157 return method_count <= 1; 157 return method_count <= 1;
158 } 158 }
159 }; 159 };
160 160
161 explicit GPU(Core::System& system, bool is_async, bool use_nvdec); 161 explicit GPU(Core::System& system_, bool is_async_, bool use_nvdec_);
162 virtual ~GPU(); 162 virtual ~GPU();
163 163
164 /// Binds a renderer to the GPU. 164 /// Binds a renderer to the GPU.
@@ -414,8 +414,8 @@ private:
414 std::condition_variable sync_cv; 414 std::condition_variable sync_cv;
415 415
416 struct FlushRequest { 416 struct FlushRequest {
417 FlushRequest(u64 fence, VAddr addr, std::size_t size) 417 explicit FlushRequest(u64 fence_, VAddr addr_, std::size_t size_)
418 : fence{fence}, addr{addr}, size{size} {} 418 : fence{fence_}, addr{addr_}, size{size_} {}
419 u64 fence; 419 u64 fence;
420 VAddr addr; 420 VAddr addr;
421 std::size_t size; 421 std::size_t size;
diff --git a/src/video_core/gpu_asynch.cpp b/src/video_core/gpu_asynch.cpp
index a9baaf7ef..6cc091ecd 100644
--- a/src/video_core/gpu_asynch.cpp
+++ b/src/video_core/gpu_asynch.cpp
@@ -10,8 +10,8 @@
10 10
11namespace VideoCommon { 11namespace VideoCommon {
12 12
13GPUAsynch::GPUAsynch(Core::System& system, bool use_nvdec) 13GPUAsynch::GPUAsynch(Core::System& system_, bool use_nvdec_)
14 : GPU{system, true, use_nvdec}, gpu_thread{system} {} 14 : GPU{system_, true, use_nvdec_}, gpu_thread{system_} {}
15 15
16GPUAsynch::~GPUAsynch() = default; 16GPUAsynch::~GPUAsynch() = default;
17 17
diff --git a/src/video_core/gpu_asynch.h b/src/video_core/gpu_asynch.h
index 0c0872e73..a384113f4 100644
--- a/src/video_core/gpu_asynch.h
+++ b/src/video_core/gpu_asynch.h
@@ -20,7 +20,7 @@ namespace VideoCommon {
20/// Implementation of GPU interface that runs the GPU asynchronously 20/// Implementation of GPU interface that runs the GPU asynchronously
21class GPUAsynch final : public Tegra::GPU { 21class GPUAsynch final : public Tegra::GPU {
22public: 22public:
23 explicit GPUAsynch(Core::System& system, bool use_nvdec); 23 explicit GPUAsynch(Core::System& system_, bool use_nvdec_);
24 ~GPUAsynch() override; 24 ~GPUAsynch() override;
25 25
26 void Start() override; 26 void Start() override;
diff --git a/src/video_core/gpu_synch.cpp b/src/video_core/gpu_synch.cpp
index ecf7bbdf3..1e9d4b9b2 100644
--- a/src/video_core/gpu_synch.cpp
+++ b/src/video_core/gpu_synch.cpp
@@ -7,7 +7,7 @@
7 7
8namespace VideoCommon { 8namespace VideoCommon {
9 9
10GPUSynch::GPUSynch(Core::System& system, bool use_nvdec) : GPU{system, false, use_nvdec} {} 10GPUSynch::GPUSynch(Core::System& system_, bool use_nvdec_) : GPU{system_, false, use_nvdec_} {}
11 11
12GPUSynch::~GPUSynch() = default; 12GPUSynch::~GPUSynch() = default;
13 13
diff --git a/src/video_core/gpu_synch.h b/src/video_core/gpu_synch.h
index 9d778c71a..c5904b8db 100644
--- a/src/video_core/gpu_synch.h
+++ b/src/video_core/gpu_synch.h
@@ -19,7 +19,7 @@ namespace VideoCommon {
19/// Implementation of GPU interface that runs the GPU synchronously 19/// Implementation of GPU interface that runs the GPU synchronously
20class GPUSynch final : public Tegra::GPU { 20class GPUSynch final : public Tegra::GPU {
21public: 21public:
22 explicit GPUSynch(Core::System& system, bool use_nvdec); 22 explicit GPUSynch(Core::System& system_, bool use_nvdec_);
23 ~GPUSynch() override; 23 ~GPUSynch() override;
24 24
25 void Start() override; 25 void Start() override;
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 4b8f58283..e27218b96 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -39,23 +39,23 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
39 CommandDataContainer next; 39 CommandDataContainer next;
40 while (state.is_running) { 40 while (state.is_running) {
41 next = state.queue.PopWait(); 41 next = state.queue.PopWait();
42 if (const auto submit_list = std::get_if<SubmitListCommand>(&next.data)) { 42 if (auto* submit_list = std::get_if<SubmitListCommand>(&next.data)) {
43 dma_pusher.Push(std::move(submit_list->entries)); 43 dma_pusher.Push(std::move(submit_list->entries));
44 dma_pusher.DispatchCalls(); 44 dma_pusher.DispatchCalls();
45 } else if (const auto command_list = std::get_if<SubmitChCommandEntries>(&next.data)) { 45 } else if (auto* command_list = std::get_if<SubmitChCommandEntries>(&next.data)) {
46 // NVDEC 46 // NVDEC
47 cdma_pusher.Push(std::move(command_list->entries)); 47 cdma_pusher.Push(std::move(command_list->entries));
48 cdma_pusher.DispatchCalls(); 48 cdma_pusher.DispatchCalls();
49 } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { 49 } else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) {
50 renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); 50 renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr);
51 } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { 51 } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) {
52 renderer.Rasterizer().ReleaseFences(); 52 renderer.Rasterizer().ReleaseFences();
53 } else if (std::holds_alternative<GPUTickCommand>(next.data)) { 53 } else if (std::holds_alternative<GPUTickCommand>(next.data)) {
54 system.GPU().TickWork(); 54 system.GPU().TickWork();
55 } else if (const auto data = std::get_if<FlushRegionCommand>(&next.data)) { 55 } else if (const auto* flush = std::get_if<FlushRegionCommand>(&next.data)) {
56 renderer.Rasterizer().FlushRegion(data->addr, data->size); 56 renderer.Rasterizer().FlushRegion(flush->addr, flush->size);
57 } else if (const auto data = std::get_if<InvalidateRegionCommand>(&next.data)) { 57 } else if (const auto* invalidate = std::get_if<InvalidateRegionCommand>(&next.data)) {
58 renderer.Rasterizer().OnCPUWrite(data->addr, data->size); 58 renderer.Rasterizer().OnCPUWrite(invalidate->addr, invalidate->size);
59 } else if (std::holds_alternative<EndProcessingCommand>(next.data)) { 59 } else if (std::holds_alternative<EndProcessingCommand>(next.data)) {
60 return; 60 return;
61 } else { 61 } else {
@@ -65,7 +65,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
65 } 65 }
66} 66}
67 67
68ThreadManager::ThreadManager(Core::System& system) : system{system} {} 68ThreadManager::ThreadManager(Core::System& system_) : system{system_} {}
69 69
70ThreadManager::~ThreadManager() { 70ThreadManager::~ThreadManager() {
71 if (!thread.joinable()) { 71 if (!thread.joinable()) {
diff --git a/src/video_core/gpu_thread.h b/src/video_core/gpu_thread.h
index 32a34e3a7..f1c52cd9e 100644
--- a/src/video_core/gpu_thread.h
+++ b/src/video_core/gpu_thread.h
@@ -32,30 +32,30 @@ struct EndProcessingCommand final {};
32 32
33/// Command to signal to the GPU thread that a command list is ready for processing 33/// Command to signal to the GPU thread that a command list is ready for processing
34struct SubmitListCommand final { 34struct SubmitListCommand final {
35 explicit SubmitListCommand(Tegra::CommandList&& entries) : entries{std::move(entries)} {} 35 explicit SubmitListCommand(Tegra::CommandList&& entries_) : entries{std::move(entries_)} {}
36 36
37 Tegra::CommandList entries; 37 Tegra::CommandList entries;
38}; 38};
39 39
40/// Command to signal to the GPU thread that a cdma command list is ready for processing 40/// Command to signal to the GPU thread that a cdma command list is ready for processing
41struct SubmitChCommandEntries final { 41struct SubmitChCommandEntries final {
42 explicit SubmitChCommandEntries(Tegra::ChCommandHeaderList&& entries) 42 explicit SubmitChCommandEntries(Tegra::ChCommandHeaderList&& entries_)
43 : entries{std::move(entries)} {} 43 : entries{std::move(entries_)} {}
44 44
45 Tegra::ChCommandHeaderList entries; 45 Tegra::ChCommandHeaderList entries;
46}; 46};
47 47
48/// Command to signal to the GPU thread that a swap buffers is pending 48/// Command to signal to the GPU thread that a swap buffers is pending
49struct SwapBuffersCommand final { 49struct SwapBuffersCommand final {
50 explicit SwapBuffersCommand(std::optional<const Tegra::FramebufferConfig> framebuffer) 50 explicit SwapBuffersCommand(std::optional<const Tegra::FramebufferConfig> framebuffer_)
51 : framebuffer{std::move(framebuffer)} {} 51 : framebuffer{std::move(framebuffer_)} {}
52 52
53 std::optional<Tegra::FramebufferConfig> framebuffer; 53 std::optional<Tegra::FramebufferConfig> framebuffer;
54}; 54};
55 55
56/// Command to signal to the GPU thread to flush a region 56/// Command to signal to the GPU thread to flush a region
57struct FlushRegionCommand final { 57struct FlushRegionCommand final {
58 explicit constexpr FlushRegionCommand(VAddr addr, u64 size) : addr{addr}, size{size} {} 58 explicit constexpr FlushRegionCommand(VAddr addr_, u64 size_) : addr{addr_}, size{size_} {}
59 59
60 VAddr addr; 60 VAddr addr;
61 u64 size; 61 u64 size;
@@ -63,7 +63,7 @@ struct FlushRegionCommand final {
63 63
64/// Command to signal to the GPU thread to invalidate a region 64/// Command to signal to the GPU thread to invalidate a region
65struct InvalidateRegionCommand final { 65struct InvalidateRegionCommand final {
66 explicit constexpr InvalidateRegionCommand(VAddr addr, u64 size) : addr{addr}, size{size} {} 66 explicit constexpr InvalidateRegionCommand(VAddr addr_, u64 size_) : addr{addr_}, size{size_} {}
67 67
68 VAddr addr; 68 VAddr addr;
69 u64 size; 69 u64 size;
@@ -71,8 +71,8 @@ struct InvalidateRegionCommand final {
71 71
72/// Command to signal to the GPU thread to flush and invalidate a region 72/// Command to signal to the GPU thread to flush and invalidate a region
73struct FlushAndInvalidateRegionCommand final { 73struct FlushAndInvalidateRegionCommand final {
74 explicit constexpr FlushAndInvalidateRegionCommand(VAddr addr, u64 size) 74 explicit constexpr FlushAndInvalidateRegionCommand(VAddr addr_, u64 size_)
75 : addr{addr}, size{size} {} 75 : addr{addr_}, size{size_} {}
76 76
77 VAddr addr; 77 VAddr addr;
78 u64 size; 78 u64 size;
@@ -92,8 +92,8 @@ using CommandData =
92struct CommandDataContainer { 92struct CommandDataContainer {
93 CommandDataContainer() = default; 93 CommandDataContainer() = default;
94 94
95 CommandDataContainer(CommandData&& data, u64 next_fence) 95 explicit CommandDataContainer(CommandData&& data_, u64 next_fence_)
96 : data{std::move(data)}, fence{next_fence} {} 96 : data{std::move(data_)}, fence{next_fence_} {}
97 97
98 CommandData data; 98 CommandData data;
99 u64 fence{}; 99 u64 fence{};
@@ -112,7 +112,7 @@ struct SynchState final {
112/// Class used to manage the GPU thread 112/// Class used to manage the GPU thread
113class ThreadManager final { 113class ThreadManager final {
114public: 114public:
115 explicit ThreadManager(Core::System& system); 115 explicit ThreadManager(Core::System& system_);
116 ~ThreadManager(); 116 ~ThreadManager();
117 117
118 /// Creates and starts the GPU thread. 118 /// Creates and starts the GPU thread.
@@ -146,7 +146,6 @@ private:
146 /// Pushes a command to be executed by the GPU thread 146 /// Pushes a command to be executed by the GPU thread
147 u64 PushCommand(CommandData&& command_data); 147 u64 PushCommand(CommandData&& command_data);
148 148
149private:
150 SynchState state; 149 SynchState state;
151 Core::System& system; 150 Core::System& system;
152 std::thread thread; 151 std::thread thread;
diff --git a/src/video_core/guest_driver.h b/src/video_core/guest_driver.h
index 99450777e..21e569ba1 100644
--- a/src/video_core/guest_driver.h
+++ b/src/video_core/guest_driver.h
@@ -19,8 +19,8 @@ namespace VideoCore {
19class GuestDriverProfile { 19class GuestDriverProfile {
20public: 20public:
21 explicit GuestDriverProfile() = default; 21 explicit GuestDriverProfile() = default;
22 explicit GuestDriverProfile(std::optional<u32> texture_handler_size) 22 explicit GuestDriverProfile(std::optional<u32> texture_handler_size_)
23 : texture_handler_size{texture_handler_size} {} 23 : texture_handler_size{texture_handler_size_} {}
24 24
25 void DeduceTextureHandlerSize(std::vector<u32> bound_offsets); 25 void DeduceTextureHandlerSize(std::vector<u32> bound_offsets);
26 26
diff --git a/src/video_core/macro/macro_hle.cpp b/src/video_core/macro/macro_hle.cpp
index df00b57df..70ac7c620 100644
--- a/src/video_core/macro/macro_hle.cpp
+++ b/src/video_core/macro/macro_hle.cpp
@@ -85,7 +85,7 @@ constexpr std::array<std::pair<u64, HLEFunction>, 3> hle_funcs{{
85 {0x0217920100488FF7, &HLE_0217920100488FF7}, 85 {0x0217920100488FF7, &HLE_0217920100488FF7},
86}}; 86}};
87 87
88HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d) : maxwell3d(maxwell3d) {} 88HLEMacro::HLEMacro(Engines::Maxwell3D& maxwell3d_) : maxwell3d{maxwell3d_} {}
89HLEMacro::~HLEMacro() = default; 89HLEMacro::~HLEMacro() = default;
90 90
91std::optional<std::unique_ptr<CachedMacro>> HLEMacro::GetHLEProgram(u64 hash) const { 91std::optional<std::unique_ptr<CachedMacro>> HLEMacro::GetHLEProgram(u64 hash) const {
@@ -99,8 +99,8 @@ std::optional<std::unique_ptr<CachedMacro>> HLEMacro::GetHLEProgram(u64 hash) co
99 99
100HLEMacroImpl::~HLEMacroImpl() = default; 100HLEMacroImpl::~HLEMacroImpl() = default;
101 101
102HLEMacroImpl::HLEMacroImpl(Engines::Maxwell3D& maxwell3d, HLEFunction func) 102HLEMacroImpl::HLEMacroImpl(Engines::Maxwell3D& maxwell3d_, HLEFunction func_)
103 : maxwell3d(maxwell3d), func(func) {} 103 : maxwell3d{maxwell3d_}, func{func_} {}
104 104
105void HLEMacroImpl::Execute(const std::vector<u32>& parameters, u32 method) { 105void HLEMacroImpl::Execute(const std::vector<u32>& parameters, u32 method) {
106 func(maxwell3d, parameters); 106 func(maxwell3d, parameters);
diff --git a/src/video_core/macro/macro_hle.h b/src/video_core/macro/macro_hle.h
index 37af875a0..cb3bd1600 100644
--- a/src/video_core/macro/macro_hle.h
+++ b/src/video_core/macro/macro_hle.h
@@ -20,7 +20,7 @@ using HLEFunction = void (*)(Engines::Maxwell3D& maxwell3d, const std::vector<u3
20 20
21class HLEMacro { 21class HLEMacro {
22public: 22public:
23 explicit HLEMacro(Engines::Maxwell3D& maxwell3d); 23 explicit HLEMacro(Engines::Maxwell3D& maxwell3d_);
24 ~HLEMacro(); 24 ~HLEMacro();
25 25
26 std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const; 26 std::optional<std::unique_ptr<CachedMacro>> GetHLEProgram(u64 hash) const;
diff --git a/src/video_core/macro/macro_interpreter.cpp b/src/video_core/macro/macro_interpreter.cpp
index bd01fd1f2..44a71aa6c 100644
--- a/src/video_core/macro/macro_interpreter.cpp
+++ b/src/video_core/macro/macro_interpreter.cpp
@@ -11,29 +11,29 @@
11MICROPROFILE_DEFINE(MacroInterp, "GPU", "Execute macro interpreter", MP_RGB(128, 128, 192)); 11MICROPROFILE_DEFINE(MacroInterp, "GPU", "Execute macro interpreter", MP_RGB(128, 128, 192));
12 12
13namespace Tegra { 13namespace Tegra {
14MacroInterpreter::MacroInterpreter(Engines::Maxwell3D& maxwell3d) 14MacroInterpreter::MacroInterpreter(Engines::Maxwell3D& maxwell3d_)
15 : MacroEngine::MacroEngine(maxwell3d), maxwell3d(maxwell3d) {} 15 : MacroEngine{maxwell3d_}, maxwell3d{maxwell3d_} {}
16 16
17std::unique_ptr<CachedMacro> MacroInterpreter::Compile(const std::vector<u32>& code) { 17std::unique_ptr<CachedMacro> MacroInterpreter::Compile(const std::vector<u32>& code) {
18 return std::make_unique<MacroInterpreterImpl>(maxwell3d, code); 18 return std::make_unique<MacroInterpreterImpl>(maxwell3d, code);
19} 19}
20 20
21MacroInterpreterImpl::MacroInterpreterImpl(Engines::Maxwell3D& maxwell3d, 21MacroInterpreterImpl::MacroInterpreterImpl(Engines::Maxwell3D& maxwell3d_,
22 const std::vector<u32>& code) 22 const std::vector<u32>& code_)
23 : maxwell3d(maxwell3d), code(code) {} 23 : maxwell3d{maxwell3d_}, code{code_} {}
24 24
25void MacroInterpreterImpl::Execute(const std::vector<u32>& parameters, u32 method) { 25void MacroInterpreterImpl::Execute(const std::vector<u32>& params, u32 method) {
26 MICROPROFILE_SCOPE(MacroInterp); 26 MICROPROFILE_SCOPE(MacroInterp);
27 Reset(); 27 Reset();
28 28
29 registers[1] = parameters[0]; 29 registers[1] = params[0];
30 num_parameters = parameters.size(); 30 num_parameters = params.size();
31 31
32 if (num_parameters > parameters_capacity) { 32 if (num_parameters > parameters_capacity) {
33 parameters_capacity = num_parameters; 33 parameters_capacity = num_parameters;
34 this->parameters = std::make_unique<u32[]>(num_parameters); 34 parameters = std::make_unique<u32[]>(num_parameters);
35 } 35 }
36 std::memcpy(this->parameters.get(), parameters.data(), num_parameters * sizeof(u32)); 36 std::memcpy(parameters.get(), params.data(), num_parameters * sizeof(u32));
37 37
38 // Execute the code until we hit an exit condition. 38 // Execute the code until we hit an exit condition.
39 bool keep_executing = true; 39 bool keep_executing = true;
diff --git a/src/video_core/macro/macro_interpreter.h b/src/video_core/macro/macro_interpreter.h
index 90217fc89..d50c619ce 100644
--- a/src/video_core/macro/macro_interpreter.h
+++ b/src/video_core/macro/macro_interpreter.h
@@ -17,7 +17,7 @@ class Maxwell3D;
17 17
18class MacroInterpreter final : public MacroEngine { 18class MacroInterpreter final : public MacroEngine {
19public: 19public:
20 explicit MacroInterpreter(Engines::Maxwell3D& maxwell3d); 20 explicit MacroInterpreter(Engines::Maxwell3D& maxwell3d_);
21 21
22protected: 22protected:
23 std::unique_ptr<CachedMacro> Compile(const std::vector<u32>& code) override; 23 std::unique_ptr<CachedMacro> Compile(const std::vector<u32>& code) override;
@@ -28,8 +28,8 @@ private:
28 28
29class MacroInterpreterImpl : public CachedMacro { 29class MacroInterpreterImpl : public CachedMacro {
30public: 30public:
31 MacroInterpreterImpl(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& code); 31 explicit MacroInterpreterImpl(Engines::Maxwell3D& maxwell3d_, const std::vector<u32>& code_);
32 void Execute(const std::vector<u32>& parameters, u32 method) override; 32 void Execute(const std::vector<u32>& params, u32 method) override;
33 33
34private: 34private:
35 /// Resets the execution engine state, zeroing registers, etc. 35 /// Resets the execution engine state, zeroing registers, etc.
@@ -38,9 +38,9 @@ private:
38 /** 38 /**
39 * Executes a single macro instruction located at the current program counter. Returns whether 39 * Executes a single macro instruction located at the current program counter. Returns whether
40 * the interpreter should keep running. 40 * the interpreter should keep running.
41 * @param offset Offset to start execution at. 41 *
42 * @param is_delay_slot Whether the current step is being executed due to a delay slot in a 42 * @param is_delay_slot Whether the current step is being executed due to a delay slot in a
43 * previous instruction. 43 * previous instruction.
44 */ 44 */
45 bool Step(bool is_delay_slot); 45 bool Step(bool is_delay_slot);
46 46
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp
index 954b87515..c82bb987f 100644
--- a/src/video_core/macro/macro_jit_x64.cpp
+++ b/src/video_core/macro/macro_jit_x64.cpp
@@ -28,15 +28,15 @@ static const std::bitset<32> PERSISTENT_REGISTERS = Common::X64::BuildRegSet({
28 BRANCH_HOLDER, 28 BRANCH_HOLDER,
29}); 29});
30 30
31MacroJITx64::MacroJITx64(Engines::Maxwell3D& maxwell3d) 31MacroJITx64::MacroJITx64(Engines::Maxwell3D& maxwell3d_)
32 : MacroEngine::MacroEngine(maxwell3d), maxwell3d(maxwell3d) {} 32 : MacroEngine{maxwell3d_}, maxwell3d{maxwell3d_} {}
33 33
34std::unique_ptr<CachedMacro> MacroJITx64::Compile(const std::vector<u32>& code) { 34std::unique_ptr<CachedMacro> MacroJITx64::Compile(const std::vector<u32>& code) {
35 return std::make_unique<MacroJITx64Impl>(maxwell3d, code); 35 return std::make_unique<MacroJITx64Impl>(maxwell3d, code);
36} 36}
37 37
38MacroJITx64Impl::MacroJITx64Impl(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& code) 38MacroJITx64Impl::MacroJITx64Impl(Engines::Maxwell3D& maxwell3d_, const std::vector<u32>& code_)
39 : Xbyak::CodeGenerator(MAX_CODE_SIZE), code(code), maxwell3d(maxwell3d) { 39 : CodeGenerator{MAX_CODE_SIZE}, code{code_}, maxwell3d{maxwell3d_} {
40 Compile(); 40 Compile();
41} 41}
42 42
@@ -553,15 +553,15 @@ Xbyak::Reg32 MacroJITx64Impl::Compile_GetRegister(u32 index, Xbyak::Reg32 dst) {
553} 553}
554 554
555void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u32 reg) { 555void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u32 reg) {
556 const auto SetRegister = [this](u32 reg, const Xbyak::Reg32& result) { 556 const auto SetRegister = [this](u32 reg_index, const Xbyak::Reg32& result) {
557 // Register 0 is supposed to always return 0. NOP is implemented as a store to the zero 557 // Register 0 is supposed to always return 0. NOP is implemented as a store to the zero
558 // register. 558 // register.
559 if (reg == 0) { 559 if (reg_index == 0) {
560 return; 560 return;
561 } 561 }
562 mov(dword[STATE + offsetof(JITState, registers) + reg * sizeof(u32)], result); 562 mov(dword[STATE + offsetof(JITState, registers) + reg_index * sizeof(u32)], result);
563 }; 563 };
564 const auto SetMethodAddress = [this](const Xbyak::Reg32& reg) { mov(METHOD_ADDRESS, reg); }; 564 const auto SetMethodAddress = [this](const Xbyak::Reg32& reg32) { mov(METHOD_ADDRESS, reg32); };
565 565
566 switch (operation) { 566 switch (operation) {
567 case Macro::ResultOperation::IgnoreAndFetch: 567 case Macro::ResultOperation::IgnoreAndFetch:
diff --git a/src/video_core/macro/macro_jit_x64.h b/src/video_core/macro/macro_jit_x64.h
index a180e7428..7f50ac2f8 100644
--- a/src/video_core/macro/macro_jit_x64.h
+++ b/src/video_core/macro/macro_jit_x64.h
@@ -23,7 +23,7 @@ constexpr size_t MAX_CODE_SIZE = 0x10000;
23 23
24class MacroJITx64 final : public MacroEngine { 24class MacroJITx64 final : public MacroEngine {
25public: 25public:
26 explicit MacroJITx64(Engines::Maxwell3D& maxwell3d); 26 explicit MacroJITx64(Engines::Maxwell3D& maxwell3d_);
27 27
28protected: 28protected:
29 std::unique_ptr<CachedMacro> Compile(const std::vector<u32>& code) override; 29 std::unique_ptr<CachedMacro> Compile(const std::vector<u32>& code) override;
@@ -34,7 +34,7 @@ private:
34 34
35class MacroJITx64Impl : public Xbyak::CodeGenerator, public CachedMacro { 35class MacroJITx64Impl : public Xbyak::CodeGenerator, public CachedMacro {
36public: 36public:
37 MacroJITx64Impl(Engines::Maxwell3D& maxwell3d, const std::vector<u32>& code); 37 explicit MacroJITx64Impl(Engines::Maxwell3D& maxwell3d_, const std::vector<u32>& code_);
38 ~MacroJITx64Impl(); 38 ~MacroJITx64Impl();
39 39
40 void Execute(const std::vector<u32>& parameters, u32 method) override; 40 void Execute(const std::vector<u32>& parameters, u32 method) override;
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h
index c078193d9..c35e57689 100644
--- a/src/video_core/memory_manager.h
+++ b/src/video_core/memory_manager.h
@@ -28,7 +28,7 @@ public:
28 }; 28 };
29 29
30 constexpr PageEntry() = default; 30 constexpr PageEntry() = default;
31 constexpr PageEntry(State state) : state{state} {} 31 constexpr PageEntry(State state_) : state{state_} {}
32 constexpr PageEntry(VAddr addr) : state{static_cast<State>(addr >> ShiftBits)} {} 32 constexpr PageEntry(VAddr addr) : state{static_cast<State>(addr >> ShiftBits)} {}
33 33
34 [[nodiscard]] constexpr bool IsUnmapped() const { 34 [[nodiscard]] constexpr bool IsUnmapped() const {
@@ -68,7 +68,7 @@ static_assert(sizeof(PageEntry) == 4, "PageEntry is too large");
68 68
69class MemoryManager final { 69class MemoryManager final {
70public: 70public:
71 explicit MemoryManager(Core::System& system); 71 explicit MemoryManager(Core::System& system_);
72 ~MemoryManager(); 72 ~MemoryManager();
73 73
74 /// Binds a renderer to the memory manager. 74 /// Binds a renderer to the memory manager.
diff --git a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp
index d6120c23e..5378c398e 100644
--- a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp
@@ -187,8 +187,8 @@ std::string TextureType(const MetaTexture& meta) {
187 187
188class ARBDecompiler final { 188class ARBDecompiler final {
189public: 189public:
190 explicit ARBDecompiler(const Device& device, const ShaderIR& ir, const Registry& registry, 190 explicit ARBDecompiler(const Device& device_, const ShaderIR& ir_, const Registry& registry_,
191 ShaderType stage, std::string_view identifier); 191 ShaderType stage_, std::string_view identifier);
192 192
193 std::string Code() const { 193 std::string Code() const {
194 return shader_source; 194 return shader_source;
@@ -802,9 +802,9 @@ private:
802 }; 802 };
803}; 803};
804 804
805ARBDecompiler::ARBDecompiler(const Device& device, const ShaderIR& ir, const Registry& registry, 805ARBDecompiler::ARBDecompiler(const Device& device_, const ShaderIR& ir_, const Registry& registry_,
806 ShaderType stage, std::string_view identifier) 806 ShaderType stage_, std::string_view identifier)
807 : device{device}, ir{ir}, registry{registry}, stage{stage} { 807 : device{device_}, ir{ir_}, registry{registry_}, stage{stage_} {
808 DefineGlobalMemory(); 808 DefineGlobalMemory();
809 809
810 AddLine("TEMP RC;"); 810 AddLine("TEMP RC;");
@@ -1134,44 +1134,44 @@ void ARBDecompiler::VisitAST(const ASTNode& node) {
1134 for (ASTNode current = ast->nodes.GetFirst(); current; current = current->GetNext()) { 1134 for (ASTNode current = ast->nodes.GetFirst(); current; current = current->GetNext()) {
1135 VisitAST(current); 1135 VisitAST(current);
1136 } 1136 }
1137 } else if (const auto ast = std::get_if<ASTIfThen>(&*node->GetInnerData())) { 1137 } else if (const auto if_then = std::get_if<ASTIfThen>(&*node->GetInnerData())) {
1138 const std::string condition = VisitExpression(ast->condition); 1138 const std::string condition = VisitExpression(if_then->condition);
1139 ResetTemporaries(); 1139 ResetTemporaries();
1140 1140
1141 AddLine("MOVC.U RC.x, {};", condition); 1141 AddLine("MOVC.U RC.x, {};", condition);
1142 AddLine("IF NE.x;"); 1142 AddLine("IF NE.x;");
1143 for (ASTNode current = ast->nodes.GetFirst(); current; current = current->GetNext()) { 1143 for (ASTNode current = if_then->nodes.GetFirst(); current; current = current->GetNext()) {
1144 VisitAST(current); 1144 VisitAST(current);
1145 } 1145 }
1146 AddLine("ENDIF;"); 1146 AddLine("ENDIF;");
1147 } else if (const auto ast = std::get_if<ASTIfElse>(&*node->GetInnerData())) { 1147 } else if (const auto if_else = std::get_if<ASTIfElse>(&*node->GetInnerData())) {
1148 AddLine("ELSE;"); 1148 AddLine("ELSE;");
1149 for (ASTNode current = ast->nodes.GetFirst(); current; current = current->GetNext()) { 1149 for (ASTNode current = if_else->nodes.GetFirst(); current; current = current->GetNext()) {
1150 VisitAST(current); 1150 VisitAST(current);
1151 } 1151 }
1152 } else if (const auto ast = std::get_if<ASTBlockDecoded>(&*node->GetInnerData())) { 1152 } else if (const auto decoded = std::get_if<ASTBlockDecoded>(&*node->GetInnerData())) {
1153 VisitBlock(ast->nodes); 1153 VisitBlock(decoded->nodes);
1154 } else if (const auto ast = std::get_if<ASTVarSet>(&*node->GetInnerData())) { 1154 } else if (const auto var_set = std::get_if<ASTVarSet>(&*node->GetInnerData())) {
1155 AddLine("MOV.U F{}, {};", ast->index, VisitExpression(ast->condition)); 1155 AddLine("MOV.U F{}, {};", var_set->index, VisitExpression(var_set->condition));
1156 ResetTemporaries(); 1156 ResetTemporaries();
1157 } else if (const auto ast = std::get_if<ASTDoWhile>(&*node->GetInnerData())) { 1157 } else if (const auto do_while = std::get_if<ASTDoWhile>(&*node->GetInnerData())) {
1158 const std::string condition = VisitExpression(ast->condition); 1158 const std::string condition = VisitExpression(do_while->condition);
1159 ResetTemporaries(); 1159 ResetTemporaries();
1160 AddLine("REP;"); 1160 AddLine("REP;");
1161 for (ASTNode current = ast->nodes.GetFirst(); current; current = current->GetNext()) { 1161 for (ASTNode current = do_while->nodes.GetFirst(); current; current = current->GetNext()) {
1162 VisitAST(current); 1162 VisitAST(current);
1163 } 1163 }
1164 AddLine("MOVC.U RC.x, {};", condition); 1164 AddLine("MOVC.U RC.x, {};", condition);
1165 AddLine("BRK (NE.x);"); 1165 AddLine("BRK (NE.x);");
1166 AddLine("ENDREP;"); 1166 AddLine("ENDREP;");
1167 } else if (const auto ast = std::get_if<ASTReturn>(&*node->GetInnerData())) { 1167 } else if (const auto ast_return = std::get_if<ASTReturn>(&*node->GetInnerData())) {
1168 const bool is_true = ExprIsTrue(ast->condition); 1168 const bool is_true = ExprIsTrue(ast_return->condition);
1169 if (!is_true) { 1169 if (!is_true) {
1170 AddLine("MOVC.U RC.x, {};", VisitExpression(ast->condition)); 1170 AddLine("MOVC.U RC.x, {};", VisitExpression(ast_return->condition));
1171 AddLine("IF NE.x;"); 1171 AddLine("IF NE.x;");
1172 ResetTemporaries(); 1172 ResetTemporaries();
1173 } 1173 }
1174 if (ast->kills) { 1174 if (ast_return->kills) {
1175 AddLine("KIL TR;"); 1175 AddLine("KIL TR;");
1176 } else { 1176 } else {
1177 Exit(); 1177 Exit();
@@ -1179,11 +1179,11 @@ void ARBDecompiler::VisitAST(const ASTNode& node) {
1179 if (!is_true) { 1179 if (!is_true) {
1180 AddLine("ENDIF;"); 1180 AddLine("ENDIF;");
1181 } 1181 }
1182 } else if (const auto ast = std::get_if<ASTBreak>(&*node->GetInnerData())) { 1182 } else if (const auto ast_break = std::get_if<ASTBreak>(&*node->GetInnerData())) {
1183 if (ExprIsTrue(ast->condition)) { 1183 if (ExprIsTrue(ast_break->condition)) {
1184 AddLine("BRK;"); 1184 AddLine("BRK;");
1185 } else { 1185 } else {
1186 AddLine("MOVC.U RC.x, {};", VisitExpression(ast->condition)); 1186 AddLine("MOVC.U RC.x, {};", VisitExpression(ast_break->condition));
1187 AddLine("BRK (NE.x);"); 1187 AddLine("BRK (NE.x);");
1188 ResetTemporaries(); 1188 ResetTemporaries();
1189 } 1189 }
diff --git a/src/video_core/renderer_opengl/gl_fence_manager.cpp b/src/video_core/renderer_opengl/gl_fence_manager.cpp
index b532fdcc2..6040646cb 100644
--- a/src/video_core/renderer_opengl/gl_fence_manager.cpp
+++ b/src/video_core/renderer_opengl/gl_fence_manager.cpp
@@ -11,10 +11,10 @@
11 11
12namespace OpenGL { 12namespace OpenGL {
13 13
14GLInnerFence::GLInnerFence(u32 payload, bool is_stubbed) : FenceBase(payload, is_stubbed) {} 14GLInnerFence::GLInnerFence(u32 payload_, bool is_stubbed_) : FenceBase{payload_, is_stubbed_} {}
15 15
16GLInnerFence::GLInnerFence(GPUVAddr address, u32 payload, bool is_stubbed) 16GLInnerFence::GLInnerFence(GPUVAddr address_, u32 payload_, bool is_stubbed_)
17 : FenceBase(address, payload, is_stubbed) {} 17 : FenceBase{address_, payload_, is_stubbed_} {}
18 18
19GLInnerFence::~GLInnerFence() = default; 19GLInnerFence::~GLInnerFence() = default;
20 20
@@ -45,10 +45,10 @@ void GLInnerFence::Wait() {
45 glClientWaitSync(sync_object.handle, 0, GL_TIMEOUT_IGNORED); 45 glClientWaitSync(sync_object.handle, 0, GL_TIMEOUT_IGNORED);
46} 46}
47 47
48FenceManagerOpenGL::FenceManagerOpenGL(VideoCore::RasterizerInterface& rasterizer, Tegra::GPU& gpu, 48FenceManagerOpenGL::FenceManagerOpenGL(VideoCore::RasterizerInterface& rasterizer_,
49 TextureCacheOpenGL& texture_cache, 49 Tegra::GPU& gpu_, TextureCacheOpenGL& texture_cache_,
50 OGLBufferCache& buffer_cache, QueryCache& query_cache) 50 OGLBufferCache& buffer_cache_, QueryCache& query_cache_)
51 : GenericFenceManager{rasterizer, gpu, texture_cache, buffer_cache, query_cache} {} 51 : GenericFenceManager{rasterizer_, gpu_, texture_cache_, buffer_cache_, query_cache_} {}
52 52
53Fence FenceManagerOpenGL::CreateFence(u32 value, bool is_stubbed) { 53Fence FenceManagerOpenGL::CreateFence(u32 value, bool is_stubbed) {
54 return std::make_shared<GLInnerFence>(value, is_stubbed); 54 return std::make_shared<GLInnerFence>(value, is_stubbed);
diff --git a/src/video_core/renderer_opengl/gl_fence_manager.h b/src/video_core/renderer_opengl/gl_fence_manager.h
index da1dcdace..39ca6125b 100644
--- a/src/video_core/renderer_opengl/gl_fence_manager.h
+++ b/src/video_core/renderer_opengl/gl_fence_manager.h
@@ -17,8 +17,8 @@ namespace OpenGL {
17 17
18class GLInnerFence : public VideoCommon::FenceBase { 18class GLInnerFence : public VideoCommon::FenceBase {
19public: 19public:
20 GLInnerFence(u32 payload, bool is_stubbed); 20 explicit GLInnerFence(u32 payload_, bool is_stubbed_);
21 GLInnerFence(GPUVAddr address, u32 payload, bool is_stubbed); 21 explicit GLInnerFence(GPUVAddr address_, u32 payload_, bool is_stubbed_);
22 ~GLInnerFence(); 22 ~GLInnerFence();
23 23
24 void Queue(); 24 void Queue();
@@ -37,9 +37,9 @@ using GenericFenceManager =
37 37
38class FenceManagerOpenGL final : public GenericFenceManager { 38class FenceManagerOpenGL final : public GenericFenceManager {
39public: 39public:
40 explicit FenceManagerOpenGL(VideoCore::RasterizerInterface& rasterizer, Tegra::GPU& gpu, 40 explicit FenceManagerOpenGL(VideoCore::RasterizerInterface& rasterizer_, Tegra::GPU& gpu_,
41 TextureCacheOpenGL& texture_cache, OGLBufferCache& buffer_cache, 41 TextureCacheOpenGL& texture_cache_, OGLBufferCache& buffer_cache_,
42 QueryCache& query_cache); 42 QueryCache& query_cache_);
43 43
44protected: 44protected:
45 Fence CreateFence(u32 value, bool is_stubbed) override; 45 Fence CreateFence(u32 value, bool is_stubbed) override;
diff --git a/src/video_core/renderer_opengl/gl_query_cache.cpp b/src/video_core/renderer_opengl/gl_query_cache.cpp
index 1a3d9720e..bcc37471f 100644
--- a/src/video_core/renderer_opengl/gl_query_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_query_cache.cpp
@@ -59,10 +59,10 @@ bool QueryCache::AnyCommandQueued() const noexcept {
59 return gl_rasterizer.AnyCommandQueued(); 59 return gl_rasterizer.AnyCommandQueued();
60} 60}
61 61
62HostCounter::HostCounter(QueryCache& cache, std::shared_ptr<HostCounter> dependency, 62HostCounter::HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency,
63 VideoCore::QueryType type) 63 VideoCore::QueryType type_)
64 : VideoCommon::HostCounterBase<QueryCache, HostCounter>{std::move(dependency)}, cache{cache}, 64 : HostCounterBase<QueryCache, HostCounter>{std::move(dependency)}, cache{cache_}, type{type_},
65 type{type}, query{cache.AllocateQuery(type)} { 65 query{cache.AllocateQuery(type)} {
66 glBeginQuery(GetTarget(type), query.handle); 66 glBeginQuery(GetTarget(type), query.handle);
67} 67}
68 68
@@ -86,13 +86,14 @@ u64 HostCounter::BlockingQuery() const {
86 return static_cast<u64>(value); 86 return static_cast<u64>(value);
87} 87}
88 88
89CachedQuery::CachedQuery(QueryCache& cache, VideoCore::QueryType type, VAddr cpu_addr, u8* host_ptr) 89CachedQuery::CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr,
90 : VideoCommon::CachedQueryBase<HostCounter>{cpu_addr, host_ptr}, cache{&cache}, type{type} {} 90 u8* host_ptr)
91 : CachedQueryBase<HostCounter>{cpu_addr, host_ptr}, cache{&cache_}, type{type_} {}
91 92
92CachedQuery::~CachedQuery() = default; 93CachedQuery::~CachedQuery() = default;
93 94
94CachedQuery::CachedQuery(CachedQuery&& rhs) noexcept 95CachedQuery::CachedQuery(CachedQuery&& rhs) noexcept
95 : VideoCommon::CachedQueryBase<HostCounter>(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {} 96 : CachedQueryBase<HostCounter>(std::move(rhs)), cache{rhs.cache}, type{rhs.type} {}
96 97
97CachedQuery& CachedQuery::operator=(CachedQuery&& rhs) noexcept { 98CachedQuery& CachedQuery::operator=(CachedQuery&& rhs) noexcept {
98 cache = rhs.cache; 99 cache = rhs.cache;
diff --git a/src/video_core/renderer_opengl/gl_query_cache.h b/src/video_core/renderer_opengl/gl_query_cache.h
index 82cac51ee..d9851e880 100644
--- a/src/video_core/renderer_opengl/gl_query_cache.h
+++ b/src/video_core/renderer_opengl/gl_query_cache.h
@@ -46,8 +46,8 @@ private:
46 46
47class HostCounter final : public VideoCommon::HostCounterBase<QueryCache, HostCounter> { 47class HostCounter final : public VideoCommon::HostCounterBase<QueryCache, HostCounter> {
48public: 48public:
49 explicit HostCounter(QueryCache& cache, std::shared_ptr<HostCounter> dependency, 49 explicit HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency,
50 VideoCore::QueryType type); 50 VideoCore::QueryType type_);
51 ~HostCounter(); 51 ~HostCounter();
52 52
53 void EndQuery(); 53 void EndQuery();
@@ -62,7 +62,7 @@ private:
62 62
63class CachedQuery final : public VideoCommon::CachedQueryBase<HostCounter> { 63class CachedQuery final : public VideoCommon::CachedQueryBase<HostCounter> {
64public: 64public:
65 explicit CachedQuery(QueryCache& cache, VideoCore::QueryType type, VAddr cpu_addr, 65 explicit CachedQuery(QueryCache& cache_, VideoCore::QueryType type_, VAddr cpu_addr,
66 u8* host_ptr); 66 u8* host_ptr);
67 ~CachedQuery() override; 67 ~CachedQuery() override;
68 68
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index bd56bed0c..9f2c0a222 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -198,10 +198,10 @@ ProgramSharedPtr BuildShader(const Device& device, ShaderType shader_type, u64 u
198 return program; 198 return program;
199} 199}
200 200
201Shader::Shader(std::shared_ptr<VideoCommon::Shader::Registry> registry_, ShaderEntries entries_, 201Shader::Shader(std::shared_ptr<Registry> registry_, ShaderEntries entries_,
202 ProgramSharedPtr program_, bool is_built) 202 ProgramSharedPtr program_, bool is_built_)
203 : registry{std::move(registry_)}, entries{std::move(entries_)}, program{std::move(program_)}, 203 : registry{std::move(registry_)}, entries{std::move(entries_)}, program{std::move(program_)},
204 is_built(is_built) { 204 is_built{is_built_} {
205 handle = program->assembly_program.handle; 205 handle = program->assembly_program.handle;
206 if (handle == 0) { 206 if (handle == 0) {
207 handle = program->source_program.handle; 207 handle = program->source_program.handle;
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h
index 1708af06a..ab5374fac 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_cache.h
@@ -108,7 +108,7 @@ public:
108 108
109private: 109private:
110 explicit Shader(std::shared_ptr<VideoCommon::Shader::Registry> registry, ShaderEntries entries, 110 explicit Shader(std::shared_ptr<VideoCommon::Shader::Registry> registry, ShaderEntries entries,
111 ProgramSharedPtr program, bool is_built = true); 111 ProgramSharedPtr program, bool is_built_ = true);
112 112
113 std::shared_ptr<VideoCommon::Shader::Registry> registry; 113 std::shared_ptr<VideoCommon::Shader::Registry> registry;
114 ShaderEntries entries; 114 ShaderEntries entries;
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 95ca96c8e..0940969ba 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -131,7 +131,7 @@ private:
131 131
132class Expression final { 132class Expression final {
133public: 133public:
134 Expression(std::string code, Type type) : code{std::move(code)}, type{type} { 134 Expression(std::string code_, Type type_) : code{std::move(code_)}, type{type_} {
135 ASSERT(type != Type::Void); 135 ASSERT(type != Type::Void);
136 } 136 }
137 Expression() : type{Type::Void} {} 137 Expression() : type{Type::Void} {}
@@ -148,8 +148,8 @@ public:
148 ASSERT(type == Type::Void); 148 ASSERT(type == Type::Void);
149 } 149 }
150 150
151 std::string As(Type type) const { 151 std::string As(Type type_) const {
152 switch (type) { 152 switch (type_) {
153 case Type::Bool: 153 case Type::Bool:
154 return AsBool(); 154 return AsBool();
155 case Type::Bool2: 155 case Type::Bool2:
@@ -418,11 +418,12 @@ struct GenericVaryingDescription {
418 418
419class GLSLDecompiler final { 419class GLSLDecompiler final {
420public: 420public:
421 explicit GLSLDecompiler(const Device& device, const ShaderIR& ir, const Registry& registry, 421 explicit GLSLDecompiler(const Device& device_, const ShaderIR& ir_, const Registry& registry_,
422 ShaderType stage, std::string_view identifier, std::string_view suffix) 422 ShaderType stage_, std::string_view identifier_,
423 : device{device}, ir{ir}, registry{registry}, stage{stage}, identifier{identifier}, 423 std::string_view suffix_)
424 suffix{suffix}, header{ir.GetHeader()}, use_unified_uniforms{ 424 : device{device_}, ir{ir_}, registry{registry_}, stage{stage_}, identifier{identifier_},
425 UseUnifiedUniforms(device, ir, stage)} { 425 suffix{suffix_}, header{ir.GetHeader()}, use_unified_uniforms{
426 UseUnifiedUniforms(device_, ir_, stage_)} {
426 if (stage != ShaderType::Compute) { 427 if (stage != ShaderType::Compute) {
427 transform_feedback = BuildTransformFeedback(registry.GetGraphicsInfo()); 428 transform_feedback = BuildTransformFeedback(registry.GetGraphicsInfo());
428 } 429 }
@@ -777,16 +778,16 @@ private:
777 name = "gs_" + name + "[]"; 778 name = "gs_" + name + "[]";
778 } 779 }
779 780
780 std::string suffix; 781 std::string suffix_;
781 if (stage == ShaderType::Fragment) { 782 if (stage == ShaderType::Fragment) {
782 const auto input_mode{header.ps.GetPixelImap(location)}; 783 const auto input_mode{header.ps.GetPixelImap(location)};
783 if (input_mode == PixelImap::Unused) { 784 if (input_mode == PixelImap::Unused) {
784 return; 785 return;
785 } 786 }
786 suffix = GetInputFlags(input_mode); 787 suffix_ = GetInputFlags(input_mode);
787 } 788 }
788 789
789 code.AddLine("layout (location = {}) {} in vec4 {};", location, suffix, name); 790 code.AddLine("layout (location = {}) {} in vec4 {};", location, suffix_, name);
790 } 791 }
791 792
792 void DeclareOutputAttributes() { 793 void DeclareOutputAttributes() {
@@ -2100,13 +2101,13 @@ private:
2100 const auto type = meta.sampler.is_shadow ? Type::Float : Type::Int; 2101 const auto type = meta.sampler.is_shadow ? Type::Float : Type::Int;
2101 const bool separate_dc = meta.sampler.is_shadow; 2102 const bool separate_dc = meta.sampler.is_shadow;
2102 2103
2103 std::vector<TextureIR> ir; 2104 std::vector<TextureIR> ir_;
2104 if (meta.sampler.is_shadow) { 2105 if (meta.sampler.is_shadow) {
2105 ir = {TextureOffset{}}; 2106 ir_ = {TextureOffset{}};
2106 } else { 2107 } else {
2107 ir = {TextureOffset{}, TextureArgument{type, meta.component}}; 2108 ir_ = {TextureOffset{}, TextureArgument{type, meta.component}};
2108 } 2109 }
2109 return {GenerateTexture(operation, "Gather", ir, separate_dc) + GetSwizzle(meta.element), 2110 return {GenerateTexture(operation, "Gather", ir_, separate_dc) + GetSwizzle(meta.element),
2110 Type::Float}; 2111 Type::Float};
2111 } 2112 }
2112 2113
@@ -2801,7 +2802,7 @@ std::string GetFlowVariable(u32 index) {
2801 2802
2802class ExprDecompiler { 2803class ExprDecompiler {
2803public: 2804public:
2804 explicit ExprDecompiler(GLSLDecompiler& decomp) : decomp{decomp} {} 2805 explicit ExprDecompiler(GLSLDecompiler& decomp_) : decomp{decomp_} {}
2805 2806
2806 void operator()(const ExprAnd& expr) { 2807 void operator()(const ExprAnd& expr) {
2807 inner += '('; 2808 inner += '(';
@@ -2856,7 +2857,7 @@ private:
2856 2857
2857class ASTDecompiler { 2858class ASTDecompiler {
2858public: 2859public:
2859 explicit ASTDecompiler(GLSLDecompiler& decomp) : decomp{decomp} {} 2860 explicit ASTDecompiler(GLSLDecompiler& decomp_) : decomp{decomp_} {}
2860 2861
2861 void operator()(const ASTProgram& ast) { 2862 void operator()(const ASTProgram& ast) {
2862 ASTNode current = ast.nodes.GetFirst(); 2863 ASTNode current = ast.nodes.GetFirst();
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h
index 451c9689a..f5a5249f2 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.h
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h
@@ -25,8 +25,8 @@ using ImageEntry = VideoCommon::Shader::Image;
25 25
26class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer { 26class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer {
27public: 27public:
28 explicit ConstBufferEntry(u32 max_offset, bool is_indirect, u32 index) 28 explicit ConstBufferEntry(u32 max_offset, bool is_indirect, u32 index_)
29 : VideoCommon::Shader::ConstBuffer{max_offset, is_indirect}, index{index} {} 29 : ConstBuffer{max_offset, is_indirect}, index{index_} {}
30 30
31 u32 GetIndex() const { 31 u32 GetIndex() const {
32 return index; 32 return index;
@@ -37,10 +37,10 @@ private:
37}; 37};
38 38
39struct GlobalMemoryEntry { 39struct GlobalMemoryEntry {
40 constexpr explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, bool is_read, 40 constexpr explicit GlobalMemoryEntry(u32 cbuf_index_, u32 cbuf_offset_, bool is_read_,
41 bool is_written) 41 bool is_written_)
42 : cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, is_read{is_read}, is_written{ 42 : cbuf_index{cbuf_index_}, cbuf_offset{cbuf_offset_}, is_read{is_read_}, is_written{
43 is_written} {} 43 is_written_} {}
44 44
45 u32 cbuf_index = 0; 45 u32 cbuf_index = 0;
46 u32 cbuf_offset = 0; 46 u32 cbuf_offset = 0;
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index a863ef218..a59fe853e 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -258,9 +258,9 @@ constexpr u32 EncodeSwizzle(SwizzleSource x_source, SwizzleSource y_source, Swiz
258 258
259} // Anonymous namespace 259} // Anonymous namespace
260 260
261CachedSurface::CachedSurface(const GPUVAddr gpu_addr, const SurfaceParams& params, 261CachedSurface::CachedSurface(const GPUVAddr gpu_addr_, const SurfaceParams& params_,
262 bool is_astc_supported) 262 bool is_astc_supported_)
263 : VideoCommon::SurfaceBase<View>(gpu_addr, params, is_astc_supported) { 263 : SurfaceBase<View>{gpu_addr_, params_, is_astc_supported_} {
264 if (is_converted) { 264 if (is_converted) {
265 internal_format = params.srgb_conversion ? GL_SRGB8_ALPHA8 : GL_RGBA8; 265 internal_format = params.srgb_conversion ? GL_SRGB8_ALPHA8 : GL_RGBA8;
266 format = GL_RGBA; 266 format = GL_RGBA;
@@ -419,11 +419,11 @@ View CachedSurface::CreateViewInner(const ViewParams& view_key, const bool is_pr
419 return view; 419 return view;
420} 420}
421 421
422CachedSurfaceView::CachedSurfaceView(CachedSurface& surface, const ViewParams& params, 422CachedSurfaceView::CachedSurfaceView(CachedSurface& surface_, const ViewParams& params_,
423 bool is_proxy) 423 bool is_proxy_)
424 : VideoCommon::ViewBase(params), surface{surface}, format{surface.internal_format}, 424 : ViewBase{params_}, surface{surface_}, format{surface_.internal_format},
425 target{GetTextureTarget(params.target)}, is_proxy{is_proxy} { 425 target{GetTextureTarget(params_.target)}, is_proxy{is_proxy_} {
426 if (!is_proxy) { 426 if (!is_proxy_) {
427 main_view = CreateTextureView(); 427 main_view = CreateTextureView();
428 } 428 }
429} 429}
@@ -493,13 +493,13 @@ GLuint CachedSurfaceView::GetTexture(SwizzleSource x_source, SwizzleSource y_sou
493 493
494 std::array swizzle{x_source, y_source, z_source, w_source}; 494 std::array swizzle{x_source, y_source, z_source, w_source};
495 495
496 switch (const PixelFormat format = GetSurfaceParams().pixel_format) { 496 switch (const PixelFormat pixel_format = GetSurfaceParams().pixel_format) {
497 case PixelFormat::D24_UNORM_S8_UINT: 497 case PixelFormat::D24_UNORM_S8_UINT:
498 case PixelFormat::D32_FLOAT_S8_UINT: 498 case PixelFormat::D32_FLOAT_S8_UINT:
499 case PixelFormat::S8_UINT_D24_UNORM: 499 case PixelFormat::S8_UINT_D24_UNORM:
500 UNIMPLEMENTED_IF(x_source != SwizzleSource::R && x_source != SwizzleSource::G); 500 UNIMPLEMENTED_IF(x_source != SwizzleSource::R && x_source != SwizzleSource::G);
501 glTextureParameteri(view.handle, GL_DEPTH_STENCIL_TEXTURE_MODE, 501 glTextureParameteri(view.handle, GL_DEPTH_STENCIL_TEXTURE_MODE,
502 GetComponent(format, x_source == SwizzleSource::R)); 502 GetComponent(pixel_format, x_source == SwizzleSource::R));
503 503
504 // Make sure we sample the first component 504 // Make sure we sample the first component
505 std::transform(swizzle.begin(), swizzle.end(), swizzle.begin(), [](SwizzleSource value) { 505 std::transform(swizzle.begin(), swizzle.end(), swizzle.begin(), [](SwizzleSource value) {
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h
index 7787134fc..76a7b2316 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.h
+++ b/src/video_core/renderer_opengl/gl_texture_cache.h
@@ -37,7 +37,8 @@ class CachedSurface final : public VideoCommon::SurfaceBase<View> {
37 friend CachedSurfaceView; 37 friend CachedSurfaceView;
38 38
39public: 39public:
40 explicit CachedSurface(GPUVAddr gpu_addr, const SurfaceParams& params, bool is_astc_supported); 40 explicit CachedSurface(GPUVAddr gpu_addr_, const SurfaceParams& params_,
41 bool is_astc_supported_);
41 ~CachedSurface(); 42 ~CachedSurface();
42 43
43 void UploadTexture(const std::vector<u8>& staging_buffer) override; 44 void UploadTexture(const std::vector<u8>& staging_buffer) override;
@@ -77,7 +78,7 @@ private:
77 78
78class CachedSurfaceView final : public VideoCommon::ViewBase { 79class CachedSurfaceView final : public VideoCommon::ViewBase {
79public: 80public:
80 explicit CachedSurfaceView(CachedSurface& surface, const ViewParams& params, bool is_proxy); 81 explicit CachedSurfaceView(CachedSurface& surface_, const ViewParams& params_, bool is_proxy_);
81 ~CachedSurfaceView(); 82 ~CachedSurfaceView();
82 83
83 /// @brief Attaches this texture view to the currently bound fb_target framebuffer 84 /// @brief Attaches this texture view to the currently bound fb_target framebuffer
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.cpp b/src/video_core/renderer_vulkan/vk_command_pool.cpp
index 6339f4fe0..256a39148 100644
--- a/src/video_core/renderer_vulkan/vk_command_pool.cpp
+++ b/src/video_core/renderer_vulkan/vk_command_pool.cpp
@@ -17,8 +17,8 @@ struct CommandPool::Pool {
17 vk::CommandBuffers cmdbufs; 17 vk::CommandBuffers cmdbufs;
18}; 18};
19 19
20CommandPool::CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device) 20CommandPool::CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device_)
21 : ResourcePool(master_semaphore, COMMAND_BUFFER_POOL_SIZE), device{device} {} 21 : ResourcePool(master_semaphore, COMMAND_BUFFER_POOL_SIZE), device{device_} {}
22 22
23CommandPool::~CommandPool() = default; 23CommandPool::~CommandPool() = default;
24 24
diff --git a/src/video_core/renderer_vulkan/vk_command_pool.h b/src/video_core/renderer_vulkan/vk_command_pool.h
index b9cb3fb5d..33655eca4 100644
--- a/src/video_core/renderer_vulkan/vk_command_pool.h
+++ b/src/video_core/renderer_vulkan/vk_command_pool.h
@@ -17,7 +17,7 @@ class VKDevice;
17 17
18class CommandPool final : public ResourcePool { 18class CommandPool final : public ResourcePool {
19public: 19public:
20 explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device); 20 explicit CommandPool(MasterSemaphore& master_semaphore, const VKDevice& device_);
21 ~CommandPool() override; 21 ~CommandPool() override;
22 22
23 void Allocate(size_t begin, size_t end) override; 23 void Allocate(size_t begin, size_t end) override;