Commit Graph

112 Commits

Author SHA1 Message Date
Lioncache f97b2d472a VideoCommon/CommandProcessor: Pass system instance through constructor
Makes the use of the interface a little less noisy, especially given
how much of the interface depends on an instance being present.
2023-12-20 09:02:53 -05:00
Lioncache b0d244b772 VideoCommon/Fifo: Pass system instance through FifoManager constructor
Given how many member functions make use of the system instance,
it's likely just better to pass the system instance in on construction.

Makes the interface a little less noisy to use.
2023-12-18 22:03:25 -05:00
Dentomologist 3c80f821c0 Common: Convert BlockingLoop::StopMode to enum class 2023-06-12 17:12:25 -07:00
Lioncash 0888c93d48 Common: Move FPU-related helpers into Common namespace
Makes these utilities' namespace consistent with the majority of the
Common library.
2023-03-21 10:58:13 -04:00
Admiral H. Curtiss ceae4242fc
VideoCommon/Fifo: Pass Core::System to methods. 2022-12-10 17:16:26 +01:00
Admiral H. Curtiss 5624dd6d39
VideoCommon/Fifo: Refactor to class, move to Core::System. 2022-12-10 17:16:19 +01:00
Admiral H. Curtiss 839db591d9
HW/Memmap: Refactor Memory to class, move to Core::System. 2022-12-03 13:27:02 +01:00
Admiral H. Curtiss 6941d2e7e6
VideoCommon/CommandProcessor: Refactor to class, move to Core::System. 2022-11-29 08:15:01 +01:00
Admiral H. Curtiss c9558ecb4c
CoreTiming: Refactor to class. 2022-11-27 03:47:12 +01:00
Admiral H. Curtiss a36a5c1308
CoreTiming: Pass Core::System to Events. 2022-11-06 17:54:58 +01:00
Robin Kertels 779fe13e62
VideoCommon: Update EFB peek cache on draw done and tokens
Massively improves performance in Mario Galaxy on Android.
2022-10-01 18:08:38 +02:00
Dentomologist f6b9acccfc Common: Refactor PointerWrap 2022-05-25 13:06:41 -07:00
Admiral H. Curtiss 853cf4f818
Common/PointerWrap: Hide internals. 2022-04-18 03:41:14 +02:00
Pokechu22 55f8aa9921 VideoCommon/Fifo: Use GPFifo::GATHER_PIPE_SIZE instead of magic 32 2022-02-12 23:38:19 -08:00
JMC47 c18abfaecc
Merge pull request #10356 from AdmiralCurtiss/config-port-core-4
Config: Port remaining Core settings to new config system (the rest).
2022-01-11 16:08:19 -05:00
Pokechu22 44e93e91d7 Common/Assert: Switch to fmt 2022-01-09 12:43:11 -08:00
Admiral H. Curtiss c82b2dccb5
Config: Port SyncGPU settings to new config system. 2022-01-09 21:29:12 +01:00
Admiral H. Curtiss d8825f5635
Config: Port dual core setting to new config system. 2022-01-09 21:29:11 +01:00
Admiral H. Curtiss d98c6b0b1d
Config: Port GPUDeterminismMode setting to new config system. 2022-01-06 16:13:55 +01:00
Pokechu22 b5fd35f951 Refactor OpcodeDecoding and FIFO analyzer to use callbacks 2021-12-18 15:21:36 -08:00
Techjar 797d0b7b1b VI: Implement post-scanout XFB output
This adds about a frame of latency, and since most games don't change
VI registers during scanout, we can get away with outputting the XFB at
the start of scanout. WWE Crush Hour is the (only currently known)
exception, which has flickering problems when doing it this way.

This adds a path to perform the output at the end of scanout, and gates
it behind an option which defaults to using the latency-reducing
pre-scanout path.
2021-08-03 23:37:50 -04:00
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Admiral H. Curtiss 1183fb3d2d VideoCommon/Fifo: Move SConfig::GetInstance() outside the GPU loop. 2021-06-23 23:52:26 +02:00
JosJuice 8a0f5ea04a Remove all remaining volatile qualifiers 2021-05-15 09:52:04 +02:00
JosJuice b93983b50a Remove Atomic.h
The STL has everything we need nowadays.

