diff options
| author | 2020-12-05 00:48:08 -0800 | |
|---|---|---|
| committer | 2020-12-05 00:48:08 -0800 | |
| commit | e6a896c4bdf9cc47c2002c115c9ff280e540fd1b (patch) | |
| tree | e5cd397cb3a11f1529f38ed8fa0a0185d07becaa /src/video_core/engines | |
| parent | Merge pull request #5127 from FearlessTobi/port-5617 (diff) | |
| parent | video_core: Resolve more variable shadowing scenarios (diff) | |
| download | yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.gz yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.tar.xz yuzu-e6a896c4bdf9cc47c2002c115c9ff280e540fd1b.zip | |
Merge pull request #5124 from lioncash/video-shadow
video_core: Resolve more variable shadowing scenarios
Diffstat (limited to 'src/video_core/engines')
| -rw-r--r-- | src/video_core/engines/engine_upload.cpp | 8 | ||||
| -rw-r--r-- | src/video_core/engines/engine_upload.h | 4 | ||||
| -rw-r--r-- | src/video_core/engines/kepler_memory.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/engines/kepler_memory.h | 2 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/engines/maxwell_dma.h | 4 |
6 files changed, 15 insertions, 13 deletions
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 | ||
| 12 | namespace Tegra::Engines::Upload { | 12 | namespace Tegra::Engines::Upload { |
| 13 | 13 | ||
| 14 | State::State(MemoryManager& memory_manager, Registers& regs) | 14 | State::State(MemoryManager& memory_manager_, Registers& regs_) |
| 15 | : regs{regs}, memory_manager{memory_manager} {} | 15 | : regs{regs_}, memory_manager{memory_manager_} {} |
| 16 | 16 | ||
| 17 | State::~State() = default; | 17 | State::~State() = default; |
| 18 | 18 | ||
| 19 | void State::ProcessExec(const bool is_linear) { | 19 | void 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 | ||
| 26 | void State::ProcessData(const u32 data, const bool is_last_call) { | 26 | void 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 | ||
| 55 | class State { | 55 | class State { |
| 56 | public: | 56 | public: |
| 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 | ||
| 63 | private: | 63 | private: |
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 | ||
| 15 | namespace Tegra::Engines { | 15 | namespace Tegra::Engines { |
| 16 | 16 | ||
| 17 | KeplerMemory::KeplerMemory(Core::System& system, MemoryManager& memory_manager) | 17 | KeplerMemory::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 | ||
| 20 | KeplerMemory::~KeplerMemory() = default; | 20 | KeplerMemory::~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 | ||
| 36 | class KeplerMemory final : public EngineInterface { | 36 | class KeplerMemory final : public EngineInterface { |
| 37 | public: | 37 | public: |
| 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 | ||
| 17 | using namespace Texture; | 17 | using namespace Texture; |
| 18 | 18 | ||
| 19 | MaxwellDMA::MaxwellDMA(Core::System& system, MemoryManager& memory_manager) | 19 | MaxwellDMA::MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_) |
| 20 | : system{system}, memory_manager{memory_manager} {} | 20 | : system{system_}, memory_manager{memory_manager_} {} |
| 21 | |||
| 22 | MaxwellDMA::~MaxwellDMA() = default; | ||
| 21 | 23 | ||
| 22 | void MaxwellDMA::CallMethod(u32 method, u32 method_argument, bool is_last_call) { | 24 | void 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; |