update MoltenVK to 1.0.38

This commit is contained in:
alexey.lysiuk 2019-11-02 17:11:22 +02:00
parent b22ce97442
commit 78da4fb805
6 changed files with 10058 additions and 6083 deletions

View file

@ -234,6 +234,12 @@ uint32_t mvkSampleCountFromVkSampleCountFlagBits(VkSampleCountFlagBits vkSampleC
/** Returns the Vulkan bit flags corresponding to the numeric sample count, which must be a PoT value. */
VkSampleCountFlagBits mvkVkSampleCountFlagBitsFromSampleCount(NSUInteger sampleCount);
/** Returns the Metal texture swizzle from the Vulkan component swizzle. */
MTLTextureSwizzle mvkMTLTextureSwizzleFromVkComponentSwizzle(VkComponentSwizzle vkSwizzle);
/** Returns all four Metal texture swizzles from the Vulkan component mapping. */
MTLTextureSwizzleChannels mvkMTLTextureSwizzleChannelsFromVkComponentMapping(VkComponentMapping vkMapping);
#pragma mark Mipmaps

View file

@ -50,7 +50,7 @@ typedef unsigned long MTLLanguageVersion;
*/
#define MVK_VERSION_MAJOR 1
#define MVK_VERSION_MINOR 0
#define MVK_VERSION_PATCH 37
#define MVK_VERSION_PATCH 38
#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)
@ -100,7 +100,7 @@ typedef unsigned long MTLLanguageVersion;
* 0: No logging.
* 1: Log errors only.
* 2: Log errors and informational messages.
* If neither is set, errors and informational messages are logged.
* If none of these is set, errors and informational messages are logged.
*
* 2. The MVK_CONFIG_TRACE_VULKAN_CALLS runtime environment variable or MoltenVK compile-time build
* setting causes MoltenVK to log the name of each Vulkan call made by the application. The logging
@ -110,15 +110,21 @@ typedef unsigned long MTLLanguageVersion;
* 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.
* 3: Same as option 2, plus logs the time spent inside the Vulkan function.
* If none of these is set, no Vulkan call logging will occur.
*
* 3. Setting the MVK_CONFIG_FORCE_LOW_POWER_GPU runtime environment variable or MoltenVK compile-time
* build setting to 1 will force MoltenVK to use a low-power GPU, if one is availble on the device.
* By default, this setting is disabled, allowing both low-power and high-power GPU's to be used.
*
* 4. Setting the MVK_ALLOW_METAL_FENCES or MVK_ALLOW_METAL_EVENTS runtime environment variable
* or MoltenVK compile-time build setting to 1 will cause MoltenVK to use MTLFence or MTLEvent
* if they are available on the device, for VkSemaphore sychronization behaviour.
* or MoltenVK compile-time build setting to 1 will cause MoltenVK to use MTLFence or MTLEvent,
* respectively, if it is available on the device, for VkSemaphore synchronization behaviour.
* If both variables are set, MVK_ALLOW_METAL_FENCES takes priority over MVK_ALLOW_METAL_EVENTS.
* Both options are disabled by default.
* If both are disabled, or if MTLFence or MTLEvent is not available on the device, MoltenVK
* will use CPU synchronization to control VkSemaphore synchronization behaviour.
* By default, MVK_ALLOW_METAL_FENCES is enabled and MVK_ALLOW_METAL_EVENTS is disabled,
* meaning MoltenVK will use MTLFences, if they are available, to control VkSemaphore
* synchronization behaviour, by default.
*
* 5. The MVK_CONFIG_AUTO_GPU_CAPTURE_SCOPE runtime environment variable or MoltenVK compile-time
* build setting controls whether Xcode should run an automatic GPU capture without the user
@ -131,6 +137,13 @@ typedef unsigned long MTLLanguageVersion;
* 0: No automatic GPU capture.
* 1: Capture all GPU commands issued during the lifetime of the VkDevice.
* If none of these is set, no automatic GPU capture will occur.
*
* 6. The MVK_CONFIG_TEXTURE_1D_AS_2D runtime environment variable or MoltenVK compile-time build
* setting controls whether MoltenVK should use a Metal 2D texture with a height of 1 for a
* Vulkan 1D image, or use a native Metal 1D texture. Metal imposes significant restrictions
* on native 1D textures, including not being renderable, clearable, or permitting mipmaps.
* Using a Metal 2D texture allows Vulkan 1D textures to support this additional functionality.
* This setting is enabled by default, and MoltenVK will use a Metal 2D texture for each Vulkan 1D image.
*/
typedef struct {
@ -548,6 +561,9 @@ typedef struct {
VkBool32 postDepthCoverage; /**< If true, coverage masks in fragment shaders post-depth-test are supported. */
VkBool32 fences; /**< If true, Metal synchronization fences (MTLFence) are supported. */
VkBool32 rasterOrderGroups; /**< If true, Raster order groups in fragment shaders are supported. */
VkBool32 native3DCompressedTextures; /**< If true, 3D compressed images are supported natively, without manual decompression. */
VkBool32 nativeTextureSwizzle; /**< If true, component swizzle is supported natively, without manual swizzling in shaders. */
VkBool32 placementHeaps; /**< If true, MTLHeap objects support placement of resources. */
} MVKPhysicalDeviceMetalFeatures;
/**

View file

@ -89,7 +89,8 @@ typedef enum {
VK_ICD_WSI_PLATFORM_MACOS,
VK_ICD_WSI_PLATFORM_IOS,
VK_ICD_WSI_PLATFORM_DISPLAY,
VK_ICD_WSI_PLATFORM_HEADLESS
VK_ICD_WSI_PLATFORM_HEADLESS,
VK_ICD_WSI_PLATFORM_METAL,
} VkIcdWsiPlatform;
typedef struct {
@ -172,4 +173,11 @@ typedef struct {
VkIcdSurfaceBase base;
} VkIcdSurfaceHeadless;
#ifdef VK_USE_PLATFORM_METAL_EXT
typedef struct {
VkIcdSurfaceBase base;
const CAMetalLayer *pLayer;
} VkIcdSurfaceMetal;
#endif // VK_USE_PLATFORM_METAL_EXT
#endif // VKICD_H

File diff suppressed because it is too large Load diff

View file

@ -44,7 +44,7 @@ extern "C" {
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
// Version of this file
#define VK_HEADER_VERSION 121
#define VK_HEADER_VERSION 126
#define VK_NULL_HANDLE 0
@ -443,11 +443,13 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT = 1000170000,
VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001,
VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = 1000175000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000,
VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000,
VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CLOCK_FEATURES_KHR = 1000181000,
VK_STRUCTURE_TYPE_PIPELINE_COMPILER_CONTROL_CREATE_INFO_AMD = 1000183000,
VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = 1000184000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
@ -470,6 +472,12 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV = 1000205002,
VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV = 1000206000,
VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV = 1000206001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES_KHR = 1000207000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES_KHR = 1000207001,
VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO_KHR = 1000207002,
VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO_KHR = 1000207003,
VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO_KHR = 1000207004,
VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO_KHR = 1000207005,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_FUNCTIONS_2_FEATURES_INTEL = 1000209000,
VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO_INTEL = 1000210000,
VK_STRUCTURE_TYPE_INITIALIZE_PERFORMANCE_API_INFO_INTEL = 1000210001,
@ -6201,6 +6209,17 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndexedIndirectCountKHR(
#endif
#define VK_KHR_shader_subgroup_extended_types 1
#define VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_SPEC_VERSION 1
#define VK_KHR_SHADER_SUBGROUP_EXTENDED_TYPES_EXTENSION_NAME "VK_KHR_shader_subgroup_extended_types"
typedef struct VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR {
VkStructureType sType;
void* pNext;
VkBool32 shaderSubgroupExtendedTypes;
} VkPhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR;
#define VK_KHR_8bit_storage 1
#define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1
#define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage"
@ -6226,6 +6245,18 @@ typedef struct VkPhysicalDeviceShaderAtomicInt64FeaturesKHR {
#define VK_KHR_shader_clock 1
#define VK_KHR_SHADER_CLOCK_SPEC_VERSION 1
#define VK_KHR_SHADER_CLOCK_EXTENSION_NAME "VK_KHR_shader_clock"
typedef struct VkPhysicalDeviceShaderClockFeaturesKHR {
VkStructureType sType;
void* pNext;
VkBool32 shaderSubgroupClock;
VkBool32 shaderDeviceClock;
} VkPhysicalDeviceShaderClockFeaturesKHR;
#define VK_KHR_driver_properties 1
#define VK_MAX_DRIVER_NAME_SIZE_KHR 256
#define VK_MAX_DRIVER_INFO_SIZE_KHR 256
@ -6342,6 +6373,89 @@ typedef struct VkPhysicalDeviceDepthStencilResolvePropertiesKHR {
#define VK_KHR_SWAPCHAIN_MUTABLE_FORMAT_EXTENSION_NAME "VK_KHR_swapchain_mutable_format"
#define VK_KHR_timeline_semaphore 1
#define VK_KHR_TIMELINE_SEMAPHORE_SPEC_VERSION 2
#define VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME "VK_KHR_timeline_semaphore"
typedef enum VkSemaphoreTypeKHR {
VK_SEMAPHORE_TYPE_BINARY_KHR = 0,
VK_SEMAPHORE_TYPE_TIMELINE_KHR = 1,
VK_SEMAPHORE_TYPE_BEGIN_RANGE_KHR = VK_SEMAPHORE_TYPE_BINARY_KHR,
VK_SEMAPHORE_TYPE_END_RANGE_KHR = VK_SEMAPHORE_TYPE_TIMELINE_KHR,
VK_SEMAPHORE_TYPE_RANGE_SIZE_KHR = (VK_SEMAPHORE_TYPE_TIMELINE_KHR - VK_SEMAPHORE_TYPE_BINARY_KHR + 1),
VK_SEMAPHORE_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
} VkSemaphoreTypeKHR;
typedef enum VkSemaphoreWaitFlagBitsKHR {
VK_SEMAPHORE_WAIT_ANY_BIT_KHR = 0x00000001,
VK_SEMAPHORE_WAIT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF
} VkSemaphoreWaitFlagBitsKHR;
typedef VkFlags VkSemaphoreWaitFlagsKHR;
typedef struct VkPhysicalDeviceTimelineSemaphoreFeaturesKHR {
VkStructureType sType;
void* pNext;
VkBool32 timelineSemaphore;
} VkPhysicalDeviceTimelineSemaphoreFeaturesKHR;
typedef struct VkPhysicalDeviceTimelineSemaphorePropertiesKHR {
VkStructureType sType;
void* pNext;
uint64_t maxTimelineSemaphoreValueDifference;
} VkPhysicalDeviceTimelineSemaphorePropertiesKHR;
typedef struct VkSemaphoreTypeCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphoreTypeKHR semaphoreType;
uint64_t initialValue;
} VkSemaphoreTypeCreateInfoKHR;
typedef struct VkTimelineSemaphoreSubmitInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t waitSemaphoreValueCount;
const uint64_t* pWaitSemaphoreValues;
uint32_t signalSemaphoreValueCount;
const uint64_t* pSignalSemaphoreValues;
} VkTimelineSemaphoreSubmitInfoKHR;
typedef struct VkSemaphoreWaitInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphoreWaitFlagsKHR flags;
uint32_t semaphoreCount;
const VkSemaphore* pSemaphores;
const uint64_t* pValues;
} VkSemaphoreWaitInfoKHR;
typedef struct VkSemaphoreSignalInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
uint64_t value;
} VkSemaphoreSignalInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreCounterValueKHR)(VkDevice device, VkSemaphore semaphore, uint64_t* pValue);
typedef VkResult (VKAPI_PTR *PFN_vkWaitSemaphoresKHR)(VkDevice device, const VkSemaphoreWaitInfoKHR* pWaitInfo, uint64_t timeout);
typedef VkResult (VKAPI_PTR *PFN_vkSignalSemaphoreKHR)(VkDevice device, const VkSemaphoreSignalInfoKHR* pSignalInfo);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreCounterValueKHR(
VkDevice device,
VkSemaphore semaphore,
uint64_t* pValue);
VKAPI_ATTR VkResult VKAPI_CALL vkWaitSemaphoresKHR(
VkDevice device,
const VkSemaphoreWaitInfoKHR* pWaitInfo,
uint64_t timeout);
VKAPI_ATTR VkResult VKAPI_CALL vkSignalSemaphoreKHR(
VkDevice device,
const VkSemaphoreSignalInfoKHR* pSignalInfo);
#endif
#define VK_KHR_vulkan_memory_model 1
#define VK_KHR_VULKAN_MEMORY_MODEL_SPEC_VERSION 3
#define VK_KHR_VULKAN_MEMORY_MODEL_EXTENSION_NAME "VK_KHR_vulkan_memory_model"
@ -6355,6 +6469,11 @@ typedef struct VkPhysicalDeviceVulkanMemoryModelFeaturesKHR {
#define VK_KHR_spirv_1_4 1
#define VK_KHR_SPIRV_1_4_SPEC_VERSION 1
#define VK_KHR_SPIRV_1_4_EXTENSION_NAME "VK_KHR_spirv_1_4"
#define VK_KHR_surface_protected_capabilities 1
#define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_SPEC_VERSION 1
#define VK_KHR_SURFACE_PROTECTED_CAPABILITIES_EXTENSION_NAME "VK_KHR_surface_protected_capabilities"
@ -6993,7 +7112,7 @@ typedef struct VkExportMemoryAllocateInfoNV {
#define VK_EXT_validation_flags 1
#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 1
#define VK_EXT_VALIDATION_FLAGS_SPEC_VERSION 2
#define VK_EXT_VALIDATION_FLAGS_EXTENSION_NAME "VK_EXT_validation_flags"
typedef enum VkValidationCheckEXT {
@ -9729,7 +9848,7 @@ typedef struct VkPhysicalDeviceYcbcrImageArraysFeaturesEXT {
#define VK_EXT_headless_surface 1
#define VK_EXT_HEADLESS_SURFACE_SPEC_VERSION 0
#define VK_EXT_HEADLESS_SURFACE_SPEC_VERSION 1
#define VK_EXT_HEADLESS_SURFACE_EXTENSION_NAME "VK_EXT_headless_surface"
typedef VkFlags VkHeadlessSurfaceCreateFlagsEXT;
typedef struct VkHeadlessSurfaceCreateInfoEXT {
@ -9860,6 +9979,11 @@ typedef struct VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT {
} VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT;
#define VK_GOOGLE_user_type 1
#define VK_GOOGLE_USER_TYPE_SPEC_VERSION 1
#define VK_GOOGLE_USER_TYPE_EXTENSION_NAME "VK_GOOGLE_user_type"
#ifdef __cplusplus
}
#endif

Binary file not shown.