blob: c18ac668211daa7493df1aaff49efca32d273583 [file] [log] [blame]
/*
* MVKEnvironment.h
*
* Copyright (c) 2014-2018 The Brenwill Workshop Ltd. (http://www.brenwill.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "MVKCommonEnvironment.h"
/** Macro to determine the Vulkan version supported by MoltenVK. */
#define MVK_VULKAN_API_VERSION VK_MAKE_VERSION(VK_VERSION_MAJOR(VK_API_VERSION_1_0), \
VK_VERSION_MINOR(VK_API_VERSION_1_0), \
VK_HEADER_VERSION)
/**
* Macro to adjust the specified Vulkan version to a value that can be compared for conformance
* against another Vulkan version. This macro strips the patch value from the specified Vulkan
* version and replaces it with zero. A Vulkan version is comformant with another version if it
* has the same or higher major and minor values, regardless of the patch value of each version.
* In particular, by definition, a Vulkan version is conformant with another Vulkan version that
* has a larger patch number, as long as it has a same or greater major and minor value.
*/
#define MVK_VULKAN_API_VERSION_CONFORM(api_ver) VK_MAKE_VERSION(VK_VERSION_MAJOR(api_ver), \
VK_VERSION_MINOR(api_ver), \
0)