From 3e4faf602aae4878f70247efaa1e649865515e5c Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 6 Mar 2022 15:32:38 +0300 Subject: [PATCH] rsx: Fix clang build --- rpcs3/Emu/RSX/Common/surface_store.h | 12 ++++++------ rpcs3/Emu/RSX/Common/surface_utils.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index 3197adb12e..d400352dbe 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -190,7 +190,7 @@ namespace rsx copy.dst_x = 0; copy.dst_y = 0; copy.width = std::max((old.width - _new.width) / bytes_to_texels_x, 1); - copy.height = prev_surface->get_surface_height(); + copy.height = prev_surface->template get_surface_height(); copy.transfer_scale_x = 1.f; copy.transfer_scale_y = 1.f; copy.target = nullptr; @@ -612,7 +612,7 @@ namespace rsx } if (it->surface->get_rsx_pitch() != it->surface->get_native_pitch() && - it->surface->get_surface_height() != 1) + it->surface->template get_surface_height() != 1) { // Memory gap in descriptor continue; @@ -721,9 +721,9 @@ namespace rsx auto this_range = it->surface->get_memory_range(); ensure(this_range.overlaps(range)); - const auto native_pitch = it->surface->get_surface_width(); + const auto native_pitch = it->surface->template get_surface_width(); const auto rsx_pitch = it->surface->get_rsx_pitch(); - auto num_rows = it->surface->get_surface_height(); + auto num_rows = it->surface->template get_surface_height(); bool valid = false; if (this_range.start < range.start) @@ -1002,8 +1002,8 @@ namespace rsx info.base_address = range.start; info.is_depth = is_depth; - const u32 normalized_surface_width = surface->get_surface_width() / required_bpp; - const u32 normalized_surface_height = surface->get_surface_height(); + const u32 normalized_surface_width = surface->template get_surface_width() / required_bpp; + const u32 normalized_surface_height = surface->template get_surface_height(); if (range.start >= texaddr) [[likely]] { diff --git a/rpcs3/Emu/RSX/Common/surface_utils.h b/rpcs3/Emu/RSX/Common/surface_utils.h index 369ac732cf..d4c769c4e1 100644 --- a/rpcs3/Emu/RSX/Common/surface_utils.h +++ b/rpcs3/Emu/RSX/Common/surface_utils.h @@ -197,7 +197,7 @@ namespace rsx } else { - static_assert(false); + fmt::throw_exception("Unreachable"); } } @@ -218,7 +218,7 @@ namespace rsx } else { - static_assert(false); + fmt::throw_exception("Unreachable"); } } @@ -543,8 +543,8 @@ namespace rsx const auto child_w = get_surface_width(); const auto child_h = get_surface_height(); - const auto parent_w = surface->get_surface_width(); - const auto parent_h = surface->get_surface_height(); + const auto parent_w = surface->template get_surface_width(); + const auto parent_h = surface->template get_surface_height(); const auto rect = rsx::intersect_region(surface->base_addr, parent_w, parent_h, 1, base_addr, child_w, child_h, 1, get_rsx_pitch()); const auto src_offset = std::get<0>(rect);