Commit Graph

5016 Commits

Author SHA1 Message Date
emoose 14783b03f2 [VFS/STFS] Update mmap_total_size & total_allocation_units() 2021-05-05 12:35:51 -05:00
emoose 84f566d92b [VFS] STFS/XContent structure improvements
Now makes use of xe::be<T> and removes need for read() method
2021-05-05 12:35:51 -05:00
Triang3l b099d74f78 [Memory] List all partitions supporting non-FromApp memory mapping functions 2021-05-04 23:27:57 +03:00
Triang3l 40ca4abc0b [GPU] Small ring buffer setup function cleanup 2021-05-04 23:13:55 +03:00
Triang3l 330beaf552 [GPU] Screen scissor alongside window scissor 2021-05-04 22:54:05 +03:00
Triang3l fb01ccaac6 [GPU] Viewport/clipping cleanup, don't clamp oDepth 2021-05-04 21:39:34 +03:00
Joel Linn 48bd08a11b [GPU] Fix shader compiler build on Linux 2021-05-03 22:50:44 -05:00
Gliniak 1f658f9b32 [XAM/Content] Prevent deletion of open packages 2021-05-02 10:46:20 -05: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 fcd46d56a0 [App] Lint fix. 2021-05-02 08:21:10 -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 f868a10649 [App] Correctly initialize title ID. 2021-05-02 00:21:57 -05:00
gibbed ea1f2b114a [App] Improve title tracking.
[App] Improve title tracking.
[App] Show title version in emulator window title, when available.
2021-05-01 17:29:05 -05:00
gibbed 0419a9f13d [App] Build title using StringBuffer. 2021-05-01 17:29:05 -05:00
gibbed 38c3db1afb [CPU/Kernel] Transparently byteswap xex2_version. 2021-05-01 17:29:05 -05:00
gibbed 46ee68eb1d [UI] Log unsuccessful SPDA result as unsigned.
[UI] Log unsuccessful SetProcessDpiAwareness result as unsigned.
2021-05-01 17:26:54 -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
illusion0001 b5fc1efad5 XMA: Set log level for unhandled register to warning 2021-05-01 12:47:36 -05:00
gibbed 99c9ed4c62 Stop Intellisense complaints about export decls.
Stop Visual Studio Intellisense complaints about export declarations.
2021-05-01 12:45:16 -05:00
Joel Linn b6e5719173 [APU] Fix compilation on Linux 2021-05-01 12:41:02 -05:00
Joel Linn 534e263b05 [APU] XMA: Cross-buffer split frames. 2021-05-01 12:41:02 -05:00
Joel Linn 6547fa1748 [APU] Rewrite XMA packet parser
Use new FFmpeg frame decoder
2021-05-01 12:41:02 -05:00
Joel Linn 7a0236dcc5 [Base] BitStream: Fix writing to non zeroed mem 2021-05-01 12:41:02 -05:00
Joel Linn 3675c8eac8 [APU] Disable warnings in FFmpeg. 2021-05-01 12:41:02 -05:00
Joel Linn d4cf474665 Replace references to libav. 2021-05-01 12:41:02 -05:00
Gliniak e5948bb810 [Kernel] Implemented: XeKeysHmacShaUsingKey 2021-05-01 12:31:14 -05:00
gibbed 524efcab7d [Kernel] Lint fix. 2021-05-01 12:20:14 -05:00
Gliniak d4c3d665d5 [XAM/Content] Set disposition for overlapped cases 2021-04-30 20:12:56 -05:00
Triang3l 556893177b [D3D12] Better D3D12 initialization failure error message 2021-04-28 21:13:00 +03:00
Triang3l bb55bb3e70 [D3D12] Make ROV the default RT path on Intel due to stencil 2021-04-28 20:53:07 +03:00
Triang3l 71fbfdb63e [D3D12] Fix non-ROV clearing always giving 'failed in backend' 2021-04-28 17:27:57 +03:00
Triang3l 51c2c9e5f2 [D3D12] Fix render target reference leak 2021-04-27 19:55:29 +03:00
Triang3l ec41dfc995 [D3D12] Fix bindless root signatures, ensure shaders are pre-translated 2021-04-27 18:29:23 +03:00
Triang3l 913e1e949c [GPU] Ownership-transfer-based RT cache, 3x3 resolution scaling
The ROV path is also disabled by default because of lower performance
2021-04-26 22:12:09 +03:00
Gliniak 30ea6e3ea3 [Kernel/Memory] Return error when region_size is 0 2021-04-10 07:19:59 -05:00
gibbed 4ce43369a7 Use English game title when available. 2021-04-07 03:47:17 -05:00
Gliniak 9ccdbb2153 [Kernel/Memory] Do not clear range if it was previously commited 2021-04-07 03:42:13 -05:00
Gliniak 010f0aa517 [XAM/Party] Added stubs for:
- XamPartyGetUserList
 - XamPartySendGameInvites
 - XamPartySetCustomData
 - XamPartyGetBandwidth
