mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-12-27 06:16:37 +01:00
Fix size of cached compute shaders (#2548)
* Fix size of cached compute shaders * Missed one
This commit is contained in:
parent
8196086f7a
commit
eb181425b1
1 changed files with 6 additions and 2 deletions
|
@ -179,7 +179,9 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
program = new ShaderProgram(entry.Header.Stage, "");
|
program = new ShaderProgram(entry.Header.Stage, "");
|
||||||
shaderProgramInfo = hostShaderEntries[0].ToShaderProgramInfo();
|
shaderProgramInfo = hostShaderEntries[0].ToShaderProgramInfo();
|
||||||
|
|
||||||
ShaderCodeHolder shader = new ShaderCodeHolder(program, shaderProgramInfo, entry.Code);
|
byte[] code = entry.Code.AsSpan().Slice(0, entry.Header.Size - entry.Header.Cb1DataSize).ToArray();
|
||||||
|
|
||||||
|
ShaderCodeHolder shader = new ShaderCodeHolder(program, shaderProgramInfo, code);
|
||||||
|
|
||||||
_cpProgramsDiskCache.Add(key, new ShaderBundle(hostProgram, shader));
|
_cpProgramsDiskCache.Add(key, new ShaderBundle(hostProgram, shader));
|
||||||
|
|
||||||
|
@ -214,7 +216,9 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
return true; // Exit early, the decoding step failed.
|
return true; // Exit early, the decoding step failed.
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderCodeHolder shader = new ShaderCodeHolder(program, shaderProgramInfo, entry.Code);
|
byte[] code = entry.Code.AsSpan().Slice(0, entry.Header.Size - entry.Header.Cb1DataSize).ToArray();
|
||||||
|
|
||||||
|
ShaderCodeHolder shader = new ShaderCodeHolder(program, shaderProgramInfo, code);
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Gpu, $"Host shader {key} got invalidated, rebuilding from guest...");
|
Logger.Info?.Print(LogClass.Gpu, $"Host shader {key} got invalidated, rebuilding from guest...");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue