summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-05-11 01:26:48 +0200
committerLiam <byteslice@airmail.cc>2022-05-11 01:26:48 +0200
commite7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7 (patch)
tree233af9509ba37f0458ea04147fa51890bbc2aa7f /src/video_core/engines
parentmaxwell_dma: fix bytes per pixel (diff)
downloadyuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.tar
yuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.tar.gz
yuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.tar.bz2
yuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.tar.lz
yuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.tar.xz
yuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.tar.zst
yuzu-e7ba9fd7e1d1c314c3c662e4defdd3dc2a8ea4e7.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/engines/maxwell_dma.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp
index 3eb7cc596..a7302f7c1 100644
--- a/src/video_core/engines/maxwell_dma.cpp
+++ b/src/video_core/engines/maxwell_dma.cpp
@@ -134,7 +134,8 @@ void MaxwellDMA::CopyBlockLinearToPitch() {
// Deswizzle the input and copy it over.
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
- const u32 bytes_per_pixel = 1;
+ const u32 bytes_per_pixel =
+ regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1;
const Parameters& src_params = regs.src_params;
const u32 width = src_params.width;
const u32 height = src_params.height;
@@ -166,7 +167,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0);
const auto& dst_params = regs.dst_params;
- const u32 bytes_per_pixel = 1;
+ const u32 bytes_per_pixel =
+ regs.launch_dma.remap_enable ? regs.pitch_in / regs.line_length_in : 1;
const u32 width = dst_params.width;
const u32 height = dst_params.height;
const u32 depth = dst_params.depth;
@@ -210,7 +212,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() {
}
void MaxwellDMA::FastCopyBlockLinearToPitch() {
- const u32 bytes_per_pixel = 1;
+ const u32 bytes_per_pixel =
+ regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1;
const size_t src_size = GOB_SIZE;
const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count;
u32 pos_x = regs.src_params.origin.x;