diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-20 15:55:58 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-20 15:56:01 -0400 |
commit | d53c73adaa3a076295c20942c875acec3962cf37 (patch) | |
tree | 032b0b590b2a8c8be4fc9a3d969bed4300abfcf6 /src/video_core | |
parent | dd1ee39426eff804667ceb07126e06ceb5a18b2e (diff) |
maxwell_dma: Make variables const where applicable within HandleCopy()
These are never modified, so we can make that assumption explicit.
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index a2157fa29..9469bce59 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -78,7 +78,7 @@ void MaxwellDMA::HandleCopy() { ASSERT(regs.exec.enable_2d == 1); - std::size_t copy_size = regs.x_count * regs.y_count; + const std::size_t copy_size = regs.x_count * regs.y_count; const auto FlushAndInvalidate = [&](u32 src_size, u64 dst_size) { // TODO(Subv): For now, manually flush the regions until we implement GPU-accelerated @@ -95,7 +95,7 @@ void MaxwellDMA::HandleCopy() { ASSERT(regs.src_params.size_z == 1); // If the input is tiled and the output is linear, deswizzle the input and copy it over. - u32 src_bytes_per_pixel = regs.src_pitch / regs.src_params.size_x; + const u32 src_bytes_per_pixel = regs.src_pitch / regs.src_params.size_x; FlushAndInvalidate(regs.src_pitch * regs.src_params.size_y, copy_size * src_bytes_per_pixel); @@ -108,7 +108,7 @@ void MaxwellDMA::HandleCopy() { ASSERT(regs.dst_params.size_z == 1); ASSERT(regs.src_pitch == regs.x_count); - u32 src_bpp = regs.src_pitch / regs.x_count; + const u32 src_bpp = regs.src_pitch / regs.x_count; FlushAndInvalidate(regs.src_pitch * regs.y_count, regs.dst_params.size_x * regs.dst_params.size_y * src_bpp); |