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
This commit is contained in:
@ -28,6 +28,8 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||
|
||||
public int Size { get; private set; }
|
||||
|
||||
public byte ClipDistancesWritten { get; private set; }
|
||||
|
||||
public FeatureFlags UsedFeatures { get; private set; }
|
||||
|
||||
public HashSet<int> TextureHandlesForCache { get; }
|
||||
@ -115,6 +117,11 @@ namespace Ryujinx.Graphics.Shader.Translation
|
||||
Size += size;
|
||||
}
|
||||
|
||||
public void SetClipDistanceWritten(int index)
|
||||
{
|
||||
ClipDistancesWritten |= (byte)(1 << index);
|
||||
}
|
||||
|
||||
public void SetUsedFeature(FeatureFlags flags)
|
||||
{
|
||||
UsedFeatures |= flags;
|
||||
|
Reference in New Issue
Block a user