Commit Graph

1504 Commits

Author SHA1 Message Date
Joel Linn
15950eec37 [Base] Use chrono APIs for Timers 2022-04-26 13:56:11 -05:00
Joel Linn
23eef94984 [Base] Add chrono support
- WinSystemClock is a FILETIME clock without scaling, can convert to
  system_time
- XSystemClock is a FILTETIME clock with scaling applied, can only
  convert to WinSystemClock
2022-04-26 13:56:11 -05:00
Gliniak
3a115ae6a0 [Kernel] Restored usage of: log_string_format_kernel_calls 2022-04-14 13:48:24 -05:00
Joel Linn
7e894d10a7 [kernel] Correct status for looked up objects
- The guest will check for 0x40000000 and replace it with
  0xb7 (ERROR_ALREADY_EXISTS), which is the correct return value.
  For example, see:
  https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createmutexa
2022-03-08 12:17:57 -06:00
Joel Linn
91f4954967 [kernel] Refactor uses of attribute names 2022-03-08 12:17:57 -06:00
Joel Linn
38d589d1e0 [kernel] Remove unnecessary string copy 2022-03-08 12:17:57 -06:00
Joel Linn
986dcf4f65 [Base] Check success of sync primitive creation
- Mainly use `assert`s, since failure is very rare
- Forward failure of `CreateSemaphore` to guests because it is more easy
  to trigger with invalid initial parameters.
2022-03-08 12:17:57 -06:00
Triang3l
22eb8747d3 [GPU/Kernel] Fix space-prefixed hexadecimal number printing 2022-01-29 14:02:55 +03:00
Triang3l
fe3f0f26e4 [UI] Image post-processing and full presentation/window rework
[GPU] Add FXAA post-processing
[UI] Add FidelityFX FSR and CAS post-processing
[UI] Add blue noise dithering from 10bpc to 8bpc
[GPU] Apply the DC PWL gamma ramp closer to the spec, supporting fully white color
[UI] Allow the GPU CP thread to present on the host directly, bypassing the UI thread OS paint event
[UI] Allow variable refresh rate (or tearing)
[UI] Present the newest frame (restart) on DXGI
[UI] Replace GraphicsContext with a far more advanced Presenter with more coherent surface connection and UI overlay state management
[UI] Connect presentation to windows via the Surface class, not native window handles
[Vulkan] Switch to simpler Vulkan setup with no instance/device separation due to interdependencies and to pass fewer objects around
[Vulkan] Lower the minimum required Vulkan version to 1.0
[UI/GPU] Various cleanup, mainly ComPtr usage
[UI] Support per-monitor DPI awareness v2 on Windows
[UI] DPI-scale Dear ImGui
[UI] Replace the remaining non-detachable window delegates with unified window event and input listeners
[UI] Allow listeners to safely destroy or close the window, and to register/unregister listeners without use-after-free and the ABA problem
[UI] Explicit Z ordering of input listeners and UI overlays, top-down for input, bottom-up for drawing
[UI] Add explicit window lifecycle phases
[UI] Replace Window virtual functions with explicit desired state, its application, actual state, its feedback
[UI] GTK: Apply the initial size to the drawing area
[UI] Limit internal UI frame rate to that of the monitor
[UI] Hide the cursor using a timer instead of polling due to no repeated UI thread paints with GPU CP thread presentation, and only within the window
2022-01-29 13:22:03 +03:00
Rick Gibbed
e49916ea0a [XAM] Improvements to profile r/w setting exports
[XAM] Improvements to XamUserReadProfileSettingsEx/
XamUserWriteProfileSettings.

- Unify X_USER_READ_PROFILE_SETTING and X_USER_WRITE_PROFILE_SETTING
  into X_USER_PROFILE_SETTING.
- Clean up Setting serialization to use X_USER_PROFILE_SETTING_DATA
  instead of manual buffer copying.
