mirror of
https://github.com/KhronosGroup/MoltenVK.git
synced 2026-01-18 05:01:18 +01:00
Add support for Vulkan 1.4.
- Advertise Vulkan 1.4 support. - Update ICD API version to 1.4. - Update CTS conformance version to 1.4. - Update platform limits to Vulkan 1.4 levels. - Update documentation.
This commit is contained in:
@@ -85,13 +85,14 @@ extensions will be advertised. A value of zero means no extensions will be adver
|
||||
#### MVK_CONFIG_API_VERSION_TO_ADVERTISE
|
||||
|
||||
##### Type: UInt32
|
||||
##### Default: `4206592` (decimal number for `VK_API_VERSION_1_3`)
|
||||
##### Default: `4210688` (decimal number for `VK_API_VERSION_1_4`)
|
||||
|
||||
Controls the _Vulkan_ API version that **MoltenVK** should advertise in `vkEnumerateInstanceVersion()`,
|
||||
after **MoltenVK** adds the `VK_HEADER_VERSION` component.
|
||||
|
||||
Set this value to one of:
|
||||
|
||||
- `4210688` (decimal number for `VK_API_VERSION_1_4`)
|
||||
- `4206592` (decimal number for `VK_API_VERSION_1_3`)
|
||||
- `4202496` (decimal number for `VK_API_VERSION_1_2`)
|
||||
- `4198400` (decimal number for `VK_API_VERSION_1_1`)
|
||||
@@ -99,6 +100,7 @@ Set this value to one of:
|
||||
|
||||
or one of the shorthand versions:
|
||||
|
||||
- `14` (`VK_API_VERSION_1_4`)
|
||||
- `13` (`VK_API_VERSION_1_3`)
|
||||
- `12` (`VK_API_VERSION_1_2`)
|
||||
- `11` (`VK_API_VERSION_1_1`)
|
||||
|
||||
@@ -56,7 +56,7 @@ distribution package, see the main [`README.md`](../README.md) document in the `
|
||||
About **MoltenVK**
|
||||
------------------
|
||||
|
||||
**MoltenVK** is a layered implementation of [*Vulkan 1.3*](https://www.khronos.org/vulkan)
|
||||
**MoltenVK** is a layered implementation of [*Vulkan 1.4*](https://www.khronos.org/vulkan)
|
||||
graphics and compute functionality, that is built on Apple's [*Metal*](https://developer.apple.com/metal)
|
||||
graphics and compute framework on *macOS*, *iOS*, and *tvOS*. **MoltenVK** allows you to use *Vulkan*
|
||||
graphics and compute functionality to develop modern, cross-platform, high-performance graphical games
|
||||
|
||||
@@ -13,11 +13,12 @@ Copyright (c) 2015-2025 [The Brenwill Workshop Ltd.](http://www.brenwill.com)
|
||||
|
||||
|
||||
|
||||
MoltenVK 1.3.1
|
||||
MoltenVK 1.4.0
|
||||
---------------
|
||||
|
||||
Released TBD
|
||||
|
||||
- Add support for _Vulkan 1.4_.
|
||||
- Add support for extensions:
|
||||
- `VK_KHR_dynamic_rendering_local_read`
|
||||
- `VK_KHR_global_priority`
|
||||
|
||||
@@ -2660,7 +2660,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1.3.1;
|
||||
CURRENT_PROJECT_VERSION = 1.4.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@@ -2736,7 +2736,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
CURRENT_PROJECT_VERSION = 1.3.1;
|
||||
CURRENT_PROJECT_VERSION = 1.4.0;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
|
||||
@@ -81,7 +81,7 @@ typedef VkFlags MVKCounterSamplingFlags;
|
||||
* EXCEPT TO ADD ADDITIONAL MEMBERS ON THE END. THE ORDER AND SIZE OF EXISTING MEMBERS SHOULD NOT BE CHANGED.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t mslVersion; /**< The version of the Metal Shading Language available on this device. The format of the integer is MMmmpp, with two decimal digts each for Major, minor, and patch version values (eg. MSL 1.3 would appear as 010300). */
|
||||
uint32_t mslVersion; /**< The version of the Metal Shading Language available on this device. The format of the integer is MMmmpp, with two decimal digts each for Major, minor, and patch version values (eg. MSL 3.2 would appear as 030200). */
|
||||
VkBool32 indirectDrawing; /**< If true, draw calls support parameters held in a GPU buffer. */
|
||||
VkBool32 baseVertexInstanceDrawing; /**< If true, draw calls support specifiying the base vertex and instance. */
|
||||
uint32_t dynamicMTLBufferSize; /**< If greater than zero, dynamic MTLBuffers for setting vertex, fragment, and compute bytes are supported, and their content must be below this value. */
|
||||
|
||||
@@ -63,11 +63,11 @@ typedef unsigned long MTLArgumentBuffersTier;
|
||||
* - 401215 (version 4.12.15)
|
||||
*/
|
||||
#define MVK_VERSION_MAJOR 1
|
||||
#define MVK_VERSION_MINOR 3
|
||||
#define MVK_VERSION_PATCH 1
|
||||
#define MVK_VERSION_MINOR 4
|
||||
#define MVK_VERSION_PATCH 0
|
||||
|
||||
#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 MVK_VERSION MVK_MAKE_VERSION(MVK_VERSION_MAJOR, MVK_VERSION_MINOR, MVK_VERSION_PATCH)
|
||||
|
||||
#define MVK_STRINGIFY_IMPL(val) #val
|
||||
#define MVK_STRINGIFY(val) MVK_STRINGIFY_IMPL(val)
|
||||
|
||||
@@ -457,6 +457,7 @@ protected:
|
||||
void populateDeviceIDProperties(VkPhysicalDeviceVulkan11Properties* pVk11Props);
|
||||
void populateSubgroupProperties(VkPhysicalDeviceVulkan11Properties* pVk11Props);
|
||||
template<typename HostImageCopyProps> void populateHostImageCopyProperties(HostImageCopyProps* pHostImageCopyProps);
|
||||
bool isTier2MetalArgumentBuffers();
|
||||
void logGPUInfo();
|
||||
|
||||
MVKInstance* _mvkInstance;
|
||||
|
||||
@@ -450,6 +450,11 @@ void MVKPhysicalDevice::getFeatures(VkPhysicalDeviceFeatures2* features) {
|
||||
pipelineCreationCacheControlFeatures->pipelineCreationCacheControl = supportedFeats13.pipelineCreationCacheControl;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES: {
|
||||
auto* pipelineProtectedAccessFeatures = (VkPhysicalDevicePipelineProtectedAccessFeatures*)next;
|
||||
pipelineProtectedAccessFeatures->pipelineProtectedAccess = supportedFeats14.pipelineProtectedAccess;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES: {
|
||||
auto* pipelineRobustnessFeatures = (VkPhysicalDevicePipelineRobustnessFeatures*)next;
|
||||
pipelineRobustnessFeatures->pipelineRobustness = supportedFeats14.pipelineRobustness;
|
||||
@@ -781,7 +786,6 @@ void MVKPhysicalDevice::getProperties(VkPhysicalDeviceProperties2* properties) {
|
||||
|
||||
uint32_t uintMax = std::numeric_limits<uint32_t>::max();
|
||||
uint32_t maxSamplerCnt = getMaxSamplerCount();
|
||||
bool isTier2 = _isUsingMetalArgumentBuffers && (_metalFeatures.argumentBuffersTier >= MTLArgumentBuffersTier2);
|
||||
|
||||
// Create a SSOT for these Vulkan 1.1 properties, which can be queried via two mechanisms here.
|
||||
VkPhysicalDeviceVulkan11Properties supportedProps11;
|
||||
@@ -796,9 +800,9 @@ void MVKPhysicalDevice::getProperties(VkPhysicalDeviceProperties2* properties) {
|
||||
supportedProps11.maxPerSetDescriptors = getMaxPerSetDescriptorCount();
|
||||
supportedProps11.maxMemoryAllocationSize = _metalFeatures.maxMTLBufferSize;
|
||||
|
||||
static constexpr VkConformanceVersion testedCTSVer = { 1, 3, 8, 0 }; // Latest version of CTS used to test
|
||||
|
||||
// Create a SSOT for these Vulkan 1.2 properties, which can be queried via two mechanisms here.
|
||||
bool isTier2 = isTier2MetalArgumentBuffers();
|
||||
static constexpr VkConformanceVersion testedCTSVer = { 1, 4, 2, 0 }; // Latest version of CTS used to test
|
||||
VkPhysicalDeviceVulkan12Properties supportedProps12;
|
||||
supportedProps12.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES;
|
||||
supportedProps12.pNext = nullptr;
|
||||
@@ -2387,8 +2391,6 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
_metalFeatures.minSwapchainImageCount = kMVKMinSwapchainImageCount;
|
||||
_metalFeatures.maxSwapchainImageCount = kMVKMaxSwapchainImageCount;
|
||||
|
||||
_metalFeatures.maxPerStageStorageTextureCount = 8;
|
||||
|
||||
_metalFeatures.vertexStrideAlignment = supportsMTLGPUFamily(Apple5) ? 1 : 4;
|
||||
|
||||
#if MVK_XCODE_15
|
||||
@@ -2471,7 +2473,9 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
}
|
||||
}
|
||||
|
||||
if (supportsMTLGPUFamily(Apple4)) {
|
||||
if (supportsMTLGPUFamily(Apple6)) {
|
||||
_metalFeatures.maxPerStageTextureCount = 128;
|
||||
} else if (supportsMTLGPUFamily(Apple4)) {
|
||||
_metalFeatures.maxPerStageTextureCount = 96;
|
||||
} else {
|
||||
_metalFeatures.maxPerStageTextureCount = 31;
|
||||
@@ -2584,7 +2588,9 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
}
|
||||
}
|
||||
|
||||
if (supportsMTLGPUFamily(Apple4)) {
|
||||
if (supportsMTLGPUFamily(Apple6)) {
|
||||
_metalFeatures.maxPerStageTextureCount = 128;
|
||||
} else if (supportsMTLGPUFamily(Apple4)) {
|
||||
_metalFeatures.maxPerStageTextureCount = 96;
|
||||
} else {
|
||||
_metalFeatures.maxPerStageTextureCount = 31;
|
||||
@@ -2914,7 +2920,7 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
_metalFeatures.needsArgumentBufferEncoders = _metalFeatures.argumentBuffers;
|
||||
#endif
|
||||
|
||||
_isUsingMetalArgumentBuffers = _metalFeatures.descriptorSetArgumentBuffers && getMVKConfig().useMetalArgumentBuffers;;
|
||||
_isUsingMetalArgumentBuffers = _metalFeatures.descriptorSetArgumentBuffers && getMVKConfig().useMetalArgumentBuffers;
|
||||
|
||||
#define checkSupportsMTLCounterSamplingPoint(mtlSP, mvkSP) \
|
||||
if ([_mtlDevice respondsToSelector: @selector(supportsCounterSampling:)] && \
|
||||
@@ -2952,6 +2958,19 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
_metalFeatures.subgroupUniformControlFlow = _gpuCapabilities.isAppleGPU;
|
||||
_metalFeatures.maximalReconvergence = _gpuCapabilities.isAppleGPU && _metalFeatures.subgroupUniformControlFlow;
|
||||
_metalFeatures.quadControlFlow = _gpuCapabilities.isAppleGPU && _metalFeatures.maximalReconvergence;
|
||||
|
||||
// Set features for all platforms based on previous settings.
|
||||
// Bump resources up for Tier2 GPU, to meet Vulkan conformance.
|
||||
// Affects push constants limit so keep it reasonable.
|
||||
if (isTier2MetalArgumentBuffers()) {
|
||||
_metalFeatures.maxPerStageTextureCount = 256;
|
||||
}
|
||||
_metalFeatures.maxPerStageStorageTextureCount = _metalFeatures.maxPerStageTextureCount;
|
||||
|
||||
}
|
||||
|
||||
bool MVKPhysicalDevice::isTier2MetalArgumentBuffers() {
|
||||
return _isUsingMetalArgumentBuffers && (_metalFeatures.argumentBuffersTier >= MTLArgumentBuffersTier2);
|
||||
}
|
||||
|
||||
// Initializes the physical device features of this instance.
|
||||
@@ -3143,7 +3162,7 @@ void MVKPhysicalDevice::initLimits() {
|
||||
// Max sum of API and shader values. Bias not publicly supported in API, but can be applied in the shader directly.
|
||||
// The lack of API value is covered by VkPhysicalDevicePortabilitySubsetFeaturesKHR::samplerMipLodBias.
|
||||
// Metal does not specify a limit for the shader value, so choose something reasonable.
|
||||
_properties.limits.maxSamplerLodBias = getMVKConfig().useMetalPrivateAPI ? 16 : 4;
|
||||
_properties.limits.maxSamplerLodBias = 16;
|
||||
_properties.limits.maxSamplerAnisotropy = 16;
|
||||
|
||||
_properties.limits.maxVertexInputAttributes = 31;
|
||||
@@ -3377,7 +3396,7 @@ void MVKPhysicalDevice::initLimits() {
|
||||
break;
|
||||
}
|
||||
|
||||
_properties.limits.pointSizeGranularity = 1;
|
||||
_properties.limits.pointSizeGranularity = 0.125;
|
||||
_properties.limits.lineWidthRange[0] = 1;
|
||||
_properties.limits.lineWidthRange[1] = _features.wideLines ? 8 : 1;
|
||||
_properties.limits.lineWidthGranularity = _features.wideLines ? 0.125f : 0;
|
||||
@@ -3437,9 +3456,9 @@ void MVKPhysicalDevice::initLimits() {
|
||||
|
||||
// Features with unknown limits - default to Vulkan required limits
|
||||
|
||||
_properties.limits.subPixelPrecisionBits = 4;
|
||||
_properties.limits.subTexelPrecisionBits = 4;
|
||||
_properties.limits.mipmapPrecisionBits = 4;
|
||||
_properties.limits.subPixelPrecisionBits = 8;
|
||||
_properties.limits.subTexelPrecisionBits = 8;
|
||||
_properties.limits.mipmapPrecisionBits = 8;
|
||||
_properties.limits.viewportSubPixelBits = 0;
|
||||
|
||||
_properties.limits.discreteQueuePriorities = 2;
|
||||
@@ -5600,7 +5619,7 @@ void MVKDevice::enableFeatures(const VkDeviceCreateInfo* pCreateInfo) {
|
||||
enablePromotedFeatures(DynamicRenderingLocalRead, dynamicRenderingLocalRead, 1);
|
||||
enablePromotedFeatures(Maintenance5, maintenance5, 1);
|
||||
enablePromotedFeatures(Maintenance6, maintenance6, 1);
|
||||
// enablePromotedFeatures(PipelineProtectedAccess, pipelineProtectedAccess, 1);
|
||||
enablePromotedFeatures(PipelineProtectedAccess, pipelineProtectedAccess, 1);
|
||||
enablePromotedFeatures(PipelineRobustness, pipelineRobustness, 1);
|
||||
enablePromotedFeatures(HostImageCopy, hostImageCopy, 1);
|
||||
enablePromotedFeatures(Vulkan14NoExt, pushDescriptor, 1);
|
||||
|
||||
@@ -54,6 +54,7 @@ MVK_DEVICE_FEATURE(Maintenance5, MAINTENANCE_5,
|
||||
MVK_DEVICE_FEATURE(Maintenance6, MAINTENANCE_6, 1)
|
||||
MVK_DEVICE_FEATURE(Multiview, MULTIVIEW, 3)
|
||||
MVK_DEVICE_FEATURE(PipelineCreationCacheControl, PIPELINE_CREATION_CACHE_CONTROL, 1)
|
||||
MVK_DEVICE_FEATURE(PipelineProtectedAccess, PIPELINE_PROTECTED_ACCESS, 1)
|
||||
MVK_DEVICE_FEATURE(PipelineRobustness, PIPELINE_ROBUSTNESS, 1)
|
||||
MVK_DEVICE_FEATURE(PrivateData, PRIVATE_DATA, 1)
|
||||
MVK_DEVICE_FEATURE(ProtectedMemory, PROTECTED_MEMORY, 1)
|
||||
|
||||
@@ -305,6 +305,9 @@ MVKInstance::MVKInstance(const VkInstanceCreateInfo* pCreateInfo) : _enabledExte
|
||||
_appInfo.apiVersion = cfgAPIVer;
|
||||
}
|
||||
|
||||
// Ensure the API version includes the Vulkan header patch number
|
||||
_appInfo.apiVersion = MVK_VULKAN_API_VERSION_HEADER(_appInfo.apiVersion);
|
||||
|
||||
initProcAddrs(); // Init function pointers. After extensions enabled.
|
||||
logVersions(); // Log the MoltenVK and Vulkan versions. After config.
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ static bool mvkIsSupportedOnPlatform(VkExtensionProperties* pProperties) {
|
||||
if ( !mvkIsAnyFlagEnabled(advExtns, MVK_CONFIG_ADVERTISE_EXTENSIONS_ALL) ) {
|
||||
#define MVK_NA kMVKOSVersionUnsupported
|
||||
if (mvkIsAnyFlagEnabled(advExtns, MVK_CONFIG_ADVERTISE_EXTENSIONS_WSI)) {
|
||||
MVK_EXTENSION_MIN_OS(EXT_METAL_SURFACE, 10.11, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(MVK_IOS_SURFACE, MVK_NA, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(MVK_MACOS_SURFACE, 10.11, MVK_NA, MVK_NA)
|
||||
MVK_EXTENSION_MIN_OS(KHR_SURFACE, 10.11, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(KHR_SWAPCHAIN, 10.11, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(EXT_METAL_SURFACE, 10.11, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(MVK_IOS_SURFACE, MVK_NA, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(MVK_MACOS_SURFACE, 10.11, MVK_NA, MVK_NA)
|
||||
MVK_EXTENSION_MIN_OS(KHR_SURFACE, 10.11, 8.0, 1.0)
|
||||
MVK_EXTENSION_MIN_OS(KHR_SWAPCHAIN, 10.11, 8.0, 1.0)
|
||||
}
|
||||
if (mvkIsAnyFlagEnabled(advExtns, MVK_CONFIG_ADVERTISE_EXTENSIONS_PORTABILITY)) {
|
||||
MVK_EXTENSION_MIN_OS(KHR_PORTABILITY_SUBSET, 10.11, 8.0, 1.0)
|
||||
|
||||
@@ -52,6 +52,7 @@ static uint32_t expandAPIVersion(uint32_t apiVer) {
|
||||
case 11: return VK_API_VERSION_1_1;
|
||||
case 12: return VK_API_VERSION_1_2;
|
||||
case 13: return VK_API_VERSION_1_3;
|
||||
case 14: return VK_API_VERSION_1_4;
|
||||
default: return std::min(apiVer, MVK_VULKAN_API_VERSION);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
0)
|
||||
|
||||
/** Macro to determine the Vulkan version supported by MoltenVK. */
|
||||
#define MVK_VULKAN_API_VERSION MVK_VULKAN_API_VERSION_HEADER(VK_API_VERSION_1_3)
|
||||
#define MVK_VULKAN_API_VERSION MVK_VULKAN_API_VERSION_HEADER(VK_API_VERSION_1_4)
|
||||
|
||||
/**
|
||||
* IOSurfaces are supported on macOS, and on iOS starting with iOS 11.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"file_format_version" : "1.0.0",
|
||||
"ICD": {
|
||||
"library_path": "./libMoltenVK.dylib",
|
||||
"api_version" : "1.3.0",
|
||||
"api_version" : "1.4.0",
|
||||
"is_portability_driver" : true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ Table of Contents
|
||||
Introduction to MoltenVK
|
||||
------------------------
|
||||
|
||||
**MoltenVK** is a layered implementation of [*Vulkan 1.3*](https://www.khronos.org/vulkan)
|
||||
**MoltenVK** is a layered implementation of [*Vulkan 1.4*](https://www.khronos.org/vulkan)
|
||||
graphics and compute functionality, that is built on Apple's [*Metal*](https://developer.apple.com/metal)
|
||||
graphics and compute framework on *macOS*, *iOS*, *tvOS*, and *visionOS*. **MoltenVK** allows
|
||||
you to use *Vulkan* graphics and compute functionality to develop modern, cross-platform,
|
||||
@@ -61,7 +61,7 @@ be compatible with all standard distribution channels, including *Apple's App St
|
||||
The **MoltenVK** runtime package contains two products:
|
||||
|
||||
- **MoltenVK** is a implementation of an almost-complete subset of the
|
||||
[*Vulkan 1.3*](https://www.khronos.org/vulkan) graphics and compute API.
|
||||
[*Vulkan 1.4*](https://www.khronos.org/vulkan) graphics and compute API.
|
||||
|
||||
- **MoltenVKShaderConverter** converts *SPIR-V* shader code to *Metal Shading Language (MSL)* shader code.
|
||||
The converter is embedded in the **MoltenVK** runtime to automatically convert *SPIR-V* shaders
|
||||
@@ -388,11 +388,11 @@ the contents of that directory out of this **MoltenVK** repository into your own
|
||||
**MoltenVK** and *Vulkan* Compliance
|
||||
------------------------------------
|
||||
|
||||
**MoltenVK** is designed to be an implementation of a *Vulkan 1.3* subset that runs on *macOS*, *iOS*,
|
||||
**MoltenVK** is designed to be an implementation of a *Vulkan 1.4* subset that runs on *macOS*, *iOS*,
|
||||
*tvOS*, and *visionOS* platforms by mapping *Vulkan* capability to native *Metal* capability.
|
||||
|
||||
The fundamental design and development goal of **MoltenVK** is to provide this capability in a way that
|
||||
is both maximally compliant with the *Vulkan 1.3* specification, and maximally performant.
|
||||
is both maximally compliant with the *Vulkan 1.4* specification, and maximally performant.
|
||||
|
||||
Such compliance and performance is inherently affected by the capability available through *Metal*,
|
||||
as the native graphics driver on *macOS*, *iOS*, *tvOS*, and *visionOS* platforms. *Vulkan*
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
# If this parameter is not provided, it defaults to:
|
||||
# "../../VK-GL-CTS/build/external/vulkancts/modules/vulkan/Debug".
|
||||
#
|
||||
# -cMm
|
||||
# Test conformance against Vulkan version M.m, with no additional extensions,
|
||||
# under the Vulkan Portability initiative.
|
||||
# In neither this nor the -p option is specified, the tests are run against the
|
||||
# latest Vulkan version, plus all extensions, that are supported by MoltenVK.
|
||||
#
|
||||
# -p
|
||||
# Same as the --portability option.
|
||||
#
|
||||
@@ -51,6 +57,7 @@ caselist_file=""
|
||||
results_file=""
|
||||
failures_file=""
|
||||
is_portability=""
|
||||
conformance_version=""
|
||||
|
||||
while (( "$#" )); do
|
||||
case "$1" in
|
||||
@@ -70,6 +77,26 @@ while (( "$#" )); do
|
||||
is_portability="Y"
|
||||
shift 1
|
||||
;;
|
||||
-c14)
|
||||
conformance_version="14"
|
||||
shift 1
|
||||
;;
|
||||
-c13)
|
||||
conformance_version="13"
|
||||
shift 1
|
||||
;;
|
||||
-c12)
|
||||
conformance_version="12"
|
||||
shift 1
|
||||
;;
|
||||
-c11)
|
||||
conformance_version="11"
|
||||
shift 1
|
||||
;;
|
||||
-c10 | -p | --portability)
|
||||
conformance_version="10"
|
||||
shift 1
|
||||
;;
|
||||
-*|--*=)
|
||||
echo "Error: Unsupported option $1. See usage instructions in body of this script." >&2
|
||||
exit 1
|
||||
@@ -102,8 +129,17 @@ fi
|
||||
# - MVK_CONFIG_API_VERSION_TO_ADVERTISE = 4194304 (VK_API_VERSION_1_0).
|
||||
# - MVK_CONFIG_ADVERTISE_EXTENSIONS = 4 (VK_KHR_portability_subset and prerequistes).
|
||||
if [ "${is_portability}" != "" ]; then
|
||||
export MVK_CONFIG_API_VERSION_TO_ADVERTISE=4194304
|
||||
export MVK_CONFIG_API_VERSION_TO_ADVERTISE=10
|
||||
export MVK_CONFIG_ADVERTISE_EXTENSIONS=4
|
||||
echo "Testing against Vulkan portability ${conformance_version} with Vulkan portability extension."
|
||||
fi
|
||||
|
||||
# When testing conformance to a particular Vulkan version,
|
||||
# advertise that version, and disable all extensions except portability.
|
||||
if [ "${conformance_version}" != "" ]; then
|
||||
export MVK_CONFIG_API_VERSION_TO_ADVERTISE="${conformance_version}"
|
||||
export MVK_CONFIG_ADVERTISE_EXTENSIONS=4
|
||||
echo "Testing against Vulkan ${conformance_version} with only Vulkan portability extension."
|
||||
fi
|
||||
|
||||
# ----- System settings ------
|
||||
|
||||
Reference in New Issue
Block a user