2021-04-06 23:39:40 -05:00
Gliniak 6c9662d17e [XAM/UI] Added Stubs For:
- XamShowPartyUI
 - XamShowCommunitySessionsUI
2021-04-06 23:39:40 -05:00
Triang3l 99024aec32
[Vulkan] Fix primary_queue_mutex usage in vulkan_graphics_system.cc 2021-03-04 18:32:27 +03:00
Triang3l 5ae6c7eaf8
[Vulkan] Fix primary queue mutex locking in texture_cache.cc 2021-03-04 18:14:07 +03:00
Triang3l 87442b106c
[D3D12] Fix signed-only texture descriptor creation 2021-02-13 23:22:03 +03:00
Gliniak a6954aced3 [Kernel/XAM] XamContentCreateEx - Extended Error Support 2021-01-31 23:58:07 -06:00
emoose 690b0d9197 [Kernel/XAM] Prevent Sleep from being used on main thread, fixes #1749 2021-01-31 23:39:13 -06:00
emoose 57764f6bea [Kernel/XAM] Improve NetDll_XNetQosServiceLookup stub, implement NetDll_XNetQosRelease
Needed for Saints Row 1 (TU1) to start up properly
2021-01-31 23:26:47 -06:00
emoose 40bbf704e0 [Kernel/XBDM] Change return values of RegisterCommandProcessorEx & DmWalkLoadedModules 2021-01-31 23:26:47 -06: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
sephiroth99 6baf6351a1 [Kernel] Fix usage of date library
For backwards compatibility reasons, the date library does not use the
new C++17 uncaught_exception signature, even if compiling under C++17.

With GCC 10, libstdc++ marks the old uncaught_exception signature as
deprecated, so this causes a compilation error.

Fortunately, date library provides a way to select which
uncaught_exception version to use, so force using the new version.

