diff options
| author | 2022-05-11 17:51:02 -0400 | |
|---|---|---|
| committer | 2022-05-11 17:51:02 -0400 | |
| commit | dca63391b60a8312cc70b8d7d075565fc70cea42 (patch) | |
| tree | 026fe350ed31ed3dc256624910837f25665d09b6 /src | |
| parent | Merge pull request #8328 from liamwhite/macro-clear (diff) | |
| parent | maxwell_dma: use fallback if remapping is enabled (diff) | |
| download | yuzu-dca63391b60a8312cc70b8d7d075565fc70cea42.tar.gz yuzu-dca63391b60a8312cc70b8d7d075565fc70cea42.tar.xz yuzu-dca63391b60a8312cc70b8d7d075565fc70cea42.zip | |
Merge pull request #8313 from liamwhite/dma-bpp
maxwell_dma: fix bytes_per_pixel
Diffstat (limited to 'src')
| -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; |