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.
This commit is contained in:
degasus
2014-06-05 17:55:21 +02:00
parent be1fe80bb6
commit bb2fc8ecbb
4 changed files with 30 additions and 8 deletions

View File

@ -7,6 +7,7 @@
#include <string>
#include "Common/Common.h"
#include "VideoCommon/NativeVertexFormat.h"
namespace VertexLoaderManager
{
@ -20,6 +21,8 @@ namespace VertexLoaderManager
// For debugging
void AppendListToString(std::string *dest);
NativeVertexFormat* GetNativeVertexFormat(const PortableVertexDeclaration& format, u32 components);
};
void RecomputeCachedArraybases();