diff options
| -rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/engines/fermi_2d.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 9019f2504..6b9382f06 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -59,12 +59,12 @@ void Fermi2D::HandleSurfaceCopy() { | |||
| 59 | // If the input is tiled and the output is linear, deswizzle the input and copy it over. | 59 | // If the input is tiled and the output is linear, deswizzle the input and copy it over. |
| 60 | Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel, | 60 | Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel, |
| 61 | dst_bytes_per_pixel, src_buffer, dst_buffer, true, | 61 | dst_bytes_per_pixel, src_buffer, dst_buffer, true, |
| 62 | regs.src.block_height); | 62 | regs.src.BlockHeight()); |
| 63 | } else { | 63 | } else { |
| 64 | // If the input is linear and the output is tiled, swizzle the input and copy it over. | 64 | // If the input is linear and the output is tiled, swizzle the input and copy it over. |
| 65 | Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel, | 65 | Texture::CopySwizzledData(regs.src.width, regs.src.height, src_bytes_per_pixel, |
| 66 | dst_bytes_per_pixel, dst_buffer, src_buffer, false, | 66 | dst_bytes_per_pixel, dst_buffer, src_buffer, false, |
| 67 | regs.dst.block_height); | 67 | regs.dst.BlockHeight()); |
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 | ||
diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h index 0c5b413cc..70667cb94 100644 --- a/src/video_core/engines/fermi_2d.h +++ b/src/video_core/engines/fermi_2d.h | |||
| @@ -49,6 +49,11 @@ public: | |||
| 49 | return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | | 49 | return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | |
| 50 | address_low); | 50 | address_low); |
| 51 | } | 51 | } |
| 52 | |||
| 53 | u32 BlockHeight() const { | ||
| 54 | // The block height is stored in log2 format. | ||
| 55 | return 1 << block_height; | ||
| 56 | } | ||
| 52 | }; | 57 | }; |
| 53 | static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size"); | 58 | static_assert(sizeof(Surface) == 0x28, "Surface has incorrect size"); |
| 54 | 59 | ||