aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-07-29 18:47:03 -0300
committerGitHub <noreply@github.com>2023-07-29 18:47:03 -0300
commitf95b7c58779f01d9077996da67953d8d9acd058c (patch)
treeb0be466b2e52f966620aa2e0acb4524d28da1b22 /src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs
parenteb528ae0f05f057e671eb9e92f44f1caa9bcc84b (diff)
Fix incorrect fragment origin when YNegate is enabled (#4673)1.1.970
* Fix incorrect fragment origin when YNegate is enabled * Shader cache version bump * Do not update support buffer if shader does not read gl_FragCoord * Pass unscaled viewport size to the support buffer
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs')
-rw-r--r--src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs b/src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs
index 544e689a..f392491c 100644
--- a/src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs
+++ b/src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs
@@ -98,6 +98,11 @@ namespace Ryujinx.Graphics.Gpu.Shader
public bool DualSourceBlendEnable;
/// <summary>
+ /// Indicates whether Y negate of the fragment coordinates is enabled.
+ /// </summary>
+ public bool YNegateEnabled;
+
+ /// <summary>
/// Creates a new GPU graphics state.
/// </summary>
/// <param name="earlyZForce">Early Z force enable</param>
@@ -116,7 +121,8 @@ namespace Ryujinx.Graphics.Gpu.Shader
/// <param name="hasConstantBufferDrawParameters">Indicates that the draw is writing the base vertex, base instance and draw index to Constant Buffer 0</param>
/// <param name="hasUnalignedStorageBuffer">Indicates that any storage buffer use is unaligned</param>
/// <param name="fragmentOutputTypes">Type of the fragment shader outputs</param>
- /// <param name="dualSourceBlendEnable">Type of the vertex attributes consumed by the shader</param>
+ /// <param name="dualSourceBlendEnable">Indicates whether dual source blend is enabled</param>
+ /// <param name="yNegateEnabled">Indicates whether Y negate of the fragment coordinates is enabled</param>
public GpuChannelGraphicsState(
bool earlyZForce,
PrimitiveTopology topology,
@@ -134,7 +140,8 @@ namespace Ryujinx.Graphics.Gpu.Shader
bool hasConstantBufferDrawParameters,
bool hasUnalignedStorageBuffer,
ref Array8<AttributeType> fragmentOutputTypes,
- bool dualSourceBlendEnable)
+ bool dualSourceBlendEnable,
+ bool yNegateEnabled)
{
EarlyZForce = earlyZForce;
Topology = topology;
@@ -153,6 +160,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
HasUnalignedStorageBuffer = hasUnalignedStorageBuffer;
FragmentOutputTypes = fragmentOutputTypes;
DualSourceBlendEnable = dualSourceBlendEnable;
+ YNegateEnabled = yNegateEnabled;
}
}
}