diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index d6a01f98c9..ca264a1b09 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -1734,8 +1734,8 @@ namespace rsx const auto clipped = rsx::intersect_region(address, slice_w, slice_h, bpp, section->get_section_base(), section->get_width(), section->get_height(), section_bpp, pitch); - const auto slice_begin = (slice * src_slice_h); - const auto slice_end = (slice_begin + slice_h); + const auto slice_begin = u32(slice * src_slice_h); + const auto slice_end = u32(slice_begin + slice_h); const auto dst_y = std::get<1>(clipped).y; const auto dst_h = std::get<2>(clipped).height; @@ -2087,7 +2087,7 @@ namespace rsx // Optimize the range a bit by only searching for mip0, layer0 to avoid false positives const auto texel_rows_per_line = get_format_texel_rows_per_line(format); const auto num_rows = (tex_height + texel_rows_per_line - 1) / texel_rows_per_line; - if (const auto length = num_rows * tex_pitch; length < tex_range.length()) + if (const auto length = u32(num_rows * tex_pitch); length < tex_range.length()) { lookup_range = utils::address_range::start_length(texaddr, length); } diff --git a/rpcs3/Emu/RSX/GL/GLRenderTargets.h b/rpcs3/Emu/RSX/GL/GLRenderTargets.h index a6238ab440..c2bd0291d4 100644 --- a/rpcs3/Emu/RSX/GL/GLRenderTargets.h +++ b/rpcs3/Emu/RSX/GL/GLRenderTargets.h @@ -172,7 +172,7 @@ struct gl_render_target_traits std::unique_ptr result(new gl::render_target(rsx::apply_resolution_scale((u16)width, true), rsx::apply_resolution_scale((u16)height, true), (GLenum)internal_fmt)); result->set_native_pitch((u16)width * format.channel_count * format.channel_size); - result->set_surface_dimensions(width, height, (u16)pitch); + result->set_surface_dimensions((u16)width, (u16)height, (u16)pitch); std::array native_layout = { (GLenum)format.swizzle.a, (GLenum)format.swizzle.r, (GLenum)format.swizzle.g, (GLenum)format.swizzle.b }; result->set_native_component_layout(native_layout); @@ -201,7 +201,7 @@ struct gl_render_target_traits std::array native_layout = { GL_RED, GL_RED, GL_RED, GL_RED }; result->set_native_pitch(native_pitch); - result->set_surface_dimensions(width, height, (u16)pitch); + result->set_surface_dimensions((u16)width, (u16)height, (u16)pitch); result->set_native_component_layout(native_layout); result->set_old_contents(old_surface);