Blender  V3.3
mtl_capabilities.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 namespace blender {
10 namespace gpu {
11 
12 /*** Derived from: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf ***/
15 #define MTL_MAX_TEXTURE_SLOTS 128
16 #define MTL_MAX_SAMPLER_SLOTS MTL_MAX_TEXTURE_SLOTS
17 #define MTL_MAX_UNIFORM_BUFFER_BINDINGS 31
18 #define MTL_MAX_VERTEX_INPUT_ATTRIBUTES 31
19 #define MTL_MAX_UNIFORMS_PER_BLOCK 64
20 
21 /* Context-specific limits -- populated in 'MTLBackend::platform_init' */
23 
24  /* Variable Limits & feature sets. */
25  int max_color_render_targets = 4; /* Minimum = 4 */
26  int buffer_alignment_for_textures = 256; /* Upper bound = 256 bytes */
27  int minimum_buffer_offset_alignment = 256; /* Upper bound = 256 bytes */
28 
29  /* Capabilities */
32  bool supports_cubemaps = true;
37 
38  /* GPU Family */
39  bool supports_family_mac1 = false;
40  bool supports_family_mac2 = false;
43 };
44 
45 } // namespace gpu
46 } // namespace blender