Commit Graph

481 Commits

Author SHA1 Message Date
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
Joel Linn
6bd1279fc0 [Base] Forward handle=null as nullptr for win 2022-03-08 12:17:57 -06:00
Joel Linn
4ea6e45e0c [Base] Remove Sleeps from more test cases
Timing dependencies in this tests were causing spurious test failures:
- Create and Run Thread
- Test Thread QueueUserCallback

They have been largely replaced by spin waits.
2022-03-08 12:17:57 -06:00
Joel Linn
e75e0eb39c [Base] Fix Semaphore::Create invalid parameters 2022-03-08 12:17:57 -06:00
Joel Linn
bb42829308 [Base] Fix WaitMultiple on POSIX
- Never use `cond_.notify_one()` because it may wake a thread that is
  unrelated to the signalled wait handle, resulting in a lost wake and
  possible deadlock. Wait conditions are to be checked by the threads
  themselves.
- Refactor and simplify `WaitMultiple`
2022-03-08 12:17:57 -06:00
Joel Linn
ca6296089e [Base] Remove timing dependency from test
- Use atomics and spin waits to synchronize threads for tests
- Improves test stability on CI
2022-03-08 12:17:57 -06:00
Joel Linn
49efbeaca8 [Base] Add spin wait helper to threading test 2022-03-08 12:17:57 -06:00
Radosław Gliński
6b45cf8447 [Base] Match exactly when no pattern in wildcard 2022-02-17 17:38:04 -06:00
Triang3l
ba28ef9717 [Win32] Declare Windows 7-11 support in the manifest 2022-02-17 20:38:52 +03:00
Triang3l
74c109273c [UI] Add PerMonitor fallback to Windows dpiAwareness 2022-02-14 12:35:08 +03:00
Triang3l
e57db52285 [UI] Enable Windows PMv2 DPI awareness accidentally kept disabled after testing 2022-02-13 23:10:19 +03:00
Gliniak
7977d7ab98 [Base] Changed entry point to wmain for Windows
This prevents subapps from crashing when executing wmain specific functions
2022-02-01 15:50:48 -06:00
Triang3l
c6fc8f706a [Base] GetAndroidThreadJniEnv capitals, move JNI usage tips there 2022-02-01 21:33:20 +03:00
Triang3l
009f709ad4 [Base] Remove Android jfieldIDs used only once from the file scope 2022-01-31 13:00:28 +03:00
Triang3l
d998c13ee8 [Base] Explain why no Android activity in xenia-base [ci skip] 2022-01-31 12:12:57 +03:00
Triang3l
3f817fb241 [Base] Android JNIEnv attachment and LaunchWebBrowser 2022-01-30 23:35:40 +03:00
Triang3l
d2ef8d3300 [Base] Android error reporting via SIGABRT/RuntimeException 2022-01-30 18:36:11 +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
Joel Linn
dbbf401205 [Base] Align test memory 2022-01-25 12:55:10 -06:00
Joel Linn
e4ae1d8b2f [Base] Fix copy_and_swap_16_in_32_aligned 2022-01-22 16:18:54 +03:00
Joel Linn
0316d1a054 [Base] Tests for copy_and_swap_16_in_32_aligned 2022-01-22 16:18:54 +03:00
Joel Linn
4a288dc6bd [Base, aarch64] Add copy_and_swap NEON impls 2022-01-22 16:18:54 +03:00
Joel Linn
bfaad055a2 [Base] Add easier to debug copy_and_swap tests 2022-01-22 16:18:54 +03:00
gibbed
5384e0e174 [Base] Fix MICROPROFILE_PRINTF. 2022-01-11 06:09:26 -06:00
Wunkolo
13a48e13bd [Base] Add operator<< string conversion for vec128_t
This allows `catch` to print out the contents of a particular vector when diagnosing how a `REQUIRE` expression has failed.
2022-01-02 15:14:58 -06:00
Wunkolo
f645c3ba31 [Base] Fix to_hex_string out-of-indexing for vec128_t type
Trying to print five `{:08X}` when vec128_t only has four values. 🥴
2022-01-02 15:14:58 -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
Triang3l
701300e8e9 [Linux] Use sched_yield instead of the deprecated pthread_yield 2021-12-18 19:43:17 +03:00
Conrad Kramer
2962a266b5 Fix xenia-core build on macOS 2021-10-25 00:48:53 +03:00
Joel Linn
247cb91ac5 [Base] Replace GCC workaround (loop opt bug)
Previous workaround was dangerous, this one is more sane.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100801#c3
2021-09-27 13:43:57 +03:00
Triang3l
f91b895c9a [Base] Don't use raw clock where unsupported 2021-09-13 23:13:02 +03:00
Triang3l
7aeac37eb6 [Base/UI] Android globals initialization + WindowedAppContext parts 2021-09-13 23:09:28 +03:00
Triang3l
acbd22840d [Base] Android log sink + sink cleanup 2021-09-13 22:53:19 +03:00
Triang3l
6986d6c7e8 [Config] Use locale-neutral fmt instead of to_string 2021-08-28 18:26:18 -05:00
Triang3l
6ce5330f5f [UI] Loop thread to main thread WindowedAppContext 2021-08-28 19:38:24 +03:00
gibbed
ed0a15dcc8 Use AppVeyor vars for extended version info. 2021-08-18 16:44:41 -05:00
sephiroth99
4861022158 [Base] Fix fpfs with GCC/Clang
The fpfs function is using strtof to convert a string to floating point
value, but the type may be a double. Using strtof in that case won't
provide enough precision, so switch to using strtod. When the type is a
float, the double will be down-converted to the correct value.
2021-08-08 10:23:52 -05:00
Triang3l
1cf12ec70b [UI/HID] ui::VirtualKey enum 2021-07-01 23:32:26 +03:00
Joel Linn
480791a056 [Base] Implement message boxes on Linux 2021-06-29 20:41:20 -05:00
gibbed
f2a68e4b85 [Base] ByteStream assert cleanup. 2021-06-28 20:32:52 -05:00
gibbed
a12f775c23 [Base] LaunchWebBrowser now takes a string view. 2021-06-28 20:32:52 -05:00
gibbed
f4cfa65c7a [Base] Fix natvis for new endian_store. 2021-06-28 20:32:52 -05:00
gibbed
92242f3f7d [Base] Attach console on cvar help/failure.
[Base] Attempt attaching to console on cvar help/failure.
2021-06-28 11:57:06 -05:00
gibbed
80cafd9358 [Base] Clean up simple message box utility. 2021-06-28 11:57:06 -05:00
ztjohnst
bf5f700f9e [Base] Fix invalid cvar args causing silent exit.
[Base] Fix invalid cvar arguments causing Xenia to silently exit.
2021-06-28 10:31:18 -05:00
ztjohnst
a77ed6f4a7 [Base] Add ShowInfoMB / ShowErrorMB functions.
[Base] Add ShowInfoMessageBox / ShowErrorMessageBox functions.
2021-06-28 10:31:18 -05:00
ztjohnst
be1a666066 [Base] Change behavior of has_console_attached().
[Base] Change has_console_attached() so that it no longer proves true
if Xenia is launched from a Windows Terminal.
2021-06-28 10:31:18 -05:00
gibbed
5c516cc341 Add missing break in logging. 2021-06-26 12:44:21 -05:00
gibbed
6bd96a5091 Remove unconditional block in logging.
Remove unconditional block in logging. This was done so the previous
commit shows an actual useful diff.
2021-06-26 12:26:10 -05:00
gibbed
458dbba4ae Ensure that logging waits before shutting down.
- Ensure that logging waits until everything is written before shutting
  down.
- Fix a bug where a new log line would not be written until the next
  log line had been appended.
2021-06-26 12:26:10 -05:00