summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines/maxwell_dma.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-07-30 06:38:44 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-08-11 01:45:03 +0200
commitf00641459e773636584c524143a3e05446ee296c (patch)
treefa6b31c0cbc7d52b8ac06ce6309d635bc2d0be45 /src/video_core/engines/maxwell_dma.cpp
parentMerge pull request #4496 from lioncash/ce-desig (diff)
downloadyuzu-f00641459e773636584c524143a3e05446ee296c.tar
yuzu-f00641459e773636584c524143a3e05446ee296c.tar.gz
yuzu-f00641459e773636584c524143a3e05446ee296c.tar.bz2
yuzu-f00641459e773636584c524143a3e05446ee296c.tar.lz
yuzu-f00641459e773636584c524143a3e05446ee296c.tar.xz
yuzu-f00641459e773636584c524143a3e05446ee296c.tar.zst
yuzu-f00641459e773636584c524143a3e05446ee296c.zip
Diffstat (limited to 'src/video_core/engines/maxwell_dma.cpp')
-rw-r--r--src/video_core/engines/maxwell_dma.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index a2d3d7823..e88290754 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -94,7 +94,8 @@ void MaxwellDMA::CopyPitchToPitch() {
}
void MaxwellDMA::CopyBlockLinearToPitch() {
- ASSERT(regs.src_params.block_size.depth == 0);
+ UNIMPLEMENTED_IF(regs.src_params.block_size.depth != 0);
+ UNIMPLEMENTED_IF(regs.src_params.layer != 0);
// Optimized path for micro copies.
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
@@ -123,17 +124,12 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
write_buffer.resize(dst_size);
}
- if (Settings::IsGPULevelExtreme()) {
- memory_manager.ReadBlock(regs.offset_in, read_buffer.data(), src_size);
- memory_manager.ReadBlock(regs.offset_out, write_buffer.data(), dst_size);
- } else {
- memory_manager.ReadBlockUnsafe(regs.offset_in, read_buffer.data(), src_size);
- memory_manager.ReadBlockUnsafe(regs.offset_out, write_buffer.data(), dst_size);
- }
+ memory_manager.ReadBlock(regs.offset_in, read_buffer.data(), src_size);
+ memory_manager.ReadBlock(regs.offset_out, write_buffer.data(), dst_size);
UnswizzleSubrect(regs.line_length_in, regs.line_count, regs.pitch_out, width, bytes_per_pixel,
- read_buffer.data() + src_layer_size * src_params.layer, write_buffer.data(),
- block_height, src_params.origin.x, src_params.origin.y);
+ block_height, src_params.origin.x, src_params.origin.y, write_buffer.data(),
+ read_buffer.data());
memory_manager.WriteBlock(regs.offset_out, write_buffer.data(), dst_size);
}
@@ -198,7 +194,6 @@ void MaxwellDMA::FastCopyBlockLinearToPitch() {
if (read_buffer.size() < src_size) {
read_buffer.resize(src_size);
}
-
if (write_buffer.size() < dst_size) {
write_buffer.resize(dst_size);
}
@@ -212,8 +207,8 @@ void MaxwellDMA::FastCopyBlockLinearToPitch() {
}
UnswizzleSubrect(regs.line_length_in, regs.line_count, regs.pitch_out, regs.src_params.width,
- bytes_per_pixel, read_buffer.data(), write_buffer.data(),
- regs.src_params.block_size.height, pos_x, pos_y);
+ bytes_per_pixel, regs.src_params.block_size.height, pos_x, pos_y,
+ write_buffer.data(), read_buffer.data());
memory_manager.WriteBlock(regs.offset_out, write_buffer.data(), dst_size);
}