diff --git a/Utilities/geometry.h b/Utilities/geometry.h index 752e05b6a4..eef1fe747e 100644 --- a/Utilities/geometry.h +++ b/Utilities/geometry.h @@ -115,7 +115,7 @@ struct size2_base #endif template - constexpr operator size2_base() const + explicit constexpr operator size2_base() const { return{ static_cast(width), static_cast(height) }; } @@ -226,7 +226,7 @@ struct position1_base } template - operator position1_base() const + explicit operator position1_base() const { return{ static_cast(x) }; } @@ -399,7 +399,7 @@ struct position2_base } template - constexpr operator position2_base() const + explicit constexpr operator position2_base() const { return{ static_cast(x), static_cast(y) }; } @@ -491,7 +491,7 @@ struct position3_base } template - operator position3_base() const + explicit operator position3_base() const { return{ static_cast(x), static_cast(y), static_cast(z) }; } @@ -581,7 +581,7 @@ struct position4_base } template - constexpr operator position4_base() const + explicit constexpr operator position4_base() const { return{ static_cast(x), static_cast(y), static_cast(z), static_cast(w) }; } @@ -656,7 +656,7 @@ struct coord_base #endif template - constexpr operator coord_base() const + explicit constexpr operator coord_base() const { return{ static_cast(x), static_cast(y), static_cast(width), static_cast(height) }; } @@ -765,7 +765,7 @@ struct area_base } template - constexpr operator area_base() const + explicit constexpr operator area_base() const { return{ static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2) }; } @@ -828,7 +828,7 @@ struct coord3_base } template - constexpr operator coord3_base() const + explicit constexpr operator coord3_base() const { return{ static_cast(x), static_cast(y), static_cast(z), static_cast(width), static_cast(height), static_cast(depth) }; } @@ -922,7 +922,7 @@ struct color4_base } template - constexpr operator color4_base() const + explicit constexpr operator color4_base() const { return{ static_cast(x), static_cast(y), static_cast(z), static_cast(w) }; } @@ -967,7 +967,7 @@ struct color3_base #endif template - constexpr operator color3_base() const + explicit constexpr operator color3_base() const { return{ static_cast(x), static_cast(y), static_cast(z) }; } @@ -1012,7 +1012,7 @@ struct color2_base #endif template - constexpr operator color2_base() const + explicit constexpr operator color2_base() const { return{ static_cast(x), static_cast(y) }; } @@ -1046,7 +1046,7 @@ struct color1_base #endif template - constexpr operator color1_base() const + explicit constexpr operator color1_base() const { return{ static_cast(x) }; } diff --git a/rpcs3/Emu/RSX/GL/GLHelpers.cpp b/rpcs3/Emu/RSX/GL/GLHelpers.cpp index 80d68e6a79..1889fa0c03 100644 --- a/rpcs3/Emu/RSX/GL/GLHelpers.cpp +++ b/rpcs3/Emu/RSX/GL/GLHelpers.cpp @@ -398,7 +398,7 @@ namespace gl { const coord3i src_region = { { src_rect.x1, src_rect.y1, 0 }, { src_rect.width(), src_rect.height(), 1 } }; const coord3i dst_region = { { dst_rect.x1, dst_rect.y1, 0 }, { dst_rect.width(), dst_rect.height(), 1 } }; - gl::copy_typeless(dst, src, dst_region, src_region); + gl::copy_typeless(dst, src, static_cast(dst_region), static_cast(src_region)); } else { diff --git a/rpcs3/Emu/RSX/GL/GLOverlays.h b/rpcs3/Emu/RSX/GL/GLOverlays.h index 44f3b45133..16d38165cb 100644 --- a/rpcs3/Emu/RSX/GL/GLOverlays.h +++ b/rpcs3/Emu/RSX/GL/GLOverlays.h @@ -311,7 +311,7 @@ namespace gl saved_sampler_state saved(31, m_sampler); glBindTexture(GL_TEXTURE_2D, source->id()); - overlay_pass::run(dst_area, target->id(), true); + overlay_pass::run(static_cast(dst_area), target->id(), true); } }; diff --git a/rpcs3/Emu/RSX/Overlays/overlay_controls.h b/rpcs3/Emu/RSX/Overlays/overlay_controls.h index 7a06f18737..d4eda1c5cf 100644 --- a/rpcs3/Emu/RSX/Overlays/overlay_controls.h +++ b/rpcs3/Emu/RSX/Overlays/overlay_controls.h @@ -811,7 +811,7 @@ namespace rsx else if (item_y_limit > h || item_y_base < 0) { // Partial render - areaf clip_rect = areai{ x, y, (x + w), (y + h) }; + areaf clip_rect = static_cast(areai{x, y, (x + w), (y + h)}); result.add(item->get_compiled(), 0.f, global_y_offset, clip_rect); } else @@ -885,7 +885,7 @@ namespace rsx else if (item_x_limit > h || item_x_base < 0) { // Partial render - areaf clip_rect = areai{ x, y, (x + w), (y + h) }; + areaf clip_rect = static_cast(areai{x, y, (x + w), (y + h)}); result.add(item->get_compiled(), global_x_offset, 0.f, clip_rect); } else diff --git a/rpcs3/Emu/RSX/VK/VKOverlays.h b/rpcs3/Emu/RSX/VK/VKOverlays.h index 5ebc3af10f..93045d915a 100644 --- a/rpcs3/Emu/RSX/VK/VKOverlays.h +++ b/rpcs3/Emu/RSX/VK/VKOverlays.h @@ -461,7 +461,7 @@ namespace vk src_scale_x = static_cast(src_area.x2) / real_src->width(); src_scale_y = static_cast(src_area.y2) / real_src->height(); - overlay_pass::run(cmd, dst_area, dst, src, render_pass); + overlay_pass::run(cmd, static_cast(dst_area), dst, src, render_pass); } }; diff --git a/rpcs3/Emu/RSX/VK/VKPresent.cpp b/rpcs3/Emu/RSX/VK/VKPresent.cpp index 9e51b66df8..bddd7ecce7 100644 --- a/rpcs3/Emu/RSX/VK/VKPresent.cpp +++ b/rpcs3/Emu/RSX/VK/VKPresent.cpp @@ -493,7 +493,7 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info) // Calculate output dimensions. Done after swapchain acquisition in case it was recreated. coordi aspect_ratio; - sizei csize = m_swapchain_dims; + sizei csize = static_cast(m_swapchain_dims); sizei new_size = csize; if (!g_cfg.video.stretch_to_display_area)