• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "description": [
3        "Copyright 2022 The ANGLE Project Authors. All rights reserved.",
4        "Use of this source code is governed by a BSD-style license that can be",
5        "found in the LICENSE file.",
6        "",
7        "mtl_features.json: Optional features for the Metal renderer."
8    ],
9    "features": [
10        {
11            "name": "has_base_vertex_instanced_draw",
12            "category": "Features",
13            "description": [
14                "The renderer supports base vertex instanced draw"
15            ]
16        },
17        {
18            "name": "has_explicit_mem_barrier",
19            "category": "Features",
20            "description": [
21                "The renderer supports explicit memory barrier"
22            ]
23        },
24        {
25            "name": "has_cheap_render_pass",
26            "category": "Features",
27            "description": [
28                "The renderer can cheaply break a render pass."
29            ]
30        },
31        {
32            "name": "has_non_uniform_dispatch",
33            "category": "Features",
34            "description": [
35                "The renderer supports non uniform compute shader dispatch's group size"
36            ]
37        },
38        {
39            "name": "has_shader_stencil_output",
40            "category": "Features",
41            "description": [
42                "The renderer supports stencil output from fragment shader"
43            ]
44        },
45        {
46            "name": "has_texture_swizzle",
47            "category": "Features",
48            "description": [
49                "The renderer supports texture swizzle"
50            ]
51        },
52        {
53            "name": "has_depth_auto_resolve",
54            "category": "Features",
55            "description": [
56                "The renderer supports MSAA depth auto resolve at the end of render pass"
57            ]
58        },
59        {
60            "name": "has_stencil_auto_resolve",
61            "category": "Features",
62            "description": [
63                "The renderer supports MSAA stencil auto resolve at the end of render pass"
64            ]
65        },
66        {
67            "name": "has_events",
68            "category": "Features",
69            "description": [
70                "The renderer supports MTL(Shared)Event"
71            ]
72        },
73        {
74            "name": "allow_inline_const_vertex_data",
75            "category": "Features",
76            "description": [
77                "The renderer supports using inline constant data for small client vertex data"
78            ]
79        },
80        {
81            "name": "allow_separate_depth_stencil_buffers",
82            "category": "Features",
83            "description": [
84                "Some Apple platforms such as iOS allows separate depth and stencil buffers, ",
85                "whereas others such as macOS don't"
86            ]
87        },
88        {
89            "name": "allow_runtime_sampler_compare_mode",
90            "category": "Features",
91            "description": [
92                "The renderer supports changing sampler's compare mode outside shaders"
93            ]
94        },
95        {
96            "name": "allow_sampler_compare_gradient",
97            "category": "Features",
98            "description": [
99                "The renderer supports sample_compare with gradients"
100            ]
101        },
102        {
103            "name": "allow_sampler_compare_lod",
104            "category": "Features",
105            "description": [
106                "The renderer supports sample_compare with lod"
107            ]
108        },
109        {
110            "name": "allow_buffer_read_write",
111            "category": "Features",
112            "description": [
113                "The renderer supports buffer read and write in the same shader"
114            ]
115        },
116        {
117            "name": "allow_multisample_store_and_resolve",
118            "category": "Features",
119            "description": [
120                "The renderer supports MSAA store and resolve in the same pass"
121            ]
122        },
123        {
124            "name": "allow_gen_multiple_mips_per_pass",
125            "category": "Features",
126            "description": [
127                "The renderer supports generating multiple mipmaps per pass"
128            ]
129        },
130        {
131            "name": "force_D24S8_as_unsupported",
132            "category": "Features",
133            "description": [
134                "Force Depth24Stencil8 format as unsupported."
135            ]
136        },
137        {
138            "name": "force_buffer_GPU_storage",
139            "category": "Features",
140            "description": [
141                "On systems that support both buffer' memory allocation on GPU and shared memory (such as ",
142                    "macOS), force using GPU memory allocation for buffers everytime or not."
143            ]
144        },
145        {
146            "name": "force_non_CS_base_mipmap_generation",
147            "category": "Features",
148            "description": [
149                "Turn this feature on to disallow Compute Shader based mipmap generation. Compute Shader ",
150                "based mipmap generation might cause GPU hang on some older iOS devices."
151            ]
152        },
153        {
154            "name": "emulate_transform_feedback",
155            "category": "Features",
156            "description": [
157                "Turn this on to allow transform feedback in Metal using a 2-pass VS for GLES3."
158            ]
159        },
160        {
161            "name": "intel_explicit_bool_cast_workaround",
162            "category": "Workarounds",
163            "description": [
164                "Insert explicit casts for float/double/unsigned/signed int on macOS 10.15 with Intel ",
165                "driver"
166            ]
167        },
168        {
169            "name": "intel_disable_fast_math",
170            "category": "Workarounds",
171            "description": [
172                "Disable fast math in atan and invariance cases when running below macOS 12.0"
173            ]
174        },
175        {
176            "name": "allow_renderpass_without_attachment",
177            "category": "Features",
178            "description": [
179                "Allow creation of render passes without any attachments"
180            ]
181        },
182        {
183            "name": "avoid_stencil_texture_swizzle",
184            "category": "Features",
185            "description": [
186                "Do not create swizzled views of stencil textures"
187            ]
188        },
189        {
190            "name": "emulate_alpha_to_coverage",
191            "category": "Workarounds",
192            "description": [
193                "Some GPUs ignore alpha-to-coverage when [[sample_mask]] is written"
194            ]
195        },
196        {
197            "name": "write_helper_sample_mask",
198            "category": "Workarounds",
199            "description": [
200                "Some GPUs produce incorrect derivatives unless [[sample_mask]] is written"
201            ]
202        },
203        {
204            "name": "pre_transform_texture_cube_grad_derivatives",
205            "category": "Workarounds",
206            "description": [
207                "Apply a vendor-specific transformation to explicit cubemap derivatives"
208            ]
209        },
210        {
211            "name": "multisample_color_format_shader_read_workaround",
212            "category": "Workarounds",
213            "description": [
214                "Add shaderRead usage to some multisampled texture formats"
215            ],
216            "issue": "http://anglebug.com/7049"
217        },
218        {
219            "name": "copy_IOSurface_to_non_IOSurface_for_read_optimization",
220            "category": "Workarounds",
221            "description": [
222                "some GPUs are faster to read an IOSurface texture by first copying the texture to a ",
223                "non-IOSurface texture"
224            ],
225            "issue": "http://anglebug.com/7117 http://anglebug.com/7573"
226        },
227        {
228            "name": "copy_texture_to_buffer_for_read_optimization",
229            "category": "Workarounds",
230            "description": [
231                "some GPUs are faster to read a texture by first copying the texture to a buffer"
232            ],
233            "issue": "http://anglebug.com/7117"
234        },
235        {
236            "name": "limit_max_draw_buffers_for_testing",
237            "category": "Features",
238            "description": [
239                "Used to check the backend works when the device's advertized limit is less than the code's limit"
240            ],
241            "issue": "http://anglebug.com/7280"
242        },
243        {
244            "name": "limit_max_color_target_bits_for_testing",
245            "category": "Features",
246            "description": [
247                "Metal iOS has a limit on the number of color target bits per pixel."
248            ],
249            "issue": "http://anglebug.com/7280"
250        },
251        {
252            "name": "preemptively_start_provoking_vertex_command_buffer",
253            "category": "Features",
254            "description": [
255                "AMD Metal Drivers appear to have a bug this works around"
256            ],
257            "issue": "http://anglebug.com/7635"
258        },
259        {
260            "name": "upload_data_to_iosurfaces_with_staging_buffers",
261            "category": "Workarounds",
262            "description": [
263                "When uploading data to IOSurface-backed textures, use a staging buffer."
264            ],
265            "issue": "http://anglebug.com/7573"
266        },
267        {
268            "name": "always_use_staged_buffer_updates",
269            "category": "Features",
270            "description": [
271                "Always update buffers by copying the data to a staging buffer and then blitting it to the actual buffer"
272            ],
273            "issue": "http://anglebug.com/7544"
274        },
275        {
276            "name": "use_shadow_buffers_when_appropriate",
277            "category": "Features",
278            "description": [
279                "On some architectures using a shadow buffer can be faster for certain size buffers"
280            ],
281            "issue": "http://anglebug.com/7544"
282        },
283        {
284            "name": "always_use_managed_storage_mode_for_buffers",
285            "category": "Features",
286            "description": [
287                "Metal buffers can be managed, shared, or private. Sometimes managed is fastest"
288            ],
289            "issue": "http://anglebug.com/7544"
290        },
291        {
292            "name": "always_use_shared_storage_mode_for_buffers",
293            "category": "Features",
294            "description": [
295                "Metal buffers can be managed, shared, or private. Sometimes shared is fastest"
296            ],
297            "issue": "http://anglebug.com/7544"
298        },
299        {
300            "name": "prefer_cpu_for_buffersubdata",
301            "category": "Features",
302            "description": [
303                "Makes bufferSubData always update via CPU"
304            ],
305            "issue": "http://anglebug.com/7544"
306        },
307        {
308            "name": "disable_programmable_blending",
309            "category": "Features",
310            "description": [
311                "Disable programmable blending in order to test read_write pixel local storage textures"
312            ],
313            "issue": "http://anglebug.com/7279"
314        },
315        {
316            "name": "disable_r_w_texture_tier2_support",
317            "category": "Features",
318            "description": [
319                "Disable tier2 read_write textures in order to test tier1 support"
320            ],
321            "issue": "http://anglebug.com/7279"
322        },
323        {
324            "name": "disable_raster_order_groups",
325            "category": "Features",
326            "description": [
327                "Disable raster order groups in order to test pixel local storage memory barriers"
328            ],
329            "issue": "http://anglebug.com/7279"
330        },
331        {
332            "name": "enable_in_memory_mtl_library_cache",
333            "category": "Features",
334            "description": [
335                "Cache MTLLibrary objects in memory."
336            ],
337            "issue": "http://crbug.com/1385510"
338        },
339        {
340            "name": "enable_parallel_mtl_library_compilation",
341            "category": "Features",
342            "description": [
343                "Compile MTLLibrary in multiple threads."
344            ],
345            "issue": "http://crbug.com/1385510"
346        },
347        {
348            "name": "always_prefer_staged_texture_uploads",
349            "category": "Features",
350            "description": [
351                "Always prefer to upload texture data via a staging buffer and avoid MTLTexture::replaceRegion."
352            ],
353            "issue": "http://crbug.com/1380790"
354        },
355        {
356            "name": "disable_staged_initialization_of_packed_texture_formats",
357            "category": "Features",
358            "description": [
359                "Staged GPU upload of some packed texture formats such as RGB9_E5 fail on Intel GPUs."
360            ],
361            "issue": "http://anglebug.com/8092"
362        },
363        {
364            "name": "compile_metal_shaders",
365            "category": "Features",
366            "description": [
367                "Compiles metal shaders using command line tools and saves to BlobCache. ",
368                "Requires using --no-sandbox and disabling enableParallelMtlLibraryCompilation."
369            ],
370            "issue": "http://crbug.com/1423136"
371        },
372        {
373            "name": "load_metal_shaders_from_blob_cache",
374            "category": "Features",
375            "description": [
376                "Loads metal shaders from blob cache. Useful if compile_metal_shaders was used to ",
377                "generate shaders."
378            ],
379            "issue": "http://crbug.com/1423136"
380        },
381        {
382            "name": "print_metal_shaders",
383            "category": "Features",
384            "description": [
385                "Prints the source to a shader before it's compiled."
386            ],
387            "issue": "http://crbug.com/1423136"
388        },
389        {
390            "name": "generate_shareable_shaders",
391            "category": "Features",
392            "description": [
393                "Attempts to generate shaders that are shareable. More specifically, shaders",
394                " end up with conditionals that are decided at run time via input parameters vs",
395                " compile time. This results in bigger shaders."
396            ],
397            "issue": "http://crbug.com/1423136"
398        },
399        {
400            "name": "disable_metal_on_nvidia",
401            "category": "Features",
402            "description": [
403                "NVIDIA GPUs are unsupported due to scarcity of the hardware."
404            ],
405            "issue": "http://anglebug.com/8170"
406        },
407        {
408            "name": "flush_after_stream_vertex_data",
409            "category": "Features",
410            "description": [
411                "Flush after calls to StreamVertexData to work around driver bugs."
412            ]
413        },
414        {
415            "name": "require_gpu_family_2",
416            "category": "Features",
417            "description": [
418                "Mac GPU Family 2 is required to support all the features of OpenGL ES 2.0"
419            ],
420            "issue": "http://anglebug.com/7952"
421        },
422        {
423            "name": "require_msl_2_1",
424            "category": "Features",
425            "description": [
426                "MSL 2.1 is required to support all the features of OpenGL ES 2.0"
427            ],
428            "issue": "http://anglebug.com/8258"
429        },
430        {
431            "name": "rescope_global_variables",
432            "category": "Features",
433            "description": [
434                "Rescope global variables that are only used in one function to be function-local."
435            ],
436            "issue": "http://anglebug.com/8311"
437        },
438        {
439            "name": "always_resolve_multisample_render_buffers",
440            "category": "Features",
441            "description": [
442                "Always automatically resolve MSAA render buffers to single sampled texture."
443            ],
444            "issue": "http://crbug.com/1486094"
445        },
446        {
447            "name": "inject_asm_statement_into_loop_bodies",
448            "category": "Features",
449            "description": [
450                "Inject asm(\"\") statements into loop bodies to force all loops to be treated as ",
451                "having side effects and not optimized out."
452            ],
453            "issue": "http://crbug.com/1513738"
454        }
455    ]
456}
457