| Age | Commit message (Collapse) | Author |
|
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
|
|
Normalizes all variables related to statistics so that they follow our
coding style.
These are relatively low traffic areas, so this modification isn't too
noisy.
|
|
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.
In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.
In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
|
|
The array_base registers as part of CP state do not seem to incorporate
the upper bits in the physical address they try to access.
|
|
|
|
|
|
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).
|
|
|
|
|
|
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.
|
|
|
|
This also renames AppendListToString to VertexLoadersToString.
|
|
An out parameter for this sort of thing is a C++03 hold-over. This also
renames AppendToString to ToString.
|
|
Much safer as opposed to just returning raw allocated memory.
|
|
|
|
This fixes a GCC6.1 warning.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Also remedies places where the video backends and core rely on things
being indirectly included.
|
|
Now we require lots of empty functions, but this removes by far more duplicated code.
|
|
|
|
They were only called at once, so no need to seperate them.
This also removes the only dereference of the NativeVertexFormat in VideoCommon, so backends may just return nullptr.
|
|
It may be a bit weird to see calls to static functions in
VertexManagerBase now, but at least it's easier to see what's going on.
|
|
|
|
|
|
|
|
Suggested by degasus.
|
|
Only loop through and call getPointers when something has actually
changed.
Worth about 2-4% speedup un SMG over the previous commit.
|
|
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager
to better match it usage.
|
|
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.
|
|
Disable bbox
|
|
|
|
|
|
|
|
VertexLoaderManager: reset stats properly
|
|
|
|
This reduces some dumb state shuffling when calling the emitted vertex loaders.
|
|
|
|
Instead we keep the loaded vertices in CPU memory.
|
|
Results are still not correct, but things are getting closer.
* Don't cull CULLALL primitives so early so they can be used as reference
planes.
* Convert CalculateZSlope to screenspace coordinates.
* Convert Pixelshader to screenspace coordinates (instead of worldspace
xy coordinates, which is totally wrong)
* Divide depth by 2^24 instead of clamping to 0.0-1.0 as was done
before.
Progress:
* Rouge Squadron 2/3 appear correct in game (videos in rs2 save file
selection are missing)
* Shadows draw 100% correctly in NHL 2003.
* Mario golf menu renders correctly.
* NFS: HP2, shadows sometimes render on top of car or below the road.
* Mario Tennis, courts and shadows render correctly, but at wrong depth
* Blood Omen 2, doesn't work.
|
|
|
|
|
|
|
|
They just blow up the code.
|
|
|
|
Not needed for unordered map.
|
|
They are used to remove the flush amounts, but as we don't
flush anymore on vertex loader changes (only on native
vertex format right now), this optimization is now unneeded.
This will allow us to hard code the frac factors within the
vertex loaders.
|