Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/metal/mtl_capabilities.hh
| Show All 10 Lines | |||||
| /*** Derived from: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf ***/ | /*** Derived from: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf ***/ | ||||
| /** Upper Bound/Fixed Limits **/ | /** Upper Bound/Fixed Limits **/ | ||||
| #define MTL_MAX_TEXTURE_SLOTS 128 | #define MTL_MAX_TEXTURE_SLOTS 128 | ||||
| #define MTL_MAX_SAMPLER_SLOTS MTL_MAX_TEXTURE_SLOTS | #define MTL_MAX_SAMPLER_SLOTS MTL_MAX_TEXTURE_SLOTS | ||||
| /* Max limit without using bind-less for samplers. */ | /* Max limit without using bind-less for samplers. */ | ||||
| #define MTL_MAX_DEFAULT_SAMPLERS 16 | #define MTL_MAX_DEFAULT_SAMPLERS 16 | ||||
| #define MTL_MAX_UNIFORM_BUFFER_BINDINGS 31 | /* Total maximum buffers which can be bound to an encoder, for use within a shader. | ||||
| * MTL_MAX_UNIFORM_BUFFER_BINDINGS + MTL_MAX_STORAGE_BUFFER_BINDINGS must be <= | |||||
| * than MTL_MAX_BUFFER_BINDINGS. */ | |||||
| #define MTL_MAX_BUFFER_BINDINGS 31 | |||||
| #define MTL_MAX_UNIFORM_BUFFER_BINDINGS 16 | |||||
| #define MTL_MAX_STORAGE_BUFFER_BINDINGS 12 | |||||
| #define MTL_MAX_VERTEX_INPUT_ATTRIBUTES 31 | #define MTL_MAX_VERTEX_INPUT_ATTRIBUTES 31 | ||||
| #define MTL_MAX_UNIFORMS_PER_BLOCK 64 | #define MTL_MAX_UNIFORMS_PER_BLOCK 64 | ||||
| static_assert((MTL_MAX_UNIFORM_BUFFER_BINDINGS + MTL_MAX_STORAGE_BUFFER_BINDINGS) <= | |||||
| MTL_MAX_BUFFER_BINDINGS); | |||||
| /* Context-specific limits -- populated in 'MTLBackend::platform_init' */ | /* Context-specific limits -- populated in 'MTLBackend::platform_init' */ | ||||
| struct MTLCapabilities { | struct MTLCapabilities { | ||||
| /* Variable Limits & feature sets. */ | /* Variable Limits & feature sets. */ | ||||
| int max_color_render_targets = 4; /* Minimum = 4 */ | int max_color_render_targets = 4; /* Minimum = 4 */ | ||||
| int buffer_alignment_for_textures = 256; /* Upper bound = 256 bytes */ | int buffer_alignment_for_textures = 256; /* Upper bound = 256 bytes */ | ||||
| int minimum_buffer_offset_alignment = 256; /* Upper bound = 256 bytes */ | int minimum_buffer_offset_alignment = 256; /* Upper bound = 256 bytes */ | ||||
| Show All 19 Lines | |||||