diff options
Diffstat (limited to '')
-rw-r--r-- | src/common/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/common/cache_management.cpp | 59 | ||||
-rw-r--r-- | src/common/cache_management.h | 27 | ||||
-rw-r--r-- | src/common/settings.h | 4 |
4 files changed, 3 insertions, 89 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 6bdffcb7a..25b22a281 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -34,8 +34,6 @@ add_library(common STATIC bit_util.h cityhash.cpp cityhash.h - cache_management.cpp - cache_management.h common_funcs.h common_precompiled_headers.h common_types.h diff --git a/src/common/cache_management.cpp b/src/common/cache_management.cpp deleted file mode 100644 index ed353828a..000000000 --- a/src/common/cache_management.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include <cstdint> -#include <cstring> - -#include "common/cache_management.h" - -namespace Common { - -#if defined(ARCHITECTURE_x86_64) - -// Most cache operations are no-ops on x86 - -void DataCacheLineCleanByVAToPoU(void* start, size_t size) {} -void DataCacheLineCleanAndInvalidateByVAToPoC(void* start, size_t size) {} -void DataCacheLineCleanByVAToPoC(void* start, size_t size) {} -void DataCacheZeroByVA(void* start, size_t size) { - std::memset(start, 0, size); -} - -#elif defined(ARCHITECTURE_arm64) - -// BS/DminLine is log2(cache size in words), we want size in bytes -#define EXTRACT_DMINLINE(ctr_el0) (1 << ((((ctr_el0) >> 16) & 0xf) + 2)) -#define EXTRACT_BS(dczid_el0) (1 << (((dczid_el0)&0xf) + 2)) - -#define DEFINE_DC_OP(op_name, function_name) \ - void function_name(void* start, size_t size) { \ - size_t ctr_el0; \ - asm volatile("mrs %[ctr_el0], ctr_el0\n\t" : [ctr_el0] "=r"(ctr_el0)); \ - size_t cacheline_size = EXTRACT_DMINLINE(ctr_el0); \ - uintptr_t va_start = reinterpret_cast<uintptr_t>(start); \ - uintptr_t va_end = va_start + size; \ - for (uintptr_t va = va_start; va < va_end; va += cacheline_size) { \ - asm volatile("dc " #op_name ", %[va]\n\t" : : [va] "r"(va) : "memory"); \ - } \ - } - -#define DEFINE_DC_OP_DCZID(op_name, function_name) \ - void function_name(void* start, size_t size) { \ - size_t dczid_el0; \ - asm volatile("mrs %[dczid_el0], dczid_el0\n\t" : [dczid_el0] "=r"(dczid_el0)); \ - size_t cacheline_size = EXTRACT_BS(dczid_el0); \ - uintptr_t va_start = reinterpret_cast<uintptr_t>(start); \ - uintptr_t va_end = va_start + size; \ - for (uintptr_t va = va_start; va < va_end; va += cacheline_size) { \ - asm volatile("dc " #op_name ", %[va]\n\t" : : [va] "r"(va) : "memory"); \ - } \ - } - -DEFINE_DC_OP(cvau, DataCacheLineCleanByVAToPoU); -DEFINE_DC_OP(civac, DataCacheLineCleanAndInvalidateByVAToPoC); -DEFINE_DC_OP(cvac, DataCacheLineCleanByVAToPoC); -DEFINE_DC_OP_DCZID(zva, DataCacheZeroByVA); - -#endif - -} // namespace Common diff --git a/src/common/cache_management.h b/src/common/cache_management.h deleted file mode 100644 index 038323e95..000000000 --- a/src/common/cache_management.h +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include <cstddef> - -namespace Common { - -// Data cache instructions enabled at EL0 by SCTLR_EL1.UCI. -// VA = virtual address -// PoC = point of coherency -// PoU = point of unification - -// dc cvau -void DataCacheLineCleanByVAToPoU(void* start, size_t size); - -// dc civac -void DataCacheLineCleanAndInvalidateByVAToPoC(void* start, size_t size); - -// dc cvac -void DataCacheLineCleanByVAToPoC(void* start, size_t size); - -// dc zva -void DataCacheZeroByVA(void* start, size_t size); - -} // namespace Common diff --git a/src/common/settings.h b/src/common/settings.h index c0620066c..7ce9ea23c 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -76,7 +76,8 @@ enum class ScalingFilter : u32 { enum class AntiAliasing : u32 { None = 0, Fxaa = 1, - LastAA = Fxaa, + Smaa = 2, + LastAA = Smaa, }; struct ResolutionScalingInfo { @@ -400,6 +401,7 @@ struct Values { Setting<bool> cpuopt_fastmem{true, "cpuopt_fastmem"}; Setting<bool> cpuopt_fastmem_exclusives{true, "cpuopt_fastmem_exclusives"}; Setting<bool> cpuopt_recompile_exclusives{true, "cpuopt_recompile_exclusives"}; + Setting<bool> cpuopt_ignore_memory_aborts{true, "cpuopt_ignore_memory_aborts"}; SwitchableSetting<bool> cpuopt_unsafe_unfuse_fma{true, "cpuopt_unsafe_unfuse_fma"}; SwitchableSetting<bool> cpuopt_unsafe_reduce_fp_error{true, "cpuopt_unsafe_reduce_fp_error"}; |