From f95b7c58779f01d9077996da67953d8d9acd058c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 29 Jul 2023 18:47:03 -0300 Subject: Fix incorrect fragment origin when YNegate is enabled (#4673) * 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 --- src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/Ryujinx.Graphics.Gpu/Shader/GpuChannelGraphicsState.cs') 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 @@ -97,6 +97,11 @@ namespace Ryujinx.Graphics.Gpu.Shader /// public bool DualSourceBlendEnable; + /// + /// Indicates whether Y negate of the fragment coordinates is enabled. + /// + public bool YNegateEnabled; + /// /// Creates a new GPU graphics state. /// @@ -116,7 +121,8 @@ namespace Ryujinx.Graphics.Gpu.Shader /// Indicates that the draw is writing the base vertex, base instance and draw index to Constant Buffer 0 /// Indicates that any storage buffer use is unaligned /// Type of the fragment shader outputs - /// Type of the vertex attributes consumed by the shader + /// Indicates whether dual source blend is enabled + /// Indicates whether Y negate of the fragment coordinates is enabled public GpuChannelGraphicsState( bool earlyZForce, PrimitiveTopology topology, @@ -134,7 +140,8 @@ namespace Ryujinx.Graphics.Gpu.Shader bool hasConstantBufferDrawParameters, bool hasUnalignedStorageBuffer, ref Array8 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; } } } -- cgit v1.2.3