Signed-off-by: sephiroth99 <sephiroth99@gmail.com>
2021-01-31 23:22:59 -06:00
emoose bb7c5b8266 [CPU/XEX] Move SecurityInfo conversion code to ReadSecurityInfo & call that during ApplyPatch 2021-01-31 23:18:54 -06:00
Triang3l 9a74df491f [DXBC] dxbc.h with non-translator-specific parts 2021-01-04 16:15:50 +03:00
emoose 2d9326e02d [Kernel] Implement XeCryptBnQwNeRsaPubCrypt via BCrypt (win32 only) 2021-01-03 14:38:01 -06:00
emoose 8c11f2a39a [Kernel] Implement XeCryptBnQw_SwapDwQwLeBe 2021-01-03 14:38:01 -06:00
emoose 4b13ecb752 [Kernel] Implement NtReadFileScatter via adding XFile::ReadScatter 2021-01-03 13:50:34 -06:00
emoose 0400eba274 [Kernel] XFile::Read: add notify_completion param to allow disabling XIOCompletion 2021-01-03 13:50:34 -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 e7cd2ffffa [GPU] Clamp scissor to surface_pitch 2020-12-29 11:15:05 +03:00
Triang3l 56d802c323 [GPU] Slightly better shader_compiler_main variable name 2020-12-28 22:09:28 +03:00
Joel Linn 7943702618 Fix rvalue being passed as a reference. 2020-12-28 22:07:00 +03:00
Gliniak 74cb0117cf [Kernel] WaitForNotification skip wait w/o wait_ticks 2020-12-26 04:57:21 -06:00
Gliniak ea6969f378 [Kernel] Implemented NtSetIoCompletion 2020-12-26 04:57:21 -06:00
Joel Linn 4e72167c5e [SDL2] Event handler in separate function 2020-12-26 04:50:27 -06:00
Joel Linn d3c618404a [SDL2] Improve GetCapabilities() 2020-12-26 04:50:27 -06:00
Joel Linn 64c5c63eaf [SDL2] Log controller device events. 2020-12-26 04:50:27 -06:00
Joel Linn 87389e2486 [SDL2] Do not restrict callbacks to window thread 2020-12-26 04:50:27 -06:00
Joel Linn ddc0cc840a [SDL2] Allow AUX buttons. 2020-12-26 04:50:27 -06:00
Joel Linn 510c3c320f [SDL2] Set more hints. 2020-12-26 04:50:27 -06:00
Triang3l 9009cba90a [GPU] Refactor shader dumps - bin and txt files for both ucode and host 2020-12-25 21:46:07 +03:00
Triang3l 2bc0113dae [GPU] Add missing override specifier to SPIR-V shader translator 2020-12-25 21:11:43 +03:00
Triang3l dcde08a493 [GPU] PS and rasterization disabling cleanup 2020-12-24 23:40:38 +03:00
Triang3l 733efa5ff8 [GPU] Add a missing default label to GatherAluResultInformation 2020-12-22 22:29:00 +03:00
Triang3l c7fbe0e6d5 [GPU] Scale gradients by SSAA factor 2020-12-20 16:35:15 +03:00
Triang3l e6fa0ad139 [GPU] Dynamic r# count via shader modifications + refactoring 2020-12-19 16:14:54 +03:00
Triang3l b106aa88e6 [GPU] Complete some register bitfield declarations 2020-12-12 20:01:41 +03:00
Triang3l e348d6361e [PPC] Disable frsqrte tests in a way not breaking the rest 2020-12-12 14:00:29 +03:00
Triang3l da60649202 [D3D12] Fix texture_cache.cc formatting 2020-12-11 21:21:26 +03:00
Triang3l 5c47a3a588 [x64] vcfux single rounding for 0x80000000+ 2020-12-11 21:20:13 +03:00
Triang3l d0b849aad7 [PPC] vcfsx/vcfux: Only mul if needed 2020-12-10 21:34:37 +03:00
Triang3l cb93ddf873 [PPC] vcfsx/vcfux optimization/simplification 2020-12-10 21:29:33 +03:00
Triang3l db1d6b1fef [PPC] Fix test suite name being ignored 2020-12-10 21:27:26 +03:00
Triang3l 040661f366 [D3D12] Fix a lint error in pipeline desc 2020-12-10 21:23:13 +03:00
Triang3l 34c5fc9c2f [DXBC] ROV: Update a todo comment about early Z 2020-12-10 12:41:29 +03:00
Triang3l 8bcfcf6452 [GPU] Update v_mad_legacy_f32 comment 2020-12-10 12:39:02 +03:00
Triang3l bc0c2040e2 [DXBC] ROV: Force late Z write with kill instructions 2020-12-10 12:36:37 +03:00
Triang3l 9349cf4ff4 [D3D12] Fix custom sample position reset 2020-12-08 22:43:15 +03:00
Triang3l b7216f91f7 [D3D12] Re-add forgotten RenderTargetCache::EndFrame call 2020-12-08 22:36:47 +03:00
Triang3l 36a0bcec8b [GPU] XXH3 hash instead of XXH64 2020-12-08 22:31:09 +03:00
Triang3l 9a4643d0f2 [GPU] Non-ROV f24 trunc/round, host shader modifications, cache dir 2020-12-07 22:31:46 +03:00
Prism Tutaj a86609e93a [GTK UI] Fix GTK submenus 2020-12-06 17:26:30 -06:00
Gliniak 06ab8589b4 [Kernel/IO] Return error creating dir as non-dir.
[Kernel/IO] Return error when creating directory with non-directory
flag in NtCreateFile.
2020-12-06 17:07:34 -06:00
Triang3l cadc31c93f
[GPU] Fix uninitialized viewport_top when drawing without a viewport 2020-12-06 15:55:28 +03:00
Gliniak ff5c5f01e0 [Kernel] Zeroing out pages without write protect flag 2020-12-05 14:18:03 -06:00
gibbed 1513dd235b [Kernel] Code reentrance for guest fibers.
[Kernel] Code reentrance using exceptions for guest fibers.
2020-12-05 14:17:33 -06:00
gibbed d420215de1 [Kernel] Allow 0 return for MmQueryAddressProtect. 2020-12-05 14:17:19 -06:00
Radosław Gliński d2cf0167fd [XAM/User] Added flag for local profile
It should fix games where right now there is no profile found.

