|
@@ -736,6 +736,19 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|
|
return MatchesTexture(specializationState, descriptor);
|
|
return MatchesTexture(specializationState, descriptor);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Populates pipeline state that doesn't exist in older caches with default values
|
|
|
|
|
+ /// based on specialization state.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ /// <param name="pipelineState">Pipeline state to prepare</param>
|
|
|
|
|
+ private void PreparePipelineState(ref ProgramPipelineState pipelineState)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!_compute)
|
|
|
|
|
+ {
|
|
|
|
|
+ pipelineState.DepthMode = GraphicsState.DepthMode ? DepthMode.MinusOneToOne : DepthMode.ZeroToOne;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Reads shader specialization state that has been serialized.
|
|
/// Reads shader specialization state that has been serialized.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -776,6 +789,8 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|
|
{
|
|
{
|
|
|
ProgramPipelineState pipelineState = default;
|
|
ProgramPipelineState pipelineState = default;
|
|
|
dataReader.ReadWithMagicAndSize(ref pipelineState, PgpsMagic);
|
|
dataReader.ReadWithMagicAndSize(ref pipelineState, PgpsMagic);
|
|
|
|
|
+
|
|
|
|
|
+ specState.PreparePipelineState(ref pipelineState);
|
|
|
specState.PipelineState = pipelineState;
|
|
specState.PipelineState = pipelineState;
|
|
|
}
|
|
}
|
|
|
|
|
|