mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-12 21:59:12 +00:00
Fix oversight packing/unpacking
This commit is contained in:
parent
68378caa69
commit
33ce657f80
3 changed files with 3 additions and 3 deletions
|
@ -381,7 +381,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||||
|
|
||||||
IProgram hostProgram;
|
IProgram hostProgram;
|
||||||
|
|
||||||
if (context.Capabilities.Api == TargetApi.Vulkan)
|
if (context.Capabilities.Api == TargetApi.Vulkan || GraphicsConfig.EnableOGLSpirV)
|
||||||
{
|
{
|
||||||
ShaderSource[] shaderSources = ShaderBinarySerializer.Unpack(shaders, hostCode);
|
ShaderSource[] shaderSources = ShaderBinarySerializer.Unpack(shaders, hostCode);
|
||||||
|
|
||||||
|
|
|
@ -504,7 +504,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||||
CachedShaderProgram program = new(hostProgram, compilation.SpecializationState, compilation.Shaders);
|
CachedShaderProgram program = new(hostProgram, compilation.SpecializationState, compilation.Shaders);
|
||||||
|
|
||||||
// Vulkan's binary code is the SPIR-V used for compilation, so it is ready immediately. Other APIs get this after compilation.
|
// Vulkan's binary code is the SPIR-V used for compilation, so it is ready immediately. Other APIs get this after compilation.
|
||||||
byte[] binaryCode = _context.Capabilities.Api == TargetApi.Vulkan ? ShaderBinarySerializer.Pack(shaderSources) : null;
|
byte[] binaryCode = (_context.Capabilities.Api == TargetApi.Vulkan || GraphicsConfig.EnableOGLSpirV) ? ShaderBinarySerializer.Pack(shaderSources) : null;
|
||||||
|
|
||||||
EnqueueForValidation(new ProgramEntry(program, binaryCode, compilation.ProgramIndex, compilation.IsCompute, isBinary: false));
|
EnqueueForValidation(new ProgramEntry(program, binaryCode, compilation.ProgramIndex, compilation.IsCompute, isBinary: false));
|
||||||
}
|
}
|
||||||
|
|
|
@ -490,7 +490,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
||||||
{
|
{
|
||||||
if (_diskCacheHostStorage.CacheEnabled)
|
if (_diskCacheHostStorage.CacheEnabled)
|
||||||
{
|
{
|
||||||
byte[] binaryCode = _context.Capabilities.Api == TargetApi.Vulkan ? ShaderBinarySerializer.Pack(sources) : null;
|
byte[] binaryCode = (_context.Capabilities.Api == TargetApi.Vulkan || GraphicsConfig.EnableOGLSpirV) ? ShaderBinarySerializer.Pack(sources) : null;
|
||||||
ProgramToSave programToSave = new(program, hostProgram, binaryCode);
|
ProgramToSave programToSave = new(program, hostProgram, binaryCode);
|
||||||
|
|
||||||
_programsToSaveQueue.Enqueue(programToSave);
|
_programsToSaveQueue.Enqueue(programToSave);
|
||||||
|
|
Loading…
Reference in a new issue