Commit Graph

427 Commits

Author SHA1 Message Date
Triang3l
866a29e153 [Base] saturate_signed NaN comment 2021-06-05 15:04:06 +03:00
Triang3l
3c20a83972 [Base] Float clamping cleanup 2021-06-05 14:55:55 +03:00
Joel Linn
10ff77a24f [Base] Add workaround for GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100801
2021-06-02 22:28:43 -05:00
Joel Linn
ceb382f8ec Update Catch2 test framework
- Use their main() method to fix command line options. Fix CLion testing
- Change to correct tag syntax.
2021-06-02 22:28:43 -05:00
Joel Linn
0e019f96b4 [Base, Linux] Make thread exit non returning
- Use pthread_exit() instead of pthread_cancel() if current thread
- Modify tests to ensure Exit does not return
2021-06-02 22:28:43 -05:00
Joel Linn
d40dfa11c5 [Base] Use pragma pack for non msvc as well.
- Pack attributes may be ignored by GCC
2021-06-02 22:28:43 -05:00
Joel Linn
d55192ea30 [Base] Refactor byte_swap
- Use builtins on non MSVC compilers
- Use `if constexpr` to reduce explicit overloads and SFINAE overhead
2021-06-02 22:28:43 -05:00
Joel Linn
4800194f0d [Base] Add faster bit_count variants
- Use C++20 `popcount()` when available
- Else use compiler specific built-ins
2021-06-02 22:28:43 -05:00
Joel Linn
e58686c9df [Base] Add le<> type
- Addition to `be<>` type
2021-06-02 22:28:43 -05:00
Joel Linn
28ca58c0e9 [Base] Fix HighResolutionTimer
- Test was failing on Linux 5.11 and GLIBC 2.33
- `timer_t(0)` is a valid handle, so a `valid_` flag was added to guard
  destruction
- Similar behaviour on Windows was fixed as well. The invalid values for
  `HANDLE` are API dependent.
2021-06-02 22:28:43 -05:00
Joel Linn
86722be9ca [Base] Make Arena alignment aware
- Add align parameter
- Templated Alloc() implicitly aligns type correctly
- Rewind may leak padding that was added due to alignment
2021-06-02 22:28:43 -05:00
Joel Linn
d8cfeac79f [Base] Remove redundant copy and move operators
- Compiler is smart enough to use 128bit vector regs by itself
2021-06-02 22:28:43 -05:00
Joel Linn
4d0d3f3ad4 [Base] Fix semaphore test
- Was using `Sleep()`
- Replaced with atomic value and bool flag
2021-06-02 22:28:43 -05:00
Joel Linn
2d9462f02b [Base] Fix unitialized variable in threading test 2021-06-02 22:28:43 -05:00
Joel Linn
4fb5244176 [Base] Fix namespacing 2021-06-02 22:28:43 -05:00
Joel Linn
4daa3f5a52 [Base] Add FourCC tests 2021-06-02 22:28:43 -05:00
Joel Linn
9bb920b104 [Base] Add FourCC type
- using fourcc_t = uint32_t
- make_fourcc() overloads
2021-06-02 22:28:43 -05:00
Triang3l
2d50fc07b4 [Linux] __builtin_ffsll instead of GNU/BSD-specific ffsll 2021-05-17 02:38:51 +03:00
Triang3l
8f1f849a06 [D3D12] unordered_map instead of multimap in TextureCache 2021-05-05 21:40:00 +03:00
Triang3l
b099d74f78 [Memory] List all partitions supporting non-FromApp memory mapping functions 2021-05-04 23:27:57 +03:00
gibbed
a18f9c9dc1 Add UTF-8 path tests for trailing separator. 2021-05-02 09:36:32 -05:00
gibbed
2d2721ee7a [Base] Fix UTF-8 fnfp with trailing separator.
[Base] Fix off-by-one in UTF-8 find_name_from_path with trailing
separator.
2021-05-02 09:36:32 -05:00
gibbed
9185c36b41 Add more UTF-8 path edge cases.
- Add macro for automatically testing both / and \ of all path
  input/outputs.
- Add more UTF-8 path edge cases.
2021-05-02 08:18:22 -05:00
gibbed
b7674f0bd8 [Base] Plain string variant of UTF-8 join_paths. 2021-05-02 08:18:22 -05:00
gibbed
46dfb3449c [Base] Dedupe new/old separators in UTF-8 fps.
[Base] Dedupe new/old separators in UTF-8 fix_path_separators.
2021-05-02 08:18:22 -05:00
gibbed
de3825274e [Base] Fix edge case in UTF-8 fnfp/fbp.
[Base] Fix edge case in UTF-8 find_name_from_path/find_base_path with
strings that consist of only a separator.
2021-05-02 08:18:22 -05:00
gibbed
653931ec8f Add and improve UTF8 tests. 2021-05-01 15:16:37 -05:00
gibbed
dbd980150b [Base] Don't use reverse iterator for UTF-8.
[Base] Don't use reverse iterator for UTF-8. Fixes #1760.
2021-05-01 15:16:37 -05:00
Joel Linn
7a0236dcc5 [Base] BitStream: Fix writing to non zeroed mem 2021-05-01 12:41:02 -05:00
sephiroth99
36f687e40e [Base] Add missing header for VS2017
When using VS2017, the compilation fails due to this missing header.

