aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenFSI.cs
blob: a3d68028f28d4e1f95f4190f355a3163b1342480 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions
{
    static class InstGenFSI
    {
        public static string FSIBegin(CodeGenContext context)
        {
            if (context.Config.GpuAccessor.QueryHostSupportsFragmentShaderInterlock())
            {
                return "beginInvocationInterlockARB()";
            }
            else if (context.Config.GpuAccessor.QueryHostSupportsFragmentShaderOrderingIntel())
            {
                return "beginFragmentShaderOrderingINTEL()";
            }

            return null;
        }

        public static string FSIEnd(CodeGenContext context)
        {
            if (context.Config.GpuAccessor.QueryHostSupportsFragmentShaderInterlock())
            {
                return "endInvocationInterlockARB()";
            }

            return null;
        }
    }
}