Commit graph

1373 commits

Author SHA1 Message Date
LC
4df2d09468 Merge pull request #5357 from ReinUsesLisp/alignment-log2
common/alignment: Rename AlignBits to AlignUpLog2 and use constraints
2021-01-15 03:12:36 -05:00
Lioncash
d5bff783bd common/bit_util: Replace CLZ/CTZ operations with standardized ones
Makes for less code that we need to maintain.
2021-01-15 02:15:32 -05:00
ReinUsesLisp
14ba0b1e68 common/alignment: Upgrade to use constraints instead of static asserts 2021-01-15 04:13:39 -03:00
ReinUsesLisp
4e4056f581 common/alignment: Rename AlignBits to AlignUpLog2
AlignUpLog2 describes what the function does better than AlignBits.
2021-01-15 04:13:33 -03:00
Lioncash
d8771fb857 common/timer: Remove
This is a leftover from citra and dolphin that isn't used at all,
particularly given the <chrono> header exists.
2021-01-15 01:55:33 -05:00
ReinUsesLisp
a815988d5c common/color: Remove
This is a leftover from Citra we no longer use.
2021-01-15 03:47:43 -03:00
bunnei
b824301b69 Merge pull request #5280 from FearlessTobi/port-5666
Port citra-emu/citra#5666: "Rotate previous log file to "citra_log.txt.old""
2021-01-12 22:16:57 -08:00
Lioncash
d11b3ebfc4 common/tree: Convert defines over to templates
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-12 16:46:36 -05:00
Lioncash
17044f999a common/tree: Remove unused splay tree defines
Makes for less code to take care of.
2021-01-12 02:32:41 -05:00
Lioncash
6d1212fdb9 common/parent_of_member: Replace TYPED_STORAGE define with template alias
Provides the same construct, but makes it obey namespacing.
2021-01-11 18:26:04 -05:00
bunnei
bf73b6ed86 common: common_funcs: Add R_UNLESS macro. 2021-01-11 14:23:16 -08:00
bunnei
eeb0493b5d common: Introduce useful tree structures. 2021-01-11 14:23:16 -08:00
ReinUsesLisp
7e3b53c5be common/div_ceil: Return numerator type
Fixes instances where DivCeil(u32, u64) would surprisingly return u64,
instead of the more natural u32.
2021-01-09 03:16:10 -03:00
FearlessTobi
ae1899577f Address review comments 2021-01-04 04:36:50 +01:00
xperia64
34bacedd1a Delete the old log file before rotating (#5675) 2021-01-04 04:33:34 +01:00
bunnei
a8aea907f4 Fix the old log file to work with the log parser. 2021-01-03 01:44:52 +01:00
xperia64
1c775a3f66 Rotate previous log file to '.old' if it exists 2021-01-03 01:44:42 +01:00
Morph
23413c0d44 general: Fix various spelling errors 2021-01-02 10:23:41 -05:00
Fernando Sahmkow
659fb51dd9 X86/NativeClock: Reimplement RTDSC access to be lock free. 2021-01-02 04:00:27 +01:00
Fernando Sahmkow
50dd9a423a X86/NativeClock: Improve performance of clock calculations on hot path. 2021-01-02 00:43:47 +01:00
MerryMage
e3490b55c1 memory: Remove MemoryHook 2021-01-01 11:34:38 +00:00
bunnei
f1195d12cc Merge pull request #5249 from ReinUsesLisp/lock-free-pages
core/memory: Read and write page table atomically
2021-01-01 02:54:01 -08:00
bunnei
41e8f75c82 Merge pull request #5208 from bunnei/service-threads
Service threads
2020-12-30 22:06:05 -08:00
ReinUsesLisp
8bfa4d6dbf core/memory: Read and write page table atomically
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-29 21:54:49 -03:00
bunnei
01e1b790a5 common: ThreadWorker: Add class to help do asynchronous work. 2020-12-29 16:46:29 -08:00
comex
8be4bd5104 k_priority_queue: Fix concepts use
- 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-29 14:33:41 -05:00
bunnei
8e1f16e8fa Merge pull request #5131 from bunnei/scheduler-rewrite
Rewrite Kernel scheduler based on Atmosphere
2020-12-20 20:57:54 -08:00
lat9nq
5e59e26876 cmake: Fix generating CMake configs and linking with Boost
Fixes regression by 91c13721de, 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-13 01:28:51 -05:00
bunnei
91c13721de common: Update CMakeList to fix build issue with Boost. 2020-12-12 11:50:07 -08:00
Morph
944c66a1c4 Revert "Merge pull request #5173 from lioncash/common-fs"
This reverts commit 65c2816e9e, reversing
changes made to f923f9b6d0.
2020-12-11 20:24:22 -05:00
Morph
07b5c70975 Revert "Merge pull request #5174 from ReinUsesLisp/fs-fix"
This reverts commit 1f5f5d8d3c, reversing
changes made to 714b347f96.
2020-12-11 20:24:22 -05:00
Morph
4b2d4ac412 Revert "Merge pull request #5179 from ReinUsesLisp/fs-path"
This reverts commit be3622e550, reversing
changes made to 586d5a72e1.
2020-12-11 20:21:46 -05:00
Morph
1992dbc3cf Revert "Merge pull request #5181 from Morph1984/5174-review"
This reverts commit 1f3f6640f6, reversing
changes made to 38152bb0f7.
2020-12-11 20:21:21 -05:00
Morph
c71f111bb0 common/file_util: Simplify the behavior of CreateFullPath 2020-12-09 19:28:11 -05:00
ReinUsesLisp
eff4da93e1 common/file_util: Let std::filesystem cast from UTF16 to std::string
Fix invalid encoding paths when iterating over a directory on Windows.
2020-12-09 18:52:36 -03:00
ReinUsesLisp
443d8d3a23 common/file_util: Fix and deprecate CreateFullPath, add CreateDirs
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-09 05:42:03 -03:00
ReinUsesLisp
74e078db55 common/file_util: Succeed on CreateDir when the directory exists 2020-12-09 05:21:08 -03:00
Lioncash
3b79d189d3 file_util: Migrate remaining file handling functions over to std::filesystem
Converts creation and deletion functions over to std::filesystem,
simplifying our file-handling code.

Notably with this, CopyDir will now function on Windows.
2020-12-09 01:24:05 -05:00
Lioncash
df7cf1df19 file_util: Migrate Exists() and IsDirectory() over to std::filesystem
Greatly simplifies our file-handling code for these functions.
2020-12-08 18:36:53 -05:00
LC
60ba2d11df Merge pull request #5136 from lioncash/video-shadow3
video_core: Resolve more variable shadowing scenarios pt.3
2020-12-07 00:06:53 -05:00
bunnei
4617be5b35 common: BitSet: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bunnei
4f16c961c9 hle: kernel: Separate KScheduler from GlobalSchedulerContext class. 2020-12-06 00:03:24 -08:00
bunnei
b164f6306b common: Port BitSet from Mesosphere. 2020-12-06 00:03:24 -08:00
Lioncash
5db4785535 video_core: Resolve more variable shadowing scenarios pt.3
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
2020-12-05 16:02:23 -05:00
Lioncash
50516223e3 xbyak_abi: Shorten std::size_t to size_t
Makes for less reading.
2020-12-05 00:43:55 -05:00
Lioncash
65a52ab81a xbyak_abi: Avoid implicit sign conversions 2020-12-05 00:43:41 -05:00
bunnei
c1f4f013fe Merge pull request #4996 from bunnei/use-4jits
Kernel: Refactor to use 4-instances of Dynarmic & various cleanups and improvements
2020-12-03 15:32:45 -08:00
bunnei
4547af2ba5 Merge pull request #5000 from lioncash/audio-error
audio_core: Make shadowing and unused parameters errors
2020-12-02 23:08:43 -08:00
Lioncash
29db886722 audio_core: Make shadowing and unused parameters errors
Moves the audio code closer to enabling warnings as errors in general.
2020-12-03 00:54:31 -05:00
bunnei
05ff3e467e common: fiber: Use VirtualBuffer for stack memory.
- This will be aligned by default, and helps memory usage.
2020-11-29 01:31:52 -08:00