• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by gen_features.py using data from mtl_features.json.
3 //
4 // Copyright 2022 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // FeaturesMtl.h: Optional features for the Metal renderer.
9 
10 #ifndef ANGLE_PLATFORM_FEATURESMTL_H_
11 #define ANGLE_PLATFORM_FEATURESMTL_H_
12 
13 #include "platform/Feature.h"
14 
15 namespace angle
16 {
17 
18 struct FeaturesMtl : FeatureSetBase
19 {
20     FeaturesMtl();
21     ~FeaturesMtl();
22 
23     FeatureInfo hasBaseVertexInstancedDraw = {
24         "hasBaseVertexInstancedDraw",
25         FeatureCategory::MetalFeatures,
26         "The renderer supports base vertex instanced draw",
27         &members,
28     };
29 
30     FeatureInfo hasExplicitMemBarrier = {
31         "hasExplicitMemBarrier",
32         FeatureCategory::MetalFeatures,
33         "The renderer supports explicit memory barrier",
34         &members,
35     };
36 
37     FeatureInfo hasCheapRenderPass = {
38         "hasCheapRenderPass",
39         FeatureCategory::MetalFeatures,
40         "The renderer can cheaply break a render pass.",
41         &members,
42     };
43 
44     FeatureInfo hasNonUniformDispatch = {
45         "hasNonUniformDispatch",
46         FeatureCategory::MetalFeatures,
47         "The renderer supports non uniform compute shader dispatch's group size",
48         &members,
49     };
50 
51     FeatureInfo hasShaderStencilOutput = {
52         "hasShaderStencilOutput",
53         FeatureCategory::MetalFeatures,
54         "The renderer supports stencil output from fragment shader",
55         &members,
56     };
57 
58     FeatureInfo hasTextureSwizzle = {
59         "hasTextureSwizzle",
60         FeatureCategory::MetalFeatures,
61         "The renderer supports texture swizzle",
62         &members,
63     };
64 
65     FeatureInfo hasDepthAutoResolve = {
66         "hasDepthAutoResolve",
67         FeatureCategory::MetalFeatures,
68         "The renderer supports MSAA depth auto resolve at the end of render pass",
69         &members,
70     };
71 
72     FeatureInfo hasStencilAutoResolve = {
73         "hasStencilAutoResolve",
74         FeatureCategory::MetalFeatures,
75         "The renderer supports MSAA stencil auto resolve at the end of render pass",
76         &members,
77     };
78 
79     FeatureInfo hasEvents = {
80         "hasEvents",
81         FeatureCategory::MetalFeatures,
82         "The renderer supports MTL(Shared)Event",
83         &members,
84     };
85 
86     FeatureInfo allowInlineConstVertexData = {
87         "allowInlineConstVertexData",
88         FeatureCategory::MetalFeatures,
89         "The renderer supports using inline constant data for small client vertex data",
90         &members,
91     };
92 
93     FeatureInfo allowSeparateDepthStencilBuffers = {
94         "allowSeparateDepthStencilBuffers",
95         FeatureCategory::MetalFeatures,
96         "Some Apple platforms such as iOS allows separate depth and stencil buffers, "
97         "whereas others such as macOS don't",
98         &members,
99     };
100 
101     FeatureInfo allowRuntimeSamplerCompareMode = {
102         "allowRuntimeSamplerCompareMode",
103         FeatureCategory::MetalFeatures,
104         "The renderer supports changing sampler's compare mode outside shaders",
105         &members,
106     };
107 
108     FeatureInfo allowSamplerCompareGradient = {
109         "allowSamplerCompareGradient",
110         FeatureCategory::MetalFeatures,
111         "The renderer supports sample_compare with gradients",
112         &members,
113     };
114 
115     FeatureInfo allowSamplerCompareLod = {
116         "allowSamplerCompareLod",
117         FeatureCategory::MetalFeatures,
118         "The renderer supports sample_compare with lod",
119         &members,
120     };
121 
122     FeatureInfo allowBufferReadWrite = {
123         "allowBufferReadWrite",
124         FeatureCategory::MetalFeatures,
125         "The renderer supports buffer read and write in the same shader",
126         &members,
127     };
128 
129     FeatureInfo allowMultisampleStoreAndResolve = {
130         "allowMultisampleStoreAndResolve",
131         FeatureCategory::MetalFeatures,
132         "The renderer supports MSAA store and resolve in the same pass",
133         &members,
134     };
135 
136     FeatureInfo allowGenMultipleMipsPerPass = {
137         "allowGenMultipleMipsPerPass",
138         FeatureCategory::MetalFeatures,
139         "The renderer supports generating multiple mipmaps per pass",
140         &members,
141     };
142 
143     FeatureInfo forceD24S8AsUnsupported = {
144         "forceD24S8AsUnsupported",
145         FeatureCategory::MetalFeatures,
146         "Force Depth24Stencil8 format as unsupported.",
147         &members,
148     };
149 
150     FeatureInfo forceBufferGPUStorage = {
151         "forceBufferGPUStorage",
152         FeatureCategory::MetalFeatures,
153         "On systems that support both buffer' memory allocation on GPU and shared memory (such as "
154         "macOS), force using GPU memory allocation for buffers everytime or not.",
155         &members,
156     };
157 
158     FeatureInfo directMetalGeneration = {"directMetalGeneration", FeatureCategory::MetalFeatures,
159                                          "Direct translation to Metal.", &members,
160                                          "http://anglebug.com/5505"};
161 
162     FeatureInfo forceNonCSBaseMipmapGeneration = {
163         "forceNonCSBaseMipmapGeneration",
164         FeatureCategory::MetalFeatures,
165         "Turn this feature on to disallow Compute Shader based mipmap generation. Compute Shader "
166         "based mipmap generation might cause GPU hang on some older iOS devices.",
167         &members,
168     };
169 
170     FeatureInfo emulateTransformFeedback = {
171         "emulateTransformFeedback",
172         FeatureCategory::MetalFeatures,
173         "Turn this on to allow transform feedback in Metal using a 2-pass VS for GLES3.",
174         &members,
175     };
176 
177     FeatureInfo rewriteRowMajorMatrices = {
178         "rewriteRowMajorMatrices",
179         FeatureCategory::MetalFeatures,
180         "Rewrite row major matrices in shaders as column major.",
181         &members,
182     };
183 
184     FeatureInfo intelExplicitBoolCastWorkaround = {
185         "intelExplicitBoolCastWorkaround",
186         FeatureCategory::MetalWorkarounds,
187         "Insert explicit casts for float/double/unsigned/signed int on macOS 10.15 with Intel "
188         "driver",
189         &members,
190     };
191 
192     FeatureInfo intelDisableFastMath = {
193         "intelDisableFastMath",
194         FeatureCategory::MetalWorkarounds,
195         "Disable fast math in atan and invariance cases when running below macOS 12.0",
196         &members,
197     };
198 
199     FeatureInfo multisampleColorFormatShaderReadWorkaround = {
200         "multisampleColorFormatShaderReadWorkaround", FeatureCategory::MetalWorkarounds,
201         "Add shaderRead usage to some multisampled texture formats", &members,
202         "http://anglebug.com/7049"};
203 
204     FeatureInfo copyIOSurfaceToNonIOSurfaceForReadOptimization = {
205         "copyIOSurfaceToNonIOSurfaceForReadOptimization", FeatureCategory::MetalWorkarounds,
206         "some GPUs are faster to read an IOSurface texture by first copying the texture to a "
207         "non-IOSurface texture",
208         &members, "http://anglebug.com/7117"};
209 };
210 
211 inline FeaturesMtl::FeaturesMtl()  = default;
212 inline FeaturesMtl::~FeaturesMtl() = default;
213 
214 }  // namespace angle
215 
216 #endif  // ANGLE_PLATFORM_FEATURESMTL_H_
217