From 4770cfa920b606b1496ca9348c3dd69b476dbbbf Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 20 Apr 2021 07:33:54 -0300 Subject: Only enable clip distance if written to on shader (#2217) * Only enable clip distance if written to on shader * Signal InstanceId use through FeatureFlags * Shader cache version bump --- Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntry.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntry.cs') diff --git a/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntry.cs b/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntry.cs index f592919f..b538e2de 100644 --- a/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntry.cs +++ b/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntry.cs @@ -75,7 +75,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition programInfo.SBuffers.Count, programInfo.Textures.Count, programInfo.Images.Count, - programInfo.UsesInstanceId); + programInfo.UsesInstanceId, + programInfo.ClipDistancesWritten); CBuffers = programInfo.CBuffers.ToArray(); SBuffers = programInfo.SBuffers.ToArray(); Textures = programInfo.Textures.ToArray(); @@ -88,7 +89,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition /// A new from this instance internal ShaderProgramInfo ToShaderProgramInfo() { - return new ShaderProgramInfo(CBuffers, SBuffers, Textures, Images, Header.UsesInstanceId); + return new ShaderProgramInfo(CBuffers, SBuffers, Textures, Images, Header.UsesInstanceId, Header.ClipDistancesWritten); } /// -- cgit v1.2.3