diff options
| author | 2019-06-12 16:20:20 -0400 | |
|---|---|---|
| committer | 2019-06-20 21:38:34 -0300 | |
| commit | cb728797b0cec79d756ba9395d24924882222103 (patch) | |
| tree | 80d3a1fced04f9b86402e0b86ab66047e6c44d4f /src | |
| parent | texture_cache: correct texture buffer on surface params (diff) | |
| download | yuzu-cb728797b0cec79d756ba9395d24924882222103.tar.gz yuzu-cb728797b0cec79d756ba9395d24924882222103.tar.xz yuzu-cb728797b0cec79d756ba9395d24924882222103.zip | |
fermi2d: Correct Origin Mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index d63b82838..0ee228e28 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -38,11 +38,16 @@ void Fermi2D::HandleSurfaceCopy() { | |||
| 38 | 38 | ||
| 39 | const u32 src_blit_x1{static_cast<u32>(regs.blit_src_x >> 32)}; | 39 | const u32 src_blit_x1{static_cast<u32>(regs.blit_src_x >> 32)}; |
| 40 | const u32 src_blit_y1{static_cast<u32>(regs.blit_src_y >> 32)}; | 40 | const u32 src_blit_y1{static_cast<u32>(regs.blit_src_y >> 32)}; |
| 41 | const u32 src_blit_x2{ | 41 | u32 src_blit_x2, src_blit_y2; |
| 42 | static_cast<u32>((regs.blit_src_x + (regs.blit_dst_width * regs.blit_du_dx)) >> 32)}; | 42 | if (regs.blit_control.origin == Origin::Corner) { |
| 43 | const u32 src_blit_y2{ | 43 | src_blit_x2 = |
| 44 | static_cast<u32>((regs.blit_src_y + (regs.blit_dst_height * regs.blit_dv_dy)) >> 32)}; | 44 | static_cast<u32>((regs.blit_src_x + (regs.blit_du_dx * regs.blit_dst_width)) >> 32); |
| 45 | 45 | src_blit_y2 = | |
| 46 | static_cast<u32>((regs.blit_src_y + (regs.blit_dv_dy * regs.blit_dst_height)) >> 32); | ||
| 47 | } else { | ||
| 48 | src_blit_x2 = static_cast<u32>((regs.blit_src_x >> 32) + regs.blit_dst_width); | ||
| 49 | src_blit_y2 = static_cast<u32>((regs.blit_src_y >> 32) + regs.blit_dst_height); | ||
| 50 | } | ||
| 46 | const Common::Rectangle<u32> src_rect{src_blit_x1, src_blit_y1, src_blit_x2, src_blit_y2}; | 51 | const Common::Rectangle<u32> src_rect{src_blit_x1, src_blit_y1, src_blit_x2, src_blit_y2}; |
| 47 | const Common::Rectangle<u32> dst_rect{regs.blit_dst_x, regs.blit_dst_y, | 52 | const Common::Rectangle<u32> dst_rect{regs.blit_dst_x, regs.blit_dst_y, |
| 48 | regs.blit_dst_x + regs.blit_dst_width, | 53 | regs.blit_dst_x + regs.blit_dst_width, |