diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-30 00:45:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 00:45:16 +0100 |
commit | c845d8a9e8b212308e729ffcd9ddf2e09884638e (patch) | |
tree | 08e1eaaaf306e944885171f51e4ff6e644529e39 /src/video_core/engines/engine_upload.cpp | |
parent | Merge pull request #9354 from lioncash/const-param (diff) | |
parent | maxwell_3d: Mark shifted value as unsigned (diff) | |
download | yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.tar yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.tar.gz yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.tar.bz2 yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.tar.lz yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.tar.xz yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.tar.zst yuzu-c845d8a9e8b212308e729ffcd9ddf2e09884638e.zip |
Diffstat (limited to 'src/video_core/engines/engine_upload.cpp')
-rw-r--r-- | src/video_core/engines/engine_upload.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video_core/engines/engine_upload.cpp b/src/video_core/engines/engine_upload.cpp index 28aa85f32..e4f8331ab 100644 --- a/src/video_core/engines/engine_upload.cpp +++ b/src/video_core/engines/engine_upload.cpp @@ -49,10 +49,9 @@ void State::ProcessData(std::span<const u8> read_buffer) { if (regs.line_count == 1) { rasterizer->AccelerateInlineToMemory(address, copy_size, read_buffer); } else { - for (u32 line = 0; line < regs.line_count; ++line) { - const GPUVAddr dest_line = address + static_cast<size_t>(line) * regs.dest.pitch; - std::span<const u8> buffer(read_buffer.data() + - static_cast<size_t>(line) * regs.line_length_in, + for (size_t line = 0; line < regs.line_count; ++line) { + const GPUVAddr dest_line = address + line * regs.dest.pitch; + std::span<const u8> buffer(read_buffer.data() + line * regs.line_length_in, regs.line_length_in); rasterizer->AccelerateInlineToMemory(dest_line, regs.line_length_in, buffer); } |