namespace Brutal.VulkanApi { public static partial class Vulkan { /// /// VK_MAKE_VERSION - Construct an API version number /// /// /// /// VK_MAKE_VERSION constructs an API version number. /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_MAKE_VERSION(major, minor, patch) \ /// ((((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch))) /// /// /// is the major version number. /// is the minor version number. /// is the patch version number. public static int MakeVersion(int major, int minor, int patch) => unchecked((int)((((uint)(major)) << 22) | (((uint)(minor)) << 12) | ((uint)(patch)))); /// /// VK_VERSION_MAJOR - Extract API major version number /// /// /// /// VK_VERSION_MAJOR extracts the API major version number from a packed /// version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22U) /// /// public static int VersionMajor(int version) => unchecked((int)((uint)(version) >> 22)); /// /// VK_VERSION_MINOR - Extract API minor version number /// /// /// /// VK_VERSION_MINOR extracts the API minor version number from a packed /// version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU) /// /// public static int VersionMinor(int version) => unchecked((int)(((uint)(version) >> 12) & 0x3FF)); /// /// VK_VERSION_PATCH - Extract API patch version number /// /// /// /// VK_VERSION_PATCH extracts the API patch version number from a packed /// version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) /// /// public static int VersionPatch(int version) => unchecked((int)((uint)(version) & 0xFFF)); /// /// VK_MAKE_API_VERSION - Construct an API version number /// /// /// /// VK_MAKE_API_VERSION constructs an API version number. /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_MAKE_API_VERSION(variant, major, minor, patch) \ /// ((((uint32_t)(variant)) << 29U) | (((uint32_t)(major)) << 22U) | (((uint32_t)(minor)) << 12U) | ((uint32_t)(patch))) /// /// /// is the variant number. /// is the major version number. /// is the minor version number. /// is the patch version number. public static int MakeApiVersion(int variant, int major, int minor, int patch) => unchecked( (int)((((uint)(variant)) << 29) | (((uint)(major)) << 22) | (((uint)(minor)) << 12) | ((uint)(patch))) ); /// /// VK_API_VERSION_VARIANT - Extract API variant number /// /// /// /// VK_API_VERSION_VARIANT extracts the API variant number from a packed /// version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_API_VERSION_VARIANT(version) ((uint32_t)(version) >> 29U) /// /// public static int ApiVersionVariant(int version) => unchecked((int)((uint)(version) >> 29)); /// /// VK_API_VERSION_MAJOR - Extract API major version number /// /// /// /// VK_API_VERSION_MAJOR extracts the API major version number from a /// packed version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22U) & 0x7FU) /// /// public static int ApiVersionMajor(int version) => unchecked((int)(((uint)(version) >> 22) & 0x7F)); /// /// VK_API_VERSION_MINOR - Extract API minor version number /// /// /// /// VK_API_VERSION_MINOR extracts the API minor version number from a /// packed version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_API_VERSION_MINOR(version) (((uint32_t)(version) >> 12U) & 0x3FFU) /// /// public static int ApiVersionMinor(int version) => unchecked((int)(((uint)(version) >> 12) & 0x3FF)); /// /// VK_API_VERSION_PATCH - Extract API patch version number /// /// /// /// VK_API_VERSION_PATCH extracts the API patch version number from a /// packed version number: /// /// /// // Provided by VK_VERSION_1_0 /// #define VK_API_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU) /// /// public static int ApiVersionPatch(int version) => unchecked((int)((uint)(version) & 0xFFF)); /// /// VK_MAKE_VIDEO_STD_VERSION /// public static int MakeVideoStdVersion(int major, int minor, int patch) => unchecked((int)((((uint)(major)) << 22) | (((uint)(minor)) << 12) | ((uint)(patch)))); } }