Example: EA Sports games
2020-12-03 01:21:33 -06:00
Gliniak c3d48eb2fa [XAM/Net] Implemented WSASetLastError 2020-11-29 10:48:29 -06:00
gibbed 215f2a340b [XAM] Ensure items returned is set in enumerate.
[XAM] Ensure items returned is set in xeXamEnumerate.
2020-11-29 02:03:44 -06:00
Joel Linn b30fcbd29a [HID] Change order to xinput, sdl, winkey 2020-11-28 14:22:50 -06:00
Joel Linn 842ac86b1f [HID] More modern c++ in SDL backend. 2020-11-28 14:22:50 -06:00
Joel Linn ff56fbdf46 [HID] Honor `is_active()` in SDL input backend. 2020-11-28 14:22:50 -06:00
Joel Linn 7931dbe180 [HID] `is_active` debugging for hid-demo. 2020-11-28 14:22:50 -06: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 5328b72268 [XAM] Split content device exports to a new file. 2020-11-27 14:19:30 -06:00
gibbed f8d663cd1e [XAM] Rename NUI export group. 2020-11-27 14:19:30 -06:00
gibbed 1481735d36 [XAM] Rework how export groups are registered. 2020-11-27 14:19:30 -06:00
gibbed 42b1427087 [XAM] Split enum exports to a new file. 2020-11-27 14:19:30 -06:00
gibbed 326220309b [x64] Handle constant in LOG2_F32/F64/V128. 2020-11-27 05:34:08 -06:00
gibbed 6c073d3c84 [HID] Add 'is active' checks to winkey input.
[HID] Add 'is active' checks to winkey input driver.
2020-11-27 05:23:21 -06:00
gibbed dd25e69e66 [HID] Pass 'is active' callback to input drivers. 2020-11-27 05:23:21 -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 e3a82e1930 [D3D12] Remove leftovers of old resolve code 2020-11-26 23:06:46 +03: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
gibbed cabd28b9bb [VFS] Fix handling of remove_all return value. 2020-11-24 02:02:49 -06:00
gibbed bda31a443e [VFS] Avoid exception on remove/remove_all. 2020-11-24 00:23:38 -06:00
gibbed 164aa8e8ca [Kernel] Scope object type enum. 2020-11-22 20:34:07 -06:00
gibbed bdeae25353 [Kernel] Add comment about Shadowrun bug.
[Kernel] Add comment about Shadowrun thread name bug and a bonus lint fix.
2020-11-22 15:49:25 -06:00
Gliniak a6868d1f8a [Memory] Removed redundant BaseHeap::IsGuestPhysicalHeap 2020-11-22 15:43:53 -06:00
Gliniak 26b0aa0cc4 [Kernel/Memory] Restrict NtVirtualMemory only to virtual memory range 2020-11-22 15:43:53 -06:00
Gliniak c071500ff4 [Base] Specify heap type on initialization 2020-11-22 15:43:53 -06:00
Triang3l 2cb7d26d62 [Android] Add a comment about pthreads dynamic loading 2020-11-23 00:42:58 +03:00
Gliniak aae292aab5 [Kernel/Memory] MmQueryAddressProtect - Check for protect_bits equals 0 2020-11-22 15:40:03 -06:00
gibbed 8749ca2260 [Kernel] Filter thread names from guest. 2020-11-22 14:54:08 -06:00
gibbed 4f25a96928 [Kernel] Overhaul Rtl time functions.
- Add date third party submodule.
- [Kernel] Add xclock.
- [Kernel] Reimplement RtlTimeToTimeFields using std::chrono/date/xclock.
- [Kernel] Reimplement RtlTimeFieldsToTime using std::chrono/date/xclock.
- Supersedes #1612.
2020-11-22 14:48:36 -06: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 432369ae84 [kernel] Define param order between compilers
Fix issue in clang where args were inverted last to first due to the way
c++ implements function calls.
The function make_tuple, being a function, has undefined ordering of
resolution of the values of its parameters `Ps(init)` and would vary
between compilers. Namely clang would resolve them in order and msvc
would resolve them in reverse order.
This normally would not matter except for the fact that init maintains
a mutable state which is affected my the order of operations:
init.ordinal is a counter and also defines where in memory a value is
stored.
The C++ standard doesn't define an order of resolution of parameters in
a function but it will define an order in a brace-initializer.
Switching make_tuple for a brace-initializer enforces an order which is
the same between all compilers (tested gcc, clang and msvc).
Prior code was written to decrement ordinal due to the reverse
traversal.
This has been switched to incrementing thanks to the in-order
traversal.
2020-11-22 13:54:00 +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
uytvbn 962b90f699 [Linux] Implement virtual memory allocation 2020-11-22 13:54:00 +03:00
Sandy Carter 5fa59fc4a9 threading_posix: don't delete thread_local thread object
Disabling on exit thread delete as it causes an assert fail.
There isn't a leak here because current_thread_ is a thread_local static.
2020-11-21 22:30:43 -06:00
Sandy Carter aa332dcc8e threading_posix: Increase stack size in test
16 KB is not enough for the linux thread to be spawned so bump up to 16MB
2020-11-21 22:30:43 -06:00
Triang3l 9f45a1f338 [Base] Use bswap_16/32/64 from byteswap.h on Linux 2020-11-21 23:54:20 +03:00
Joel Linn 923678dad7 [GPU] Add performance counter registers.
v3: Document registers referenced by D3D in `gpu.md`.
2020-11-21 21:55:52 +03:00
Joel Linn f6dc9ad517 [GPU] Skip viz-query geometry (if marked).
Document research about viz queries.

v2: Remove viz status unions and move comments to register definitions.
    Add contributors to TODOs.

v3: Comment out unused variables.
    Add TODO for correctly dropping draw calls with memexport.
    Register comment formatting.
