Commit Graph

35 Commits

Author SHA1 Message Date
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
Pokechu22 b6149623aa Remove VertexLoader::ToString 2021-05-07 15:42:13 -07:00
Pokechu22 51de3d0fd1 Refactor CP array constants slightly 2021-03-26 17:27:21 -07:00
Techjar ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
Stenzek 81b4ed2a81 Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
Stenzek 38c48ff72e VertexLoaderManager: Add methods to generate "uber" vertex formats
These vertex formats enable all attributes. Inactive attributes are set
to offset=0, and the smallest type possible. This "optimization" stops
the NV compiler from generating variants of vertex shaders.
2017-07-30 17:43:59 +10:00
Lioncash 9ebd84e54a VertexLoaderManager: Return debug strings by value
This also renames AppendListToString to VertexLoadersToString.
2017-03-26 23:50:09 -04:00
anthony b427ead0cc Remove Frameskip 2016-10-08 11:49:51 -05:00
degasus 258f48572d VertexLoaderJit: Fix out-of-bounds access for zfreeze.
This fixes a GCC6.1 warning.
2016-09-17 16:47:12 +02:00
degasus 7833ff25df VideoBackends: Merge Initialize and Shutdown functions. 2016-06-26 12:34:59 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Rohit Nirmal 14b0a9cf70 Fix building with PCH disabled. 2016-02-26 13:55:34 -06:00
hdcmeta a2e2e36745 D3D12: Additions to VideoCommon to support D3D12 backend. 2016-02-15 09:48:23 -08:00
Lioncash 1df1ba55bb VideoCommon: Convert some DataReader includes into forward declarations
Gets rid of some indirect inclusions in cpp files.
Also this will reduce the amount of rebuilt files if
changes occur in the DataReader header.
2016-01-31 15:19:20 -05:00
Lioncash d9fec92628 VideoCommon: Header cleanup
Also remedies places where the video backends and core rely on things
being indirectly included.
2016-01-17 20:11:45 -05:00
Tillmann Karras 983978ee66 VideoCommon: flush vertex manager if components change 2015-11-01 22:39:31 +01:00
Tillmann Karras 5ddd2cef6c zfreeze: cache vertex positions
Suggested by degasus.
2015-06-07 12:13:00 +02:00
Scott Mansell f57517f1a0 Clean up cached_arraybases. Update VideoSW to new scheme.
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager
to better match it usage.
2015-05-30 04:09:27 +12:00
Scott Mansell 6d916762fb Fix invalid pointer errors in Burnout 2.
Yet another story of games loading weird shit into registers.

For some reason, Burnout 2 would (in rare situations) load invalid
addresses into cp_state.array_bases. What would the real hardware
do in this situation? Who knows, Burnout 2 doesn't actually enable
the vertex array with the invalid address so nothing kinky happens.

But dolphin tries to optimise things and starts using the address
as soon as it is loaded into memory. This causes GetPointer (which is
now much more vocal) to throw an error.

The Fix:  We don't call GetPointer until we are sure the vertex array
has been enabled.
2015-05-29 18:51:17 +12:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Tillmann Karras 1aac65f988 VertexLoaderManager: assimilate GetVertexSize() 2015-01-31 09:23:50 +01:00
degasus 3fc7e55cc4 VideoCommon: clean up VertexLoader 2014-12-09 18:56:27 +01:00
degasus 21970c4a2a VideoCommon: cleanup OpcodeDecoder 2014-12-09 18:56:27 +01:00
comex e86ddacb18 Changes to allow LoadCPReg to work in a preprocess mode which affects a separate state.
This state will be used to calculate sizes for skipping over commands on
a separate thread.  An alternative to having these state variables would
be to have the preprocessor stash "state as we go" somewhere, but I
think that would be much uglier.

GetVertexSize now takes an extra argument to determine which state to
use, as does FifoCommandRunnable, which calls it.  While I'm modifying
FifoCommandRunnable, I also change it to take a buffer and size as
parameters rather than using g_pVideoData, which will also be necessary
later.  I also get rid of an unused overload.
2014-09-28 21:25:06 -04:00
Lioncash b06ec302d1 Remove some unnecessary semicolons 2014-09-11 13:05:31 -04:00
Rohit Nirmal fbc64984ca Include CommonTypes.h instead of Common.h. 2014-09-08 15:39:58 -04:00
degasus 8b84ddce9a VideoCommon: rewrite frame skipping code 2014-09-04 18:07:39 +02:00
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
Pierre Bourdon 73f9a22e2e VertexLoader: Remove global state dependency on g_nativeVertexFmt 2014-07-26 01:35:09 +02:00
degasus bb2fc8ecbb VideoCommon: Cache native vertex formats
We are used to have a 1:1 mapping of GX vertex formats and the native (OGL + D3D) ones, but there are by far more GX ones.
This new cache maps them directly so that we don't flush on GX vertex format changes as long as the native one doesn't change.

The idea is stolen from galop1n.
2014-07-04 14:39:27 +02:00
Lioncash 2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
lioncash d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
degasus 010a0d481a VideoCommon: remove Cache Displaylist
This option was known to break every second game and only boost a bit.
It also seems to be broken because of streaming into pinned memory and buffer storage buffers.

v2: also remove dlc_desc
2014-01-31 07:30:55 +01:00
Jasper St. Pierre 34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00