diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2019-11-13 06:16:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-13 06:16:22 +0100 |
commit | cf770a68a528cdb7f3a5483f6d17eeb924e37b7e (patch) | |
tree | 6406933e26e9fbe255a04b4c0810d21b05815494 /src/video_core/textures/texture.h | |
parent | Update CONTRIBUTING.md (diff) | |
parent | video_core: Enable sign conversion warnings (diff) | |
download | yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.gz yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.bz2 yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.lz yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.xz yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.tar.zst yuzu-cf770a68a528cdb7f3a5483f6d17eeb924e37b7e.zip |
Diffstat (limited to 'src/video_core/textures/texture.h')
-rw-r--r-- | src/video_core/textures/texture.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index 27c8ce975..8e82c6748 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h @@ -342,13 +342,14 @@ struct TSCEntry { float GetLodBias() const { // Sign extend the 13-bit value. constexpr u32 mask = 1U << (13 - 1); - return static_cast<s32>((mip_lod_bias ^ mask) - mask) / 256.0f; + return static_cast<float>(static_cast<s32>((mip_lod_bias ^ mask) - mask)) / 256.0f; } std::array<float, 4> GetBorderColor() const { if (srgb_conversion) { - return {srgb_border_color_r / 255.0f, srgb_border_color_g / 255.0f, - srgb_border_color_b / 255.0f, border_color[3]}; + return {static_cast<float>(srgb_border_color_r) / 255.0f, + static_cast<float>(srgb_border_color_g) / 255.0f, + static_cast<float>(srgb_border_color_b) / 255.0f, border_color[3]}; } return border_color; } |