summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
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]
2020-12-29common: ThreadWorker: Add class to help do asynchronous work.bunnei
2020-12-29k_priority_queue: Fix concepts usecomex
- 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.)
2020-12-20Merge pull request #5131 from bunnei/scheduler-rewritebunnei
Rewrite Kernel scheduler based on Atmosphere
2020-12-13cmake: Fix generating CMake configs and linking with Boostlat9nq
Fixes regression by 761206cf81b271f7f4dd6a167a120325b760dbf3, causing yuzu to not build on Linux with any version of Boost except a cached 1.73 Conan version from before about a day ago. Moves the Boost requirement out of the `REQUIRED_LIBS` psuedo-2D-array for Conan to instead be manually configured, using Conan as a fallback solution if the system does not meet our requirements. Requires any update from the linux-fresh container in order to build. **DO NOT MERGE** until someone with the MSVC toolchain can verify this works there, too.
2020-12-12common: Update CMakeList to fix build issue with Boost.bunnei
2020-12-11Revert "Merge pull request #5173 from lioncash/common-fs"Morph
This reverts commit ce5fcb6bb2c358b0251a2ce87945bda52789a76d, reversing changes made to 6f41763061082d5fa2ab039c554427152243cb46.
2020-12-11Revert "Merge pull request #5174 from ReinUsesLisp/fs-fix"Morph
This reverts commit 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a, reversing changes made to e94dd7e2c4fc3f7ca2c15c01bdc301be2b8a4c1b.
2020-12-11Revert "Merge pull request #5179 from ReinUsesLisp/fs-path"Morph
This reverts commit 4e94d0d53af2cdb7b03ef9de23cc29f3565df97a, reversing changes made to 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76.
2020-12-11Revert "Merge pull request #5181 from Morph1984/5174-review"Morph
This reverts commit cdb36aef9ec9d30bdef1953f9ed46776ae2f12af, reversing changes made to 5e9b77129f2cf8c039a8d98033cae4ac0f93f515.
2020-12-09common/file_util: Simplify the behavior of CreateFullPathMorph
2020-12-09common/file_util: Let std::filesystem cast from UTF16 to std::stringReinUsesLisp
Fix invalid encoding paths when iterating over a directory on Windows.
2020-12-09common/file_util: Fix and deprecate CreateFullPath, add CreateDirsReinUsesLisp
Fix CreateFullPath to have its intended previous behavior (whatever that was), and deprecate it in favor of the new CreateDirs function. Unlike CreateDir, CreateDirs is marked as [[nodiscard]] to avoid new code ignoring its result value.
2020-12-09common/file_util: Succeed on CreateDir when the directory existsReinUsesLisp