- Fix XamUserReadProfileSettingsEx case where user_index is non-zero
  and xuids are being used.
- Skip unset settings in XamUserWriteProfileSettings_entry.
2022-01-24 07:29:57 -06:00
gibbed
f4d60f3fc4 [XAM] Fix xeXMsgStartIORequestEx result check. 2022-01-11 06:09:06 -06:00
gibbed
975eadf17e [Kernel] Assert export function return/arg types. 2022-01-09 14:16:37 -06:00
gibbed
12ec728989 [Kernel] Use tables for export groups. 2022-01-09 14:16:37 -06:00
gibbed
3ad0a7dab2 [Kernel] Suffix export functions with _entry. 2022-01-09 12:17:03 -06:00
gibbed
600c14b3f0 [xboxknrl] Implement ExTryToAcquireRWLShared.
[xboxknrl] Implement ExTryToAcquireReadWriteLockShared.
2022-01-07 10:22:48 -06:00
gibbed
1f9c434b5e [xboxkrnl] Implement ExAcquireRWLShared.
[xboxkrnl] Implement ExAcquireReadWriteLockShared.
2022-01-07 10:22:48 -06:00
gibbed
3162a6435c [xboxkrnl] Implement ExTryToAcquireRWLExclusive.
[xboxkrnl] Implement ExTryToAcquireReadWriteLockExclusive.
2022-01-07 10:22:48 -06:00
gibbed
e795337071 [xboxkrnl] ExReleaseReadWriteLock fixes.
[xboxkrnl] ExReleaseReadWriteLock fixes:
- Don't unncessarily double-load lock members.
- Reset readers entry count when lock count becomes negative.
- Properly decrease writers waiting count when writer event fired.
2022-01-07 10:22:48 -06:00
gibbed
b4f35635c5 [xboxkrnl] ExAcquireReadWriteLockExclusive fixes.
[xboxkrnl] ExAcquireReadWriteLockExclusive fixes:
- Don't unnecessarily double-load lock count.
- Don't release spin lock before we're done with the lock.
2022-01-07 10:22:48 -06:00
gibbed
fa774f1d86 [xboxkrnl] Fix up XexGetProcedureAddress logging.
[xboxkrnl] Fix up XexGetProcedureAddress failure logging.
2022-01-07 09:35:43 -06:00
Gliniak
20fe7bc4b7 [Kernel/XMP] Send correct notification when playback controller is changed
- Changed locked into playback_client enumerator
- Changed vague notification name to something more descriptive
2022-01-04 16:22:57 -06:00
Gliniak
1ba4fbec17 [Kernel/XMP] Remove responsibility of stopping audio when controller is changed 2022-01-04 16:22:57 -06:00
Wunkolo
1a8068b151 [Base] Add user-literals for several memory sizes
Rather than using `n * 1024 * 1024`, this adds a convenient `_MiB`/`_KiB` user-literal to the new `literals.h` header to concisely describe units of memory in a much more readable way. Any other useful literals can be added to this header. These literals exist in the `xe::literals` namespace so they are opt-in, similar to `std::chrono` literals, and require a `using namespace xe::literals` statement to utilize it within the current scope.

