mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-22 22:36:25 +00:00
Set PointSize in shader on OpenGL (#6292)
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>
This commit is contained in:
parent
bd6937ae5c
commit
e59dba42ef
@ -80,9 +80,10 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||||||
return;
|
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.
|
// 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)
|
||||||
|
{
|
||||||
this.Store(StorageKind.Output, IoVariable.PointSize, null, ConstF(TranslatorContext.Definitions.PointSize));
|
this.Store(StorageKind.Output, IoVariable.PointSize, null, ConstF(TranslatorContext.Definitions.PointSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user