aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/IGpuAccessor.cs
blob: b2512868ea479da3502f2804936ea9df72e1e9e2 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
using System;

namespace Ryujinx.Graphics.Shader
{
    public interface IGpuAccessor
    {
        void Log(string message)
        {
            // No default log output.
        }

        uint ConstantBuffer1Read(int offset)
        {
            return 0;
        }

        ReadOnlySpan<ulong> GetCode(ulong address, int minimumSize);

        int QueryComputeLocalSizeX()
        {
            return 1;
        }

        int QueryComputeLocalSizeY()
        {
            return 1;
        }

        int QueryComputeLocalSizeZ()
        {
            return 1;
        }

        int QueryComputeLocalMemorySize()
        {
            return 0x1000;
        }

        int QueryComputeSharedMemorySize()
        {
            return 0xc000;
        }

        uint QueryConstantBufferUse()
        {
            return 0;
        }

        bool QueryHostHasFrontFacingBug()
        {
            return false;
        }

        bool QueryHostHasVectorIndexingBug()
        {
            return false;
        }

        int QueryHostStorageBufferOffsetAlignment()
        {
            return 16;
        }

        bool QueryHostSupportsBgraFormat()
        {
            return true;
        }

        bool QueryHostSupportsFragmentShaderInterlock()
        {
            return true;
        }

        bool QueryHostSupportsFragmentShaderOrderingIntel()
        {
            return false;
        }

        bool QueryHostSupportsImageLoadFormatted()
        {
            return true;
        }

        bool QueryHostSupportsNonConstantTextureOffset()
        {
            return true;
        }

        bool QueryHostSupportsShaderBallot()
        {
            return true;
        }

        bool QueryHostSupportsTextureShadowLod()
        {
            return true;
        }

        SamplerType QuerySamplerType(int handle, int cbufSlot = -1)
        {
            return SamplerType.Texture2D;
        }

        bool QueryIsTextureRectangle(int handle, int cbufSlot = -1)
        {
            return false;
        }

        InputTopology QueryPrimitiveTopology()
        {
            return InputTopology.Points;
        }

        bool QueryTessCw()
        {
            return false;
        }

        TessPatchType QueryTessPatchType()
        {
            return TessPatchType.Triangles;
        }

        TessSpacing QueryTessSpacing()
        {
            return TessSpacing.EqualSpacing;
        }

        TextureFormat QueryTextureFormat(int handle, int cbufSlot = -1)
        {
            return TextureFormat.R8G8B8A8Unorm;
        }

        bool QueryTransformFeedbackEnabled()
        {
            return false;
        }

        ReadOnlySpan<byte> QueryTransformFeedbackVaryingLocations(int bufferIndex)
        {
            return ReadOnlySpan<byte>.Empty;
        }

        int QueryTransformFeedbackStride(int bufferIndex)
        {
            return 0;
        }

        bool QueryEarlyZForce()
        {
            return false;
        }
    }
}