I've done a pass through the codebase to replace trivial instances of `1024 * 1024 * ...` expressions being used but avoided anything that added additional casting complexity from `size_t` to `uint32_t` and such to keep this commit concise.
2022-01-02 11:51:31 -06:00
Gliniak
f2c0ae46c1 [Kernel] Added missing month to RtlTimeFieldsToTime
Additionally added check for highest possible month day
2021-12-22 15:02:25 +03:00
Triang3l
fdec0ab332 [Code] Make union usage more consistent 2021-11-03 20:45:09 +03:00
Gliniak
d6660ac391 [Kernel] Added %L to formatter 2021-10-14 15:05:12 -05:00
Joel Linn
360e2f5414 [Kernel] Fix glibc exception on empty content_root 2021-09-15 15:24:21 -05:00
Triang3l
6241b4f907 [Kernel] stringstream<< > string.push_back as LLVM libc++ doesn't support char16_t stream 2021-09-12 13:04:03 +03:00
Triang3l
9d992e3d06 [Kernel] Rename sin_zero due to #define on Android 2021-09-11 23:31:52 +03:00
Triang3l
44847abb98 [Kernel] Remove a TODO for a verified reference 2021-09-07 21:12:06 +03:00
Triang3l
e720e0a540 [Code] Remove game names from code comments (most of at least) 2021-09-05 21:27:40 +03:00
Triang3l
6ce5330f5f [UI] Loop thread to main thread WindowedAppContext 2021-08-28 19:38:24 +03:00
Triang3l
f540c188bf [Lint] Revert incorrect clang-format changes 2021-08-26 21:18:18 +03:00
Triang3l
7edfdc2672 Merge branch 'master' into linux_windowing 2021-08-26 22:58:14 +03:00
Gliniak
f6f524b814 Implemented ExLoadedImageName 2021-08-18 17:37:44 -05:00
emoose
e5725b5877 [Kernel] Support XFileAlignmentInformation, stub NtDeviceIoControlFile & IoCreateDevice
XMountUtilityDrive-related code checks some values returned from NtDeviceIoControlFile, stub just returns values that it seems to accept
IoCreateDevice is also used by utility-drive code, writing some values into a pointer returned by it, so stub allocs space so it can write to the pointer without errors.
2021-08-18 17:34:59 -05:00
emoose
eaab7998f7 [Kernel/XAM] Run XAM-tasks in seperate thread, stub XamTaskShouldExit 2021-08-18 17:34:59 -05:00
Gliniak
05bfdb02e5 [XAM] Return correct error code from GetServiceInfo 2021-08-18 17:25:44 -05:00
Gliniak
f933d9c409 [XAM] XamEnumerate: Set initial item_count value to 0 2021-08-08 10:23:11 -05:00
Gliniak
c9073e101f [XAM] Fix ContentCreate to pass copy of root_name.
[XAM] Fix xeXamContentCreate to pass copy of root_name for deferred
operation, as the pointer may no longer be valid when the callback
is executed.
2021-08-01 13:55:56 -05:00
gibbed
ddee85f0be [Kernel] Fix XStaticUntypedEnumerator item count.
[Kernel] Fix XStaticUntypedEnumerator not tracking item count.

Somehow this didn't make it into PR #1862.
2021-06-30 13:26:05 -05:00
gibbed
4498a28568 [XAM] Deferred xeXamContentCreate. 2021-06-30 03:39:22 -05:00
gibbed
e8fda5878c [XAM] Enumerator improvements.
- [Kernel] XEnumerator::WriteItems no longer cares about provided
  buffer size, since we know the size when the XEnumerator was created.
- [Kernel] Added XStaticEnumerator template. Previous
  XStaticEnumerator renamed to XStaticUntypedEnumerator.
- [XAM] Deferred xeXamEnumerate.
2021-06-30 03:39:22 -05:00
gibbed
b18f73b949 [Kernel] Add make_object template. 2021-06-30 03:39:22 -05:00
emoose
e23a9b7608 [Kernel] Add APC support to NtWriteFile 2021-06-29 03:13:43 -05:00
gibbed
fb0c354b2f [xboxkrnl] Trim DbgPrint messages. 2021-06-28 20:32:52 -05:00
gibbed
a0ed4ec711 [xboxkrnl] Fix xeRtlNtStatusToDosError logging. 2021-06-28 20:32:52 -05:00
gibbed
997d0555db Lint/format .inc files. 2021-06-28 20:32:52 -05:00
gibbed
ead4818e25 [xboxkrnl] Optional string formatter logging. 2021-06-28 20:32:52 -05:00
gibbed
e84ef132ae [xboxkrnl] Log strings for string formatters. 2021-06-28 20:32:52 -05:00