2020-11-21 21:55:52 +03:00
Triang3l b06138b464 [GPU] Disable faceness for rectangles temporarily 2020-11-21 21:52:17 +03:00
Triang3l 48c97dd3b4 [Base] Android and Arm platform defines 2020-11-21 16:26:26 +03:00
Triang3l 00a7d1a067 [D3D12] Cleanup rasterizer state 2020-11-20 23:12:12 +03:00
Triang3l 44a3f200c3 [GPU] Rename PrimitiveTwoFaced to PrimitivePolygonal, add rects to it and ignore fill modes for non-polygons 2020-11-19 23:55:49 +03:00
Triang3l 99bb82fd1c [GPU] Separate GetHostViewportInfo X and Y bounds 2020-11-18 12:27:36 +03:00
gibbed 49dc0e9c39 [XAM] Rollup of user fixes.
- [XAM] Fix XamUserGetXUID type mask handling.
- [XAM] Fix XamGetUserName return values.
- [XAM] Fix XamGetUserName copy size.
- [XAM] Implement XamGetUserGamerTag.
- [XAM] Fix XamUserCheckPrivilege handling of all users.
- [XAM] Stub XamUserGetMembershipTier.
2020-11-17 19:58:30 -06:00
Triang3l b7ba3051f2 [Kernel] Fix null in thread affinity init + ignore affinity when less than 6 cores 2020-11-16 23:15:51 +03:00
Satori 52230fd4e8 [Base] Fix FileLogSink not writing to log file 2020-11-16 14:04:17 -06:00
Triang3l 10d7bcde93 [GPU] Viewport in draw_util with host API flexibility 2020-11-16 23:03:42 +03:00
Satori b74eac36c7 [Base] Log to stdout by default 2020-11-16 01:52:27 -06:00
Satori 446837edb1 [Base/Win] Add cvars to enable a console window to be shown with xenia 2020-11-16 01:52:27 -06:00
Satori 42b10209fe [Base] Add support for multiple log sinks in Logger 2020-11-16 01:52:27 -06:00
Sandy 36466231d0
threading test: zero initialize counter
The high performance test atomic counters need to be set to zero to have reliable results.
2020-11-16 00:13:14 -06:00
Cancerous 94b9616b3a [XAM] Raise the size of the dummy HDD to 20GB.
- [XAM] Raise the size of the dummy HDD to 20GB.
- [XAM] Rename unknown field to device_type in X_CONTENT_DEVICE_DATA.
2020-11-15 15:04:40 -06:00
Cancerous ce1a31faad [Kernel] Set flag 5 in XboxHardwareInfo.
[Kernel] Set flag 5 (indicates storage is initialized) in XboxHardwareInfo.
2020-11-15 15:04:40 -06:00
gibbed 362251df0b [Base] Fix dangling pointer in LaunchWebBrowser.
[Base] Fix dangling pointer in LaunchWebBrowser. Fixes #1614.
2020-11-15 14:36:13 -06:00
gibbed a4e5c4cecf [App] Fix dangling ptr in Discord playing update.
[App] Fix dangling pointer in Discord playing update. Fixes #1621.
2020-11-15 13:59:25 -06:00
gibbed e848a20c23 [Kernel] Allow wildcard filter to end in *. 2020-11-15 13:29:34 -06:00
gibbed 32e8b47a33 [Kernel] Enforce *. in wildcard matching. Supersedes #1675. 2020-11-15 13:24:06 -06:00
Gliniak d1f7ee3593 [Audio/XMA] Invalidate output buffer when there is no valid input buffer 2020-11-15 11:31:11 -06:00
Triang3l 91d5ba444a [Base/Kernel] Add and use truncating null-terminating string copying 2020-11-15 11:27:59 -06:00
Joel Linn 68cf47e245 [threading] Fix Fence for multiple waiting threads 2020-11-15 11:12:05 -06:00
Sandy Carter d7094fae52 [threading linux] Implement native_handle
Move wait implementation to not use native_handle.
Implement native_handle for each primitive using posix natives.
2020-11-15 11:12:05 -06:00
Sandy Carter e945a13957 [threading linux] Implement suspend count
Add suspend count to thread implementation.
Increment suspend count on suspend and decrement on resume.
Wait on suspend count to be decremented to 0.
Return suspend count on suspend and on resume before incr/decr.
Fix naming of resume suspend count to make clear that suspend count is
before incr/decr.
Add test.
2020-11-15 11:12:05 -06:00
Sandy Carter 382dd8860f [threading] Change thread names to suit pthread
Shorten names to 16.
Rename Win32 to Windowing.
Shorten GraphicsSystem thread names due to 16 length limit of pthread.
Without this change, both show up as GraphicsSystem.
Remove redundant "Worker" and "Thread" from names.
Remove redundant thread handle from thread name.
2020-11-15 11:12:05 -06:00
Sandy Carter a503b6222f [threads linux] Free and signal suspended threads
Give other threads access to initially suspended threads by signalling
conditional variable before waiting for state to be changed again.
2020-11-15 11:12:05 -06:00
Sandy Carter e11fa0372d [threading linux] Implement Signal and Wait
Add Signal abstract function to handles.
Test SignalAndWait.
2020-11-15 11:12:05 -06:00
Sandy Carter cb905fb195 [threading] Add complex wait on multiple test 2020-11-15 11:12:05 -06:00
Sandy Carter e9e269622b [threading linux] Implement TLS
Implement TLSHandle with pthread_key_t.

