From f2f33219520d7505f378dc6fd5a38e3605280c99 Mon Sep 17 00:00:00 2001 From: Nekotekina Aux1 Date: Wed, 4 Mar 2020 15:36:23 +0300 Subject: [PATCH] Fix warnings in VKGSRender --- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 5 +++-- rpcs3/Emu/RSX/VK/VKTexture.cpp | 11 +++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 5b5357f369..d8e5fb5810 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -2620,9 +2620,10 @@ void VKGSRender::update_vertex_env(u32 id, const vk::vertex_upload_info& vertex_ { // Actual allocation must have been done previously u32 base_offset; + const u32 offset32 = static_cast(m_vertex_layout_stream_info.offset); + const u32 range32 = static_cast(m_vertex_layout_stream_info.range); - if (!m_vertex_layout_storage || - !m_vertex_layout_storage->in_range(m_vertex_layout_stream_info.offset, m_vertex_layout_stream_info.range, base_offset)) + if (!m_vertex_layout_storage || !m_vertex_layout_storage->in_range(offset32, range32, base_offset)) { verify("Incompatible driver (MacOS?)" HERE), m_texbuffer_view_size >= m_vertex_layout_stream_info.range; diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index 1b74e22c40..13c1e6f5de 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -232,7 +232,7 @@ namespace vk const auto src_texel_size = vk::get_format_texel_width(src->info.format); const auto src_length = src_texel_size * src_copy.imageExtent.width * src_copy.imageExtent.height; - u64 min_scratch_size = src_length; + u32 min_scratch_size = src_length; // Check for DS manipulation which will affect scratch memory requirements if (const VkFlags combined_aspect = src->aspect() | dst->aspect(); @@ -684,7 +684,10 @@ namespace vk data_length += packed_size; } - job->run(cmd, scratch_buf, section.bufferOffset, scratch_buf, src_offset, data_length, + const u32 buf_off32 = static_cast(section.bufferOffset); + const u32 src_off32 = static_cast(src_offset); + + job->run(cmd, scratch_buf, buf_off32, scratch_buf, src_off32, data_length, section.imageExtent.width, section.imageExtent.height, section.imageExtent.depth, packet.second); } @@ -882,8 +885,8 @@ namespace vk auto src_w = src_area.width(); auto dst_w = dst_area.width(); - if (xfer_info.src_is_typeless) src_w *= xfer_info.src_scaling_hint; - if (xfer_info.dst_is_typeless) dst_w *= xfer_info.dst_scaling_hint; + if (xfer_info.src_is_typeless) src_w = static_cast(src_w * xfer_info.src_scaling_hint); + if (xfer_info.dst_is_typeless) dst_w = static_cast(dst_w * xfer_info.dst_scaling_hint); if (src_w == dst_w) {