Commit Graph

55 Commits

Author SHA1 Message Date
Gliniak ed843f35f8 [GPU] Added janky(?) support for register: D1MODE_V_COUNTER
Put internal_display_resolution into graphics_system

Thanks Beeanyew for initial implementation
2024-08-31 23:37:21 +02:00
NicknineTheEagle c4e930ed4c Proper 4:3 support 2024-07-01 08:55:15 +02:00
Mateusz Dukat 34ed823bfc [GPU] Change FPS limit strategy 2024-03-14 20:58:40 +01:00
chss95cs@gmail.com d372d8d5e3 nasty commit with a bunch of test code left in, will clean up and pr
Remove the logger_ != nullptr check from shouldlog, it will nearly always be true except on initialization and gets checked later anyway, this shrinks the size of the generated code for some
Select specialized vastcpy for current cpu, for now only have paths for MOVDIR64B and generic avx1
Add XE_UNLIKELY/LIKELY if, they map better to the c++ unlikely/likely attributes which we will need to use soon
Finished reimplementing STVL/STVR/LVL/LVR as their own opcodes. we now generate far less code for these instructions. this also means optimization passes can be written to simplify/remove/replace these instructions in some cases. Found that a good deal of the X86 we were emitting for these instructions was dead code or redundant.
the reduction in generated HIR/x86 should help a lot with compilation times and make function precompilation more feasible as a default

