mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 05:49:34 +00:00
Save correct ConfigOptionsBitSet to shader storage header.
Fix Enabling HW Lightning with Shader Storage enabled breaks lightning #922
This commit is contained in:
parent
d8f8f587cf
commit
5fc82399bc
|
@ -387,8 +387,7 @@ void CombinerInfo::_saveShadersStorage() const
|
|||
|
||||
fout.write((char*)&ShaderStorageFormatVersion, sizeof(ShaderStorageFormatVersion));
|
||||
|
||||
const u32 optionsSet = _getConfigOptionsBitSet();
|
||||
fout.write((char*)&optionsSet, sizeof(optionsSet));
|
||||
fout.write((char*)&m_configOptionsBitSet, sizeof(m_configOptionsBitSet));
|
||||
|
||||
const char * strRenderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
||||
u32 len = strlen(strRenderer);
|
||||
|
@ -412,6 +411,7 @@ bool CombinerInfo::_loadShadersStorage()
|
|||
{
|
||||
wchar_t fileName[PLUGIN_PATH_SIZE];
|
||||
getStorageFileName(fileName);
|
||||
m_configOptionsBitSet = _getConfigOptionsBitSet();
|
||||
|
||||
#ifdef OS_WINDOWS
|
||||
std::ifstream fin(fileName, std::ofstream::binary);
|
||||
|
@ -431,7 +431,7 @@ bool CombinerInfo::_loadShadersStorage()
|
|||
|
||||
u32 optionsSet;
|
||||
fin.read((char*)&optionsSet, sizeof(optionsSet));
|
||||
if (optionsSet != _getConfigOptionsBitSet())
|
||||
if (optionsSet != m_configOptionsBitSet)
|
||||
return false;
|
||||
|
||||
const char * strRenderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
||||
|
|
|
@ -143,7 +143,12 @@ public:
|
|||
void updateParameters(OGLRender::RENDER_STATE _renderState);
|
||||
|
||||
private:
|
||||
CombinerInfo() : m_bChanged(false), m_bShaderCacheSupported(false), m_shadersLoaded(0), m_pCurrent(NULL) {}
|
||||
CombinerInfo()
|
||||
: m_bChanged(false)
|
||||
, m_bShaderCacheSupported(false)
|
||||
, m_shadersLoaded(0)
|
||||
, m_configOptionsBitSet(0)
|
||||
, m_pCurrent(NULL) {}
|
||||
CombinerInfo(const CombinerInfo &);
|
||||
|
||||
void _saveShadersStorage() const;
|
||||
|
@ -154,6 +159,7 @@ private:
|
|||
bool m_bChanged;
|
||||
bool m_bShaderCacheSupported;
|
||||
u32 m_shadersLoaded;
|
||||
u32 m_configOptionsBitSet;
|
||||
|
||||
ShaderCombiner * m_pCurrent;
|
||||
typedef std::map<u64, ShaderCombiner *> Combiners;
|
||||
|
|
Loading…
Reference in New Issue
Block a user