summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexLoaderManager.cpp
AgeCommit message (Collapse)Author
2019-12-05VideoCommon/IndexGenerator: Eliminate static stateLioncash
Now that we've extracted all of the stateless functions that can be hidden, it's time to make the index generator a regular class with active data members. This can just be a member that sits within the vertex manager base class. By deglobalizing the state of the index generator we also get rid of the wonky dual-initializing that was going on within the OpenGL backend. Since the renderer is always initialized before the vertex manager, we now only call Init() once throughout the execution lifecycle.
2019-07-10VideoCommon/Statistics: Rename stats global to g_statsLioncash
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.
2019-07-10VideoCommon/Statistics: Normalize statistic variable namesLioncash
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.
2019-06-01Common/CommonFuncs: Remove now-unneccessary ArraySize functionLioncash
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.
2019-05-31VideoCommon: Constrain the array_base registersbooto
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.
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2019-02-19Move most backend functionality to VideoCommonStenzek
2018-03-14Assert: Uppercase assertion macrosLioncash
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).
2017-07-30Vulkan: Uber shader supportStenzek
2017-07-30ShaderGen: Implement vertex ubershadersStenzek
2017-07-30VertexLoaderManager: Add methods to generate "uber" vertex formatsStenzek
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-05-18Remove D3D12Helios747
2017-03-26VertexLoaderManager: Return debug strings by valueLioncash
This also renames AppendListToString to VertexLoadersToString.
2017-03-26VertexLoaderBase: Return debug strings by valueLioncash
An out parameter for this sort of thing is a C++03 hold-over. This also renames AppendToString to ToString.
2017-02-18VertexManagerBase: Make CreateNativeVertexFormat return a unique_ptrLioncash
Much safer as opposed to just returning raw allocated memory.
2016-10-08Remove Frameskipanthony
2016-09-17VertexLoaderJit: Fix out-of-bounds access for zfreeze.degasus
This fixes a GCC6.1 warning.
2016-08-21VertexManagerBase: Get rid of static behaviorLioncash
2016-06-26VideoBackends: Merge Initialize and Shutdown functions.degasus
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-02-15D3D12: Additions to VideoCommon to support D3D12 backend.hdcmeta
2016-01-31VideoCommon: Convert some DataReader includes into forward declarationsLioncash
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-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-06VideoSW: Use more VideoCommondegasus
Now we require lots of empty functions, but this removes by far more duplicated code.
2015-12-22VertexLoaderBase: Get rid of explicit delete and newLioncash
2015-11-24NativeVertexFormat: Inline Initialize in contructordegasus
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.
2015-11-02VideoCommon: VertexManager -> VertexManagerBaseTillmann Karras
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.
2015-11-01VideoCommon: flush vertex manager if components changeTillmann Karras
2015-10-22VertexLoaderManager: symbolize magic constantTillmann Karras
2015-07-08VertexLoader: avoid empty lines in perf-$pid.mapTillmann Karras
2015-06-07zfreeze: cache vertex positionsTillmann Karras
Suggested by degasus.
2015-05-30Add a dirty flag for arraybases.Scott Mansell
Only loop through and call getPointers when something has actually changed. Worth about 2-4% speedup un SMG over the previous commit.
2015-05-30Clean up cached_arraybases. Update VideoSW to new scheme.Scott Mansell
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager to better match it usage.
2015-05-29Fix invalid pointer errors in Burnout 2.Scott Mansell
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-25Merge pull request #2274 from degasus/disable_bboxRyan Houdek
Disable bbox
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-25BBox: remove now unreachable SW bbox implementationdegasus
2015-02-23Merge pull request #2050 from Tilka/reset_vertex_loader_statsskidau
VertexLoaderManager: reset stats properly
2015-02-14VertexLoaderManager: reset stats properlyTillmann Karras
2015-02-13Change RunVertices' function arguments.Ryan Houdek
This reduces some dumb state shuffling when calling the emitted vertex loaders.
2015-01-31VertexLoaderManager: assimilate GetVertexSize()Tillmann Karras
2015-01-24Stop doing nastly shit to OpenGL stream buffers.Scott Mansell
Instead we keep the loaded vertices in CPU memory.
2015-01-23Fix various issues with zfreeze implemntation.Scott Mansell
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.
2015-01-18VertexLoaderManager: make it nicer to readTillmann Karras
2015-01-03VideoCommon: fix deterministic dual coredegasus
2014-12-21VideoCommon: split VertexLoaderBase from VertexLoaderdegasus
2014-12-21VertexLoader: remove inlined gettersdegasus
They just blow up the code.
2014-12-21VideoCommon: Move NativeVertexFormat cache to VertexLoaderManagerdegasus
2014-12-21VertexLoaderUid: remove operator<degasus
Not needed for unordered map.