dolphin/Source
comex 608f9bcd67 Refactor opcode decoding a bit to kill FifoCommandRunnable.
Separated out from my gpu-determinism branch by request.  It's not a big
commit; I just like to write long commit messages.

The main reason to kill it is hopefully a slight performance improvement
from avoiding the double switch (especially in single core mode);
however, this also improves cycle calculation, as described below.

- FifoCommandRunnable is removed; in its stead, Decode returns the
number of cycles (which only matters for "sync" GPU mode), or 0 if there
was not enough data, and is also responsible for unknown opcode alerts.

Decode and DecodeSemiNop are almost identical, so the latter is replaced
with a skipped_frame parameter to Decode.  Doesn't mean we can't improve
skipped_frame mode to do less work; if, at such a point, branching on it
has too much overhead (it certainly won't now), it can always be changed
to a template parameter.

- FifoCommandRunnable used a fixed, large cycle count for display lists,
regardless of the contents.  Presumably the actual hardware's processing
time is mostly the processing time of whatever commands are in the list,
and with this change InterpretDisplayList can just return the list's
cycle count to be added to the total.  (Since the calculation for this
is part of Decode, it didn't seem easy to split this change up.)

To facilitate this, Decode also gains an explicit 'end' parameter in
lieu of FifoCommandRunnable's call to GetVideoBufferEndPtr, which can
point to there or to the end of a display list (or elsewhere in
gpu-determinism, but that's another story).  Also, as a small
optimization, InterpretDisplayList now calls OpcodeDecoder_Run rather
than having its own Decode loop, to allow Decode to be inlined (haven't
checked whether this actually happens though).

skipped_frame mode still does not traverse display lists and uses the
old fake value of 45 cycles.  degasus has suggested that this hack is
not essential for performance and can be removed, but I want to separate
any potential performance impact of that from this commit.
2014-09-01 14:35:23 -04:00
..
Android Merge pull request #902 from Sonicadvance1/android-64bit-support 2014-08-28 18:20:35 -05:00
Core Refactor opcode decoding a bit to kill FifoCommandRunnable. 2014-09-01 14:35:23 -04:00
DSPSpy Fixed issue with DSP Dump not closing files. 2014-06-23 13:08:43 -07:00
DSPTool Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
PCH Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
UnitTests UnitTests: Remove now non-existent UpdateStatusBar from StubHost. 2014-08-24 08:34:25 -04:00
VSProps Add headers required by XAudio2_7 to externals. 2014-08-23 11:03:07 -07:00
CMakeLists.txt Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00
dolphin-emu.sln Windows: Use a shared precompiled header for dolphin code under Source/ 2014-08-14 23:51:13 -07:00