You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VkBool32supportLargeQueryPools; /**< Metal allows only 8192 occlusion queries per MTLBuffer. If enabled, MoltenVK allocates a MTLBuffer for each query pool, allowing each query pool to support 8192 queries, which may slow performance or cause unexpected behaviour if the query pool is not established prior to a Metal renderpass, or if the query pool is changed within a Metal renderpass. If disabled, one MTLBuffer will be shared by all query pools, which improves performance, but limits the total device queries to 8192. Default is false. */
34
-
VkBool32imageFlipY; /**< If enabled, images will be flipped on the Y-axis, as Vulkan coordinate system is inverse of OpenGL. Default is false. */
37
+
VkBool32 debugMode; /**< If enabled, several debugging capabilities will be enabled. Shader code will be logged during Runtime Shader Conversion. Improves support for Xcode GPU Frame Capture. Default is false. */
35
38
VkBool32 shaderConversionFlipVertexY; /**< If enabled, MSL vertex shader code created during Runtime Shader Conversion will flip the Y-axis of each vertex, as Vulkan coordinate system is inverse of OpenGL. Default is true. */
36
-
VkBool32shaderConversionLogging; /**< If enabled, both SPIR-V and MSL code will be logged during Runtime Shader Conversion. Default is false. */
37
-
VkBool32performanceTracking; /**< If enabled, per-frame performance statistics are tracked, and can be retrieved via the API. Default is false. */
39
+
VkBool32 supportLargeQueryPools; /**< Metal allows only 8192 occlusion queries per MTLBuffer. If enabled, MoltenVK allocates a MTLBuffer for each query pool, allowing each query pool to support 8192 queries, which may slow performance or cause unexpected behaviour if the query pool is not established prior to a Metal renderpass, or if the query pool is changed within a Metal renderpass. If disabled, one MTLBuffer will be shared by all query pools, which improves performance, but limits the total device queries to 8192. Default is false. */
40
+
VkBool32 performanceTracking; /**< If enabled, per-frame performance statistics are tracked, optionally logged, and can be retrieved via the vkGetSwapchainPerformanceMVK() function, and various shader compilation performance statistics are tracked, logged, and can be retrieved via the vkGetShaderCompilationPerformanceMVK() function. Default is false. */
38
41
uint32_t performanceLoggingFrameCount; /**< If non-zero, performance statistics will be periodically logged to the console, on a repeating cycle of this many frames per swapchain. The performanceTracking capability must also be enabled. Default is zero, indicating no logging. */
39
42
} MVKDeviceConfiguration;
40
43
41
44
/** Features provided by the current implementation of Metal on the current device. */
42
45
typedefstruct {
43
-
VkBool32indirectDrawing; /**< Draw calls support parameters held in a GPU buffer. */
44
-
VkBool32baseVertexInstanceDrawing; /**< Draw calls support specifiying the base vertex and instance. */
45
-
VkBool32dynamicMTLBuffers; /**< Dynamic MTLBuffers supported for setting vertex, fragment, and compute bytes. */
46
-
uint32_tmaxPerStageBufferCount; /**< The total number of per-stage Metal buffers available for shader uniform content and attributes. */
47
-
uint32_tmaxPerStageTextureCount; /**< The total number of per-stage Metal textures available for shader uniform content. */
48
-
uint32_tmaxPerStageSamplerCount; /**< The total number of per-stage Metal samplers available for shader uniform content. */
49
-
VkDeviceSizemaxMTLBufferSize; /**< The max size of a MTLBuffer (in bytes). */
50
-
VkDeviceSizemtlBufferAlignment; /**< The alignment used when allocating memory for MTLBuffers. */
51
-
VkDeviceSizemaxQueryBufferSize; /**< The maximum size of an occlusion query buffer (in bytes). */
46
+
float mslVersion; /**< The version of the Metal Shading Language available on this device. */
47
+
VkBool32 indirectDrawing; /**< If true, draw calls support parameters held in a GPU buffer. */
48
+
VkBool32 baseVertexInstanceDrawing; /**< If true, draw calls support specifiying the base vertex and instance. */
49
+
VkBool32 dynamicMTLBuffers; /**< If true, dynamic MTLBuffers for setting vertex, fragment, and compute bytes are supported. */
50
+
VkBool32 shaderSpecialization; /**< If true, shader specialization (aka Metal function constants) is supported. */
51
+
VkBool32 ioSurfaces; /**< If true, VkImages can be underlaid by IOSurfaces via the vkUseIOSurfaceMVK() function, to support inter-process image transfers. */
52
+
VkBool32 texelBuffers; /**< If true, texel buffers are supported, allowing the contents of a buffer to be interpreted as an image via a VkBufferView. */
53
+
VkBool32 depthClipMode; /**< If true, the device supports both depth clipping and depth clamping per the depthClampEnable flag of VkPipelineRasterizationStateCreateInfo in VkGraphicsPipelineCreateInfo. */
54
+
uint32_t maxPerStageBufferCount; /**< The total number of per-stage Metal buffers available for shader uniform content and attributes. */
55
+
uint32_t maxPerStageTextureCount; /**< The total number of per-stage Metal textures available for shader uniform content. */
56
+
uint32_t maxPerStageSamplerCount; /**< The total number of per-stage Metal samplers available for shader uniform content. */
57
+
VkDeviceSize maxMTLBufferSize; /**< The max size of a MTLBuffer (in bytes). */
58
+
VkDeviceSize mtlBufferAlignment; /**< The alignment used when allocating memory for MTLBuffers. Must be PoT. */
59
+
VkDeviceSize maxQueryBufferSize; /**< The maximum size of an occlusion query buffer (in bytes). */
60
+
VkSampleCountFlags supportedSampleCounts; /**< A bitmask identifying the sample counts supported by the device. */
52
61
} MVKPhysicalDeviceMetalFeatures;
53
62
54
63
/** MoltenVK swapchain performance statistics. */
@@ -58,16 +67,44 @@ typedef struct {
58
67
double averageFramesPerSecond; /**< The rolling average number of frames per second. This is simply the inverse of the averageFrameInterval value. */
59
68
} MVKSwapchainPerformance;
60
69
70
+
/** MoltenVK performance of a particular type of shader compilation event. */
71
+
typedefstruct {
72
+
uint32_t count; /**< The number of compilation events of this type. */
73
+
double averageInterval; /**< The average time interval consumed by the compilation event, in seconds. */
74
+
double minimumInterval; /**< The minimum time interval consumed by the compilation event, in seconds. */
75
+
double maximumInterval; /**< The maximum time interval consumed by the compilation event, in seconds. */
76
+
} MVKShaderCompilationEventPerformance;
77
+
78
+
/** MoltenVK performance of shader compilation events for a VkDevice. */
79
+
typedefstruct {
80
+
MVKShaderCompilationEventPerformance spirvToMSL; /** Convert SPIR-V to MSL source code. */
81
+
MVKShaderCompilationEventPerformance mslCompile; /** Compile MSL source code into a MTLLibrary. */
82
+
MVKShaderCompilationEventPerformance mslLoad; /** Load pre-compiled MSL code into a MTLLibrary. */
83
+
MVKShaderCompilationEventPerformance functionRetrieval; /** Retrieve a MTLFunction from a MTLLibrary. */
84
+
MVKShaderCompilationEventPerformance functionSpecialization; /** Specialize a retrieved MTLFunction. */
85
+
MVKShaderCompilationEventPerformance pipelineCompile; /** Compile MTLFunctions into a pipeline. */
0 commit comments