shader cache based by git revision

This commit is contained in:
degasus 2013-02-26 10:48:19 +01:00
parent 8b7141d3de
commit 90ff648d00
2 changed files with 9 additions and 8 deletions

View file

@ -21,11 +21,8 @@
#include "Common.h"
#include <fstream>
// Increment this every time you change shader generation code.
enum
{
LINEAR_DISKCACHE_VER = 6979
};
// defined in Version.cpp
extern const char *scm_rev_git_str;
// On disk format:
//header{
@ -187,13 +184,15 @@ private:
{
Header()
: id(*(u32*)"DCAC")
, ver(LINEAR_DISKCACHE_VER)
, key_t_size(sizeof(K))
, value_t_size(sizeof(V))
{}
{
memcpy(ver, scm_rev_git_str, 40);
}
const u32 id, ver;
const u32 id;
const u16 key_t_size, value_t_size;
char ver[40];
} m_header;

View file

@ -50,3 +50,5 @@ const char *netplay_dolphin_ver = SCM_DESC_STR " M" NP_ARCH;
#else
const char *netplay_dolphin_ver = SCM_DESC_STR " L" NP_ARCH;
#endif
const char *scm_rev_git_str = SCM_REV_STR;