diff options
author | Subv <subv2112@gmail.com> | 2016-11-29 22:51:53 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-11-29 22:51:53 +0100 |
commit | aea9a91100e4b80edc8c70d610c102eb2d76dd1f (patch) | |
tree | a0258781fb72ee27758442eff3d6b6634cf3b1ee /src/video_core | |
parent | Merge pull request #2196 from Subv/system_mode (diff) | |
download | yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.gz yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.bz2 yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.lz yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.xz yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.tar.zst yuzu-aea9a91100e4b80edc8c70d610c102eb2d76dd1f.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/rasterizer.cpp | 6 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index 6c4bbed33..f81f529b6 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp @@ -562,9 +562,9 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader }; if ((texture.config.wrap_s == Regs::TextureConfig::ClampToBorder && - (s < 0 || s >= texture.config.width)) || + (s < 0 || static_cast<u32>(s) >= texture.config.width)) || (texture.config.wrap_t == Regs::TextureConfig::ClampToBorder && - (t < 0 || t >= texture.config.height))) { + (t < 0 || static_cast<u32>(t) >= texture.config.height))) { auto border_color = texture.config.border_color; texture_color[i] = {border_color.r, border_color.g, border_color.b, border_color.a}; @@ -947,7 +947,7 @@ static void ProcessTriangleInternal(const Shader::OutputVertex& v0, const Shader // Blend the fog for (unsigned i = 0; i < 3; i++) { combiner_output[i] = - fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i]; + static_cast<u8>(fog_factor * combiner_output[i] + (1.0f - fog_factor) * fog_color[i]); } } diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index d4d5903ce..e5f4366c1 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -213,12 +213,12 @@ void RasterizerOpenGL::DrawTriangles() { // Scissor checks are window-, not viewport-relative, which means that if the cached texture // sub-rect changes, the scissor bounds also need to be updated. - GLint scissor_x1 = rect.left + regs.scissor_test.x1 * color_surface->res_scale_width; - GLint scissor_y1 = rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height; + GLint scissor_x1 = static_cast<GLint>(rect.left + regs.scissor_test.x1 * color_surface->res_scale_width); + GLint scissor_y1 = static_cast<GLint>(rect.bottom + regs.scissor_test.y1 * color_surface->res_scale_height); // x2, y2 have +1 added to cover the entire pixel area, otherwise you might get cracks when // scaling or doing multisampling. - GLint scissor_x2 = rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width; - GLint scissor_y2 = rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height; + GLint scissor_x2 = static_cast<GLint>(rect.left + (regs.scissor_test.x2 + 1) * color_surface->res_scale_width); + GLint scissor_y2 = static_cast<GLint>(rect.bottom + (regs.scissor_test.y2 + 1) * color_surface->res_scale_height); if (uniform_block_data.data.scissor_x1 != scissor_x1 || uniform_block_data.data.scissor_x2 != scissor_x2 || |