diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-04-20 07:33:54 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-20 12:33:54 +0200 |
commit | 4770cfa920b606b1496ca9348c3dd69b476dbbbf (patch) | |
tree | 864a33b60a4bf30239e26f720026f4988e72d220 /Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs | |
parent | 89791ba68dba70999643c5d876e9329b385c6e8a (diff) |
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
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs')
-rw-r--r-- | Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs b/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs index 9b1af8fb..7f27124f 100644 --- a/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs +++ b/Ryujinx.Graphics.Gpu/Shader/Cache/Definition/HostShaderCacheEntryHeader.cs @@ -42,9 +42,14 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition public bool InUse; /// <summary> + /// Mask of clip distances that are written to on the shader. + /// </summary> + public byte ClipDistancesWritten; + + /// <summary> /// Reserved / unused. /// </summary> - public short Reserved; + public byte Reserved; /// <summary> /// Create a new host shader cache entry header. @@ -54,14 +59,21 @@ namespace Ryujinx.Graphics.Gpu.Shader.Cache.Definition /// <param name="texturesCount">Count of texture descriptors</param> /// <param name="imagesCount">Count of image descriptors</param> /// <param name="usesInstanceId">Set to true if the shader uses instance id</param> - public HostShaderCacheEntryHeader(int cBuffersCount, int sBuffersCount, int texturesCount, int imagesCount, bool usesInstanceId) : this() + public HostShaderCacheEntryHeader( + int cBuffersCount, + int sBuffersCount, + int texturesCount, + int imagesCount, + bool usesInstanceId, + byte clipDistancesWritten) : this() { - CBuffersCount = cBuffersCount; - SBuffersCount = sBuffersCount; - TexturesCount = texturesCount; - ImagesCount = imagesCount; - UsesInstanceId = usesInstanceId; - InUse = true; + CBuffersCount = cBuffersCount; + SBuffersCount = sBuffersCount; + TexturesCount = texturesCount; + ImagesCount = imagesCount; + UsesInstanceId = usesInstanceId; + ClipDistancesWritten = clipDistancesWritten; + InUse = true; } } } |