Commit Graph

874 Commits

Author SHA1 Message Date
Lioncash
2989bed496 common/bit_util: Fix bad merge duplicating the copy constructor
Introduced as a result of #2090, we already define the copy constructor
further down below, so this isn't needed.
2019-03-20 23:48:37 -04:00
bunnei
2e456f3303 Merge pull request #2090 from FearlessTobi/port-4599
Port citra-emu/citra#4244 and citra-emu/citra#4599: Changes to BitField
2019-03-20 23:44:20 -04:00
Lioncash
c270fbd742 common/uint128: Add missing header guard 2019-03-20 22:39:00 -04:00
Lioncash
8150d492cd common/uint128: Add missing top-file source text 2019-03-20 22:38:25 -04:00
Lioncash
a95375d07c common/CMakeLists: Amend boost dependency
When #2247 was created, thread_queue_list.h was the only user of
boost-related code, however #2252 moved the page table struct into
common, which makes use of Boost.ICL, so we need to add the dependency
to the common library's link interface again.
2019-03-20 21:42:13 -04:00
bunnei
a6f4fc3f96 Merge pull request #2247 from lioncash/include
common/thread_queue_list: Remove unnecessary dependency on boost
2019-03-20 21:34:12 -04:00
bunnei
2433c449d4 core: Move PageTable struct into Common. 2019-03-16 22:05:40 -04:00
bunnei
3bca0f48c6 Merge pull request #2129 from FernandoS27/cntpct
Correct CNTPCT from using CPU Cycles to using Clock Cycles
2019-03-16 21:58:59 -04:00
Lioncash
010aff8746 common/thread_queue_list: Remove unnecessary dependency on boost
We really don't need to pull in several headers of boost related
machinery just to perform the erase-remove idiom (particularly with
C++20 around the corner, which adds universal container std::erase and
std::erase_if, which we can just use instead).

With this, we don't need to link in anything boost-related into common.
2019-03-16 05:01:39 -04:00
bunnei
ba686919fc Merge pull request #2147 from ReinUsesLisp/texture-clean
shader_ir: Remove "extras" from the MetaTexture
2019-03-10 17:28:36 -04:00
Lioncash
0adf134c00 common/bit_field: Make BitField trivially copyable
This makes the class much more flexible and doesn't make performing
copies with classes that contain a bitfield member a pain.

Given BitField instances are only intended to be used within unions, the
fact the full storage value would be copied isn't a big concern (only
sizeof(union_type) would be copied anyways).

While we're at it, provide defaulted move constructors for consistency.
2019-03-07 17:05:44 -05:00
Lioncash
d842c536d5 logging/backend: Make time_origin a class variable instead of a local static
Moves local global state into the Impl class itself and initializes it
at the creation of the instance instead of in the function.

This makes it nicer for weakly-ordered architectures, given the
CreateEntry() class won't need to have atomic loads executed for each
individual call to the CreateEntry class.
2019-03-02 14:44:24 -05:00
Lioncash
62086b6a20 logging/backend: Move CreateEntry into the Impl class
This function is only ever used within this source file and makes it
easier to remove static state in the following change.
2019-03-02 14:44:24 -05:00
Lioncash
5a5287d917 common/math_util: Move contents into the Common namespace
These types are within the common library, so they should be within the
Common namespace.
2019-02-27 03:38:39 -05:00
Lioncash
7ff6e73155 common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the
Common namespace.
2019-02-26 22:38:36 -05:00
Lioncash
898d317430 common/quaternion: Move Quaternion into the Common namespace
Quaternion is within the common library, so it should be using the
Common namespace.
2019-02-26 22:31:17 -05:00
ReinUsesLisp
5c6821bdc1 shader/decode: Split memory and texture instructions decoding 2019-02-26 00:11:30 -03:00
tgsm
8d0a84ff6a Remove GCC version checks
Citra can't be compiled using GCC <7 because of required C++17 support, so these version checks don't need to exist anymore.
2019-02-24 15:24:06 +01:00
Fernando Sahmkow
2a66711071 Corrections, documenting and fixes. 2019-02-16 16:52:24 -04:00
Fernando Sahmkow
fb6c13a924 Use u128 on Clock Cycles calculation. 2019-02-15 22:57:16 -04:00
Fernando Sahmkow
50a727ea23 Implement 128 bits Unsigned Integer Multiplication and Division. 2019-02-15 22:55:31 -04:00
B3n30
c41eea822c Adressed review comments 2019-02-15 22:14:54 +01:00
B3n30
803645dd71 threadsafe_queue: Add WaitIfEmpty and use it in logging 2019-02-15 22:12:54 +01:00
bunnei
df21e6f47b Merge pull request #2113 from ReinUsesLisp/vulkan-base
vulkan: Add dependencies and device abstraction
2019-02-14 10:06:48 -05:00
fearlessTobi
85e5021dd9 Make bitfield assignment operator public
This change needs to be made to get the code compiling again. It was suggested after a conversation with Lioncash.

