summaryrefslogtreecommitdiffstats
path: root/src/video_core/textures/texture.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-11-08 21:08:07 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-11-08 23:48:50 +0100
commit096f339a2a817054c9e2dfef188a5e2470126236 (patch)
tree83b293c8ca82a1b6052c6d20063550fd92f10c61 /src/video_core/textures/texture.h
parentmicroprofile: Silence conversion warnings (diff)
downloadyuzu-096f339a2a817054c9e2dfef188a5e2470126236.tar
yuzu-096f339a2a817054c9e2dfef188a5e2470126236.tar.gz
yuzu-096f339a2a817054c9e2dfef188a5e2470126236.tar.bz2
yuzu-096f339a2a817054c9e2dfef188a5e2470126236.tar.lz
yuzu-096f339a2a817054c9e2dfef188a5e2470126236.tar.xz
yuzu-096f339a2a817054c9e2dfef188a5e2470126236.tar.zst
yuzu-096f339a2a817054c9e2dfef188a5e2470126236.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/textures/texture.h7
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;
}