diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-26 05:50:38 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 21:25:18 +0100 |
commit | d3e433a38048c5d32c0929446008586e975ccd0e (patch) | |
tree | 06ac0719687b366f6c82b3c78d8df99b7bf33a69 /src/video_core/engines/maxwell_3d.h | |
parent | gl_state: Remove scissor test tracking (diff) | |
download | yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.gz yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.bz2 yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.lz yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.xz yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.tar.zst yuzu-d3e433a38048c5d32c0929446008586e975ccd0e.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_3d.h')
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 3a641c182..2134d6e4f 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -574,7 +574,7 @@ public: f32 translate_z; INSERT_UNION_PADDING_WORDS(2); - Common::Rectangle<s32> GetRect() const { + Common::Rectangle<f32> GetRect() const { return { GetX(), // left GetY() + GetHeight(), // top @@ -583,20 +583,20 @@ public: }; }; - s32 GetX() const { - return static_cast<s32>(std::max(0.0f, translate_x - std::fabs(scale_x))); + f32 GetX() const { + return std::max(0.0f, translate_x - std::fabs(scale_x)); } - s32 GetY() const { - return static_cast<s32>(std::max(0.0f, translate_y - std::fabs(scale_y))); + f32 GetY() const { + return std::max(0.0f, translate_y - std::fabs(scale_y)); } - s32 GetWidth() const { - return static_cast<s32>(translate_x + std::fabs(scale_x)) - GetX(); + f32 GetWidth() const { + return translate_x + std::fabs(scale_x) - GetX(); } - s32 GetHeight() const { - return static_cast<s32>(translate_y + std::fabs(scale_y)) - GetY(); + f32 GetHeight() const { + return translate_y + std::fabs(scale_y) - GetY(); } }; |