diff --git a/rpcs3/Emu/RSX/Common/BufferUtils.cpp b/rpcs3/Emu/RSX/Common/BufferUtils.cpp index cb13b65de7..2ea98df02e 100644 --- a/rpcs3/Emu/RSX/Common/BufferUtils.cpp +++ b/rpcs3/Emu/RSX/Common/BufferUtils.cpp @@ -44,13 +44,13 @@ namespace template gsl::span as_span_workaround(gsl::span unformated_span) { - return{ (T*)unformated_span.data(), ::narrow(unformated_span.size_bytes() / sizeof(T)) }; + return{ (T*)unformated_span.data(), unformated_span.size_bytes() / sizeof(T) }; } template gsl::span as_const_span(gsl::span unformated_span) { - return{ (T*)unformated_span.data(), ::narrow(unformated_span.size_bytes() / sizeof(T)) }; + return{ (T*)unformated_span.data(), unformated_span.size_bytes() / sizeof(T) }; } } diff --git a/rpcs3/Emu/RSX/Common/TextureUtils.cpp b/rpcs3/Emu/RSX/Common/TextureUtils.cpp index 5400bd8c38..45de801efd 100644 --- a/rpcs3/Emu/RSX/Common/TextureUtils.cpp +++ b/rpcs3/Emu/RSX/Common/TextureUtils.cpp @@ -30,13 +30,13 @@ namespace template gsl::span as_span_workaround(gsl::span unformated_span) { - return{ (T*)unformated_span.data(), ::narrow(unformated_span.size_bytes() / sizeof(T)) }; + return{ (T*)unformated_span.data(), unformated_span.size_bytes() / sizeof(T) }; } template gsl::span as_const_span(gsl::span unformated_span) { - return{ (T*)unformated_span.data(), ::narrow(unformated_span.size_bytes() / sizeof(T)) }; + return{ (T*)unformated_span.data(), unformated_span.size_bytes() / sizeof(T) }; } // TODO: Make this function part of GSL @@ -1042,4 +1042,4 @@ std::pair get_compatible_gcm_format(rsx::surface_depth_format format) default: ASSUME(0); } -} \ No newline at end of file +} diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 5e580dcd04..2d1ff4462c 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -14,7 +14,7 @@ namespace template gsl::span as_const_span(gsl::span unformated_span) { - return{ (T*)unformated_span.data(), ::narrow(unformated_span.size_bytes() / sizeof(T)) }; + return{ (T*)unformated_span.data(), unformated_span.size_bytes() / sizeof(T) }; } } diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index ce415ce367..744287b3d4 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -2405,7 +2405,7 @@ namespace rsx subres.height_in_block = subres.height_in_texel = image_height; subres.pitch_in_block = full_width; subres.depth = 1; - subres.data = { vm::_ptr(image_base), src.pitch * image_height }; + subres.data = { vm::_ptr(image_base), static_cast::index_type>(src.pitch * image_height) }; subresource_layout.push_back(subres); vram_texture = upload_image_from_cpu(cmd, rsx_range, image_width, image_height, 1, 1, src.pitch, gcm_format, texture_upload_context::blit_engine_src, @@ -2537,7 +2537,7 @@ namespace rsx subres.height_in_block = subres.height_in_texel = dst_dimensions.height; subres.pitch_in_block = pitch_in_block; subres.depth = 1; - subres.data = { vm::get_super_ptr(dst.rsx_address), dst.pitch * dst_dimensions.height }; + subres.data = { vm::get_super_ptr(dst.rsx_address), static_cast::index_type>(dst.pitch * dst_dimensions.height) }; subresource_layout.push_back(subres); cached_dest = upload_image_from_cpu(cmd, rsx_range, dst_dimensions.width, dst_dimensions.height, 1, 1, dst.pitch, diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index 0317e72ea1..363fd75a0a 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -1372,7 +1372,7 @@ void GLGSRender::load_program_env() auto mapping = m_fragment_constants_buffer->alloc_from_heap(fragment_constants_size, m_uniform_buffer_offset_align); auto buf = static_cast(mapping.first); - m_prog_buffer.fill_fragment_constants_buffer({ reinterpret_cast(buf), gsl::narrow(fragment_constants_size) }, + m_prog_buffer.fill_fragment_constants_buffer({ reinterpret_cast(buf), fragment_constants_size }, current_fragment_program, gl::get_driver_caps().vendor_NVIDIA); m_fragment_constants_buffer->bind_range(GL_FRAGMENT_CONSTANT_BUFFERS_BIND_SLOT, mapping.second, fragment_constants_size); diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 148a1ce11a..8fe090ac3d 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -2735,7 +2735,7 @@ void VKGSRender::load_program_env() auto mem = m_fragment_constants_ring_info.alloc<256>(fragment_constants_size); auto buf = m_fragment_constants_ring_info.map(mem, fragment_constants_size); - m_prog_buffer->fill_fragment_constants_buffer({ reinterpret_cast(buf), ::narrow(fragment_constants_size) }, + m_prog_buffer->fill_fragment_constants_buffer({ reinterpret_cast(buf), fragment_constants_size }, current_fragment_program, vk::sanitize_fp_values()); m_fragment_constants_ring_info.unmap(); diff --git a/rpcs3/Emu/RSX/VK/VKRenderTargets.h b/rpcs3/Emu/RSX/VK/VKRenderTargets.h index 21fa553715..1f5aee67f1 100644 --- a/rpcs3/Emu/RSX/VK/VKRenderTargets.h +++ b/rpcs3/Emu/RSX/VK/VKRenderTargets.h @@ -245,7 +245,7 @@ namespace vk subres.height_in_block = subres.height_in_texel = surface_height * samples_y; subres.pitch_in_block = rsx_pitch / get_bpp(); subres.depth = 1; - subres.data = { (const std::byte*)vm::get_super_ptr(base_addr), s32(rsx_pitch * surface_height * samples_y) }; + subres.data = { (const std::byte*)vm::get_super_ptr(base_addr), static_cast::index_type>(rsx_pitch * surface_height * samples_y) }; if (LIKELY(g_cfg.video.resolution_scale_percent == 100 && samples() == 1)) { diff --git a/rpcs3/Emu/RSX/VK/VKTexture.cpp b/rpcs3/Emu/RSX/VK/VKTexture.cpp index c5c4569997..602c83e112 100644 --- a/rpcs3/Emu/RSX/VK/VKTexture.cpp +++ b/rpcs3/Emu/RSX/VK/VKTexture.cpp @@ -722,7 +722,7 @@ namespace vk check_caps = false; } - gsl::span mapped{ (std::byte*)mapped_buffer, ::narrow(image_linear_size) }; + gsl::span mapped{ (std::byte*)mapped_buffer, image_linear_size }; opt = upload_texture_subresource(mapped, layout, format, is_swizzled, caps); upload_heap.unmap(); diff --git a/rpcs3/rpcs3qt/rsx_debugger.cpp b/rpcs3/rpcs3qt/rsx_debugger.cpp index c7b49d971e..e589837d1d 100644 --- a/rpcs3/rpcs3qt/rsx_debugger.cpp +++ b/rpcs3/rpcs3qt/rsx_debugger.cpp @@ -15,7 +15,7 @@ namespace template gsl::span as_const_span(gsl::span unformated_span) { - return{ (T*)unformated_span.data(), ::narrow(unformated_span.size_bytes() / sizeof(T)) }; + return{ (T*)unformated_span.data(), unformated_span.size_bytes() / sizeof(T) }; } }