diff options
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index a126c359c..02e161270 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -77,6 +77,14 @@ void Fermi2D::Blit() { | |||
| 77 | const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format)); | 77 | const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format)); |
| 78 | const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 && | 78 | const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 && |
| 79 | src.format != regs.dst.format; | 79 | src.format != regs.dst.format; |
| 80 | |||
| 81 | auto srcX = args.src_x0; | ||
| 82 | auto srcY = args.src_y0; | ||
| 83 | if (args.sample_mode.origin == Origin::Corner) { | ||
| 84 | srcX -= (args.du_dx >> 33) << 32; | ||
| 85 | srcY -= (args.dv_dy >> 33) << 32; | ||
| 86 | } | ||
| 87 | |||
| 80 | Config config{ | 88 | Config config{ |
| 81 | .operation = regs.operation, | 89 | .operation = regs.operation, |
| 82 | .filter = args.sample_mode.filter, | 90 | .filter = args.sample_mode.filter, |
| @@ -86,10 +94,10 @@ void Fermi2D::Blit() { | |||
| 86 | .dst_y0 = args.dst_y0, | 94 | .dst_y0 = args.dst_y0, |
| 87 | .dst_x1 = args.dst_x0 + args.dst_width, | 95 | .dst_x1 = args.dst_x0 + args.dst_width, |
| 88 | .dst_y1 = args.dst_y0 + args.dst_height, | 96 | .dst_y1 = args.dst_y0 + args.dst_height, |
| 89 | .src_x0 = static_cast<s32>(args.src_x0 >> 32), | 97 | .src_x0 = static_cast<s32>(srcX >> 32), |
| 90 | .src_y0 = static_cast<s32>(args.src_y0 >> 32), | 98 | .src_y0 = static_cast<s32>(srcY >> 32), |
| 91 | .src_x1 = static_cast<s32>((args.du_dx * args.dst_width + args.src_x0) >> 32), | 99 | .src_x1 = static_cast<s32>((srcX + args.du_dx * args.dst_width) >> 32), |
| 92 | .src_y1 = static_cast<s32>((args.dv_dy * args.dst_height + args.src_y0) >> 32), | 100 | .src_y1 = static_cast<s32>((srcY + args.dv_dy * args.dst_height) >> 32), |
| 93 | }; | 101 | }; |
| 94 | 102 | ||
| 95 | const auto need_align_to_pitch = | 103 | const auto need_align_to_pitch = |