Signed-off-by: sephiroth99 <sephiroth99@gmail.com>
2021-01-31 23:22:59 -06:00
emoose
2d9326e02d [Kernel] Implement XeCryptBnQwNeRsaPubCrypt via BCrypt (win32 only) 2021-01-03 14:38:01 -06:00
Triang3l
86ba17847b [Base] Hopefully fix Clang template inheritance error 2020-12-31 16:46:25 +03:00
Triang3l
ea9ee0d4ba [Kernel] Make HDTV gamma the default 2020-12-31 16:14:26 +03:00
Triang3l
37013ee352 [Config] CVar defauls versioning 2020-12-31 16:04:50 +03:00
Triang3l
36a0bcec8b [GPU] XXH3 hash instead of XXH64 2020-12-08 22:31:09 +03:00
gibbed
319699130a [XAM] Improvement rollup. Content, enumerators...
- [Kernel] Create guest object for XEnumerator.
- [XAM] Split content data into host/guest variants.
- [XAM] Correct message return type from RESULT to HRESULT.
- [XAM] Add a new dummy content device for ODD.
- [XAM] Implement XamContentAggregateCreateEnumerator.
- [XAM] Implement XamGetPrivateEnumStructureFromHandle.
- [XAM] Implement XMsgCompleteIORequest (sketchy).
- [XAM] Implement XamGetOverlappedResult (sketchy).
- [XAM] Implement XamTaskSchedule (sketchy).
2020-11-27 14:19:30 -06:00
gibbed
f8e6ac4108 Defer XAM UI functions & other improvements.
- [Kernel] Fix global locking in kernel dispatch thread.
- [Kernel] Improve CompleteOverlappedDeferred/CompleteOverlappedDeferredEx.
- [XAM] Identify unknowns in XamNotifyCreateListener/XNotifyListener.
- [XAM] Defer XamShowMessageBoxUI.
- [XAM] Defer XamShowKeyboardUI.
- [XAM] Fix cancel handling in XamShowKeyboardUI.
- [XAM] Defer XamShowDeviceSelectorUI.
- [XAM] Defer XamShowDirtyDiscErrorUI.
2020-11-27 05:15:17 -06:00
Triang3l
d353cade76 [Base] mapped_memory_win: more explicit invalid handle values 2020-11-24 22:49:56 +03:00
Triang3l
a73592c2ef [Memory/CPU] UWP: Support separate code execution and write memory, FromApp functions + other Windows memory fixes 2020-11-24 22:18:50 +03:00
Triang3l
2cb7d26d62 [Android] Add a comment about pthreads dynamic loading 2020-11-23 00:42:58 +03:00
Triang3l
63ff758049 [Threading] Android thread naming and other cleanup 2020-11-22 20:03:45 +03:00
Triang3l
aca23c08cf [Memory] Fix kFileMappingHandleInvalid typos in tests 2020-11-22 18:49:47 +03:00
Triang3l
a39266b71e [Threading] Android thread termination signal 2020-11-22 18:48:55 +03:00
Triang3l
0ebf073385 [Base] Affinity and yield to sched on Android 2020-11-22 16:56:04 +03:00
Triang3l
9ef7fb62d3 [Memory] Android memory mapping 2020-11-22 16:32:46 +03:00
Triang3l
ec507dc2f6 [Memory] Fix forgotten kFileMappingHandleInvalid 2020-11-22 14:34:09 +03:00
Triang3l
86ae42919d [Memory] Close shared memory FD and properly handle its invalid value 2020-11-22 14:17:37 +03:00
Sandy Carter
49e194009b [memory linux] Properly unlink shared memory
shm_unlink(name) is the proper way to close a shared memory in linux.
Prior to this, xenia was creating and not cleaning up shared memory handle
which would accumulate in /dev/shm. shm_unlink is the proper way of doing
this.
Add filename to CloseFileMappingHandle signature.
Add simple test to open and close.
2020-11-22 13:54:00 +03:00
Sandy Carter
2c7009ca80 [memory] Move "Local\\" prefix to win impl
CreateFileMappingHandle now takes shared memory name without a prefix.
The doc of shm_open recommends not using slashes and prefixing with "/".
The prefixing has been moved to the os implementation layer.
Invocations of CreateFileMappingHandle were all using "Local\\" so these
prefixes were removed.
2020-11-22 13:54:00 +03:00
Sandy Carter
22ef265057 [memory] Add Memory mapping view tests
Add test for mapping and for mapping with access.
2020-11-22 13:54:00 +03:00