I have tried to not alter any behavior or semantics with this
change wherever possible. In particular, WriteLow and WriteHigh
in CommandProcessor retain the ability to accidentally undo
another thread's write to the upper half or lower half
respectively. If that should be fixed, it should be done in a
separate commit for clarity. One thing did change: The places
where we were using += on a volatile variable (not an atomic
operation) are now using fetch_add (actually an atomic operation).

Tested with single core and dual core on x86-64 and AArch64.
2021-05-13 18:56:27 +02:00
Stenzek e3ac5dca32 Fifo: Run/sync with the GPU on command processor register access 2021-04-18 03:24:01 +10:00
Lioncash 3d9b2aa005 VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
2020-11-17 21:23:58 -05:00
Stenzek b26bb0605b VideoBackendBase: Do save state logic on the GPU thread 2019-07-24 04:08:25 +10:00
Techjar ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
Lioncash de9c5fd375 ConfigManager: Convert GPUDeterminismMode into an enum class
Makes the values strongly-typed and gets more identifiers out of the
global namespace.

We are forced to use anything that is not "None" to mean none, because
X11 is garbage in that it has:

\#define None 0L

Because clearly no one else will ever want to use that identifier for
anything in their own code (and is why you should prefix literally
any and all preprocessor macros you expose to library users in public
headers).
2018-06-15 14:45:30 -04:00
Lioncash 50a476c371 Assert: Uppercase assertion macros
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Stenzek c790077c13 VideoBackend: Remove PeekMessages method
The video thread and backend no longer create any windows, therefore
there will never be any messages dispatched to their thread.
2018-01-27 13:53:55 +10:00
Lioncash f6e3a39c0e CommandProcessor: Remove unnecessary include
Gets rid of some indirect inclusion.
2017-09-02 13:34:21 -04:00
Shawn Hoffman ed8f293b4f Change "blocking" BlockingLoop::Stop to give up and die after a timeout.
This fixes the global-static fifo object causing infinite hangs in some
cases. Notably, failure to initialize a graphics backend would result in
BlockingLoop::Prepare being called but never executing Run(), leaving the
object in a bad state.
2017-06-25 20:47:30 -07:00
Shawn Hoffman e6c15e993b quiet some sign-conversion-in-parameter warnings 2017-06-07 20:09:43 -07:00
Lioncash 41fbc659bf Fifo: Remove unnecessary integral casts
FIFO_SIZE is a u32, so %u can just be used instead.
2017-03-28 10:35:26 -04:00
Lioncash 62db55dee2 Fifo: const correctness
PushFifoAuxBuffer only memcpys data using ptr as the source pointer, so
it can be a pointer to const data because of that.
2017-03-26 23:08:33 -04:00
JosJuice 045de7dd26 Remove special condition for auto dual core determinism 2017-02-01 15:43:47 +01:00
degasus 3787af9ee9 CommandProcessor: Limit scope of ugly SCPFifoStruct.
It's only used as an interface between two classes. So no need to declare
it in the backend export header.
2017-01-27 19:04:56 +01:00
Jules Blok 8203ea929b BlockingLoop: Yield to UI message pump while waiting. 2016-11-11 13:37:02 +01:00
degasus 22681ad975 SyncGPU: Fix savestate. 2016-10-11 18:29:53 +02:00
anthony b427ead0cc Remove Frameskip 2016-10-08 11:49:51 -05:00
degasus 12f050bb8e Fifo: Fix SyncGPU. 2016-10-03 10:38:16 +02:00
degasus 735da0ed69 Fifo: Use SyncGPU timings for single core. 2016-09-17 16:25:13 +02:00
EmptyChaos aa16282516 Core: Change CoreTiming event key from int to EventType*
Replace 'int' keys with something that carries type information.
Performance is neutral.
2016-09-03 14:55:44 +10:00
Markus Wick 52af0770c3 Merge pull request #4141 from lioncash/vtx
VertexManagerBase: Get rid of static state
2016-08-23 07:33:25 +02:00
Markus Wick 10d20d47aa Merge pull request #4132 from lioncash/enum-fifo
Fifo: Make SyncGPUReason an enum class
2016-08-22 16:49:40 +02:00
Lioncash 1392efa91d VertexManagerBase: Get rid of static behavior 2016-08-21 23:30:38 -04:00
JosJuice 31c530c7b3 Merge pull request #3386 from lioncash/memory
Common: Namespace MemoryUtil
2016-08-19 11:04:45 +02:00
Lioncash 5635d4b709 Fifo: Make SyncGPUReason an enum class 2016-08-18 22:35:58 -04:00