diff options
| -rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 9 |
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 76e8bc656..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() { | |||
| 134 | 134 | ||
| 135 | // Deswizzle the input and copy it over. | 135 | // Deswizzle the input and copy it over. |
| 136 | UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0); | 136 | UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0); |
| 137 | const u32 bytes_per_pixel = regs.pitch_out / regs.line_length_in; | 137 | const u32 bytes_per_pixel = |
| 138 | regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1; | ||
| 138 | const Parameters& src_params = regs.src_params; | 139 | const Parameters& src_params = regs.src_params; |
| 139 | const u32 width = src_params.width; | 140 | const u32 width = src_params.width; |
| 140 | const u32 height = src_params.height; | 141 | const u32 height = src_params.height; |
| @@ -166,7 +167,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() { | |||
| 166 | UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0); | 167 | UNIMPLEMENTED_IF(regs.launch_dma.remap_enable != 0); |
| 167 | 168 | ||
| 168 | const auto& dst_params = regs.dst_params; | 169 | const auto& dst_params = regs.dst_params; |
| 169 | const u32 bytes_per_pixel = regs.pitch_in / regs.line_length_in; | 170 | const u32 bytes_per_pixel = |
| 171 | regs.launch_dma.remap_enable ? regs.pitch_in / regs.line_length_in : 1; | ||
| 170 | const u32 width = dst_params.width; | 172 | const u32 width = dst_params.width; |
| 171 | const u32 height = dst_params.height; | 173 | const u32 height = dst_params.height; |
| 172 | const u32 depth = dst_params.depth; | 174 | const u32 depth = dst_params.depth; |
| @@ -210,7 +212,8 @@ void MaxwellDMA::CopyPitchToBlockLinear() { | |||
| 210 | } | 212 | } |
| 211 | 213 | ||
| 212 | void MaxwellDMA::FastCopyBlockLinearToPitch() { | 214 | void MaxwellDMA::FastCopyBlockLinearToPitch() { |
| 213 | const u32 bytes_per_pixel = regs.pitch_out / regs.line_length_in; | 215 | const u32 bytes_per_pixel = |
| 216 | regs.launch_dma.remap_enable ? regs.pitch_out / regs.line_length_in : 1; | ||
| 214 | const size_t src_size = GOB_SIZE; | 217 | const size_t src_size = GOB_SIZE; |
| 215 | const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count; | 218 | const size_t dst_size = static_cast<size_t>(regs.pitch_out) * regs.line_count; |
| 216 | u32 pos_x = regs.src_params.origin.x; | 219 | u32 pos_x = regs.src_params.origin.x; |