summaryrefslogtreecommitdiffstats
path: root/src/video_core/clipper.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-05-14 05:29:27 +0200
committerbunnei <bunneidev@gmail.com>2015-05-23 04:59:42 +0200
commit1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e (patch)
treec21e1e3b667abbe498e1ab818c25988095cd0dbf /src/video_core/clipper.cpp
parentMerge pull request #803 from lioncash/typo (diff)
downloadyuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar
yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.gz
yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.bz2
yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.lz
yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.xz
yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.tar.zst
yuzu-1b42d55a9dcb27ac2374de0ed0d1d0ec8385b13e.zip
Diffstat (limited to 'src/video_core/clipper.cpp')
-rw-r--r--src/video_core/clipper.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/video_core/clipper.cpp b/src/video_core/clipper.cpp
index ba3876a76..943f3eb35 100644
--- a/src/video_core/clipper.cpp
+++ b/src/video_core/clipper.cpp
@@ -58,12 +58,13 @@ static void InitScreenCoordinates(OutputVertex& vtx)
float24 offset_z;
} viewport;
- viewport.halfsize_x = float24::FromRawFloat24(registers.viewport_size_x);
- viewport.halfsize_y = float24::FromRawFloat24(registers.viewport_size_y);
- viewport.offset_x = float24::FromFloat32(static_cast<float>(registers.viewport_corner.x));
- viewport.offset_y = float24::FromFloat32(static_cast<float>(registers.viewport_corner.y));
- viewport.zscale = float24::FromRawFloat24(registers.viewport_depth_range);
- viewport.offset_z = float24::FromRawFloat24(registers.viewport_depth_far_plane);
+ const auto& regs = g_state.regs;
+ viewport.halfsize_x = float24::FromRawFloat24(regs.viewport_size_x);
+ viewport.halfsize_y = float24::FromRawFloat24(regs.viewport_size_y);
+ viewport.offset_x = float24::FromFloat32(static_cast<float>(regs.viewport_corner.x));
+ viewport.offset_y = float24::FromFloat32(static_cast<float>(regs.viewport_corner.y));
+ viewport.zscale = float24::FromRawFloat24(regs.viewport_depth_range);
+ viewport.offset_z = float24::FromRawFloat24(regs.viewport_depth_far_plane);
float24 inv_w = float24::FromFloat32(1.f) / vtx.pos.w;
vtx.color *= inv_w;