summaryrefslogtreecommitdiff
path: root/src/common (follow)
Commit message (Collapse)AuthorAgeFilesLines
* common: Add -fsized-deallocation as a Clang flagGravatar lat9nq2021-02-091-0/+2
| | | | Prevents an operator delete error when compiling with Clang 11.
* string_util: Remove MSVC workaround for converting between UTF8/UTF16Gravatar Morph2021-02-081-14/+0
| | | | This has been fixed as of Visual Studio 2019 Version 16.2
* Merge pull request #5885 from MerryMage/ring_buffer-granularityGravatar bunnei2021-02-061-11/+10
|\ | | | | ring_buffer: Remove granularity template argument
| * ring_buffer: Remove granularity template argumentGravatar MerryMage2021-02-061-11/+10
| | | | | | | | | | | | 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
* | hle: kernel: Drop R_UNLESS_NOLOG in favor of expanded if-statement.Gravatar bunnei2021-02-051-8/+0
| |
* | common: scope_exit: Add a cancellable ScopeExit macro.Gravatar bunnei2021-02-051-0/+6
| |
* | common: common_funcs: Add R_UNLESS_NOLOG for scenarios that should not log.Gravatar bunnei2021-02-051-0/+8
|/
* common: common_funcs: Change R_UNLESS to LOG_ERROR.Gravatar bunnei2021-01-281-1/+1
|
* common: common_funcs: Log error on R_UNLESS.Gravatar bunnei2021-01-281-0/+3
|
* common: common_funcs: Add useful kernel macro R_SUCCEED_IF.Gravatar bunnei2021-01-281-0/+3
|
* common: common_funcs: Add a few more useful macros for kernel code.Gravatar bunnei2021-01-281-0/+11
|
* Merge pull request #5778 from ReinUsesLisp/shader-dirGravatar bunnei2021-01-273-0/+39
|\ | | | | renderer_opengl: Avoid precompiled cache and force NV GL cache directory
| * renderer_opengl: Avoid precompiled cache and force NV GL cache directoryGravatar ReinUsesLisp2021-01-213-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | common: Add missing include to bit_util.hGravatar bunnei2021-01-211-0/+1
| |
* | bit_util: Unify implementations of MostSignificantBit32/MostSignificantBit64Gravatar Lioncash2021-01-211-35/+13
|/ | | | | | 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.
* Merge pull request #5360 from ReinUsesLisp/enforce-memclass-accessGravatar bunnei2021-01-171-2/+2
|\ | | | | core: Silence Wclass-memaccess warnings and enforce it
| * core: Silence Wclass-memaccess warningsGravatar ReinUsesLisp2021-01-151-2/+2
| | | | | | | | | | This requires making several types trivial and properly initialize them whenever they are called.
* | Merge pull request #5275 from FernandoS27/fast-native-clockGravatar bunnei2021-01-155-104/+174
|\ \ | | | | | | X86/NativeClock: Improve performance of clock calculations on hot path.
| * | X86/NativeClock: Reimplement RTDSC access to be lock free.Gravatar Fernando Sahmkow2021-01-025-103/+107
| | |
| * | X86/NativeClock: Improve performance of clock calculations on hot path.Gravatar Fernando Sahmkow2021-01-022-5/+71
| | |
* | | Merge pull request #5336 from lioncash/treeGravatar bunnei2021-01-152-841/+668
|\ \ \ | | | | | | | | common/tree: Convert defines over to templates
| * | | common/tree: Convert defines over to templatesGravatar Lioncash2021-01-122-592/+666
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | common/tree: Remove unused splay tree definesGravatar Lioncash2021-01-121-249/+2
| | | | | | | | | | | | | | | | Makes for less code to take care of.
* | | | Merge pull request #5358 from ReinUsesLisp/rename-insert-paddingGravatar LC2021-01-151-4/+4
|\ \ \ \ | | |_|/ | |/| | common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT
| * | | common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITGravatar ReinUsesLisp2021-01-151-4/+4
| | | | | | | | | | | | | | | | INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
* | | | Merge pull request #5355 from lioncash/timerGravatar bunnei2021-01-153-202/+0
|\ \ \ \ | | | | | | | | | | common/timer: Remove
| * | | | common/timer: RemoveGravatar Lioncash2021-01-153-202/+0
| |/ / / | | | | | | | | | | | | | | | | This is a leftover from citra and dolphin that isn't used at all, particularly given the <chrono> header exists.
* | | | Merge pull request #5357 from ReinUsesLisp/alignment-log2Gravatar LC2021-01-151-17/+12
|\ \ \ \ | | | | | | | | | | common/alignment: Rename AlignBits to AlignUpLog2 and use constraints
| * | | | common/alignment: Upgrade to use constraints instead of static assertsGravatar ReinUsesLisp2021-01-151-13/+9
| | | | |
| * | | | common/alignment: Rename AlignBits to AlignUpLog2Gravatar ReinUsesLisp2021-01-151-5/+4
| | | | | | | | | | | | | | | | | | | | AlignUpLog2 describes what the function does better than AlignBits.
* | | | | common/bit_util: Replace CLZ/CTZ operations with standardized onesGravatar Lioncash2021-01-151-76/+0
| |/ / / |/| | | | | | | | | | | Makes for less code that we need to maintain.
* | | | common/color: RemoveGravatar ReinUsesLisp2021-01-152-272/+0
|/ / / | | | | | | | | | This is a leftover from Citra we no longer use.
* | | Merge pull request #5280 from FearlessTobi/port-5666Gravatar bunnei2021-01-121-4/+12
|\ \ \ | |/ / |/| | Port citra-emu/citra#5666: "Rotate previous log file to "citra_log.txt.old""
| * | Address review commentsGravatar FearlessTobi2021-01-041-5/+5
| | |
| * | Delete the old log file before rotating (#5675)Gravatar xperia642021-01-041-0/+3
| | |
| * | Fix the old log file to work with the log parser.Gravatar bunnei2021-01-031-1/+1
| | |
| * | Rotate previous log file to '.old' if it existsGravatar xperia642021-01-031-4/+9
| | |
* | | common/parent_of_member: Replace TYPED_STORAGE define with template aliasGravatar Lioncash2021-01-112-8/+10
| | | | | | | | | | | | Provides the same construct, but makes it obey namespacing.
* | | common: common_funcs: Add R_UNLESS macro.Gravatar bunnei2021-01-111-0/+8
| | |
* | | common: Introduce useful tree structures.Gravatar bunnei2021-01-114-0/+1641
| | |
* | | common/div_ceil: Return numerator typeGravatar ReinUsesLisp2021-01-091-5/+5
|/ / | | | | | | | | Fixes instances where DivCeil(u32, u64) would surprisingly return u64, instead of the more natural u32.
* / general: Fix various spelling errorsGravatar Morph2021-01-022-3/+3
|/
* memory: Remove MemoryHookGravatar MerryMage2021-01-014-78/+0
|
* Merge pull request #5249 from ReinUsesLisp/lock-free-pagesGravatar bunnei2021-01-013-23/+65
|\ | | | | core/memory: Read and write page table atomically
| * core/memory: Read and write page table atomicallyGravatar ReinUsesLisp2020-12-293-23/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* | Merge pull request #5208 from bunnei/service-threadsGravatar bunnei2020-12-303-0/+90
|\ \ | | | | | | Service threads
| * | common: ThreadWorker: Add class to help do asynchronous work.Gravatar bunnei2020-12-293-0/+90
| |/
* / k_priority_queue: Fix concepts useGravatar comex2020-12-291-0/+4
|/ | | | | | | | | | | | - For `std::same_as`, add missing include of `<concepts>`. - For `std::convertible_to`, create a replacement in `common/concepts.h` and use that instead. This would also be found in `<concepts>`, but unlike `std::same_as`, `std::convertible_to` is not yet implemented in libc++, LLVM's STL implementation - not even in master. (In fact, `std::same_as` is the *only* concept currently implemented. For some reason.)
* Merge pull request #5131 from bunnei/scheduler-rewriteGravatar bunnei2020-12-203-346/+100
|\ | | | | Rewrite Kernel scheduler based on Atmosphere
| * common: BitSet: Various style fixes based on code review feedback.Gravatar bunnei2020-12-061-23/+22
| |