The conversation can be seen here: https://user-images.githubusercontent.com/20753089/45064197-b6107800-b0b2-11e8-9db8-f696299fb86a.PNG
2019-02-13 21:15:15 +01:00
Lioncash
77f464eabe threadsafe_queue: Use std::size_t for representing size
Makes it consistent with the regular standard containers in terms of
size representation. This also gets rid of dependence on our own
type aliases, removing the need for an include.
2019-02-12 22:39:53 -05:00
Lioncash
1407c2211c threadsafe_queue: Remove NeedSize template parameter
The necessity of this parameter is dubious at best, and in 2019 probably
offers completely negligible savings as opposed to just leaving this
enabled. This removes it and simplifies the overall interface.
2019-02-12 22:09:51 -05:00
ReinUsesLisp
19b748aeb1 logging: Add Vulkan backend logging class type 2019-02-12 18:33:02 -03:00
ReinUsesLisp
9d30378cec cmake: Fix title bar issue 2019-02-06 22:23:41 -03:00
Frederic L
008e2e4b6f cmake: Use CMAKE_COMMAND instead of "cmake"
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-02-06 22:23:41 -03:00
ReinUsesLisp
0ffe489806 gl_shader_disk_cache: Invalidate shader cache changes with CMake hash 2019-02-06 22:20:57 -03:00
ReinUsesLisp
fdcf2a00be file_util: Add shader directory 2019-02-06 22:20:57 -03:00
Weiyi Wang
7128c0d386 common/bitfield: make it endianness-aware 2019-02-06 17:29:39 +01:00
Weiyi Wang
7e4911453c common/swap: remove default value for swap type internal storage
This is compromise for swap type being used in union. A union has deleted default constructor if it has at least one variant member with non-trivial default constructor, and no variant member of T has a default member initializer. In the use case of Bitfield, all variant members will be the swap type on endianness mismatch, which would all have non-trivial default constructor if default value is specified, and non of them can have member initializer
2019-02-06 17:24:27 +01:00
Weiyi Wang
195eff19bb common/swap: use template and tag for LE/BE specification
The tag can be useful for other type-generic templates like BitFields to forward the endianness specification
2019-02-06 17:24:13 +01:00
Weiyi Wang
463b3ce0e8 common/swap: add swap template for enum 2019-02-06 17:21:15 +01:00
bunnei
d6d09d543e Merge pull request #1928 from lioncash/caps
kernel: Handle kernel capability descriptors
2018-12-27 11:15:34 -05:00
Lioncash
a946aa932e common/quaternion: Ensure that w is always initialized
Previously xyz was always being zero initialized due to its constructor,
but w wasn't. Ensures that we always have a deterministic initial state.
2018-12-21 15:25:31 -05:00
Lioncash
1512d86eb7 common: Add basic bit manipulation utility function to Common 2018-12-21 07:04:18 -05:00
bunnei
70efa6e1a6 Merge pull request #1732 from DarkLordZach/yield-types
svc: Implement yield types 0 and -1
2018-12-15 00:28:12 -05:00
Tobias
2f0e7689b2 Backport review comment from citra-emu/citra#4418
Original reason:
As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
2018-12-07 16:21:18 +01:00
bunnei
09ece69dd5 Merge pull request #1773 from lioncash/thread
common/thread: Minor cleanup
2018-11-23 08:52:05 -08:00
Lioncash
4321487c2d common/thread: Drop Hungarian notation on SetCurrentThreadName's parameter
This is inconsistent with our coding style.
2018-11-22 00:40:26 -05:00
Zach Hilman
52696a99c1 scheduler: Add explanations for YieldWith and WithoutLoadBalancing 2018-11-22 00:33:53 -05:00
Lioncash
b86419c574 common/thread: Make Barrier's 'count' member non-const
While admirable as a means to ensure immutability, this has the
unfortunate downside of making the class non-movable. std::move cannot
actually perform a move operation if the provided operand has const data
members (std::move acts as an operation to "slide" resources out of an
object instance). Given Barrier contains move-only types such as
std::mutex, this can lead to confusing error messages if an object ever
contained a Barrier instance and said object was attempted to be moved.
2018-11-21 21:47:08 -05:00
Lioncash
92ac099702 common/thread: Initialize class member variables where applicable
Simplifies the constructor interfaces for Barrier and Event classes.
2018-11-21 21:45:01 -05:00
Lioncash
d1a5af5b2c common/thread: Group non-member functions together
Keeps the non-member interface in one spot instead of split into two
places, making it nicer to locate functions.
2018-11-21 21:42:33 -05:00
Lioncash
39c8ea3e88 common/thread: Remove SleepCurrentThread()
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
2018-11-21 21:40:11 -05:00
Lioncash
171cca777d common/thread: Remove unused CurrentThreadId()
This is an old function that's no longer necessary. C++11 introduced
proper threading support to the language and a thread ID can be
retrieved via std::this_thread::get_id() if it's ever needed.
2018-11-21 21:37:11 -05:00
Lioncash
3bcdbe4289 common: Remove bit_set.h
This is an analog of BitSet from Dolphin that was introduced to allow
iterating over a set of bits. Given it's currently unused, and given
that std::bitset exists, we can remove this. If it's ever needed in the
future it can be brought back.
2018-11-21 21:30:10 -05:00