Commit Graph

123 Commits

Author SHA1 Message Date
chss95cs@gmail.com
b4c175d8a3 Enable SDL_LEAN_AND_MEAN, SDL_RENDER_DISABLED, saves about 500kb in final exe
Build several projects that arent performance critical with /Os and /O1 under msvc windows
2022-09-29 07:26:38 -07:00
beeanyew
cd17f1846f [Input System] xe_mutex revert
On request from chrisps, revert xe_mutex back to xe_unlikely_mutex to avoid mutex deadlocks while initializing hid-winkey.
2022-09-18 15:18:29 +02:00
chss95cs@gmail.com
eb8154908c atomic cas use prefetchw if available
remove useless memorybarrier
remove double membarrier in wait pm4 cmd
add int64 cvar
use int64 cvar for x64 feature mask
Rework some functions that were frontend bound according to vtune placing some of their code in different noinline functions, profiling after indicating l1 cache misses decreased and perf of func increased
remove long vpinsrd dep chain code for conversion.h, instead do normal load+bswap or movbe if avail
Much faster entry table via split_map, code size could be improved though
GetResolveInfo was very large and had impact on icache, mark callees as noinline + msvc pragma optimize small
use log2 shifts instead of integer divides in memory
minor optimizations in PhysicalHeap::EnableAccessCallbacks, the majority of time in the function is spent looping, NOT calling Protect! Someone should optimize this function and rework the algo completely
remove wonky scheduling log message, it was spammy and unhelpful
lock count was unnecessary for criticalsection mutex, criticalsection is already a recursive mutex
brief notes i gotta run
2022-09-17 04:04:53 -07:00
chss95cs@gmail.com
457296850e Add OPCODE_NEGATED_MUL_ADD/OPCODE_NEGATED_MUL_SUB
Proper handling of nans for VMX max/min on x64 (minps/maxps has special behavior depending on the operand order that vmx does not have for vminfp/vmaxfp)
Add extremely unintrusive guest code profiler utilizing KUSER_SHARED systemtime. This profiler is disabled on platforms other than windows, and on windows is disabled by default by a cvar
Repurpose GUEST_SCRATCH64 stack offset to instead be for storing guest function profile times, define GUEST_SCRATCH as 0 instead, since thats already meant to be a scratch area
Fix xenia silently closing on config errors/other fatal errors by setting has_console_attached_'s default to false
Add alternative code path for guest clock that uses kusershared systemtime instead of QueryPerformanceCounter. This is way faster and I have tested it and found it to be working, but i have disabled it because i do not know how well it works on wine or on processors other than mine
Significantly reduce log spam by setting XELOGAPU and XELOGGPU to be LogLevel::Debug
Changed some LOGI to LOGD in places to reduce log spam
Mark VdSwap as kHighFrequency, it was spamming up logs
Make logging calls less intrusive for the caller by forcing the test of log level inline and moving the format/AppendLogLine stuff to an outlined cold function
Add swcache namespace for software cache operations like prefetches, streaming stores and streaming loads.
Add XE_MSVC_REORDER_BARRIER for preventing msvc from propagating a value too close to its store or from its load
Add xe_unlikely_mutex for locks we know have very little contention
add XE_HOST_CACHE_LINE_SIZE and XE_RESTRICT to platform.h
Microoptimization: Changed most uses of size_t to ring_size_t in RingBuffer, this reduces the size of the inlined ringbuffer operations slightly by eliminating rex prefixes, depending on register allocation
Add BeginPrefetchedRead to ringbuffer, which prefetches the second range if there is one according to the provided PrefetchTag
added inline_loadclock cvar, which will directly use the value of the guest clock from clock.cc in jitted guest code. off by default
change uses of GUEST_SCRATCH64 to GUEST_SCRATCH
Add fast vectorized xenos_half_to_float/xenos_float_to_half (currently resides in x64_seq_vector, move to gpu code maybe at some point)
Add fast x64 codegen for PackFloat16_4/UnpackFloat16_4. Same code can be used for Float16_2 in future commit. This should speed up some games that use these functions heavily
Remove cvar for toggling old float16 behavior
Add VRSAVE register, support mfspr/mtspr vrsave
Add cvar for toggling off codegen for trap instructions and set it to true by default.
Add specialized methods to CommandProcessor: WriteRegistersFromMem, WriteRegisterRangeFromRing, and WriteOneRegisterFromRing. These reduce the overall cost of WriteRegister
Use a fixed size vmem vector for upload ranges, realloc/memsetting on resize  in the inner loop of requestranges was showing up on the profiler (the search in requestranges itself needs work)
Rename fixed_vmem_vector to better fit xenia's naming convention
Only log unknown register writes in WriteRegister if DEBUG :/. We're stuck on MSVC with c++17 so we have no way of influencing the branch ordering for that function without profile guided optimization
Remove binding stride assert in shader_translator.cc, triangle told me its leftover ogl stuff
Mark xe::FatalError as noreturn
If a controller is not connected, delay by 1.1 seconds before checking if it has been reconnected. Asking Xinput about a controller slot that is unused is extremely slow, and XinputGetState/SetState were taking up
an enormous amount of time in profiles. this may have caused a bit of input lag
Protect accesses to input_system with a lock
Add proper handling for user_index>= 4 in XamInputGetState/SetState, properly return zeroed state in GetState
Add missing argument to NtQueryVirtualMemory_entry
Fixed RtlCompareMemoryUlong_entry, it actually does not care if the source is misaligned, and for length it aligns down
Fixed RtlUpperChar and RtlLowerChar, added a table that has their correct return values precomputed
2022-08-20 11:40:19 -07:00
Gliniak
6e1e62378f Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-07-17 21:27:52 +02:00
Triang3l
037310f8dc [Android] Unified xenia-app with windowed apps and build prerequisites 2022-07-11 21:45:57 +03:00
Gliniak
7c2cd16548 Merge remote-tracking branch 'GliniakRepo/local_multiplayer' into canary_experimental 2022-05-19 10:56:21 +02:00
Gliniak
006f3adad3 Merge remote-tracking branch 'GliniakRepo/disablePositiveVibes' into canary_pr 2022-05-19 10:03:50 +02:00
Triang3l
0590346084 [Vulkan] Add Vulkan-Headers and VMA submodules 2022-02-13 20:08:08 +03:00
Gliniak
613f5ebe02 [HID] Added option to turn off vibration 2022-02-03 09:12:31 +01:00
Gliniak
17b30be56a Added support for local multiplayer 2022-02-02 13:44:28 +01: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
617b17e25b [WinKey] Fix RThumbDown being mapped to RThumbLeft 2022-01-14 16:06:40 -06:00
Enrico Pozzobon
5e31429128 [WinKey] Rebindable keyboard controls. 2022-01-11 12:38:13 -06:00
Triang3l
6ce5330f5f [UI] Loop thread to main thread WindowedAppContext 2021-08-28 19:38:24 +03:00
Triang3l
90c4950503 [HID] Fix SDL GetKeystroke copy-paste regression 2021-07-26 10:12:17 +03:00
Triang3l
692e329e9c [Vulkan] Load Vulkan manually for more lifetime and extension control 2021-07-11 22:56:01 +03:00
Triang3l
1cf12ec70b [UI/HID] ui::VirtualKey enum 2021-07-01 23:32:26 +03: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
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
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
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
Joel Linn
41cf7c7a63 [Input] Fix doubling with any enabled.
Keystrokes from multiple backends where mixed.
Effectively doubling all keystroke inputs.
2020-07-12 08:57:21 -05:00
Joel Linn
6267c73c4c [SDL] Add global helper to setup the library.
Call to SDLHelper::Prepare() is needed before first SDL_InitSubSystem().
- Sets hints (SDL configuration vars).
- Configures logging.
2020-04-23 15:44:58 -05:00
Joel Linn
5463798631 [HID] Implement GetKeystroke() for SDL 2020-04-23 15:44:58 -05:00
Joel Linn
d7d5d92e59 [HID] Fix any poll on XInput. 2020-04-23 15:44:58 -05:00
Joel Linn
c8da7fbfe4 [HID] Optional guide button support.
Maybe this is interesting to some games.
2020-04-23 15:44:58 -05:00
Joel Linn
fc96195656 [HID] C++17-ify 2020-04-23 15:44:58 -05:00
Joel Linn
d1315438f3 [HID] Extend demo to show keystrokes. 2020-04-23 15:44:58 -05:00
Sandy Carter
c8e64da4eb filesystem: use std for PathExists
Remove custom platform implementation of `PathExists` and replace uses
with `std::filesystem::exists`.
2020-04-09 09:44:48 -05:00
Joel Linn
05a62673f7 [SDL2] Redirect log messages into our system. 2020-04-08 21:55:56 -05:00
Joel Linn
11d79c6c1c [SDL2] Remove delayed loading code. 2020-04-08 21:55:56 -05:00
Joel Linn
804384c19c [SDL2] On Win, build and link statically.
Keep using system lib dynamically on Unix.
2020-04-08 21:55:56 -05:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
Joel Linn
64f3925c7d [HID/Linux] Implement cross platform controller input using SDL2 library. 2020-02-10 13:41:19 -06:00
Joel Linn
2aa008e02e [HID] Fix Demo for XInput 2020-02-09 16:19:39 -06:00
Margen67
09e1028154 Remove (hopefully) last OpenGL leftovers & crunch
Crunch is unused.
2019-11-08 09:10:51 -08:00
gibbed
3e6c2bb47c Fix up handling of positional options in cvar handling.
- Fix up handling of positional options in cvar handling so that executables
  other than app can handle them properly.
- Fix command-line arguments for xenia-vfs-dump.
2019-08-24 07:41:55 -05:00
Jonathan Goyvaerts
81fe22f1c8 Get rid of gflags alltogether 2019-08-03 02:34:19 +02:00
Jonathan Goyvaerts
c1af632562 Replace all gflag implementations with cvar implementations 2019-08-03 02:34:07 +02:00
gibbed
1145d57007 Undo main/wWinMain changes in preparation for new method
of doing a startup AVX check.

This reverts commit 4030cff3ec.
2019-04-20 02:32:45 -05:00
gibbed
4030cff3ec - Move main, wWinMain entrypoints to their own file.
- Fix startup AVX checks.
2019-04-18 16:57:42 -05:00