1//
2// Copyright 2019 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6// FeaturesMtl.h: Optional features for the Metal renderer.
7//
8
9#ifndef ANGLE_PLATFORM_FEATURESMTL_H_
10#define ANGLE_PLATFORM_FEATURESMTL_H_
11
12#include "platform/Feature.h"
13
14namespace angle
15{
16
17struct FeaturesMtl : FeatureSetBase
18{
19 // BaseVertex/Instanced draw support:
20 Feature hasBaseVertexInstancedDraw = {
21 "has_base_vertex_instanced_draw", FeatureCategory::MetalFeatures,
22 "The renderer supports base vertex instanced draw", &members};
23
24 // Support depth texture filtering
25 Feature hasDepthTextureFiltering = {
26 "has_depth_texture_filtering", FeatureCategory::MetalFeatures,
27 "The renderer supports depth texture's filtering other than nearest", &members};
28
29 // Non-uniform compute shader dispatch support, i.e. Group size is not necessarily to be fixed:
30 Feature hasNonUniformDispatch = {
31 "has_non_uniform_dispatch", FeatureCategory::MetalFeatures,
32 "The renderer supports non uniform compute shader dispatch's group size", &members};
33 // Texture swizzle support:
34 Feature hasTextureSwizzle = {"has_texture_swizzle", FeatureCategory::MetalFeatures,
35 "The renderer supports texture swizzle", &members};
36
37 // On macos, separate depth & stencil buffers are not supproted. However, on iOS devices,
38 // they are supproted:
39 Feature allowSeparatedDepthStencilBuffers = {
40 "allow_separate_depth_stencil_buffers", FeatureCategory::MetalFeatures,
41 "Some Apple platforms such as iOS allows separate depth & stencil buffers, "
42 "whereas others such as macOS don't",
43 &members};
44};
45
46} // namespace angle
47
48#endif // ANGLE_PLATFORM_FEATURESMTL_H_
49