yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

maxwell_dma: Make variables const where applicable within HandleCopy()

These are never modified, so we can make that assumption explicit.
This commit is contained in:
Lioncash 2018-10-20 15:55:58 -04:00
parent dd1ee39426
commit d53c73adaa
1 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ void MaxwellDMA::HandleCopy() {
ASSERT(regs.exec.enable_2d == 1); 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) { const auto FlushAndInvalidate = [&](u32 src_size, u64 dst_size) {
// TODO(Subv): For now, manually flush the regions until we implement GPU-accelerated // 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); ASSERT(regs.src_params.size_z == 1);
// If the input is tiled and the output is linear, deswizzle the input and copy it over. // 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, FlushAndInvalidate(regs.src_pitch * regs.src_params.size_y,
copy_size * src_bytes_per_pixel); copy_size * src_bytes_per_pixel);
@ -108,7 +108,7 @@ void MaxwellDMA::HandleCopy() {
ASSERT(regs.dst_params.size_z == 1); ASSERT(regs.dst_params.size_z == 1);
ASSERT(regs.src_pitch == regs.x_count); 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, FlushAndInvalidate(regs.src_pitch * regs.y_count,
regs.dst_params.size_x * regs.dst_params.size_y * src_bpp); regs.dst_params.size_x * regs.dst_params.size_y * src_bpp);