diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-04-21 20:08:21 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-04-21 20:08:21 +0200 |
commit | 4e14b64bfc8aa526b3a9de2908c516190d5020be (patch) | |
tree | fc254b1593b46add931738063543da46f5e061d6 /src/video_core/engines | |
parent | Merge pull request #10057 from liamwhite/its-not-in-the-timeline (diff) | |
download | yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.tar yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.tar.gz yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.tar.bz2 yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.tar.lz yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.tar.xz yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.tar.zst yuzu-4e14b64bfc8aa526b3a9de2908c516190d5020be.zip |
Diffstat (limited to 'src/video_core/engines')
-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() { const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format)); const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 && src.format != regs.dst.format; + + auto srcX = args.src_x0; + auto srcY = args.src_y0; + if (args.sample_mode.origin == Origin::Corner) { + srcX -= (args.du_dx >> 33) << 32; + srcY -= (args.dv_dy >> 33) << 32; + } + Config config{ .operation = regs.operation, .filter = args.sample_mode.filter, @@ -86,10 +94,10 @@ void Fermi2D::Blit() { .dst_y0 = args.dst_y0, .dst_x1 = args.dst_x0 + args.dst_width, .dst_y1 = args.dst_y0 + args.dst_height, - .src_x0 = static_cast<s32>(args.src_x0 >> 32), - .src_y0 = static_cast<s32>(args.src_y0 >> 32), - .src_x1 = static_cast<s32>((args.du_dx * args.dst_width + args.src_x0) >> 32), - .src_y1 = static_cast<s32>((args.dv_dy * args.dst_height + args.src_y0) >> 32), + .src_x0 = static_cast<s32>(srcX >> 32), + .src_y0 = static_cast<s32>(srcY >> 32), + .src_x1 = static_cast<s32>((srcX + args.du_dx * args.dst_width) >> 32), + .src_y1 = static_cast<s32>((srcY + args.dv_dy * args.dst_height) >> 32), }; const auto need_align_to_pitch = |