Don't static assert in default prefetch impl, in c++20 the assertion will be triggered even without an instantiation
Reorder some if/else to prod msvc into ordering the branches optimally. it somewhat worked...
Added some notes about which opcodes should be removed/refactored
Dispatch in WriteRegister via vector compares for the bounds. still not very optimal, we ought to be checking whether any register in a range may be special
A lot of work on trying to optimize writeregister, moved wraparound path into a noinline function based on profiling info
Hoist the IsUcodeAnalyzed check out of AnalyzeShader, instead check it before each call. Profiler recorded many hits in the stack frame setup of the function, but none in the actual body of it, so the check is often true but the stack frame setup is run unconditionally
Pre-check whether we're about to write a single register from a ring
Replace more jump tables from draw_util/texture_info with popcnt based sparse indexing/bit tables/shuffle lookups
Place the GPU register file on its own VAD/virtual allocation, it is no longer a member of graphics system
2022-09-04 22:42:51 -05: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
Triang3l 40ca4abc0b [GPU] Small ring buffer setup function cleanup 2021-05-04 23:13:55 +03:00
Triang3l 9a4643d0f2 [GPU] Non-ROV f24 trunc/round, host shader modifications, cache dir 2020-12-07 22:31:46 +03: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
Triang3l cde092ece1 [D3D12] Persistent shader and PSO storage 2020-03-21 19:22:19 +03:00
DrChat b5d647d540 [Vulkan] Better handling of device lost events (present fatal error dialog) 2017-12-18 14:27:00 -06:00
gibbed 082c767fba Add the currently active graphics system to the window title. 2017-08-09 00:40:44 -05:00
DrChat 070e7bf33d TraceDump: Support capturing Vulkan traces 2017-02-15 01:59:26 -06:00
Dr. Chat b66f10f2b8 Testing travis xenia powerpc testing 2017-02-06 00:40:06 -06:00
Dr. Chat 27c16b1936 GPU: Fix incorrectly calculating the primary ringbuffer's size 2016-06-16 21:30:06 -05:00
Dr. Chat 6997970d52 GraphicsSystem Save/Restore 2015-12-29 13:09:41 -08:00
Ben Vanik 6c95ca1cdb Moving graphics context creation around to hide actual creation.
Makes it easier to support APIs that don't have a concept of sharing.
2015-11-10 17:38:57 -08:00
Ben Vanik 5834a42ef3 Dependency injection for apu/gpu/hid. 2015-11-08 15:02:24 -08:00
Ben Vanik b5a18b5462 Factoring out a lot of reusable GPU code from gl4/. 2015-11-08 11:54:36 -08:00
Ben Vanik a92566dfc5 More style. 2015-08-07 21:29:03 -07:00
Ben Vanik 15c17459be Massive refactoring of xenia::ui and GL swap behavior.
This seems to dramatically improve most games (especially with
--vsync=false), though it may cause swap issues with others.
New code should be easier to port, and enables elemental-forms to be
drawn for any emulator UI.
2015-07-12 22:04:17 -07:00
Ben Vanik 9efccc5f4a Removing dependencies on MainWindow. 2015-07-01 08:02:22 -07:00
Ben Vanik 883126d497 Simplifying GPU creation.
Part of #296.
2015-06-27 09:11:03 -07:00
Ben Vanik f88bf33b4f Moving threads to XHostThread and making shutdown not crash. 2015-05-19 22:20:49 -07:00
Ben Vanik 30f7effa73 Code cleanup: removing common.h 2015-05-02 01:25:59 -07:00
Ben Vanik 727ffaa122 Various fixes and utilties. 2015-05-02 00:26:03 -07:00
Ben Vanik 41174b0e64 Hacktastic GPU trace viewer; textures, shaders, state, etc. 2015-03-01 12:26:11 -08:00
Ben Vanik 07c592942f Simple UI for frame seeking. 2015-02-21 11:19:00 -08:00
Ben Vanik 5227fe72b5 RequestSwap to force a swap from the GL thread. 2015-02-21 11:18:22 -08:00
Ben Vanik 130c11a2ca GPU recording (--trace_gpu=file) and playback (gpu-trace-viewer file). 2015-02-20 07:47:06 -08:00
Ben Vanik 29719b8f4d Cleaning up some line ending issues. 2015-02-09 14:10:23 -08:00
Ben Vanik 00e4a4fe1b Fix #include format. 2015-01-31 22:49:47 -08:00
Ben Vanik f8325512d7 GL4 command processor. 2014-12-31 19:26:54 -08:00
Ben Vanik 577ab0a4f1 Main window, empty GPU files. 2014-12-31 19:26:53 -08:00
Ben Vanik a0eebf8898 Removing old run loop/ref/core/etc. 2014-12-31 19:26:51 -08:00
Ben Vanik 244e8a8745 Removing the last of XEDECLARECLASS. 2014-08-20 22:50:10 -07:00
Ben Vanik fdab788017 Removing PAL. 2014-08-16 21:19:21 -07:00
Ben Vanik 01f0b14250 Removing xe_thread_t. 2014-08-16 01:36:45 -07:00
Ben Vanik 6e76c169d6 Proper(ish) VdSwap - fixes a bunch of things.
Caching is working a bit better, now.
2014-06-08 21:24:29 -07:00
Ben Vanik 295910c3d8 Initial refactoring of gpu/.
Runs too fast - now there are ringbuffer wrapping issues.
2014-06-08 11:23:55 -07:00
Ben Vanik 0e3854555d Pure dynamic MMIO access. Prep for more complex GPU memory management. 2014-06-01 23:36:18 -07:00
gibbed b6c831c7ec Wait for graphics driver to complete initialization before continuing. 2014-01-24 23:00:05 -08:00
Ben Vanik 7969349126 Fixing some shutdown code. 2014-01-02 18:58:44 -08:00
Ben Vanik fdb6a5cfa3 Initial Alloy implementation.
This is a regression in functionality and performance, but a much better
foundation for the future of the project (I think). It can run basic
apps under an SSA interpreter but doesn't support some of the features
required to do real 360 apps yet.
2013-12-06 22:57:16 -08:00
Ben Vanik b7ffd46319 Massive refactoring of all code + audio skeleton.
This should make it easier to find files and (in the future) split things
up into separate libraries.
It also changes around emulator initialization to make it a little more
difficult to do things out of order and a little more sensible as to when
real init work happens.
Also adding a skeleton audio system/driver and reworking CPU register
access to be more extensible.
2013-10-23 20:42:24 -07:00
Ben Vanik fbea5a6394 Making the GPU counter a vblank counter, not a timer. 2013-10-20 02:00:51 -07:00
Ben Vanik 37065255a2 Dispatching interrupts. 2013-10-19 12:50:26 -07:00
Ben Vanik 90bc6ad1a8 Interrupts fire on the right 'thread', ringbuffer work, 2013-10-19 11:50:01 -07:00
Ben Vanik cc12f0b96a Periodically fire interrupts. 2013-10-13 11:06:13 -07:00
Ben Vanik 6e4fb87992 D3D11 window up and spinning. 2013-10-11 20:23:58 -07:00
Ben Vanik 651954ccae Starting to drive command buffer actions down to a graphics driver. 2013-10-06 21:09:58 -07:00