diff options
| author | 2021-01-07 15:56:15 -0500 | |
|---|---|---|
| committer | 2021-02-13 13:07:56 -0500 | |
| commit | b675c44e494976cf8164203fc826b54e2fac467b (patch) | |
| tree | 68880d4617e87048fd1c325ed05dc26b434396cf /src | |
| parent | Address PR feedback (diff) | |
| download | yuzu-b675c44e494976cf8164203fc826b54e2fac467b.tar.gz yuzu-b675c44e494976cf8164203fc826b54e2fac467b.tar.xz yuzu-b675c44e494976cf8164203fc826b54e2fac467b.zip | |
rebase, fix name shadowing, more const
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/cdma_pusher.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/command_classes/vic.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/gpu.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/gpu_thread.cpp | 2 |
4 files changed, 10 insertions, 11 deletions
diff --git a/src/video_core/cdma_pusher.cpp b/src/video_core/cdma_pusher.cpp index e1f00c4da..a3fda1094 100644 --- a/src/video_core/cdma_pusher.cpp +++ b/src/video_core/cdma_pusher.cpp | |||
| @@ -145,9 +145,9 @@ void CDmaPusher::ExecuteCommand(u32 state_offset, u32 data) { | |||
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | void CDmaPusher::ThiStateWrite(ThiRegisters& state, u32 offset, u32 argument) { | 148 | void CDmaPusher::ThiStateWrite(ThiRegisters& state, u32 state_offset, u32 argument) { |
| 149 | u8* const state_offset = reinterpret_cast<u8*>(&state) + sizeof(u32) * offset; | 149 | u8* const offset_ptr = reinterpret_cast<u8*>(&state) + sizeof(u32) * state_offset; |
| 150 | std::memcpy(state_offset, &argument, sizeof(u32)); | 150 | std::memcpy(offset_ptr, &argument, sizeof(u32)); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | } // namespace Tegra | 153 | } // namespace Tegra |
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index 564f9c1e8..0a8b82f2b 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp | |||
| @@ -134,10 +134,10 @@ void Vic::Execute() { | |||
| 134 | 134 | ||
| 135 | // Populate luma buffer | 135 | // Populate luma buffer |
| 136 | for (std::size_t y = 0; y < surface_height - 1; ++y) { | 136 | for (std::size_t y = 0; y < surface_height - 1; ++y) { |
| 137 | std::size_t src = y * stride; | 137 | const std::size_t src = y * stride; |
| 138 | std::size_t dst = y * aligned_width; | 138 | const std::size_t dst = y * aligned_width; |
| 139 | 139 | ||
| 140 | std::size_t size = surface_width; | 140 | const std::size_t size = surface_width; |
| 141 | 141 | ||
| 142 | for (std::size_t offset = 0; offset < size; ++offset) { | 142 | for (std::size_t offset = 0; offset < size; ++offset) { |
| 143 | luma_buffer[dst + offset] = luma_ptr[src + offset]; | 143 | luma_buffer[dst + offset] = luma_ptr[src + offset]; |
| @@ -148,8 +148,8 @@ void Vic::Execute() { | |||
| 148 | 148 | ||
| 149 | // Populate chroma buffer from both channels with interleaving. | 149 | // Populate chroma buffer from both channels with interleaving. |
| 150 | for (std::size_t y = 0; y < half_height; ++y) { | 150 | for (std::size_t y = 0; y < half_height; ++y) { |
| 151 | std::size_t src = y * half_stride; | 151 | const std::size_t src = y * half_stride; |
| 152 | std::size_t dst = y * aligned_width; | 152 | const std::size_t dst = y * aligned_width; |
| 153 | 153 | ||
| 154 | for (std::size_t x = 0; x < half_width; ++x) { | 154 | for (std::size_t x = 0; x < half_width; ++x) { |
| 155 | chroma_buffer[dst + x * 2] = chroma_b_ptr[src + x]; | 155 | chroma_buffer[dst + x * 2] = chroma_b_ptr[src + x]; |
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 3db33faf3..51c63af4a 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -493,8 +493,7 @@ void GPU::PushCommandBuffer(Tegra::ChCommandHeaderList& entries) { | |||
| 493 | // TODO(ameerj): RE proper async nvdec operation | 493 | // TODO(ameerj): RE proper async nvdec operation |
| 494 | // gpu_thread.SubmitCommandBuffer(std::move(entries)); | 494 | // gpu_thread.SubmitCommandBuffer(std::move(entries)); |
| 495 | 495 | ||
| 496 | cdma_pusher->Push(std::move(entries)); | 496 | cdma_pusher->ProcessEntries(std::move(entries)); |
| 497 | cdma_pusher->DispatchCalls(); | ||
| 498 | } | 497 | } |
| 499 | 498 | ||
| 500 | void GPU::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { | 499 | void GPU::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { |
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 7644588e3..eb0e43c0c 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -49,7 +49,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer, | |||
| 49 | } else if (auto* command_list = std::get_if<SubmitChCommandEntries>(&next.data)) { | 49 | } else if (auto* command_list = std::get_if<SubmitChCommandEntries>(&next.data)) { |
| 50 | // NVDEC | 50 | // NVDEC |
| 51 | cdma_pusher.ProcessEntries(std::move(command_list->entries)); | 51 | cdma_pusher.ProcessEntries(std::move(command_list->entries)); |
| 52 | } else if (const auto data = std::get_if<SwapBuffersCommand>(&next.data)) { | 52 | } else if (const auto* data = std::get_if<SwapBuffersCommand>(&next.data)) { |
| 53 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); | 53 | renderer.SwapBuffers(data->framebuffer ? &*data->framebuffer : nullptr); |
| 54 | } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { | 54 | } else if (std::holds_alternative<OnCommandListEndCommand>(next.data)) { |
| 55 | rasterizer->ReleaseFences(); | 55 | rasterizer->ReleaseFences(); |