dolphin/Source/Core/VideoCommon
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
..
AVIDump.cpp Change libav* autodetection to support framedumping on Ubuntu 14.04 2014-07-13 23:06:20 +02:00
AVIDump.h AVIDump: cleanup 2014-06-27 19:48:35 +02:00
BPFunctions.cpp Removed warnings by assigning to bool 2014-08-16 14:16:10 -05:00
BPFunctions.h BPStructs: Consistently put the two shared copy args first 2014-05-20 11:28:15 -04:00
BPMemory.cpp BPStructs: Move LoadBPReg here 2014-05-20 11:28:14 -04:00
BPMemory.h VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
BPStructs.cpp msvc: resolve all warnings in VideoCommon. 2014-08-19 22:33:46 -07:00
BPStructs.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
CMakeLists.txt Add the VideoCommon PostProcessing class. 2014-08-13 01:05:10 -05:00
CommandProcessor.cpp Refactor SetCpStatus into two functions for from-GPU and from-CPU mode rather than a boolean parameter. 2014-08-26 12:43:39 -04:00
CommandProcessor.h Refactor SetCpStatus into two functions for from-GPU and from-CPU mode rather than a boolean parameter. 2014-08-26 12:43:39 -04:00
ConstantManager.h LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
CPMemory.cpp Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
CPMemory.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
DataReader.h remove unused globals 2014-07-11 16:10:20 +02:00
Debugger.cpp Core: Remove UpdateFPSDisplay 2014-08-19 10:05:58 -04:00
Debugger.h Kill off some usages of c_str. 2014-03-14 13:51:23 -04:00
DriverDetails.cpp Qualcomm fixed screen rotation in their latest v66 development drivers. 2014-08-18 00:17:09 -05:00
DriverDetails.h Qualcomm fixed screen rotation in their latest v66 development drivers. 2014-08-18 00:17:09 -05:00
Fifo.cpp Refactor opcode decoding a bit to kill FifoCommandRunnable. 2014-09-01 14:35:23 -04:00
Fifo.h mark all local functions as static 2014-07-11 16:07:23 +02:00
FPSCounter.cpp FPSCounter: Initialize members. 2014-07-26 14:37:18 +02:00
FPSCounter.h FPSCounter: Remove redundant destructor. 2014-07-18 12:49:40 +02:00
FramebufferManagerBase.cpp Remove the 3D Vision hack. 2014-07-26 12:45:10 +02:00
FramebufferManagerBase.h clang-modernize -use-nullptr 2014-03-09 21:14:26 +01:00
HiresTextures.cpp msvc: resolve all warnings in VideoCommon. 2014-08-19 22:33:46 -07:00
HiresTextures.h Kill off some usages of c_str. 2014-03-14 13:51:23 -04:00
ImageWrite.cpp VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
ImageWrite.h Kill off replaceable usages of s[n]printf. 2014-06-18 19:53:38 -04:00
IndexGenerator.cpp Video backends: warn on usage of GL_DRAW_QUADS_2. 2014-05-17 11:55:32 -07:00
IndexGenerator.h Video backends: warn on usage of GL_DRAW_QUADS_2. 2014-05-17 11:55:32 -07:00
LightingShaderGen.h LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
LookUpTables.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
MainBase.cpp Unify three types of non-FIFO requests to the GPU thread around Common::Event and Common::Flag. 2014-08-26 12:43:39 -04:00
MainBase.h Unify three types of non-FIFO requests to the GPU thread around Common::Event and Common::Flag. 2014-08-26 12:43:39 -04:00
NativeVertexFormat.h VideoCommon: Cache native vertex formats 2014-07-04 14:39:27 +02:00
OnScreenDisplay.cpp Kill off some usages of c_str. 2014-03-14 13:51:23 -04:00
OnScreenDisplay.h Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
OpcodeDecoding.cpp Refactor opcode decoding a bit to kill FifoCommandRunnable. 2014-09-01 14:35:23 -04:00
OpcodeDecoding.h Refactor opcode decoding a bit to kill FifoCommandRunnable. 2014-09-01 14:35:23 -04:00
PerfQueryBase.cpp clang-modernize -use-nullptr 2014-03-09 21:14:26 +01:00
PerfQueryBase.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
PixelEngine.cpp Fix warnings unearthed by #579 2014-07-13 02:16:51 +02:00
PixelEngine.h Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
PixelShaderGen.cpp Support Sampler binding in the shader. 2014-07-18 17:04:03 -05:00
PixelShaderGen.h LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
PixelShaderManager.cpp msvc: resolve all warnings in VideoCommon. 2014-08-19 22:33:46 -07:00
PixelShaderManager.h PixelShader: remove the duplicated ppl constants 2014-06-19 16:33:33 +02:00
PostProcessing.cpp Revert "Catch broken configurations inside of the Post Processing shaders." 2014-08-25 14:33:41 +02:00
PostProcessing.h Revert "Catch broken configurations inside of the Post Processing shaders." 2014-08-25 14:33:41 +02:00
RenderBase.cpp Unify three types of non-FIFO requests to the GPU thread around Common::Event and Common::Flag. 2014-08-26 12:43:39 -04:00
RenderBase.h Add the PostProcessing class object to RenderBase in VideoCommon. 2014-08-13 01:05:14 -05:00
ShaderGenCommon.h LightingShader: hard code const variable 2014-06-19 16:46:53 +02:00
Statistics.cpp Statistics: Reformat stats string 2014-06-27 09:36:50 +02:00
Statistics.h VideoCommon: remove unused stats 2014-06-27 09:35:26 +02:00
TextureCacheBase.cpp VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
TextureCacheBase.h BPMemory: Expose the pixel_format and zformat fields in PE_CONTROL as enumerations. 2014-03-25 23:57:58 +01:00
TextureConversionShader.cpp Support Sampler binding in the shader. 2014-07-18 17:04:03 -05:00
TextureConversionShader.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
TextureDecoder_Generic.cpp VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
TextureDecoder_x64.cpp VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
TextureDecoder.h avoid the extern keyword in .cpp files 2014-07-11 16:10:20 +02:00
VertexLoader_Color.cpp avoid the extern keyword in .cpp files 2014-07-11 16:10:20 +02:00
VertexLoader_Color.h Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
VertexLoader_Normal.cpp Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
VertexLoader_Normal.h Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
VertexLoader_Position.cpp Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
VertexLoader_Position.h Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
VertexLoader_TextCoord.cpp Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
VertexLoader_TextCoord.h Get rid of C-style empty function parameter indicators 2014-08-30 15:23:48 -04:00
VertexLoader.cpp VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
VertexLoader.h Re-enable the vertex loader JIT on OS X. 2014-08-27 23:50:59 -04:00
VertexLoaderManager.cpp Refactor opcode decoding a bit to kill FifoCommandRunnable. 2014-09-01 14:35:23 -04:00
VertexLoaderManager.h Refactor opcode decoding a bit to kill FifoCommandRunnable. 2014-09-01 14:35:23 -04:00
VertexManagerBase.cpp Fix a few warnings caused by using BitField with non-typesafe functions. 2014-06-11 20:58:40 +02:00
VertexManagerBase.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
VertexShaderGen.cpp VideoCommon: Clean up brace placements 2014-08-30 18:06:45 -04:00
VertexShaderGen.h VideoCommon: Remove some unused constants from VertexShaderGen.h. 2014-07-05 23:46:07 -04:00
VertexShaderManager.cpp msvc: resolve all warnings in VideoCommon. 2014-08-19 22:33:46 -07:00
VertexShaderManager.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
VideoBackendBase.cpp clang-modernize -use-nullptr 2014-03-09 21:14:26 +01:00
VideoBackendBase.h Core: Remove UpdateFPSDisplay 2014-08-19 10:05:58 -04:00
VideoCommon.h windows: remove now-extraneous NOMINMAX and WIN32_LEAN_AND_MEAN #defines from dolphin code. 2014-08-23 10:48:48 -07:00
VideoCommon.vcxproj Merge pull request #797 from shuffle2/msvc-pch 2014-08-16 14:58:28 -07:00
VideoCommon.vcxproj.filters Merge pull request #797 from shuffle2/msvc-pch 2014-08-16 14:58:28 -07:00
VideoConfig.cpp VideoConfig: Ignore Borderless Fullscreen setting when the backend does not support exclusive fullscreen. 2014-07-30 12:15:58 +02:00
VideoConfig.h VideoConfig: Ignore Borderless Fullscreen setting when the backend does not support exclusive fullscreen. 2014-07-30 12:15:58 +02:00
VideoState.cpp Convert some more header inclusions into forward declarations 2014-07-29 20:55:07 -04:00
VideoState.h Convert some more header inclusions into forward declarations 2014-07-29 20:55:07 -04:00
XFMemory.cpp Video backends: mass-replace "xfregs" with "xfmem". 2014-05-16 18:58:07 -07:00
XFMemory.h VideoCommon: use the Light struct in XF memory 2014-06-19 16:33:29 +02:00
XFStructs.cpp mark all local functions as static 2014-07-11 16:07:23 +02:00
XFStructs.h Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00