summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2021-02-19common: wall_clock: Fix integer overflow with StandardWallClock.bunnei
- Previous optimized impl. resulted in an integer overflow, so revert. - This is our slow/fallback path that should never be really be used, so the optimization in unimportant.
2021-02-18common/cityhash: Use common typesReinUsesLisp
Allow sharing return types with the rest of the code base. For example, we use 'u128 = std::array<u64, 2>', meanwhile Google's code uses 'uint128 = std::pair<u64, u64>'. While we are at it, use size_t instead of std::size_t.
2021-02-15common: wall_clock: Optimize GetClockCycles/GetCPUCycles to use a single MUL ↵bunnei
instruction.
2021-02-15common: Merge uint128 to a single header file with inlines.bunnei
2021-02-09common: Add -fsized-deallocation as a Clang flaglat9nq
Prevents an operator delete error when compiling with Clang 11.
2021-02-08string_util: Remove MSVC workaround for converting between UTF8/UTF16Morph
This has been fixed as of Visual Studio 2019 Version 16.2
2021-02-06Merge pull request #5885 from MerryMage/ring_buffer-granularitybunnei
ring_buffer: Remove granularity template argument
2021-02-06ring_buffer: Remove granularity template argumentMerryMage
Non-obvious bug in RingBuffer::Push(std::vector<T>&) when granularity != 1 Just remove it altogether because we do not have a use for granularity != 1
2021-02-05hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement.bunnei
2021-02-05common: scope_exit: Add a cancellable ScopeExit macro.bunnei
2021-02-05common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log.bunnei
2021-01-28common: common_funcs: Change R_UNLESS to LOG_ERROR.bunnei
2021-01-28common: common_funcs: Log error on R_UNLESS.bunnei
2021-01-28common: common_funcs: Add useful kernel macro R_SUCCEED_IF.bunnei
2021-01-28common: common_funcs: Add a few more useful macros for kernel code.bunnei
2021-01-27Merge pull request #5778 from ReinUsesLisp/shader-dirbunnei
renderer_opengl: Avoid precompiled cache and force NV GL cache directory
2021-01-21common: Add missing include to bit_util.hbunnei
2021-01-21bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64Lioncash
We can use the standardized CLZ facilities to perform this. This also allows us to make utilizing functions constexpr and eliminate the inclusion of an intrinsics header.
2021-01-21renderer_opengl: Avoid precompiled cache and force NV GL cache directoryReinUsesLisp
Setting __GL_SHADER_DISK_CACHE_PATH we can force the cache directory to be in yuzu's user directory to stop commonly distributed malware from deleting our driver shader cache. And by setting __GL_SHADER_DISK_CACHE_SKIP_CLEANUP we can have an unbounded shader cache size. This has only been implemented on Windows, mostly because previous tests didn't seem to work on Linux. Disable the precompiled cache on Nvidia's driver. There's no need to hide information the driver already has in its own cache.
2021-01-17Merge pull request #5360 from ReinUsesLisp/enforce-memclass-accessbunnei
core: Silence Wclass-memaccess warnings and enforce it
2021-01-15Merge pull request #5275 from FernandoS27/fast-native-clockbunnei
X86/NativeClock: Improve performance of clock calculations on hot path.
2021-01-15Merge pull request #5336 from lioncash/treebunnei
common/tree: Convert defines over to templates
2021-01-15Merge pull request #5358 from ReinUsesLisp/rename-insert-paddingLC
common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
2021-01-15core: Silence Wclass-memaccess warningsReinUsesLisp
This requires making several types trivial and properly initialize them whenever they are called.
2021-01-15common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2021-01-15Merge pull request #5355 from lioncash/timerbunnei
common/timer: Remove
2021-01-15Merge pull request #5357 from ReinUsesLisp/alignment-log2LC
common/alignment: Rename AlignBits to AlignUpLog2 and use constraints
2021-01-15common/bit_util: Replace CLZ/CTZ operations with standardized onesLioncash
Makes for less code that we need to maintain.
2021-01-15common/alignment: Upgrade to use constraints instead of static assertsReinUsesLisp
2021-01-15common/alignment: Rename AlignBits to AlignUpLog2ReinUsesLisp
AlignUpLog2 describes what the function does better than AlignBits.
2021-01-15common/timer: RemoveLioncash
This is a leftover from citra and dolphin that isn't used at all, particularly given the <chrono> header exists.
2021-01-15common/color: RemoveReinUsesLisp
This is a leftover from Citra we no longer use.
2021-01-12Merge pull request #5280 from FearlessTobi/port-5666bunnei
Port citra-emu/citra#5666: "Rotate previous log file to "citra_log.txt.old""
2021-01-12common/tree: Convert defines over to templatesLioncash
Reworks the tree header to operate off of templates as opposed to a series of defines. This allows all tree facilities to obey namespacing rules, and also allows this code to be used within modules once compiler support is in place. This also gets rid to use a macro to define functions and structs for necessary data types. With templates, these will be generated when they're actually used, eliminating the need for the separate declaration.
2021-01-12common/tree: Remove unused splay tree definesLioncash
Makes for less code to take care of.
2021-01-11common/parent_of_member: Replace TYPED_STORAGE define with template aliasLioncash
Provides the same construct, but makes it obey namespacing.
2021-01-11common: common_funcs: Add R_UNLESS macro.bunnei
2021-01-11common: Introduce useful tree structures.bunnei
2021-01-09common/div_ceil: Return numerator typeReinUsesLisp
Fixes instances where DivCeil(u32, u64) would surprisingly return u64, instead of the more natural u32.
2021-01-04Address review commentsFearlessTobi
2021-01-04Delete the old log file before rotating (#5675)xperia64
2021-01-03Fix the old log file to work with the log parser.bunnei
2021-01-03Rotate previous log file to '.old' if it existsxperia64
2021-01-02general: Fix various spelling errorsMorph
2021-01-02X86/NativeClock: Reimplement RTDSC access to be lock free.Fernando Sahmkow
2021-01-02X86/NativeClock: Improve performance of clock calculations on hot path.Fernando Sahmkow
2021-01-01memory: Remove MemoryHookMerryMage
2021-01-01Merge pull request #5249 from ReinUsesLisp/lock-free-pagesbunnei
core/memory: Read and write page table atomically
2020-12-30Merge pull request #5208 from bunnei/service-threadsbunnei
Service threads
2020-12-29core/memory: Read and write page table atomicallyReinUsesLisp
Squash attributes into the pointer's integer, making them an uintptr_t pair containing 2 bits at the bottom and then the pointer. These bits are currently unused thanks to alignment requirements. Configure Dynarmic to mask out these bits on pointer reads. While we are at it, remove some unused attributes carried over from Citra. Read/Write and other hot functions use a two step unpacking process that is less readable to stop MSVC from emitting an extra AND instruction in the hot path: mov rdi,rcx shr rdx,0Ch mov r8,qword ptr [rax+8] mov rax,qword ptr [r8+rdx*8] mov rdx,rax -and al,3 and rdx,0FFFFFFFFFFFFFFFCh je Core::Memory::Memory::Impl::Read<unsigned char> mov rax,qword ptr [vaddr] movzx eax,byte ptr [rdx+rax]