Move shader source code length adjustment to the main compilation routine

This commit is contained in:
Wojtek Figat
2021-01-05 14:25:38 +01:00
parent 6adb489276
commit 336a3bd484
3 changed files with 6 additions and 4 deletions

View File

@@ -322,8 +322,6 @@ bool ProcessShaderBase(CookAssetsStep::AssetCookData& data, ShaderAssetBase* ass
auto sourceLength = sourceChunk->Size();
Encryption::DecryptBytes((byte*)source, sourceLength);
source[sourceLength - 1] = 0;
while (sourceLength > 2 && source[sourceLength - 1] == 0)
sourceLength--;
// Init shader cache output stream
// TODO: reuse MemoryWriteStream per cooking process to reduce dynamic memory allocations