mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-21 19:41:15 +00:00
deps: update moltenvk to 1.2.3
This commit is contained in:
parent
c8be433c61
commit
d42667dd35
3 changed files with 83 additions and 44 deletions
19
deps/moltenvk/include/MoltenVK/mvk_datatypes.h
vendored
19
deps/moltenvk/include/MoltenVK/mvk_datatypes.h
vendored
|
@ -416,21 +416,14 @@ MTLBarrierScope mvkMTLBarrierScopeFromVkAccessFlags(VkAccessFlags vkAccess);
|
|||
#pragma mark -
|
||||
#pragma mark Geometry conversions
|
||||
|
||||
/** Returns a VkExtent2D that corresponds to the specified CGSize. */
|
||||
static inline VkExtent2D mvkVkExtent2DFromCGSize(CGSize cgSize) {
|
||||
VkExtent2D vkExt;
|
||||
vkExt.width = cgSize.width;
|
||||
vkExt.height = cgSize.height;
|
||||
return vkExt;
|
||||
}
|
||||
/**
|
||||
* Returns a VkExtent2D that corresponds to the specified CGSize.
|
||||
* Rounds to nearest integer using half-to-even rounding.
|
||||
*/
|
||||
VkExtent2D mvkVkExtent2DFromCGSize(CGSize cgSize);
|
||||
|
||||
/** Returns a CGSize that corresponds to the specified VkExtent2D. */
|
||||
static inline CGSize mvkCGSizeFromVkExtent2D(VkExtent2D vkExtent) {
|
||||
CGSize cgSize;
|
||||
cgSize.width = vkExtent.width;
|
||||
cgSize.height = vkExtent.height;
|
||||
return cgSize;
|
||||
}
|
||||
CGSize mvkCGSizeFromVkExtent2D(VkExtent2D vkExtent);
|
||||
|
||||
/** Returns a Metal MTLOrigin constructed from a VkOffset3D. */
|
||||
static inline MTLOrigin mvkMTLOriginFromVkOffset3D(VkOffset3D vkOffset) {
|
||||
|
|
108
deps/moltenvk/include/MoltenVK/vk_mvk_moltenvk.h
vendored
108
deps/moltenvk/include/MoltenVK/vk_mvk_moltenvk.h
vendored
|
@ -51,12 +51,12 @@ typedef unsigned long MTLArgumentBuffersTier;
|
|||
*/
|
||||
#define MVK_VERSION_MAJOR 1
|
||||
#define MVK_VERSION_MINOR 2
|
||||
#define MVK_VERSION_PATCH 2
|
||||
#define MVK_VERSION_PATCH 3
|
||||
|
||||
#define MVK_MAKE_VERSION(major, minor, patch) (((major) * 10000) + ((minor) * 100) + (patch))
|
||||
#define MVK_VERSION MVK_MAKE_VERSION(MVK_VERSION_MAJOR, MVK_VERSION_MINOR, MVK_VERSION_PATCH)
|
||||
|
||||
#define VK_MVK_MOLTENVK_SPEC_VERSION 36
|
||||
#define VK_MVK_MOLTENVK_SPEC_VERSION 37
|
||||
#define VK_MVK_MOLTENVK_EXTENSION_NAME "VK_MVK_moltenvk"
|
||||
|
||||
/** Identifies the level of logging MoltenVK should be limited to outputting. */
|
||||
|
@ -71,11 +71,14 @@ typedef enum MVKConfigLogLevel {
|
|||
|
||||
/** Identifies the level of Vulkan call trace logging MoltenVK should perform. */
|
||||
typedef enum MVKConfigTraceVulkanCalls {
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_NONE = 0, /**< No Vulkan call logging. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER = 1, /**< Log the name of each Vulkan call when the call is entered. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_EXIT = 2, /**< Log the name of each Vulkan call when the call is entered and exited. This effectively brackets any other logging activity within the scope of the Vulkan call. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_DURATION = 3, /**< Same as MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_EXIT, plus logs the time spent inside the Vulkan function. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_MAX_ENUM = 0x7FFFFFFF
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_NONE = 0, /**< No Vulkan call logging. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER = 1, /**< Log the name of each Vulkan call when the call is entered. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_THREAD_ID = 2, /**< Log the name and thread ID of each Vulkan call when the call is entered. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_EXIT = 3, /**< Log the name of each Vulkan call when the call is entered and exited. This effectively brackets any other logging activity within the scope of the Vulkan call. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_EXIT_THREAD_ID = 4, /**< Log the name and thread ID of each Vulkan call when the call is entered and name when exited. This effectively brackets any other logging activity within the scope of the Vulkan call. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_DURATION = 5, /**< Same as MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_EXIT, plus logs the time spent inside the Vulkan function. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_DURATION_THREAD_ID = 6, /**< Same as MVK_CONFIG_TRACE_VULKAN_CALLS_ENTER_EXIT_THREAD_ID, plus logs the time spent inside the Vulkan function. */
|
||||
MVK_CONFIG_TRACE_VULKAN_CALLS_MAX_ENUM = 0x7FFFFFFF
|
||||
} MVKConfigTraceVulkanCalls;
|
||||
|
||||
/** Identifies the scope for Metal to run an automatic GPU capture for diagnostic debugging purposes. */
|
||||
|
@ -130,6 +133,24 @@ typedef enum MVKConfigFastMath {
|
|||
MVK_CONFIG_FAST_MATH_MAX_ENUM = 0x7FFFFFFF
|
||||
} MVKConfigFastMath;
|
||||
|
||||
/** Identifies available system data compression algorithms. */
|
||||
typedef enum MVKConfigCompressionAlgorithm {
|
||||
MVK_CONFIG_COMPRESSION_ALGORITHM_NONE = 0, /**< No compression. */
|
||||
MVK_CONFIG_COMPRESSION_ALGORITHM_LZFSE = 1, /**< Apple proprietary. Good balance of high performance and small compression size, particularly for larger data content. */
|
||||
MVK_CONFIG_COMPRESSION_ALGORITHM_ZLIB = 2, /**< Open cross-platform ZLib format. For smaller data content, has better performance and smaller size than LZFSE. */
|
||||
MVK_CONFIG_COMPRESSION_ALGORITHM_LZ4 = 3, /**< Fastest performance. Largest compression size. */
|
||||
MVK_CONFIG_COMPRESSION_ALGORITHM_LZMA = 4, /**< Slowest performance. Smallest compression size, particular with larger content. */
|
||||
MVK_CONFIG_COMPRESSION_ALGORITHM_MAX_ENUM = 0x7FFFFFFF,
|
||||
} MVKConfigCompressionAlgorithm;
|
||||
|
||||
/** Identifies the style of activity performance logging to use. */
|
||||
typedef enum MVKConfigActivityPerformanceLoggingStyle {
|
||||
MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE_FRAME_COUNT = 0, /**< Repeatedly log performance after a configured number of frames. */
|
||||
MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE_IMMEDIATE = 1, /**< Log immediately after each performance measurement. */
|
||||
MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE_DEVICE_LIFETIME = 2, /**< Log at the end of the VkDevice lifetime. This is useful for one-shot apps such as testing frameworks. */
|
||||
MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE_MAX_ENUM = 0x7FFFFFFF,
|
||||
} MVKConfigActivityPerformanceLoggingStyle;
|
||||
|
||||
/**
|
||||
* MoltenVK configuration settings.
|
||||
*
|
||||
|
@ -299,12 +320,13 @@ typedef struct {
|
|||
uint32_t maxActiveMetalCommandBuffersPerQueue;
|
||||
|
||||
/**
|
||||
* 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 renderpass. If disabled, one MTLBuffer will be shared by all query pools,
|
||||
* which improves performance, but limits the total device queries to 8192.
|
||||
* Depending on the GPU, Metal allows 8192 or 32768 occlusion queries per MTLBuffer.
|
||||
* If enabled, MoltenVK allocates a MTLBuffer for each query pool, allowing each query
|
||||
* pool to support that permitted number of queries. This 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 renderpass. If disabled, one MTLBuffer will
|
||||
* be shared by all query pools, which improves performance, but limits the total device
|
||||
* queries to the permitted number.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
|
@ -322,22 +344,23 @@ typedef struct {
|
|||
VkBool32 presentWithCommandBuffer;
|
||||
|
||||
/**
|
||||
* If enabled, swapchain images will use simple Nearest sampling when magnifying the
|
||||
* swapchain image to fit a physical display surface. If disabled, swapchain images will
|
||||
* If enabled, swapchain images will use simple Nearest sampling when minifying or magnifying
|
||||
* the swapchain image to fit a physical display surface. If disabled, swapchain images will
|
||||
* use Linear sampling when magnifying the swapchain image to fit a physical display surface.
|
||||
* Enabling this setting avoids smearing effects when swapchain images are simple interger
|
||||
* multiples of display pixels (eg- macOS Retina, and typical of graphics apps and games),
|
||||
* but may cause aliasing effects when using non-integer display scaling.
|
||||
*
|
||||
* The value of this parameter may be changed before creating a VkSwapchain,
|
||||
* The value of this parameter must be changed before creating a VkSwapchain,
|
||||
* for the change to take effect.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_SWAPCHAIN_MAG_FILTER_USE_NEAREST
|
||||
* MVK_CONFIG_SWAPCHAIN_MIN_MAG_FILTER_USE_NEAREST
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to true.
|
||||
*/
|
||||
VkBool32 swapchainMagFilterUseNearest;
|
||||
VkBool32 swapchainMinMagFilterUseNearest;
|
||||
#define swapchainMagFilterUseNearest swapchainMinMagFilterUseNearest
|
||||
|
||||
/**
|
||||
* The maximum amount of time, in nanoseconds, to wait for a Metal library, function, or
|
||||
|
@ -359,8 +382,8 @@ typedef struct {
|
|||
* If enabled, performance statistics, as defined by the MVKPerformanceStatistics structure,
|
||||
* are collected, and can be retrieved via the vkGetPerformanceStatisticsMVK() function.
|
||||
*
|
||||
* You can also use the performanceLoggingFrameCount or logActivityPerformanceInline
|
||||
* parameters to automatically log the performance statistics collected by this parameter.
|
||||
* You can also use the activityPerformanceLoggingStyle and performanceLoggingFrameCount
|
||||
* parameters to configure when to log the performance statistics collected by this parameter.
|
||||
*
|
||||
* The value of this parameter must be changed before creating a VkDevice,
|
||||
* for the change to take effect.
|
||||
|
@ -768,21 +791,20 @@ typedef struct {
|
|||
VkBool32 useMTLHeap;
|
||||
|
||||
/**
|
||||
* Controls whether MoltenVK should log the performance of individual activities as they happen.
|
||||
* If this setting is enabled, activity performance will be logged when each activity happens.
|
||||
* If this setting is disabled, activity performance will be logged when frame peformance is
|
||||
* logged as determined by the performanceLoggingFrameCount value.
|
||||
* Controls when MoltenVK should log activity performance events.
|
||||
*
|
||||
* The value of this parameter must be changed before creating a VkDevice,
|
||||
* for the change to take effect.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_PERFORMANCE_LOGGING_INLINE
|
||||
* MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, this setting is disabled by default, and activity
|
||||
* performance will be logged only when frame activity is logged.
|
||||
* If neither is set, this setting is set to
|
||||
* MVK_CONFIG_ACTIVITY_PERFORMANCE_LOGGING_STYLE_FRAME_COUNT by default,
|
||||
* and activity performance will be logged when frame activity is logged.
|
||||
*/
|
||||
VkBool32 logActivityPerformanceInline;
|
||||
MVKConfigActivityPerformanceLoggingStyle activityPerformanceLoggingStyle;
|
||||
#define logActivityPerformanceInline activityPerformanceLoggingStyle
|
||||
|
||||
/**
|
||||
* Controls the Vulkan API version that MoltenVK should advertise in vkEnumerateInstanceVersion().
|
||||
|
@ -875,6 +897,27 @@ typedef struct {
|
|||
*/
|
||||
MVKUseMetalArgumentBuffers useMetalArgumentBuffers;
|
||||
|
||||
/**
|
||||
* Controls the type of compression to use on the MSL source code that is stored in memory
|
||||
* for use in a pipeline cache. After being converted from SPIR-V, or loaded directly into
|
||||
* a VkShaderModule, and then compiled into a MTLLibrary, the MSL source code is no longer
|
||||
* needed for operation, but it is retained so it can be written out as part of a pipeline
|
||||
* cache export. When a large number of shaders are loaded, this can consume significant
|
||||
* memory. In such a case, this parameter can be used to compress the MSL source code that
|
||||
* is awaiting export as part of a pipeline cache.
|
||||
*
|
||||
* The value of this parameter can be changed at any time, and will affect the size of
|
||||
* the cached MSL from subsequent shader compilations.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_SHADER_COMPRESSION_ALGORITHM
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, this setting is set to
|
||||
* MVK_CONFIG_COMPRESSION_ALGORITHM_NONE by default,
|
||||
* and MoltenVK will not compress the MSL source code after compilation into a MTLLibrary.
|
||||
*/
|
||||
MVKConfigCompressionAlgorithm shaderSourceCompressionAlgorithm;
|
||||
|
||||
} MVKConfiguration;
|
||||
|
||||
/** Identifies the type of rounding Metal uses for float to integer conversions in particular calculatons. */
|
||||
|
@ -979,6 +1022,8 @@ typedef struct {
|
|||
VkBool32 programmableSamplePositions; /**< If true, programmable MSAA sample positions are supported. */
|
||||
VkBool32 shaderBarycentricCoordinates; /**< If true, fragment shader barycentric coordinates are supported. */
|
||||
MTLArgumentBuffersTier argumentBuffersTier; /**< The argument buffer tier available on this device, as a Metal enumeration. */
|
||||
VkBool32 needsSampleDrefLodArrayWorkaround; /**< If true, sampling from arrayed depth images with explicit LoD is broken and needs a workaround. */
|
||||
VkDeviceSize hostMemoryPageSize; /**< The size of a page of host memory on this platform. */
|
||||
} MVKPhysicalDeviceMetalFeatures;
|
||||
|
||||
/** MoltenVK performance of a particular type of activity. */
|
||||
|
@ -996,6 +1041,8 @@ typedef struct {
|
|||
MVKPerformanceTracker spirvToMSL; /** Convert SPIR-V to MSL source code. */
|
||||
MVKPerformanceTracker mslCompile; /** Compile MSL source code into a MTLLibrary. */
|
||||
MVKPerformanceTracker mslLoad; /** Load pre-compiled MSL code into a MTLLibrary. */
|
||||
MVKPerformanceTracker mslCompress; /** Compress MSL source code after compiling a MTLLibrary, to hold it in a pipeline cache. */
|
||||
MVKPerformanceTracker mslDecompress; /** Decompress MSL source code to write the MSL when serializing a pipeline cache. */
|
||||
MVKPerformanceTracker shaderLibraryFromCache; /** Retrieve a shader library from the cache, lazily creating it if needed. */
|
||||
MVKPerformanceTracker functionRetrieval; /** Retrieve a MTLFunction from a MTLLibrary. */
|
||||
MVKPerformanceTracker functionSpecialization; /** Specialize a retrieved MTLFunction. */
|
||||
|
@ -1217,9 +1264,8 @@ VKAPI_ATTR void VKAPI_CALL vkGetVersionStringsMVK(
|
|||
/**
|
||||
* Sets the number of threads in a workgroup for a compute kernel.
|
||||
*
|
||||
* This needs to be called if you are creating compute shader modules from MSL
|
||||
* source code or MSL compiled code. Workgroup size is determined automatically
|
||||
* if you're using SPIR-V.
|
||||
* This needs to be called if you are creating compute shader modules from MSL source code
|
||||
* or MSL compiled code. If you are using SPIR-V, workgroup size is determined automatically.
|
||||
*
|
||||
* This function is not supported by the Vulkan SDK Loader and Layers framework
|
||||
* and is unavailable when using the Vulkan SDK Loader and Layers framework.
|
||||
|
|
BIN
deps/moltenvk/lib/libMoltenVK-static.a
vendored
BIN
deps/moltenvk/lib/libMoltenVK-static.a
vendored
Binary file not shown.
Loading…
Reference in a new issue