ShaderGen: Remove virtual methods from ShaderGeneratorInterface, move string buffer to ShaderCode

This fixes the crashes occuring at startup with a non-empty shader cache.
Because LinearDiskCache reads/writes to the storage of ShaderUid, ShaderUid must be trivially copyable.
Additionally, adds a static assert to LinearDiskCache to ensure this doesn't happen in the future.

The initialization of ShaderUid data has been moved to the code generation functions, so the above condition holds true.
This commit is contained in:
Stenzek
2016-01-02 16:20:01 +10:00
parent 066af14272
commit 617f9d9532
6 changed files with 35 additions and 32 deletions

View File

@ -23,10 +23,6 @@ public:
PixelShaderUid puid;
GeometryShaderUid guid;
SHADERUID() {}
SHADERUID(const SHADERUID& r) : vuid(r.vuid), puid(r.puid), guid(r.guid) {}
bool operator <(const SHADERUID& r) const
{
if (puid < r.puid)