aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMary Guillemard <mary@mary.zone>2024-02-10 20:27:17 +0100
committerGitHub <noreply@github.com>2024-02-10 20:27:17 +0100
commite59dba42efee4b7226581fa019227c2bb44fbc6c (patch)
tree421afa19323fa1dd34fd65209616fb568bcd89db /src
parentbd6937ae5ca8bbc7c5e9b7792933d9971cf1768b (diff)
Set PointSize in shader on OpenGL (#6292)1.1.1178
Previously we were only doing it for Vulkan, but it turns out that not setting it when PROGRAM_POINT_SIZE is set is considered UB on OpenGL Core. Signed-off-by: Mary <mary@mary.zone>
Diffstat (limited to 'src')
-rw-r--r--src/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs b/src/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
index f1dffb35..e1157eea 100644
--- a/src/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
+++ b/src/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
@@ -80,9 +80,10 @@ namespace Ryujinx.Graphics.Shader.Translation
return;
}
- if (TranslatorContext.Definitions.Stage == ShaderStage.Vertex && TranslatorContext.Options.TargetApi == TargetApi.Vulkan)
+ // Vulkan requires the point size to be always written on the shader if the primitive topology is points.
+ // OpenGL requires the point size to be always written on the shader if PROGRAM_POINT_SIZE is set.
+ if (TranslatorContext.Definitions.Stage == ShaderStage.Vertex)
{
- // Vulkan requires the point size to be always written on the shader if the primitive topology is points.
this.Store(StorageKind.Output, IoVariable.PointSize, null, ConstF(TranslatorContext.Definitions.PointSize));
}