Test Alloc, Free, Get and Set.
2020-11-15 11:12:05 -06:00
Sandy Carter 634f87f63b [threading linux] Implement Callback Queuing
Add thread local bool for alertable state.
Use real-time event interrupt to run callback.
Fix sleep duration from miliseconds (microseconds / 1000) to seconds in sleep
command.
Add note for future implementation.

Ignore real-time event 37 in .gdbinit which is used to signal callback.

Test AlertableSleep
Test Thread QueueUserCallback.
TODO: Test alerted wait result when using IO functions.
2020-11-15 11:12:05 -06:00
Sandy Carter 4397f25325 [threading linux] Implement suspendable pthreads
Use real-time event interrupt to communicate suspend in timely manner.
Use conditional_variable to implement suspend wait and resume trigger.

Ignore real-time event 36 in .gdbinit which is used to signal suspend.

Test suspending threads.
2020-11-15 11:12:05 -06:00
Sandy Carter b2912e7891 [threading linux] Wait for thread start 2020-11-15 11:12:05 -06:00
Sandy Carter b91203a0b5 [threading linux] Implement basic Thread function
Add Basic Tests on Threads
2020-11-15 11:12:05 -06:00
Sandy Carter c2de074d5c [threading linux] Implement Timer
Test Manual Reset and Synchronization timers single threaded.
Test Cancelling timers.
Test WaitMultiple.
Ignore real-time event 35 in .gdbinit which is used to signal timer.

Callbacks don't seem to be called so testing them is difficult.
2020-11-15 11:12:05 -06:00
Sandy Carter 331bb0ea9a [threading linux] Implement Mutant
Keep track of recursive locks with owner and count of locks.
Only allow recursive locks from same thread and increment count.
Only allow first locks from when count is zero.

Test acquiring and releasing mutant on same and on different threads.
Test Release return values.
Test WaitAll and WaitAny.
2020-11-15 11:12:05 -06:00
Sandy Carter 5d0efedaf4 [threading linux] Implement Semaphore
Test acquiring and releasing semaphores on same and on different threads.
Test previous_count values.
Test WaitAll and WaitAny.

Add tests for invalid semaphore creation parameters but disactivated as
they do not pass on any platform. These should be enabled and the
implementations fixed to match documentation.
2020-11-15 11:12:05 -06:00
Sandy Carter 75d54e2fa2 [threading linux] Make PosixCondition base class
Add PosixConditionBase as base class for Waitables to use common
primitives mutex and conditional variable
Add abstract signaled() and post_execution() to use single WaitMultiple
implementation.
2020-11-15 11:12:05 -06:00
Sandy Carter 6e13a38cad [threading linux] Implement WaitMultiple
Make conditional_variable and mutex static and create generalisation of
Wait for vector of handles.
Use std::any for waitany and std::all for waitall
2020-11-15 11:12:05 -06:00
Sandy Carter 4ce9eddfb9 [threading] Test WaitAll and WaitAny with Events 2020-11-15 11:12:05 -06:00
Sandy Carter 9d20adfa77 [threading linux] Implement Events
Remove file-descriptor specific wait implementation to PosixFdHandle class
which breaks on waits of non-fd handles.
Replace with PosixConditionHandle and extend to support auto reset and
initial values.
Simplify mutex and conditional variable use with stdlib versions which
wrap these primitives but provide better C++ interface.
Test Event and Reset
2020-11-15 11:12:05 -06:00
Sandy Carter f9d708265f [threading linux] Fix events with closed handles
Linux: Remove copy and destroy call in make_unique invokation which closes
handles on all events.
Testing: Add Wait test for Events set and unset.
2020-11-15 11:12:05 -06:00
Sandy Carter 4280a6451d [threading] Simplify and test Fence
Remove atomic boolean in fence. Variable signaled_ is already protected
by mutex.
Remove wait loop with single predicate wait protected with mutex.

Add Fence Signal and Wait tests
Test signaling without waiting.
Test signaling before waiting.
Test signaling twice before waiting.
Test synchronizing threads with fence.

