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

View File

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