aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
index b1fd6470..077ce70d 100644
--- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
+++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs
@@ -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; }
@@ -89,7 +91,7 @@ namespace Ryujinx.Graphics.Shader.Translation
return count + 1;
}
- public TextureFormat GetTextureFormat(int handle)
+ public TextureFormat GetTextureFormat(int handle, int cbufSlot = -1)
{
// When the formatted load extension is supported, we don't need to
// specify a format, we can just declare it without a format and the GPU will handle it.
@@ -98,7 +100,7 @@ namespace Ryujinx.Graphics.Shader.Translation
return TextureFormat.Unknown;
}
- var format = GpuAccessor.QueryTextureFormat(handle);
+ var format = GpuAccessor.QueryTextureFormat(handle, cbufSlot);
if (format == TextureFormat.Unknown)
{
@@ -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;