Few REQUIRES were used to test as there are no return codes.
A failing test may hang indefinitely or cause a segfault which would still
register as a fail.
2020-11-15 11:12:05 -06:00
Sandy Carter b5ea686475 [threading] Implement Posix HighResolutionTimer
Implement HighResolutionTimer for Posix by using native timers.
Callbacks are triggered with realtime interrupts if they are supported.
Create an enum to track user-defined interrupts as well as an initializer and
handler to register these interrupts per thread.
Add test cases for timers for both single and multiple.
Fix Sleep function to continue sleeping if interrupted by system.
Add local .gdbinit to ignore signal 34 which is used by high res timer
2020-11-15 11:12:05 -06:00
Sandy Carter d8d8a7dbb8 [threading linux] Fix nanosleep using microseconds
Add Sleep Test for 50ms.
Fix Sleep under linux that was using microseconds as nanoseconds.
Factor timespec creation to template function using div/mod and nanoseconds
from duration cast.
2020-11-15 11:12:05 -06:00
Sandy Carter 6c79c93f2b [threading] Add basic threading tests
Test logical_processor_count() 3 times to test static return value stays
correct.
Run EnableAffinityConfiguration(). No asserts possible.
Test setting thread id, test using uint32_t max to reset.
Test setting thread name. No asserts possible.
Test running MaybeYield(). No obvious more complex test case.
Test running SyncMemory(). No obvious more complex test case.
2020-11-15 11:12:05 -06:00
Triang3l 56a07c1773 [GPU] Scissor in draw_util 2020-11-15 16:34:23 +03:00
Joel Linn 06214c544a [CPU] std::sort compare: satisfy comp(a,a)==false 2020-11-14 13:30:06 -06:00
Joel Linn 8b1ebe1130 Premake: Reorder links to speed up building.
- Re-enable LTO on clang.
- Set AR on travis so it builds with LTO.
2020-11-14 13:30:06 -06:00
Sandy Carter e348cacc6d [debugging linux] Implement functions
Check TracerPid in /proc/self/status for attached debugger.
Add SIGTRAP handler to prevent signal from halting app while not running
in a debugger.
Log DebugPrint in clog (stderr).
2020-11-14 13:17:15 -06:00
Radosław Gliński f8d7652dc4
[Kernel] Remove remaining SHIM usage from xam_net (#1671) 2020-11-14 19:30:56 +03:00
Triang3l a319617185 [Kernel] Thread affinity cleanup 2020-11-14 18:09:47 +03:00
Gliniak 2dc6b0b2ad [Kernel/Thread] Added missing paramteter to KeSetAffinityThread 2020-11-14 17:48:30 +03:00
Triang3l fe9b5b4a8f [D3D12] Cleanup: remove inline 2020-11-14 17:02:09 +03:00
Triang3l 6b988d43c7 [D3D12] Cleanup: pipeline state -> pipeline, other things 2020-11-14 16:43:18 +03:00
Gliniak 87a3c5fac2 [GPU] Added Stub for Packet: PM4_WAIT_FOR_IDLE 2020-11-10 22:48:00 +03:00
Triang3l e196edc989 [Base] Use the original XEPACKEDSTRUCT/UNION names on MSVC 2020-11-08 19:41:41 +03:00
Triang3l 6ac4d3e0c9 [DXBC] Fix texture binding reference use-after-grow 2020-11-06 13:00:22 +03:00
Triang3l ae3b68c7b6 [DXBC] Fast mul path only for fully identical components because neg is post-abs 2020-10-30 22:31:30 +03:00
Triang3l feb8258a5e [DXBC] Multiplication signed zero handling 2020-10-30 22:14:38 +03:00
Triang3l 9bbe4365d1 [GPU] Fix adaptive quad tessellation inside factors 2020-10-27 21:01:55 +03:00
gibbed 2b8f347b0b [XAM] Stub xuids usage xeXamUserReadProfileSettingsEx.
[XAM] Stub valid xuids usage xeXamUserReadProfileSettingsEx.
2020-10-26 16:07:37 -05:00
Gliniak 10db913ca2 [Kernel/Xam] XNotifyGetNext - Overall improvements 2020-10-26 15:43:51 -05:00
Triang3l 445d78452f [DXBC] Pop aL on loop end 2020-10-25 19:50:24 +03:00
Triang3l ca9086f3ba [GPU] Add a comment about non-positive tessellation factors 2020-10-19 23:02:20 +03:00
Triang3l 9081046e7b [D3D12] Remove SRV[unbounded] and UAV overlap in bindless root sig 2020-10-18 22:09:08 +03:00
Triang3l fd18a97f3a [GPU] Shaders: Make label_addresses accessible to translators 2020-10-14 21:19:33 +03:00
Triang3l 7e9e37bd09 [DXBC] Remove dxbc_source_map cvar export 2020-10-08 23:08:40 +03:00
Triang3l 81bc33523a [GPU] Remove unused FinalizeTrace 2020-10-08 21:37:29 +03:00
Triang3l 603150af64 [D3D12] Minor shared memory cleanup 2020-10-07 23:16:15 +03:00
Triang3l b91c24870b [D3D12] Remove await result check in trace init - unsafe too, but not leaking 2020-10-06 22:35:43 +03:00
Triang3l 19121130a3 [GPU] SharedMemory: common sparse memory allocation 2020-10-06 21:32:44 +03:00
Triang3l 75bf2d3c7d [D3D12] Minor deferred command list refactoring 2020-10-04 21:53:52 +03:00
Triang3l 81ee7b4c39 [D3D12] Minor FINE_GRAINED_DRAW_SCOPES refactoring 2020-10-04 21:49:10 +03:00
Triang3l e0916be5cd [D3D12] Remove SHM EnsureTilesResident declaration 2020-10-03 16:15:25 +03:00
Triang3l 9f404090d3 [GPU] Split SharedMemory into common and D3D12 2020-10-03 16:13:17 +03:00
Triang3l 6cb8f0aab4 [D3D12] Nicer DeferredCommandList uintmax_t alignment 2020-10-03 14:12:30 +03:00
Triang3l 1014458783 [D3D12] Only await submission fence in one place 2020-09-29 21:17:20 +03:00
Triang3l 0156d3ef26 [D3D12] Await UpdateTileMappings when syncing with the GPU 2020-09-28 12:16:09 +03:00
Triang3l c2e8c5554d [UI] Replace ImmediateTexture handles with pointers + small cleanup 2020-09-27 16:30:53 +03:00
Triang3l f5f8714c3f [D3D12] Delayed ImmediateTexture releasing 2020-09-27 16:21:14 +03:00
Triang3l d437555036 [UI] Remove immdraw restrict_texture_samples + cleanup 2020-09-26 22:06:04 +03:00
Triang3l 18031a8f6d [D3D12] Immdraw texture upload leak fix + cleanup 2020-09-26 18:36:31 +03:00
Triang3l c218d6dc10 [D3D12] Move D3D12ImmediateTexture to D3D12ImmediateDrawer 2020-09-21 23:15:51 +03:00
Triang3l dfeeb959c3 [D3D12] Swap R/B in Capture 2020-09-21 21:56:30 +03:00
Triang3l fc55b1f81d [UI] Remove pass-unfriendly UpdateTexture of ImmediateDrawer 2020-09-20 20:34:22 +03:00
Triang3l 183c7eee2b [D3D12] Various refactoring mostly on the immediate drawer side, cache immdraw scissor, force stretch alpha to 1 2020-09-20 15:15:08 +03:00
Triang3l 6ba0620b10 [UI] Fix build error due to undeclared size_t 2020-09-18 21:20:37 +03:00
Gliniak ba565c3403 [Kernel/Usbcam] XUsbcamCreate
- Provided description to some parameters
- Provided description what function more/less should do
- Changed return code based on game behaviour
2020-09-17 23:14:33 +03:00
Triang3l 5c291d0589 [D3D12] Remove unneeded code things from pools 2020-09-17 22:55:16 +03:00
Triang3l 3236d0ae75 [D3D12] Fix DescriptorHeapPool closing comment 2020-09-17 22:01:41 +03:00
Triang3l 1ebd0067f0 [Vulkan Old] Fix build error caused by constexpr countof 2020-09-17 21:51:44 +03:00
Triang3l 7c2245bb94 [UI] Remove GraphicsUploadBufferPool double include 2020-09-17 21:39:11 +03:00
Triang3l 189a38826f [UI] UploadBufferPool common code 2020-09-17 21:37:44 +03:00
Triang3l 2cebd3cabe [D3D12] Unify UploadBufferPool page size (2 MB), add alignment parameter 2020-09-15 22:13:53 +03:00
Triang3l dfbe36a8aa [UI/D3D12] Small refactoring, allow BeginSwap to return false if no surface 2020-09-14 23:27:19 +03:00
Triang3l acb1fc059f [D3D12] Make the feature list in the log sorted again 2020-09-06 00:57:00 +03:00
Triang3l 38e0cc4941 [D3D12] Non-zeroed heaps on 2004 2020-09-06 00:52:30 +03:00
Triang3l b3f84f4a9c [GPU] Rename present_stretch to present_rescale 2020-09-05 19:34:36 +03:00
Triang3l 74804ae710 [DXBC] ROV: Fix depth being overwritten if stencil failed 2020-09-05 19:23:45 +03:00
Triang3l 0be0eb2b38 [GPU/D3D12] Letterboxing cropping to action-safe area 2020-09-05 17:47:32 +03:00
Triang3l 52efbcf741 [Memory] Fix Protect range calculation 2020-09-01 12:44:37 +03:00
Triang3l 1e9ee8f43b [D3D12] Change most subsystem pointers to references 2020-08-30 22:07:35 +03:00
Triang3l c5dd7403f0 [D3D12] Change swap chain format to BGRA 2020-08-30 18:59:53 +03:00