mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-24 21:01:59 +00:00
add MoltenVK 1.0.33
it's .dylib instead of static library because it will be loaded dynamically on supported versions of macOS, i.e. 10.11+
This commit is contained in:
parent
6b5419b759
commit
44ffa4eaf6
23 changed files with 67318 additions and 0 deletions
445
moltenvk/include/MoltenVK/mvk_datatypes.h
Normal file
445
moltenvk/include/MoltenVK/mvk_datatypes.h
Normal file
|
@ -0,0 +1,445 @@
|
|||
/*
|
||||
* mvk_datatypes.h
|
||||
*
|
||||
* Copyright (c) 2014-2019 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.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* This file contains functions for converting between Vulkan and Metal data types.
|
||||
*
|
||||
* The functions here are used internally by MoltenVK, and are exposed here
|
||||
* as a convenience for use elsewhere within applications using MoltenVK.
|
||||
*/
|
||||
|
||||
#ifndef __mvkDataTypes_h_
|
||||
#define __mvkDataTypes_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "mvk_vulkan.h"
|
||||
|
||||
#import <Metal/Metal.h>
|
||||
#import <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Image properties
|
||||
|
||||
#pragma mark Texture formats
|
||||
|
||||
/** Enumerates the data type of a format. */
|
||||
typedef enum {
|
||||
kMVKFormatNone, /**< Format type is unknown. */
|
||||
kMVKFormatColorHalf, /**< A 16-bit floating point color. */
|
||||
kMVKFormatColorFloat, /**< A 32-bit floating point color. */
|
||||
kMVKFormatColorInt8, /**< A signed 8-bit integer color. */
|
||||
kMVKFormatColorUInt8, /**< An unsigned 8-bit integer color. */
|
||||
kMVKFormatColorInt16, /**< A signed 16-bit integer color. */
|
||||
kMVKFormatColorUInt16, /**< An unsigned 16-bit integer color. */
|
||||
kMVKFormatColorInt32, /**< A signed 32-bit integer color. */
|
||||
kMVKFormatColorUInt32, /**< An unsigned 32-bit integer color. */
|
||||
kMVKFormatDepthStencil, /**< A depth and stencil value. */
|
||||
kMVKFormatCompressed, /**< A block-compressed color. */
|
||||
} MVKFormatType;
|
||||
|
||||
/** Returns whether the VkFormat is supported by this implementation. */
|
||||
bool mvkVkFormatIsSupported(VkFormat vkFormat);
|
||||
|
||||
/** Returns whether the MTLPixelFormat is supported by this implementation. */
|
||||
bool mvkMTLPixelFormatIsSupported(MTLPixelFormat mtlFormat);
|
||||
|
||||
/** Returns the format type corresponding to the specified Vulkan VkFormat, */
|
||||
MVKFormatType mvkFormatTypeFromVkFormat(VkFormat vkFormat);
|
||||
|
||||
/** Returns the format type corresponding to the specified Metal MTLPixelFormat, */
|
||||
MVKFormatType mvkFormatTypeFromMTLPixelFormat(MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the Metal MTLPixelFormat corresponding to the specified Vulkan VkFormat,
|
||||
* or returns MTLPixelFormatInvalid if no corresponding MTLPixelFormat exists.
|
||||
*
|
||||
* Not all MTLPixelFormats returned by this function are supported by all GPU's,
|
||||
* and, internally, MoltenVK may substitute and use a different MTLPixelFormat than
|
||||
* is returned by this function for a particular Vulkan VkFormat value.
|
||||
*
|
||||
* Not all macOS GPU's support the MTLPixelFormatDepth24Unorm_Stencil8 pixel format.
|
||||
* Even though this function will return that value when passed the corresponding
|
||||
* VkFormat value, internally, MoltenVK will use the MTLPixelFormatDepth32Float_Stencil8
|
||||
* instead when a GPU does not support the MTLPixelFormatDepth24Unorm_Stencil8 pixel format.
|
||||
* On an macOS device that has more than one GPU, one of the GPU's may support the
|
||||
* MTLPixelFormatDepth24Unorm_Stencil8 pixel format while another may not.
|
||||
*/
|
||||
MTLPixelFormat mvkMTLPixelFormatFromVkFormat(VkFormat vkFormat);
|
||||
|
||||
/**
|
||||
* Returns the Vulkan VkFormat corresponding to the specified Metal MTLPixelFormat,
|
||||
* or returns VK_FORMAT_UNDEFINED if no corresponding VkFormat exists.
|
||||
*/
|
||||
VkFormat mvkVkFormatFromMTLPixelFormat(MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a texel block of the specified Vulkan format.
|
||||
* For uncompressed formats, the returned value corresponds to the size in bytes of a single texel.
|
||||
*/
|
||||
uint32_t mvkVkFormatBytesPerBlock(VkFormat vkFormat);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a texel block of the specified Metal format.
|
||||
* For uncompressed formats, the returned value corresponds to the size in bytes of a single texel.
|
||||
*/
|
||||
uint32_t mvkMTLPixelFormatBytesPerBlock(MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the size of the compression block, measured in texels for a Vulkan format.
|
||||
* The returned value will be {1, 1} for non-compressed formats.
|
||||
*/
|
||||
VkExtent2D mvkVkFormatBlockTexelSize(VkFormat vkFormat);
|
||||
|
||||
/**
|
||||
* Returns the size of the compression block, measured in texels for a Metal format.
|
||||
* The returned value will be {1, 1} for non-compressed formats.
|
||||
*/
|
||||
VkExtent2D mvkMTLPixelFormatBlockTexelSize(MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a texel of the specified Vulkan format.
|
||||
* The returned value may be fractional for certain compressed formats.
|
||||
*/
|
||||
float mvkVkFormatBytesPerTexel(VkFormat vkFormat);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a texel of the specified Metal format.
|
||||
* The returned value may be fractional for certain compressed formats.
|
||||
*/
|
||||
float mvkMTLPixelFormatBytesPerTexel(MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a row of texels of the specified Vulkan format.
|
||||
*
|
||||
* For compressed formats, this takes into consideration the compression block size,
|
||||
* and texelsPerRow should specify the width in texels, not blocks. The result is rounded
|
||||
* up if texelsPerRow is not an integer multiple of the compression block width.
|
||||
*/
|
||||
size_t mvkVkFormatBytesPerRow(VkFormat vkFormat, uint32_t texelsPerRow);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a row of texels of the specified Metal format.
|
||||
*
|
||||
* For compressed formats, this takes into consideration the compression block size,
|
||||
* and texelsPerRow should specify the width in texels, not blocks. The result is rounded
|
||||
* up if texelsPerRow is not an integer multiple of the compression block width.
|
||||
*/
|
||||
size_t mvkMTLPixelFormatBytesPerRow(MTLPixelFormat mtlFormat, uint32_t texelsPerRow);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a texture layer of the specified Vulkan format.
|
||||
*
|
||||
* For compressed formats, this takes into consideration the compression block size,
|
||||
* and texelRowsPerLayer should specify the height in texels, not blocks. The result is
|
||||
* rounded up if texelRowsPerLayer is not an integer multiple of the compression block height.
|
||||
*/
|
||||
size_t mvkVkFormatBytesPerLayer(VkFormat vkFormat, size_t bytesPerRow, uint32_t texelRowsPerLayer);
|
||||
|
||||
/**
|
||||
* Returns the size, in bytes, of a texture layer of the specified Metal format.
|
||||
* For compressed formats, this takes into consideration the compression block size,
|
||||
* and texelRowsPerLayer should specify the height in texels, not blocks. The result is
|
||||
* rounded up if texelRowsPerLayer is not an integer multiple of the compression block height.
|
||||
*/
|
||||
size_t mvkMTLPixelFormatBytesPerLayer(MTLPixelFormat mtlFormat, size_t bytesPerRow, uint32_t texelRowsPerLayer);
|
||||
|
||||
/**
|
||||
* Returns the default properties for the specified Vulkan format.
|
||||
*
|
||||
* Not all MTLPixelFormats returned by this function are supported by all GPU's, and, as a
|
||||
* result, MoltenVK may return a different value from the vkGetPhysicalDeviceFormatProperties()
|
||||
* function than is returned here. Use the vkGetPhysicalDeviceFormatProperties() function to
|
||||
* return the properties for a particular GPU.
|
||||
*
|
||||
* Setting assumeGPUSupportsDefault to true allows the default format properties to be returned.
|
||||
* The assumeGPUSupportsDefault flag can be set to false if it is already known that the format
|
||||
* is not supported by a particular GPU for images, in which case all of the returned properties
|
||||
* will be disabled, except possibly VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT, which may be supported
|
||||
* for the format even without image support.
|
||||
*/
|
||||
VkFormatProperties mvkVkFormatProperties(VkFormat vkFormat, bool assumeGPUSupportsDefault = true);
|
||||
|
||||
/** Returns the name of the specified Vulkan format. */
|
||||
const char* mvkVkFormatName(VkFormat vkFormat);
|
||||
|
||||
/** Returns the name of the specified Metal pixel format. */
|
||||
const char* mvkMTLPixelFormatName(MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the MTLClearColor value corresponding to the color value in the VkClearValue,
|
||||
* extracting the color value that is VkFormat for the VkFormat.
|
||||
*/
|
||||
MTLClearColor mvkMTLClearColorFromVkClearValue(VkClearValue vkClearValue,
|
||||
VkFormat vkFormat);
|
||||
|
||||
/** Returns the Metal depth value corresponding to the depth value in the specified VkClearValue. */
|
||||
double mvkMTLClearDepthFromVkClearValue(VkClearValue vkClearValue);
|
||||
|
||||
/** Returns the Metal stencil value corresponding to the stencil value in the specified VkClearValue. */
|
||||
uint32_t mvkMTLClearStencilFromVkClearValue(VkClearValue vkClearValue);
|
||||
|
||||
/** Returns whether the specified Metal MTLPixelFormat can be used as a depth format. */
|
||||
bool mvkMTLPixelFormatIsDepthFormat(MTLPixelFormat mtlFormat);
|
||||
|
||||
/** Returns whether the specified Metal MTLPixelFormat can be used as a stencil format. */
|
||||
bool mvkMTLPixelFormatIsStencilFormat(MTLPixelFormat mtlFormat);
|
||||
|
||||
/** Returns whether the specified Metal MTLPixelFormat is a PVRTC format. */
|
||||
bool mvkMTLPixelFormatIsPVRTCFormat(MTLPixelFormat mtlFormat);
|
||||
|
||||
/** Returns the Metal texture type from the specified Vulkan image properties. */
|
||||
MTLTextureType mvkMTLTextureTypeFromVkImageType(VkImageType vkImageType,
|
||||
uint32_t arraySize,
|
||||
bool isMultisample);
|
||||
|
||||
/** Returns the Vulkan image type from the Metal texture type. */
|
||||
VkImageType mvkVkImageTypeFromMTLTextureType(MTLTextureType mtlTextureType);
|
||||
|
||||
/** Returns the Metal MTLTextureType corresponding to the Vulkan VkImageViewType. */
|
||||
MTLTextureType mvkMTLTextureTypeFromVkImageViewType(VkImageViewType vkImageViewType, bool isMultisample);
|
||||
|
||||
/** Returns the Metal texture usage from the Vulkan image usage. */
|
||||
MTLTextureUsage mvkMTLTextureUsageFromVkImageUsageFlags(VkImageUsageFlags vkImageUsageFlags);
|
||||
|
||||
/** Returns the Vulkan image usage from the Metal texture usage and format. */
|
||||
VkImageUsageFlags mvkVkImageUsageFlagsFromMTLTextureUsage(MTLTextureUsage mtlUsage, MTLPixelFormat mtlFormat);
|
||||
|
||||
/**
|
||||
* Returns the numeric sample count corresponding to the specified Vulkan sample count flag.
|
||||
*
|
||||
* The specified flags value should have only one bit set, otherwise an invalid numeric value will be returned.
|
||||
*/
|
||||
uint32_t mvkSampleCountFromVkSampleCountFlagBits(VkSampleCountFlagBits vkSampleCountFlag);
|
||||
|
||||
/** Returns the Vulkan bit flags corresponding to the numeric sample count, which must be a PoT value. */
|
||||
VkSampleCountFlagBits mvkVkSampleCountFlagBitsFromSampleCount(NSUInteger sampleCount);
|
||||
|
||||
|
||||
#pragma mark Mipmaps
|
||||
|
||||
/**
|
||||
* Returns the number of mipmap levels available to an image with the specified side dimension.
|
||||
*
|
||||
* If the specified dimension is a power-of-two, the value returned is (log2(dim) + 1).
|
||||
* If the specified dimension is NOT a power-of-two, the value returned is 0, indicating
|
||||
* that the image cannot support mipmaps.
|
||||
*/
|
||||
uint32_t mvkMipmapLevels(uint32_t dim);
|
||||
|
||||
/**
|
||||
* Returns the number of mipmap levels available to an image with the specified extent.
|
||||
*
|
||||
* If each dimension in the specified extent is a power-of-two, the value returned
|
||||
* is MAX(log2(dim) + 1) across both dimensions. If either dimension in the specified
|
||||
* extent is NOT a power-of-two, the value returned is 1, indicating that the image
|
||||
* cannot support mipmaps, and that only the base mip level can be used.
|
||||
*/
|
||||
uint32_t mvkMipmapLevels2D(VkExtent2D extent);
|
||||
|
||||
/**
|
||||
* Returns the number of mipmap levels available to an image with the specified extent.
|
||||
*
|
||||
* If each dimension in the specified extent is a power-of-two, the value returned
|
||||
* is MAX(log2(dim) + 1) across all dimensions. If either dimension in the specified
|
||||
* extent is NOT a power-of-two, the value returned is 1, indicating that the image
|
||||
* cannot support mipmaps, and that only the base mip level can be used.
|
||||
*/
|
||||
uint32_t mvkMipmapLevels3D(VkExtent3D extent);
|
||||
|
||||
/**
|
||||
* Returns the size of the specified zero-based mipmap level,
|
||||
* when the size of the base level is the specified size.
|
||||
*/
|
||||
VkExtent2D mvkMipmapLevelSizeFromBaseSize2D(VkExtent2D baseSize, uint32_t level);
|
||||
|
||||
/**
|
||||
* Returns the size of the specified zero-based mipmap level,
|
||||
* when the size of the base level is the specified size.
|
||||
*/
|
||||
VkExtent3D mvkMipmapLevelSizeFromBaseSize3D(VkExtent3D baseSize, uint32_t level);
|
||||
|
||||
/**
|
||||
* Returns the size of the mipmap base level, when the size of
|
||||
* the specified zero-based mipmap level is the specified size.
|
||||
*/
|
||||
VkExtent2D mvkMipmapBaseSizeFromLevelSize2D(VkExtent2D levelSize, uint32_t level);
|
||||
|
||||
/**
|
||||
* Returns the size of the mipmap base level, when the size of
|
||||
* the specified zero-based mipmap level is the specified size.
|
||||
*/
|
||||
VkExtent3D mvkMipmapBaseSizeFromLevelSize3D(VkExtent3D levelSize, uint32_t level);
|
||||
|
||||
|
||||
#pragma mark Samplers
|
||||
|
||||
/**
|
||||
* Returns the Metal MTLSamplerAddressMode corresponding to the specified Vulkan VkSamplerAddressMode,
|
||||
* or returns MTLSamplerAddressModeMirrorClampToEdge if no corresponding MTLSamplerAddressMode exists.
|
||||
*/
|
||||
MTLSamplerAddressMode mvkMTLSamplerAddressModeFromVkSamplerAddressMode(VkSamplerAddressMode vkMode);
|
||||
|
||||
#if MVK_MACOS
|
||||
/**
|
||||
* Returns the Metal MTLSamplerBorderColor corresponding to the specified Vulkan VkBorderColor,
|
||||
* or returns MTLSamplerBorderColorTransparentBlack if no corresponding MTLSamplerBorderColor exists.
|
||||
*/
|
||||
MTLSamplerBorderColor mvkMTLSamplerBorderColorFromVkBorderColor(VkBorderColor vkColor);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns the Metal MTLSamplerMinMagFilter corresponding to the specified Vulkan VkFilter,
|
||||
* or returns MTLSamplerMinMagFilterNearest if no corresponding MTLSamplerMinMagFilter exists.
|
||||
*/
|
||||
MTLSamplerMinMagFilter mvkMTLSamplerMinMagFilterFromVkFilter(VkFilter vkFilter);
|
||||
|
||||
/**
|
||||
* Returns the Metal MTLSamplerMipFilter corresponding to the specified Vulkan VkSamplerMipmapMode,
|
||||
* or returns MTLSamplerMipFilterNotMipmapped if no corresponding MTLSamplerMipFilter exists.
|
||||
*/
|
||||
MTLSamplerMipFilter mvkMTLSamplerMipFilterFromVkSamplerMipmapMode(VkSamplerMipmapMode vkMode);
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Render pipeline
|
||||
|
||||
/** Returns the Metal MTLColorWriteMask corresponding to the specified Vulkan VkColorComponentFlags. */
|
||||
MTLColorWriteMask mvkMTLColorWriteMaskFromVkChannelFlags(VkColorComponentFlags vkWriteFlags);
|
||||
|
||||
/** Returns the Metal MTLBlendOperation corresponding to the specified Vulkan VkBlendOp. */
|
||||
MTLBlendOperation mvkMTLBlendOperationFromVkBlendOp(VkBlendOp vkBlendOp);
|
||||
|
||||
/** Returns the Metal MTLBlendFactor corresponding to the specified Vulkan VkBlendFactor. */
|
||||
MTLBlendFactor mvkMTLBlendFactorFromVkBlendFactor(VkBlendFactor vkBlendFactor);
|
||||
|
||||
/**
|
||||
* Returns the Metal MTLVertexFormat corresponding to the specified
|
||||
* Vulkan VkFormat as used as a vertex attribute format.
|
||||
*/
|
||||
MTLVertexFormat mvkMTLVertexFormatFromVkFormat(VkFormat vkFormat);
|
||||
|
||||
/** Returns the Metal MTLVertexStepFunction corresponding to the specified Vulkan VkVertexInputRate. */
|
||||
MTLVertexStepFunction mvkMTLVertexStepFunctionFromVkVertexInputRate(VkVertexInputRate vkVtxStep);
|
||||
|
||||
/** Returns the Metal MTLPrimitiveType corresponding to the specified Vulkan VkPrimitiveTopology. */
|
||||
MTLPrimitiveType mvkMTLPrimitiveTypeFromVkPrimitiveTopology(VkPrimitiveTopology vkTopology);
|
||||
|
||||
/** Returns the Metal MTLPrimitiveTopologyClass corresponding to the specified Vulkan VkPrimitiveTopology. */
|
||||
MTLPrimitiveTopologyClass mvkMTLPrimitiveTopologyClassFromVkPrimitiveTopology(VkPrimitiveTopology vkTopology);
|
||||
|
||||
/** Returns the Metal MTLTriangleFillMode corresponding to the specified Vulkan VkPolygonMode, */
|
||||
MTLTriangleFillMode mvkMTLTriangleFillModeFromVkPolygonMode(VkPolygonMode vkFillMode);
|
||||
|
||||
/** Returns the Metal MTLLoadAction corresponding to the specified Vulkan VkAttachmentLoadOp. */
|
||||
MTLLoadAction mvkMTLLoadActionFromVkAttachmentLoadOp(VkAttachmentLoadOp vkLoadOp);
|
||||
|
||||
/** Returns the Metal MTLStoreAction corresponding to the specified Vulkan VkAttachmentStoreOp. */
|
||||
MTLStoreAction mvkMTLStoreActionFromVkAttachmentStoreOp(VkAttachmentStoreOp vkStoreOp, bool hasResolveAttachment = false);
|
||||
|
||||
/** Returns the Metal MTLViewport corresponding to the specified Vulkan VkViewport. */
|
||||
MTLViewport mvkMTLViewportFromVkViewport(VkViewport vkViewport);
|
||||
|
||||
/** Returns the Metal MTLScissorRect corresponding to the specified Vulkan VkRect2D. */
|
||||
MTLScissorRect mvkMTLScissorRectFromVkRect2D(VkRect2D vkRect);
|
||||
|
||||
/** Returns the Metal MTLCompareFunction corresponding to the specified Vulkan VkCompareOp, */
|
||||
MTLCompareFunction mvkMTLCompareFunctionFromVkCompareOp(VkCompareOp vkOp);
|
||||
|
||||
/** Returns the Metal MTLStencilOperation corresponding to the specified Vulkan VkStencilOp, */
|
||||
MTLStencilOperation mvkMTLStencilOperationFromVkStencilOp(VkStencilOp vkOp);
|
||||
|
||||
/** Returns the Metal MTLCullMode corresponding to the specified Vulkan VkCullModeFlags, */
|
||||
MTLCullMode mvkMTLCullModeFromVkCullModeFlags(VkCullModeFlags vkCull);
|
||||
|
||||
/** Returns the Metal MTLWinding corresponding to the specified Vulkan VkFrontFace, */
|
||||
MTLWinding mvkMTLWindingFromVkFrontFace(VkFrontFace vkWinding);
|
||||
|
||||
/** Returns the Metal MTLIndexType corresponding to the specified Vulkan VkIndexType, */
|
||||
MTLIndexType mvkMTLIndexTypeFromVkIndexType(VkIndexType vkIdxType);
|
||||
|
||||
/** Returns the size, in bytes, of a vertex index of the specified type. */
|
||||
size_t mvkMTLIndexTypeSizeInBytes(MTLIndexType mtlIdxType);
|
||||
|
||||
|
||||
#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 Metal MTLOrigin constructed from a VkOffset3D. */
|
||||
static inline MTLOrigin mvkMTLOriginFromVkOffset3D(VkOffset3D vkOffset) {
|
||||
return MTLOriginMake(vkOffset.x, vkOffset.y, vkOffset.z);
|
||||
}
|
||||
|
||||
/** Returns a Vulkan VkOffset3D constructed from a Metal MTLOrigin. */
|
||||
static inline VkOffset3D mvkVkOffset3DFromMTLSize(MTLOrigin mtlOrigin) {
|
||||
return { (int32_t)mtlOrigin.x, (int32_t)mtlOrigin.y, (int32_t)mtlOrigin.z };
|
||||
}
|
||||
|
||||
/** Returns a Metal MTLSize constructed from a VkExtent3D. */
|
||||
static inline MTLSize mvkMTLSizeFromVkExtent3D(VkExtent3D vkExtent) {
|
||||
return MTLSizeMake(vkExtent.width, vkExtent.height, vkExtent.depth);
|
||||
}
|
||||
|
||||
/** Returns a Vulkan VkExtent3D constructed from a Metal MTLSize. */
|
||||
static inline VkExtent3D mvkVkExtent3DFromMTLSize(MTLSize mtlSize) {
|
||||
return { (uint32_t)mtlSize.width, (uint32_t)mtlSize.height, (uint32_t)mtlSize.depth };
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Memory options
|
||||
|
||||
/** Macro indicating the Vulkan memory type bits corresponding to Metal private memory (not host visible). */
|
||||
#define MVK_VK_MEMORY_TYPE_METAL_PRIVATE (VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
|
||||
|
||||
/** Macro indicating the Vulkan memory type bits corresponding to Metal managed memory (host visible and non-coherent). */
|
||||
#define MVK_VK_MEMORY_TYPE_METAL_MANAGED (VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
|
||||
|
||||
/** Macro indicating the Vulkan memory type bits corresponding to Metal shared memory (host visible and coherent). */
|
||||
#define MVK_VK_MEMORY_TYPE_METAL_SHARED (VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
|
||||
|
||||
/** Macro indicating the Vulkan memory type bits corresponding to Metal memoryless memory (not host visible and lazily allocated). */
|
||||
#define MVK_VK_MEMORY_TYPE_METAL_MEMORYLESS (VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT)
|
||||
|
||||
/** Returns the Metal storage mode corresponding to the specified Vulkan memory flags. */
|
||||
MTLStorageMode mvkMTLStorageModeFromVkMemoryPropertyFlags(VkMemoryPropertyFlags vkFlags);
|
||||
|
||||
/** Returns the Metal CPU cache mode corresponding to the specified Vulkan memory flags. */
|
||||
MTLCPUCacheMode mvkMTLCPUCacheModeFromVkMemoryPropertyFlags(VkMemoryPropertyFlags vkFlags);
|
||||
|
||||
/** Returns the Metal resource option flags corresponding to the specified Vulkan memory flags. */
|
||||
MTLResourceOptions mvkMTLResourceOptionsFromVkMemoryPropertyFlags(VkMemoryPropertyFlags vkFlags);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
45
moltenvk/include/MoltenVK/mvk_vulkan.h
Normal file
45
moltenvk/include/MoltenVK/mvk_vulkan.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* mvk_vulkan.h
|
||||
*
|
||||
* Copyright (c) 2014-2019 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* This is a convenience header file that loads vulkan.h with the appropriate MoltenVK
|
||||
* Vulkan platform extensions automatically enabled for iOS or macOS.
|
||||
*
|
||||
* When building for iOS, this header automatically enables the VK_MVK_ios_surface Vulkan extension.
|
||||
* When building for macOS, this header automatically enables the VK_MVK_macos_surface Vulkan extension.
|
||||
*/
|
||||
|
||||
#ifndef __mvk_vulkan_h_
|
||||
#define __mvk_vulkan_h_ 1
|
||||
|
||||
|
||||
#include <Availability.h>
|
||||
|
||||
#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
|
||||
# define VK_USE_PLATFORM_IOS_MVK 1
|
||||
#endif
|
||||
|
||||
#ifdef __MAC_OS_X_VERSION_MAX_ALLOWED
|
||||
# define VK_USE_PLATFORM_MACOS_MVK 1
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <vulkan-portability/vk_extx_portability_subset.h>
|
||||
|
||||
#endif
|
893
moltenvk/include/MoltenVK/vk_mvk_moltenvk.h
Normal file
893
moltenvk/include/MoltenVK/vk_mvk_moltenvk.h
Normal file
|
@ -0,0 +1,893 @@
|
|||
/*
|
||||
* vk_mvk_moltenvk.h
|
||||
*
|
||||
* Copyright (c) 2014-2019 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.
|
||||
*/
|
||||
|
||||
|
||||
/** Vulkan extension VK_MVK_moltenvk. */
|
||||
|
||||
#ifndef __vk_mvk_moltenvk_h_
|
||||
#define __vk_mvk_moltenvk_h_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "mvk_vulkan.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Metal/Metal.h>
|
||||
#import <IOSurface/IOSurfaceRef.h>
|
||||
#else
|
||||
typedef unsigned long MTLLanguageVersion;
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* The version number of MoltenVK is a single integer value, derived from the Major, Minor,
|
||||
* and Patch version values, where each of the Major, Minor, and Patch components is allocated
|
||||
* two decimal digits, in the format MjMnPt. This creates a version number that is both human
|
||||
* readable and allows efficient computational comparisons to a single integer number.
|
||||
*
|
||||
* The following examples illustrate how the MoltenVK version number is built from its components:
|
||||
* - 002000 (version 0.20.0)
|
||||
* - 010000 (version 1.0.0)
|
||||
* - 030104 (version 3.1.4)
|
||||
* - 401215 (version 4.12.15)
|
||||
*/
|
||||
#define MVK_VERSION_MAJOR 1
|
||||
#define MVK_VERSION_MINOR 0
|
||||
#define MVK_VERSION_PATCH 33
|
||||
|
||||
#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 18
|
||||
#define VK_MVK_MOLTENVK_EXTENSION_NAME "VK_MVK_moltenvk"
|
||||
|
||||
/**
|
||||
* MoltenVK configuration settings.
|
||||
*
|
||||
* To be active, some configuration settings must be set before a VkDevice is created.
|
||||
* See the description of the individual configuration structure members for more information.
|
||||
*
|
||||
* There are three mechanisms for setting the values of the MoltenVK configuration parameters:
|
||||
* - Runtime API via the vkGetMoltenVKConfigurationMVK()/vkSetMoltenVKConfigurationMVK() functions.
|
||||
* - Application runtime environment variables.
|
||||
* - Build settings at MoltenVK build time.
|
||||
*
|
||||
* To change the MoltenVK configuration settings at runtime using a programmatic API,
|
||||
* use the vkGetMoltenVKConfigurationMVK() and vkSetMoltenVKConfigurationMVK() functions
|
||||
* to retrieve, modify, and set a copy of the MVKConfiguration structure.
|
||||
*
|
||||
* The initial value of each of the configuration settings can established at runtime
|
||||
* by a corresponding environment variable, or if the environment variable is not set,
|
||||
* by a corresponding build setting at the time MoltenVK is compiled. The environment
|
||||
* variable and build setting for each configuration parameter share the same name.
|
||||
*
|
||||
* For example, the initial value of the shaderConversionFlipVertexY configuration setting
|
||||
* is set by the MVK_CONFIG_SHADER_CONVERSION_FLIP_VERTEX_Y at runtime, or by the
|
||||
* MVK_CONFIG_SHADER_CONVERSION_FLIP_VERTEX_Y build setting when MoltenVK is compiled.
|
||||
*
|
||||
* This structure may be extended as new features are added to MoltenVK. If you are linking to
|
||||
* an implementation of MoltenVK that was compiled from a different VK_MVK_MOLTENVK_SPEC_VERSION
|
||||
* than your app was, the size of this structure in your app may be larger or smaller than the
|
||||
* struct in MoltenVK. See the description of the vkGetMoltenVKConfigurationMVK() and
|
||||
* vkSetMoltenVKConfigurationMVK() functions for information about how to handle this.
|
||||
*
|
||||
* TO SUPPORT DYNAMIC LINKING TO THIS STRUCTURE AS DESCRIBED ABOVE, THIS STRUCTURE SHOULD NOT
|
||||
* BE CHANGED EXCEPT TO ADD ADDITIONAL MEMBERS ON THE END. EXISTING MEMBERS, AND THEIR ORDER,
|
||||
* SHOULD NOT BE CHANGED.
|
||||
*
|
||||
* In addition to the configuration parmeters in this structure, there are several settings that
|
||||
* can be configured through runtime environment variables or MoltenVK compile-time build settings:
|
||||
*
|
||||
* 1. The MVK_CONFIG_LOG_LEVEL runtime environment variable or MoltenVK compile-time build setting
|
||||
* controls the level of logging performned by MoltenVK using the following numeric values:
|
||||
* 0: No logging.
|
||||
* 1: Log errors only.
|
||||
* 2: Log errors and informational messages.
|
||||
* If neither is set, errors and informational messages are logged.
|
||||
*
|
||||
* 2. 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.
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
|
||||
/**
|
||||
* If enabled, debugging capabilities will be enabled, including logging
|
||||
* shader code during runtime shader conversion.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_DEBUG
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter is false if MoltenVK was
|
||||
* built in Release mode, and true if MoltenVK was built in Debug mode.
|
||||
*/
|
||||
VkBool32 debugMode;
|
||||
|
||||
/**
|
||||
* If enabled, MSL vertex shader code created during runtime shader conversion will
|
||||
* flip the Y-axis of each vertex, as the Vulkan Y-axis is the inverse of OpenGL.
|
||||
*
|
||||
* An alternate way to reverse the Y-axis is to employ a negative Y-axis value on
|
||||
* the viewport, in which case this parameter can be disabled.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
* Specifically, this parameter can be enabled when compiling some pipelines,
|
||||
* and disabled when compiling others. Existing pipelines are not automatically
|
||||
* re-compiled when this parameter is changed.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_SHADER_CONVERSION_FLIP_VERTEX_Y
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to true.
|
||||
*/
|
||||
VkBool32 shaderConversionFlipVertexY;
|
||||
|
||||
/**
|
||||
* If enabled, queue command submissions (vkQueueSubmit() & vkQueuePresentKHR()) will be
|
||||
* processed on the thread that called the submission function. If disabled, processing
|
||||
* will be dispatched to a GCD dispatch_queue whose priority is determined by
|
||||
* VkDeviceQueueCreateInfo::pQueuePriorities during vkCreateDevice().
|
||||
*
|
||||
* 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_SYNCHRONOUS_QUEUE_SUBMITS
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to true.
|
||||
*/
|
||||
VkBool32 synchronousQueueSubmits;
|
||||
|
||||
/**
|
||||
* If enabled, where possible, a Metal command buffer will be created and filled when each
|
||||
* Vulkan command buffer is filled. For applications that parallelize the filling of Vulkan
|
||||
* commmand buffers across multiple threads, this allows the Metal command buffers to also
|
||||
* be filled on the same parallel thread. Because each command buffer is filled separately,
|
||||
* this requires that each Vulkan command buffer requires a dedicated Metal command buffer.
|
||||
*
|
||||
* If disabled, a single Metal command buffer will be created and filled when the Vulkan
|
||||
* command buffers are submitted to the Vulkan queue. This allows a single Metal command
|
||||
* buffer to be used for all of the Vulkan command buffers in a queue submission. The
|
||||
* Metal command buffer is filled on the thread that processes the command queue submission.
|
||||
*
|
||||
* Depending on the nature of your application, you may find performance is improved by filling
|
||||
* the Metal command buffers on parallel threads, or you may find that performance is improved by
|
||||
* consolidating all Vulkan command buffers onto a single Metal command buffer during queue submission.
|
||||
*
|
||||
* Prefilling of a Metal command buffer will not occur during the filling of secondary command
|
||||
* buffers (VK_COMMAND_BUFFER_LEVEL_SECONDARY), or for primary command buffers that are intended
|
||||
* to be submitted to multiple queues concurrently (VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT).
|
||||
*
|
||||
* When enabling this features, be aware that one Metal command buffer is required for each Vulkan
|
||||
* command buffer. Depending on the number of command buffers that you use, you may also need to
|
||||
* change the value of the maxActiveMetalCommandBuffersPerQueue setting.
|
||||
*
|
||||
* In addition, if this feature is enabled, be aware that if you have recorded commands to a
|
||||
* Vulkan command buffer, and then choose to reset that command buffer instead of submitting it,
|
||||
* the corresponding prefilled Metal command buffer will still be submitted. This is because Metal
|
||||
* command buffers do not support the concept of being reset after being filled. Depending on when
|
||||
* and how often you do this, it may cause unexpected visual artifacts and unnecessary GPU load.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
* Specifically, this parameter can be enabled when filling some command buffers,
|
||||
* and disabled when filling others.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_PREFILL_METAL_COMMAND_BUFFERS
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to false.
|
||||
*/
|
||||
VkBool32 prefillMetalCommandBuffers;
|
||||
|
||||
/**
|
||||
* The maximum number of Metal command buffers that can be concurrently active per Vulkan queue.
|
||||
* The number of active Metal command buffers required depends on the prefillMetalCommandBuffers
|
||||
* setting. If prefillMetalCommandBuffers is enabled, one Metal command buffer is required per
|
||||
* Vulkan command buffer. If prefillMetalCommandBuffers is disabled, one Metal command buffer
|
||||
* is required per command buffer queue submission, which may be significantly less than the
|
||||
* number of Vulkan command buffers.
|
||||
*
|
||||
* 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_MAX_ACTIVE_METAL_COMMAND_BUFFERS_PER_QUEUE
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to 64.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
* Specifically, this parameter can be enabled when creating some query pools,
|
||||
* and disabled when creating others.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_SUPPORT_LARGE_QUERY_POOLS
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to true.
|
||||
*/
|
||||
VkBool32 supportLargeQueryPools;
|
||||
|
||||
/**
|
||||
* If enabled, each surface presentation is scheduled using a command buffer. Enabling this
|
||||
* setting may improve rendering frame synchronization, but may result in reduced frame rates.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_PRESENT_WITH_COMMAND_BUFFER
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to true.
|
||||
*/
|
||||
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
|
||||
* 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,
|
||||
* for the change to take effect.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_SWAPCHAIN_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;
|
||||
|
||||
/**
|
||||
* The maximum amount of time, in nanoseconds, to wait for a Metal library, function, or
|
||||
* pipeline state object to be compiled and created by the Metal compiler. An internal error
|
||||
* within the Metal compiler can stall the thread for up to 30 seconds. Setting this value
|
||||
* limits that delay to a specified amount of time, allowing shader compilations to fail fast.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_METAL_COMPILE_TIMEOUT
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to infinite.
|
||||
*/
|
||||
uint64_t metalCompileTimeout;
|
||||
|
||||
/**
|
||||
* If enabled, per-frame performance statistics are tracked, optionally logged, and can be
|
||||
* retrieved via the vkGetSwapchainPerformanceMVK() function, and various performance statistics
|
||||
* are tracked, logged, and can be retrieved via the vkGetPerformanceStatisticsMVK() function.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_PERFORMANCE_TRACKING
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to false.
|
||||
*/
|
||||
VkBool32 performanceTracking;
|
||||
|
||||
/**
|
||||
* If non-zero, performance statistics will be periodically logged to the console, on a repeating
|
||||
* cycle of this many frames per swapchain. The performanceTracking capability must also be enabled.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_PERFORMANCE_LOGGING_FRAME_COUNT
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to zero.
|
||||
*/
|
||||
uint32_t performanceLoggingFrameCount;
|
||||
|
||||
/**
|
||||
* If enabled, a MoltenVK logo watermark will be rendered on top of the scene.
|
||||
* This can be enabled for publicity during demos.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_DISPLAY_WATERMARK
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to false.
|
||||
*/
|
||||
VkBool32 displayWatermark;
|
||||
|
||||
/**
|
||||
* Metal does not distinguish functionality between queues, which would normally mean only
|
||||
* a single general-purpose queue family with multiple queues is needed. However, Vulkan
|
||||
* associates command buffers with a queue family, whereas Metal associates command buffers
|
||||
* with a specific Metal queue. In order to allow a Metal command buffer to be prefilled
|
||||
* before is is formally submitted to a Vulkan queue, each Vulkan queue family can support
|
||||
* only a single Metal queue. As a result, in order to provide parallel queue operations,
|
||||
* MoltenVK provides multiple queue families, each with a single queue.
|
||||
*
|
||||
* If this parameter is disabled, all queue families will be advertised as having general-purpose
|
||||
* graphics + compute + transfer functionality, which is how the actual Metal queues behave.
|
||||
*
|
||||
* If this parameter is enabled, one queue family will be advertised as having general-purpose
|
||||
* graphics + compute + transfer functionality, and the remaining queue families will be advertised
|
||||
* as having specialized graphics OR compute OR transfer functionality, to make it easier for some
|
||||
* apps to select a queue family with the appropriate requirements.
|
||||
*
|
||||
* The value of this parameter must be changed before creating a VkDevice, and before
|
||||
* querying a VkPhysicalDevice for queue family properties, for the change to take effect.
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_SPECIALIZED_QUEUE_FAMILIES
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to false.
|
||||
*/
|
||||
VkBool32 specializedQueueFamilies;
|
||||
|
||||
/**
|
||||
* If enabled, when the app creates a VkDevice from a VkPhysicalDevice (GPU) that is neither
|
||||
* headless nor low-power, and is different than the GPU used by the windowing system, the
|
||||
* windowing system will be forced to switch to use the GPU selected by the Vulkan app.
|
||||
* When the Vulkan app is ended, the windowing system will automatically switch back to
|
||||
* using the previous GPU, depending on the usage requirements of other running apps.
|
||||
*
|
||||
* If disabled, the Vulkan app will render using its selected GPU, and if the windowing
|
||||
* system uses a different GPU, the windowing system compositor will automatically copy
|
||||
* framebuffer content from the app GPU to the windowing system GPU.
|
||||
*
|
||||
* The value of this parmeter has no effect on systems with a single GPU, or when the
|
||||
* Vulkan app creates a VkDevice from a low-power or headless VkPhysicalDevice (GPU).
|
||||
*
|
||||
* Switching the windowing system GPU to match the Vulkan app GPU maximizes app performance,
|
||||
* because it avoids the windowing system compositor from having to copy framebuffer content
|
||||
* between GPUs on each rendered frame. However, doing so forces the entire system to
|
||||
* potentially switch to using a GPU that may consume more power while the app is running.
|
||||
*
|
||||
* Some Vulkan apps may want to render using a high-power GPU, but leave it up to the
|
||||
* system window compositor to determine how best to blend content with the windowing
|
||||
* system, and as a result, may want to disable this parameter.
|
||||
*
|
||||
* 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_SWITCH_SYSTEM_GPU
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to true.
|
||||
*/
|
||||
VkBool32 switchSystemGPU;
|
||||
|
||||
/**
|
||||
* If enabled, arbitrary VkImageView component swizzles are supported, as defined
|
||||
* in VkImageViewCreateInfo::components when creating a VkImageView.
|
||||
*
|
||||
* If disabled, a very limited set of VkImageView component swizzles are supported
|
||||
* via format substitutions.
|
||||
*
|
||||
* Metal does not natively support per-texture swizzling. If this parameter is enabled
|
||||
* both when a VkImageView is created, and when any pipeline that uses that VkImageView
|
||||
* is compiled, VkImageView swizzling is automatically performed in the converted Metal
|
||||
* shader code during all texture sampling and reading operations, regardless of whether
|
||||
* a swizzle is required for the VkImageView associated with the Metal texture.
|
||||
* This may result in reduced performance.
|
||||
*
|
||||
* The value of this parameter may be changed at any time during application runtime,
|
||||
* and the changed value will immediately effect subsequent MoltenVK behaviour.
|
||||
* Specifically, this parameter can be enabled when creating VkImageViews that need it,
|
||||
* and compiling pipelines that use those VkImageViews, and can be disabled when creating
|
||||
* VkImageViews that don't need it, and compiling pipelines that use those VkImageViews.
|
||||
*
|
||||
* Existing pipelines are not automatically re-compiled when this parameter is changed.
|
||||
*
|
||||
* An error is logged and returned during VkImageView creation if that VkImageView
|
||||
* requires full image view swizzling and this feature is not enabled. An error is
|
||||
* also logged when a pipeline that was not compiled with full image view swizzling
|
||||
* is presented with a VkImageView that is expecting it.
|
||||
*
|
||||
* An error is also retuned and logged when a VkPhysicalDeviceImageFormatInfo2KHR is passed
|
||||
* in a call to vkGetPhysicalDeviceImageFormatProperties2KHR() to query for an VkImageView
|
||||
* format that will require full swizzling to be enabled, and this feature is not enabled.
|
||||
*
|
||||
* If this parameter is disabled, the following limited set of VkImageView swizzles are
|
||||
* supported by MoltenVK, via automatic format substitution:
|
||||
*
|
||||
* Texture format Swizzle
|
||||
* -------------- -------
|
||||
* VK_FORMAT_R8_UNORM ZERO, ANY, ANY, RED
|
||||
* VK_FORMAT_A8_UNORM ALPHA, ANY, ANY, ZERO
|
||||
* VK_FORMAT_R8G8B8A8_UNORM BLUE, GREEN, RED, ALPHA
|
||||
* VK_FORMAT_R8G8B8A8_SRGB BLUE, GREEN, RED, ALPHA
|
||||
* VK_FORMAT_B8G8R8A8_UNORM BLUE, GREEN, RED, ALPHA
|
||||
* VK_FORMAT_B8G8R8A8_SRGB BLUE, GREEN, RED, ALPHA
|
||||
* VK_FORMAT_D32_SFLOAT_S8_UINT RED, ANY, ANY, ANY (stencil only)
|
||||
* VK_FORMAT_D24_UNORM_S8_UINT RED, ANY, ANY, ANY (stencil only)
|
||||
*
|
||||
* The initial value or this parameter is set by the
|
||||
* MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to false.
|
||||
*/
|
||||
VkBool32 fullImageViewSwizzle;
|
||||
|
||||
/**
|
||||
* The index of the queue family whose presentation submissions will
|
||||
* be used as the default GPU Capture Scope during debugging in Xcode.
|
||||
*
|
||||
* 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_DEFAULT_GPU_CAPTURE_SCOPE_QUEUE_FAMILY_INDEX
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to zero (the first queue family).
|
||||
*/
|
||||
uint32_t defaultGPUCaptureScopeQueueFamilyIndex;
|
||||
|
||||
/**
|
||||
* The index of the queue, within the queue family identified by the
|
||||
* defaultGPUCaptureScopeQueueFamilyIndex parameter, whose presentation submissions
|
||||
* will be used as the default GPU Capture Scope during debugging in Xcode.
|
||||
*
|
||||
* 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_DEFAULT_GPU_CAPTURE_SCOPE_QUEUE_INDEX
|
||||
* runtime environment variable or MoltenVK compile-time build setting.
|
||||
* If neither is set, the value of this parameter defaults to zero (the first queue).
|
||||
*/
|
||||
uint32_t defaultGPUCaptureScopeQueueIndex;
|
||||
|
||||
} MVKConfiguration;
|
||||
|
||||
/**
|
||||
* Features provided by the current implementation of Metal on the current device. You can
|
||||
* retrieve a copy of this structure using the vkGetPhysicalDeviceMetalFeaturesMVK() function.
|
||||
*
|
||||
* This structure may be extended as new features are added to MoltenVK. If you are linking to
|
||||
* an implementation of MoltenVK that was compiled from a different VK_MVK_MOLTENVK_SPEC_VERSION
|
||||
* than your app was, the size of this structure in your app may be larger or smaller than the
|
||||
* struct in MoltenVK. See the description of the vkGetPhysicalDeviceMetalFeaturesMVK() function
|
||||
* for information about how to handle this.
|
||||
*
|
||||
* TO SUPPORT DYNAMIC LINKING TO THIS STRUCTURE AS DESCRIBED ABOVE, THIS STRUCTURE SHOULD NOT
|
||||
* BE CHANGED EXCEPT TO ADD ADDITIONAL MEMBERS ON THE END. EXISTING MEMBERS, AND THEIR ORDER,
|
||||
* 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.2 would appear as 010200). */
|
||||
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. */
|
||||
VkBool32 dynamicMTLBuffers; /**< If true, dynamic MTLBuffers for setting vertex, fragment, and compute bytes are supported. */
|
||||
VkBool32 shaderSpecialization; /**< If true, shader specialization (aka Metal function constants) is supported. */
|
||||
VkBool32 ioSurfaces; /**< If true, VkImages can be underlaid by IOSurfaces via the vkUseIOSurfaceMVK() function, to support inter-process image transfers. */
|
||||
VkBool32 texelBuffers; /**< If true, texel buffers are supported, allowing the contents of a buffer to be interpreted as an image via a VkBufferView. */
|
||||
VkBool32 layeredRendering; /**< If true, layered rendering to multiple cube or texture array layers is supported. */
|
||||
VkBool32 presentModeImmediate; /**< If true, immediate surface present mode (VK_PRESENT_MODE_IMMEDIATE_KHR), allowing a swapchain image to be presented immediately, without waiting for the vertical sync period of the display, is supported. */
|
||||
VkBool32 stencilViews; /**< If true, stencil aspect views are supported through the MTLPixelFormatX24_Stencil8 and MTLPixelFormatX32_Stencil8 formats. */
|
||||
VkBool32 multisampleArrayTextures; /**< If true, MTLTextureType2DMultisampleArray is supported. */
|
||||
VkBool32 samplerClampToBorder; /**< If true, the border color set when creating a sampler will be respected. */
|
||||
uint32_t maxTextureDimension; /**< The maximum size of each texture dimension (width, height, or depth). */
|
||||
uint32_t maxPerStageBufferCount; /**< The total number of per-stage Metal buffers available for shader uniform content and attributes. */
|
||||
uint32_t maxPerStageTextureCount; /**< The total number of per-stage Metal textures available for shader uniform content. */
|
||||
uint32_t maxPerStageSamplerCount; /**< The total number of per-stage Metal samplers available for shader uniform content. */
|
||||
VkDeviceSize maxMTLBufferSize; /**< The max size of a MTLBuffer (in bytes). */
|
||||
VkDeviceSize mtlBufferAlignment; /**< The alignment used when allocating memory for MTLBuffers. Must be PoT. */
|
||||
VkDeviceSize maxQueryBufferSize; /**< The maximum size of an occlusion query buffer (in bytes). */
|
||||
VkDeviceSize mtlCopyBufferAlignment; /**< The alignment required during buffer copy operations (in bytes). */
|
||||
VkSampleCountFlags supportedSampleCounts; /**< A bitmask identifying the sample counts supported by the device. */
|
||||
uint32_t minSwapchainImageCount; /**< The minimum number of swapchain images that can be supported by a surface. */
|
||||
uint32_t maxSwapchainImageCount; /**< The maximum number of swapchain images that can be supported by a surface. */
|
||||
VkBool32 combinedStoreResolveAction; /**< If true, the device supports VK_ATTACHMENT_STORE_OP_STORE with a simultaneous resolve attachment. */
|
||||
VkBool32 arrayOfTextures; /**< If true, arrays of textures is supported. */
|
||||
VkBool32 arrayOfSamplers; /**< If true, arrays of texture samplers is supported. */
|
||||
MTLLanguageVersion mslVersionEnum; /**< The version of the Metal Shading Language available on this device, as a Metal enumeration. */
|
||||
} MVKPhysicalDeviceMetalFeatures;
|
||||
|
||||
/**
|
||||
* MoltenVK swapchain performance statistics. You can retrieve a copy of this structure using
|
||||
* the vkGetSwapchainPerformanceMVK() function.
|
||||
*
|
||||
* This structure may be extended as new features are added to MoltenVK. If you are linking to
|
||||
* an implementation of MoltenVK that was compiled from a different VK_MVK_MOLTENVK_SPEC_VERSION
|
||||
* than your app was, the size of this structure in your app may be larger or smaller than the
|
||||
* struct in MoltenVK. See the description of the vkGetSwapchainPerformanceMVK() function for
|
||||
* information about how to handle this.
|
||||
*
|
||||
* TO SUPPORT DYNAMIC LINKING TO THIS STRUCTURE AS DESCRIBED ABOVE, THIS STRUCTURE SHOULD NOT
|
||||
* BE CHANGED EXCEPT TO ADD ADDITIONAL MEMBERS ON THE END. EXISTING MEMBERS, AND THEIR ORDER,
|
||||
* SHOULD NOT BE CHANGED.
|
||||
*/
|
||||
typedef struct {
|
||||
double lastFrameInterval; /**< The time interval between this frame and the immediately previous frame, in milliseconds. */
|
||||
double averageFrameInterval; /**< The rolling average time interval between frames, in miliseconds. This value has less volatility than the lastFrameInterval value. */
|
||||
double averageFramesPerSecond; /**< The rolling average number of frames per second. This is simply the 1000 divided by the averageFrameInterval value. */
|
||||
} MVKSwapchainPerformance;
|
||||
|
||||
/** MoltenVK performance of a particular type of activity. */
|
||||
typedef struct {
|
||||
uint32_t count; /**< The number of activities of this type. */
|
||||
double averageDuration; /**< The average duration of the activity, in milliseconds. */
|
||||
double minimumDuration; /**< The minimum duration of the activity, in milliseconds. */
|
||||
double maximumDuration; /**< The maximum duration of the activity, in milliseconds. */
|
||||
} MVKPerformanceTracker;
|
||||
|
||||
/** MoltenVK performance of shader compilation activities. */
|
||||
typedef struct {
|
||||
MVKPerformanceTracker hashShaderCode; /** Create a hash from the incoming shader code. */
|
||||
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 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. */
|
||||
MVKPerformanceTracker pipelineCompile; /** Compile MTLFunctions into a pipeline. */
|
||||
} MVKShaderCompilationPerformance;
|
||||
|
||||
|
||||
/** MoltenVK performance of pipeline cache activities. */
|
||||
typedef struct {
|
||||
MVKPerformanceTracker sizePipelineCache; /** Calculate the size of cache data required to write MSL to pipeline cache data stream. */
|
||||
MVKPerformanceTracker writePipelineCache; /** Write MSL to pipeline cache data stream. */
|
||||
MVKPerformanceTracker readPipelineCache; /** Read MSL from pipeline cache data stream. */
|
||||
} MVKPipelineCachePerformance;
|
||||
|
||||
/** MoltenVK performance of queue activities. */
|
||||
typedef struct {
|
||||
MVKPerformanceTracker mtlQueueAccess; /** Create an MTLCommmandQueue or access an existing cached instance. */
|
||||
} MVKQueuePerformance;
|
||||
|
||||
/**
|
||||
* MoltenVK performance. You can retrieve a copy of this structure using the vkGetPerformanceStatisticsMVK() function.
|
||||
*
|
||||
* This structure may be extended as new features are added to MoltenVK. If you are linking to
|
||||
* an implementation of MoltenVK that was compiled from a different VK_MVK_MOLTENVK_SPEC_VERSION
|
||||
* than your app was, the size of this structure in your app may be larger or smaller than the
|
||||
* struct in MoltenVK. See the description of the vkGetPerformanceStatisticsMVK() function for
|
||||
* information about how to handle this.
|
||||
*
|
||||
* TO SUPPORT DYNAMIC LINKING TO THIS STRUCTURE AS DESCRIBED ABOVE, THIS STRUCTURE SHOULD NOT
|
||||
* BE CHANGED EXCEPT TO ADD ADDITIONAL MEMBERS ON THE END. EXISTING MEMBERS, AND THEIR ORDER,
|
||||
* SHOULD NOT BE CHANGED.
|
||||
*/
|
||||
typedef struct {
|
||||
MVKShaderCompilationPerformance shaderCompilation; /** Shader compilations activities. */
|
||||
MVKPipelineCachePerformance pipelineCache; /** Pipeline cache activities. */
|
||||
MVKQueuePerformance queue; /** Queue activities. */
|
||||
} MVKPerformanceStatistics;
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Function types
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMoltenVKConfigurationMVK)(VkInstance instance, MVKConfiguration* pConfiguration, size_t* pConfigurationSize);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetMoltenVKConfigurationMVK)(VkInstance instance, MVKConfiguration* pConfiguration, size_t* pConfigurationSize);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceMetalFeaturesMVK)(VkPhysicalDevice physicalDevice, MVKPhysicalDeviceMetalFeatures* pMetalFeatures, size_t* pMetalFeaturesSize);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSwapchainPerformanceMVK)(VkDevice device, VkSwapchainKHR swapchain, MVKSwapchainPerformance* pSwapchainPerf, size_t* pSwapchainPerfSize);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPerformanceStatisticsMVK)(VkDevice device, MVKPerformanceStatistics* pPerf, size_t* pPerfSize);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetVersionStringsMVK)(char* pMoltenVersionStringBuffer, uint32_t moltenVersionStringBufferLength, char* pVulkanVersionStringBuffer, uint32_t vulkanVersionStringBufferLength);
|
||||
|
||||
#ifdef __OBJC__
|
||||
typedef void (VKAPI_PTR *PFN_vkGetMTLDeviceMVK)(VkPhysicalDevice physicalDevice, id<MTLDevice>* pMTLDevice);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetMTLTextureMVK)(VkImage image, id<MTLTexture> mtlTexture);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetMTLTextureMVK)(VkImage image, id<MTLTexture>* pMTLTexture);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkUseIOSurfaceMVK)(VkImage image, IOSurfaceRef ioSurface);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetIOSurfaceMVK)(VkImage image, IOSurfaceRef* pIOSurface);
|
||||
#endif // __OBJC__
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Function prototypes
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
||||
/**
|
||||
* Populates the pConfiguration structure with the current MoltenVK configuration settings.
|
||||
*
|
||||
* To change a specific configuration value, call vkGetMoltenVKConfigurationMVK() to retrieve
|
||||
* the current configuration, make changes, and call vkSetMoltenVKConfigurationMVK() to
|
||||
* update all of the values.
|
||||
*
|
||||
* To be active, some configuration settings must be set before a VkDevice is created.
|
||||
* See the description of the MVKConfiguration members for more information.
|
||||
*
|
||||
* If you are linking to an implementation of MoltenVK that was compiled from a different
|
||||
* VK_MVK_MOLTENVK_SPEC_VERSION than your app was, the size of the MVKConfiguration structure
|
||||
* in your app may be larger or smaller than the same struct as expected by MoltenVK.
|
||||
*
|
||||
* When calling this function, set the value of *pConfigurationSize to sizeof(MVKConfiguration),
|
||||
* to tell MoltenVK the limit of the size of your MVKConfiguration structure. Upon return from
|
||||
* this function, the value of *pConfigurationSize will hold the actual number of bytes copied
|
||||
* into your passed MVKConfiguration structure, which will be the smaller of what your app
|
||||
* thinks is the size of MVKConfiguration, and what MoltenVK thinks it is. This represents the
|
||||
* safe access area within the structure for both MoltenVK and your app.
|
||||
*
|
||||
* If the size that MoltenVK expects for MVKConfiguration is different than the value passed in
|
||||
* *pConfigurationSize, this function will return VK_INCOMPLETE, otherwise it will return VK_SUCCESS.
|
||||
*
|
||||
* Although it is not necessary, you can use this function to determine in advance the value
|
||||
* that MoltenVK expects the size of MVKConfiguration to be by setting the value of pConfiguration
|
||||
* to NULL. In that case, this function will set *pConfigurationSize to the size that MoltenVK
|
||||
* expects MVKConfiguration to be.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMoltenVKConfigurationMVK(
|
||||
VkInstance instance,
|
||||
MVKConfiguration* pConfiguration,
|
||||
size_t* pConfigurationSize);
|
||||
|
||||
/**
|
||||
* Sets the MoltenVK configuration settings to those found in the pConfiguration structure.
|
||||
*
|
||||
* To change a specific configuration value, call vkGetMoltenVKConfigurationMVK()
|
||||
* to retrieve the current configuration, make changes, and call
|
||||
* vkSetMoltenVKConfigurationMVK() to update all of the values.
|
||||
*
|
||||
* To be active, some configuration settings must be set before a VkDevice is created.
|
||||
* See the description of the MVKConfiguration members for more information.
|
||||
*
|
||||
* If you are linking to an implementation of MoltenVK that was compiled from a different
|
||||
* VK_MVK_MOLTENVK_SPEC_VERSION than your app was, the size of the MVKConfiguration structure
|
||||
* in your app may be larger or smaller than the same struct as expected by MoltenVK.
|
||||
*
|
||||
* When calling this function, set the value of *pConfigurationSize to sizeof(MVKConfiguration),
|
||||
* to tell MoltenVK the limit of the size of your MVKConfiguration structure. Upon return from
|
||||
* this function, the value of *pConfigurationSize will hold the actual number of bytes copied
|
||||
* out of your passed MVKConfiguration structure, which will be the smaller of what your app
|
||||
* thinks is the size of MVKConfiguration, and what MoltenVK thinks it is. This represents the
|
||||
* safe access area within the structure for both MoltenVK and your app.
|
||||
*
|
||||
* If the size that MoltenVK expects for MVKConfiguration is different than the value passed in
|
||||
* *pConfigurationSize, this function will return VK_INCOMPLETE, otherwise it will return VK_SUCCESS.
|
||||
*
|
||||
* Although it is not necessary, you can use this function to determine in advance the value
|
||||
* that MoltenVK expects the size of MVKConfiguration to be by setting the value of pConfiguration
|
||||
* to NULL. In that case, this function will set *pConfigurationSize to the size that MoltenVK
|
||||
* expects MVKConfiguration to be.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkSetMoltenVKConfigurationMVK(
|
||||
VkInstance instance,
|
||||
const MVKConfiguration* pConfiguration,
|
||||
size_t* pConfigurationSize);
|
||||
|
||||
/**
|
||||
* Populates the pMetalFeatures structure with the Metal-specific features
|
||||
* supported by the specified physical device.
|
||||
*
|
||||
* If you are linking to an implementation of MoltenVK that was compiled from a different
|
||||
* VK_MVK_MOLTENVK_SPEC_VERSION than your app was, the size of the MVKPhysicalDeviceMetalFeatures
|
||||
* structure in your app may be larger or smaller than the same struct as expected by MoltenVK.
|
||||
*
|
||||
* When calling this function, set the value of *pMetalFeaturesSize to sizeof(MVKPhysicalDeviceMetalFeatures),
|
||||
* to tell MoltenVK the limit of the size of your MVKPhysicalDeviceMetalFeatures structure. Upon return from
|
||||
* this function, the value of *pMetalFeaturesSize will hold the actual number of bytes copied into your
|
||||
* passed MVKPhysicalDeviceMetalFeatures structure, which will be the smaller of what your app thinks is the
|
||||
* size of MVKPhysicalDeviceMetalFeatures, and what MoltenVK thinks it is. This represents the safe access
|
||||
* area within the structure for both MoltenVK and your app.
|
||||
*
|
||||
* If the size that MoltenVK expects for MVKPhysicalDeviceMetalFeatures is different than the value passed in
|
||||
* *pMetalFeaturesSize, this function will return VK_INCOMPLETE, otherwise it will return VK_SUCCESS.
|
||||
*
|
||||
* Although it is not necessary, you can use this function to determine in advance the value that MoltenVK
|
||||
* expects the size of MVKPhysicalDeviceMetalFeatures to be by setting the value of pMetalFeatures to NULL.
|
||||
* In that case, this function will set *pMetalFeaturesSize to the size that MoltenVK expects
|
||||
* MVKPhysicalDeviceMetalFeatures to be.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceMetalFeaturesMVK(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
MVKPhysicalDeviceMetalFeatures* pMetalFeatures,
|
||||
size_t* pMetalFeaturesSize);
|
||||
|
||||
/**
|
||||
* Populates the pSwapchainPerf structure with the current performance statistics for the swapchain.
|
||||
*
|
||||
* If you are linking to an implementation of MoltenVK that was compiled from a different
|
||||
* VK_MVK_MOLTENVK_SPEC_VERSION than your app was, the size of the MVKSwapchainPerformance
|
||||
* structure in your app may be larger or smaller than the same struct as expected by MoltenVK.
|
||||
*
|
||||
* When calling this function, set the value of *pSwapchainPerfSize to sizeof(MVKSwapchainPerformance),
|
||||
* to tell MoltenVK the limit of the size of your MVKSwapchainPerformance structure. Upon return from
|
||||
* this function, the value of *pSwapchainPerfSize will hold the actual number of bytes copied into
|
||||
* your passed MVKSwapchainPerformance structure, which will be the smaller of what your app thinks
|
||||
* is the size of MVKSwapchainPerformance, and what MoltenVK thinks it is. This represents the safe
|
||||
* access area within the structure for both MoltenVK and your app.
|
||||
*
|
||||
* If the size that MoltenVK expects for MVKSwapchainPerformance is different than the value passed in
|
||||
* *pSwapchainPerfSize, this function will return VK_INCOMPLETE, otherwise it will return VK_SUCCESS.
|
||||
*
|
||||
* Although it is not necessary, you can use this function to determine in advance the value
|
||||
* that MoltenVK expects the size of MVKSwapchainPerformance to be by setting the value of
|
||||
* pSwapchainPerf to NULL. In that case, this function will set *pSwapchainPerfSize to the
|
||||
* size that MoltenVK expects MVKSwapchainPerformance to be.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainPerformanceMVK(
|
||||
VkDevice device,
|
||||
VkSwapchainKHR swapchain,
|
||||
MVKSwapchainPerformance* pSwapchainPerf,
|
||||
size_t* pSwapchainPerfSize);
|
||||
|
||||
/**
|
||||
* Populates the pPerf structure with the current performance statistics for the device.
|
||||
*
|
||||
* If you are linking to an implementation of MoltenVK that was compiled from a different
|
||||
* VK_MVK_MOLTENVK_SPEC_VERSION than your app was, the size of the MVKPerformanceStatistics
|
||||
* structure in your app may be larger or smaller than the same struct as expected by MoltenVK.
|
||||
*
|
||||
* When calling this function, set the value of *pPerfSize to sizeof(MVKPerformanceStatistics),
|
||||
* to tell MoltenVK the limit of the size of your MVKPerformanceStatistics structure. Upon return
|
||||
* from this function, the value of *pPerfSize will hold the actual number of bytes copied into
|
||||
* your passed MVKPerformanceStatistics structure, which will be the smaller of what your app
|
||||
* thinks is the size of MVKPerformanceStatistics, and what MoltenVK thinks it is. This
|
||||
* represents the safe access area within the structure for both MoltenVK and your app.
|
||||
*
|
||||
* If the size that MoltenVK expects for MVKPerformanceStatistics is different than the value passed
|
||||
* in *pPerfSize, this function will return VK_INCOMPLETE, otherwise it will return VK_SUCCESS.
|
||||
*
|
||||
* Although it is not necessary, you can use this function to determine in advance the value
|
||||
* that MoltenVK expects the size of MVKPerformanceStatistics to be by setting the value of
|
||||
* pPerf to NULL. In that case, this function will set *pPerfSize to the size that MoltenVK
|
||||
* expects MVKPerformanceStatistics to be.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPerformanceStatisticsMVK(
|
||||
VkDevice device,
|
||||
MVKPerformanceStatistics* pPerf,
|
||||
size_t* pPerfSize);
|
||||
|
||||
/**
|
||||
* Returns a human readable version of the MoltenVK and Vulkan versions.
|
||||
*
|
||||
* This function is provided as a convenience for reporting. Use the MVK_VERSION,
|
||||
* VK_API_VERSION_1_0, and VK_HEADER_VERSION macros for programmatically accessing
|
||||
* the corresponding version numbers.
|
||||
*/
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetVersionStringsMVK(
|
||||
char* pMoltenVersionStringBuffer,
|
||||
uint32_t moltenVersionStringBufferLength,
|
||||
char* pVulkanVersionStringBuffer,
|
||||
uint32_t vulkanVersionStringBufferLength);
|
||||
|
||||
|
||||
#ifdef __OBJC__
|
||||
|
||||
/** Returns, in the pMTLDevice pointer, the MTLDevice used by the VkPhysicalDevice. */
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetMTLDeviceMVK(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
id<MTLDevice>* pMTLDevice);
|
||||
|
||||
/**
|
||||
* Sets the VkImage to use the specified MTLTexture.
|
||||
*
|
||||
* Any differences in the properties of mtlTexture and this image will modify the
|
||||
* properties of this image.
|
||||
*
|
||||
* If a MTLTexture has already been created for this image, it will be destroyed.
|
||||
*
|
||||
* Returns VK_SUCCESS.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkSetMTLTextureMVK(
|
||||
VkImage image,
|
||||
id<MTLTexture> mtlTexture);
|
||||
|
||||
/** Returns, in the pMTLTexture pointer, the MTLTexture currently underlaying the VkImage. */
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetMTLTextureMVK(
|
||||
VkImage image,
|
||||
id<MTLTexture>* pMTLTexture);
|
||||
|
||||
/**
|
||||
* Indicates that a VkImage should use an IOSurface to underlay the Metal texture.
|
||||
*
|
||||
* If ioSurface is not null, it will be used as the IOSurface, and any differences
|
||||
* in the properties of that IOSurface will modify the properties of this image.
|
||||
*
|
||||
* If ioSurface is null, this image will create and use an IOSurface
|
||||
* whose properties are compatible with the properties of this image.
|
||||
*
|
||||
* If a MTLTexture has already been created for this image, it will be destroyed.
|
||||
*
|
||||
* IOSurfaces are supported on the following platforms:
|
||||
* - macOS 10.11 and above
|
||||
* - iOS 11.0 and above
|
||||
*
|
||||
* To enable IOSurface support, ensure the Deployment Target build setting
|
||||
* (MACOSX_DEPLOYMENT_TARGET or IPHONEOS_DEPLOYMENT_TARGET) is set to at least
|
||||
* one of the values above when compiling MoltenVK, and any app that uses MoltenVK.
|
||||
*
|
||||
* Returns:
|
||||
* - VK_SUCCESS.
|
||||
* - VK_ERROR_FEATURE_NOT_PRESENT if IOSurfaces are not supported on the platform.
|
||||
* - VK_ERROR_INITIALIZATION_FAILED if ioSurface is specified and is not compatible with this VkImage.
|
||||
*/
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkUseIOSurfaceMVK(
|
||||
VkImage image,
|
||||
IOSurfaceRef ioSurface);
|
||||
|
||||
/**
|
||||
* Returns, in the pIOSurface pointer, the IOSurface currently underlaying the VkImage,
|
||||
* as set by the useIOSurfaceMVK() function, or returns null if the VkImage is not using
|
||||
* an IOSurface, or if the platform does not support IOSurfaces.
|
||||
*/
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetIOSurfaceMVK(
|
||||
VkImage image,
|
||||
IOSurfaceRef* pIOSurface);
|
||||
|
||||
#endif // __OBJC__
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Shaders
|
||||
|
||||
/**
|
||||
* Enumerates the magic number values to set in the MVKMSLSPIRVHeader when
|
||||
* submitting a SPIR-V stream that contains either Metal Shading Language source
|
||||
* code or Metal Shading Language compiled binary code in place of SPIR-V code.
|
||||
*/
|
||||
typedef enum {
|
||||
kMVKMagicNumberSPIRVCode = 0x07230203, /**< SPIR-V stream contains standard SPIR-V code. */
|
||||
kMVKMagicNumberMSLSourceCode = 0x19960412, /**< SPIR-V stream contains Metal Shading Language source code. */
|
||||
kMVKMagicNumberMSLCompiledCode = 0x19981215, /**< SPIR-V stream contains Metal Shading Language compiled binary code. */
|
||||
} MVKMSLMagicNumber;
|
||||
|
||||
/**
|
||||
* Describes the header at the start of an SPIR-V stream, when it contains either
|
||||
* Metal Shading Language source code or Metal Shading Language compiled binary code.
|
||||
*
|
||||
* To submit MSL source code to the vkCreateShaderModule() function in place of SPIR-V
|
||||
* code, prepend a MVKMSLSPIRVHeader containing the kMVKMagicNumberMSLSourceCode magic
|
||||
* number to the MSL source code. The MSL source code must be null-terminated.
|
||||
*
|
||||
* To submit MSL compiled binary code to the vkCreateShaderModule() function in place of
|
||||
* SPIR-V code, prepend a MVKMSLSPIRVHeader containing the kMVKMagicNumberMSLCompiledCode
|
||||
* magic number to the MSL compiled binary code.
|
||||
*
|
||||
* In both cases, the pCode element of VkShaderModuleCreateInfo should pointer to the
|
||||
* location of the MVKMSLSPIRVHeader, and the MSL code should start at the byte immediately
|
||||
* after the MVKMSLSPIRVHeader.
|
||||
*
|
||||
* The codeSize element of VkShaderModuleCreateInfo should be set to the entire size of
|
||||
* the submitted code memory, including the additional sizeof(MVKMSLSPIRVHeader) bytes
|
||||
* taken up by the MVKMSLSPIRVHeader, and, in the case of MSL source code, including
|
||||
* the null-terminator byte.
|
||||
*/
|
||||
typedef uint32_t MVKMSLSPIRVHeader;
|
||||
|
||||
|
||||
#endif // VK_NO_PROTOTYPES
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
|
@ -0,0 +1,76 @@
|
|||
#ifndef VK_EXTX_PORTABILITY_SUBSET_H_
|
||||
#define VK_EXTX_PORTABILITY_SUBSET_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2018 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Please Note: This extension is currently defined as "EXTX", meaning "multivendor experimental".
|
||||
That means the definition of this extension is in active development, and may break compatibility
|
||||
between point releases (defined as any increment of VK_EXTX_PORTABILITY_SUBSET_SPEC_VERSION).
|
||||
You are free to explore the extension and provide feedback, but it is not recommended to use this
|
||||
extension for shipping applications, particularly applications that require the driver implementing this
|
||||
extension to be linked dynamically and potentially "dropped-in" to the application execution environment.
|
||||
*/
|
||||
|
||||
#include "vulkan/vulkan.h"
|
||||
|
||||
#define VK_EXTX_PORTABILITY_SUBSET_SPEC_VERSION 1
|
||||
#define VK_EXTX_PORTABILITY_SUBSET_EXTENSION_NAME "VK_EXTX_portability_subset"
|
||||
|
||||
#define VK_EXTX_PORTABILITY_SUBSET_EXTENSION_ID 164
|
||||
// See enum_offset() from https://www.khronos.org/registry/vulkan/specs/1.1/styleguide.html#_assigning_extension_token_values
|
||||
#define VK_EXTX_PORTABILITY_SUBSET_STYPE_ID(x) \
|
||||
((VkStructureType)(1000000000 + 1000 * (VK_EXTX_PORTABILITY_SUBSET_EXTENSION_ID - 1) + x))
|
||||
#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_EXTX VK_EXTX_PORTABILITY_SUBSET_STYPE_ID(0)
|
||||
#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX VK_EXTX_PORTABILITY_SUBSET_STYPE_ID(1)
|
||||
#define VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_SUPPORT_EXTX VK_EXTX_PORTABILITY_SUBSET_STYPE_ID(2)
|
||||
|
||||
typedef struct VkPhysicalDevicePortabilitySubsetFeaturesEXTX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 triangleFans;
|
||||
VkBool32 separateStencilMaskRef;
|
||||
VkBool32 events;
|
||||
VkBool32 standardImageViews;
|
||||
VkBool32 samplerMipLodBias;
|
||||
} VkPhysicalDevicePortabilitySubsetFeaturesEXTX;
|
||||
|
||||
typedef struct VkPhysicalDevicePortabilitySubsetPropertiesEXTX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t minVertexInputBindingStrideAlignment;
|
||||
} VkPhysicalDevicePortabilitySubsetPropertiesEXTX;
|
||||
|
||||
typedef struct VkPhysicalDeviceImageViewSupportEXTX {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkImageViewCreateFlags flags;
|
||||
VkImageViewType viewType;
|
||||
VkFormat format;
|
||||
VkComponentMapping components;
|
||||
VkImageAspectFlags aspectMask;
|
||||
} VkPhysicalDeviceImageViewSupportEXTX;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // VK_EXTX_PORTABILITY_SUBSET_H_
|
170
moltenvk/include/vulkan/vk_icd.h
Normal file
170
moltenvk/include/vulkan/vk_icd.h
Normal file
|
@ -0,0 +1,170 @@
|
|||
//
|
||||
// File: vk_icd.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VKICD_H
|
||||
#define VKICD_H
|
||||
|
||||
#include "vulkan.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
// Loader-ICD version negotiation API. Versions add the following features:
|
||||
// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
|
||||
// or vk_icdNegotiateLoaderICDInterfaceVersion.
|
||||
// Version 1 - Add support for vk_icdGetInstanceProcAddr.
|
||||
// Version 2 - Add Loader/ICD Interface version negotiation
|
||||
// via vk_icdNegotiateLoaderICDInterfaceVersion.
|
||||
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
|
||||
// Version 4 - Add unknown physical device extension qyering via
|
||||
// vk_icdGetPhysicalDeviceProcAddr.
|
||||
// Version 5 - Tells ICDs that the loader is now paying attention to the
|
||||
// application version of Vulkan passed into the ApplicationInfo
|
||||
// structure during vkCreateInstance. This will tell the ICD
|
||||
// that if the loader is older, it should automatically fail a
|
||||
// call for any API version > 1.0. Otherwise, the loader will
|
||||
// manually determine if it can support the expected version.
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 5
|
||||
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
|
||||
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
|
||||
typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
|
||||
|
||||
// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
|
||||
// file directly, it won't be found.
|
||||
#ifndef PFN_GetPhysicalDeviceProcAddr
|
||||
typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ICD must reserve space for a pointer for the loader's dispatch
|
||||
* table, at the start of <each object>.
|
||||
* The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
|
||||
*/
|
||||
|
||||
#define ICD_LOADER_MAGIC 0x01CDC0DE
|
||||
|
||||
typedef union {
|
||||
uintptr_t loaderMagic;
|
||||
void *loaderData;
|
||||
} VK_LOADER_DATA;
|
||||
|
||||
static inline void set_loader_magic_value(void *pNewObject) {
|
||||
VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
|
||||
loader_info->loaderMagic = ICD_LOADER_MAGIC;
|
||||
}
|
||||
|
||||
static inline bool valid_loader_magic_value(void *pNewObject) {
|
||||
const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
|
||||
return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC;
|
||||
}
|
||||
|
||||
/*
|
||||
* Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that
|
||||
* contains the platform-specific connection and surface information.
|
||||
*/
|
||||
typedef enum {
|
||||
VK_ICD_WSI_PLATFORM_MIR,
|
||||
VK_ICD_WSI_PLATFORM_WAYLAND,
|
||||
VK_ICD_WSI_PLATFORM_WIN32,
|
||||
VK_ICD_WSI_PLATFORM_XCB,
|
||||
VK_ICD_WSI_PLATFORM_XLIB,
|
||||
VK_ICD_WSI_PLATFORM_ANDROID,
|
||||
VK_ICD_WSI_PLATFORM_MACOS,
|
||||
VK_ICD_WSI_PLATFORM_IOS,
|
||||
VK_ICD_WSI_PLATFORM_DISPLAY
|
||||
} VkIcdWsiPlatform;
|
||||
|
||||
typedef struct {
|
||||
VkIcdWsiPlatform platform;
|
||||
} VkIcdSurfaceBase;
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
MirConnection *connection;
|
||||
MirSurface *mirSurface;
|
||||
} VkIcdSurfaceMir;
|
||||
#endif // VK_USE_PLATFORM_MIR_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
struct wl_display *display;
|
||||
struct wl_surface *surface;
|
||||
} VkIcdSurfaceWayland;
|
||||
#endif // VK_USE_PLATFORM_WAYLAND_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkIcdSurfaceWin32;
|
||||
#endif // VK_USE_PLATFORM_WIN32_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
xcb_connection_t *connection;
|
||||
xcb_window_t window;
|
||||
} VkIcdSurfaceXcb;
|
||||
#endif // VK_USE_PLATFORM_XCB_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
Display *dpy;
|
||||
Window window;
|
||||
} VkIcdSurfaceXlib;
|
||||
#endif // VK_USE_PLATFORM_XLIB_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
struct ANativeWindow *window;
|
||||
} VkIcdSurfaceAndroid;
|
||||
#endif // VK_USE_PLATFORM_ANDROID_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
const void *pView;
|
||||
} VkIcdSurfaceMacOS;
|
||||
#endif // VK_USE_PLATFORM_MACOS_MVK
|
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
const void *pView;
|
||||
} VkIcdSurfaceIOS;
|
||||
#endif // VK_USE_PLATFORM_IOS_MVK
|
||||
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
VkDisplayModeKHR displayMode;
|
||||
uint32_t planeIndex;
|
||||
uint32_t planeStackIndex;
|
||||
VkSurfaceTransformFlagBitsKHR transform;
|
||||
float globalAlpha;
|
||||
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
|
||||
VkExtent2D imageExtent;
|
||||
} VkIcdSurfaceDisplay;
|
||||
|
||||
#endif // VKICD_H
|
195
moltenvk/include/vulkan/vk_layer.h
Normal file
195
moltenvk/include/vulkan/vk_layer.h
Normal file
|
@ -0,0 +1,195 @@
|
|||
//
|
||||
// File: vk_layer.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2017 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2017 Valve Corporation
|
||||
* Copyright (c) 2015-2017 LunarG, Inc.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Need to define dispatch table
|
||||
* Core struct can then have ptr to dispatch table at the top
|
||||
* Along with object ptrs for current and next OBJ
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define VK_LAYER_EXPORT
|
||||
#endif
|
||||
|
||||
#define MAX_NUM_UNKNOWN_EXTS 250
|
||||
|
||||
// Loader-Layer version negotiation API. Versions add the following features:
|
||||
// Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr
|
||||
// or vk_icdNegotiateLoaderLayerInterfaceVersion.
|
||||
// Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and
|
||||
// vk_icdNegotiateLoaderLayerInterfaceVersion.
|
||||
#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
|
||||
#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
|
||||
|
||||
#define VK_CURRENT_CHAIN_VERSION 1
|
||||
|
||||
// Typedef for use in the interfaces below
|
||||
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
|
||||
|
||||
// Version negotiation values
|
||||
typedef enum VkNegotiateLayerStructType {
|
||||
LAYER_NEGOTIATE_UNINTIALIZED = 0,
|
||||
LAYER_NEGOTIATE_INTERFACE_STRUCT = 1,
|
||||
} VkNegotiateLayerStructType;
|
||||
|
||||
// Version negotiation structures
|
||||
typedef struct VkNegotiateLayerInterface {
|
||||
VkNegotiateLayerStructType sType;
|
||||
void *pNext;
|
||||
uint32_t loaderLayerInterfaceVersion;
|
||||
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr;
|
||||
PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr;
|
||||
} VkNegotiateLayerInterface;
|
||||
|
||||
// Version negotiation functions
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
|
||||
|
||||
// Function prototype for unknown physical device extension command
|
||||
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// CreateInstance and CreateDevice support structures
|
||||
|
||||
/* Sub type of structure for instance and device loader ext of CreateInfo.
|
||||
* When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
|
||||
* or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
|
||||
* then VkLayerFunction indicates struct type pointed to by pNext
|
||||
*/
|
||||
typedef enum VkLayerFunction_ {
|
||||
VK_LAYER_LINK_INFO = 0,
|
||||
VK_LOADER_DATA_CALLBACK = 1
|
||||
} VkLayerFunction;
|
||||
|
||||
typedef struct VkLayerInstanceLink_ {
|
||||
struct VkLayerInstanceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr;
|
||||
} VkLayerInstanceLink;
|
||||
|
||||
/*
|
||||
* When creating the device chain the loader needs to pass
|
||||
* down information about it's device structure needed at
|
||||
* the end of the chain. Passing the data via the
|
||||
* VkLayerDeviceInfo avoids issues with finding the
|
||||
* exact instance being used.
|
||||
*/
|
||||
typedef struct VkLayerDeviceInfo_ {
|
||||
void *device_info;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
} VkLayerDeviceInfo;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
|
||||
void *object);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
|
||||
void *object);
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerInstanceLink *pLayerInfo;
|
||||
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
|
||||
} u;
|
||||
} VkLayerInstanceCreateInfo;
|
||||
|
||||
typedef struct VkLayerDeviceLink_ {
|
||||
struct VkLayerDeviceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
|
||||
} VkLayerDeviceLink;
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerDeviceLink *pLayerInfo;
|
||||
PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData;
|
||||
} u;
|
||||
} VkLayerDeviceCreateInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
|
||||
|
||||
typedef enum VkChainType {
|
||||
VK_CHAIN_TYPE_UNKNOWN = 0,
|
||||
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
|
||||
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
|
||||
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3,
|
||||
} VkChainType;
|
||||
|
||||
typedef struct VkChainHeader {
|
||||
VkChainType type;
|
||||
uint32_t version;
|
||||
uint32_t size;
|
||||
} VkChainHeader;
|
||||
|
||||
typedef struct VkEnumerateInstanceExtensionPropertiesChain {
|
||||
VkChainHeader header;
|
||||
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *,
|
||||
VkExtensionProperties *);
|
||||
const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const {
|
||||
return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties);
|
||||
}
|
||||
#endif
|
||||
} VkEnumerateInstanceExtensionPropertiesChain;
|
||||
|
||||
typedef struct VkEnumerateInstanceLayerPropertiesChain {
|
||||
VkChainHeader header;
|
||||
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *);
|
||||
const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const {
|
||||
return pfnNextLayer(pNextLink, pPropertyCount, pProperties);
|
||||
}
|
||||
#endif
|
||||
} VkEnumerateInstanceLayerPropertiesChain;
|
||||
|
||||
typedef struct VkEnumerateInstanceVersionChain {
|
||||
VkChainHeader header;
|
||||
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *);
|
||||
const struct VkEnumerateInstanceVersionChain *pNextLink;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
inline VkResult CallDown(uint32_t *pApiVersion) const {
|
||||
return pfnNextLayer(pNextLink, pApiVersion);
|
||||
}
|
||||
#endif
|
||||
} VkEnumerateInstanceVersionChain;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
92
moltenvk/include/vulkan/vk_platform.h
Normal file
92
moltenvk/include/vulkan/vk_platform.h
Normal file
|
@ -0,0 +1,92 @@
|
|||
//
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2017 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef VK_PLATFORM_H_
|
||||
#define VK_PLATFORM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* Platform-specific directives and type declarations
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
/* Platform-specific calling convention macros.
|
||||
*
|
||||
* Platforms should define these so that Vulkan clients call Vulkan commands
|
||||
* with the same calling conventions that the Vulkan implementation expects.
|
||||
*
|
||||
* VKAPI_ATTR - Placed before the return type in function declarations.
|
||||
* Useful for C++11 and GCC/Clang-style function attribute syntax.
|
||||
* VKAPI_CALL - Placed after the return type in function declarations.
|
||||
* Useful for MSVC-style calling convention syntax.
|
||||
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
|
||||
*
|
||||
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
|
||||
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
// On Windows, Vulkan commands use the stdcall convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL __stdcall
|
||||
#define VKAPI_PTR VKAPI_CALL
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||
// calling convention, i.e. float parameters are passed in registers. This
|
||||
// is true even if the rest of the application passes floats on the stack,
|
||||
// as it does by default when compiling for the armeabi-v7a NDK ABI.
|
||||
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR VKAPI_ATTR
|
||||
#else
|
||||
// On other platforms, use the default calling convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#endif // !defined(VK_NO_STDINT_H)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
69
moltenvk/include/vulkan/vk_sdk_platform.h
Normal file
69
moltenvk/include/vulkan/vk_sdk_platform.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
//
|
||||
// File: vk_sdk_platform.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef VK_SDK_PLATFORM_H
|
||||
#define VK_SDK_PLATFORM_H
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define NOMINMAX
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#define inline __inline
|
||||
#endif // __cplusplus
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
|
||||
// C99:
|
||||
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
|
||||
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
|
||||
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
|
||||
// "CMakeLists.txt" file).
|
||||
// NOTE: This is fixed in Visual Studio 2015.
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define strdup _strdup
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
// Check for noexcept support using clang, with fallback to Windows or GCC version numbers
|
||||
#ifndef NOEXCEPT
|
||||
#if defined(__clang__)
|
||||
#if __has_feature(cxx_noexcept)
|
||||
#define HAS_NOEXCEPT
|
||||
#endif
|
||||
#else
|
||||
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46
|
||||
#define HAS_NOEXCEPT
|
||||
#else
|
||||
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
|
||||
#define HAS_NOEXCEPT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAS_NOEXCEPT
|
||||
#define NOEXCEPT noexcept
|
||||
#else
|
||||
#define NOEXCEPT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // VK_SDK_PLATFORM_H
|
77
moltenvk/include/vulkan/vulkan.h
Normal file
77
moltenvk/include/vulkan/vulkan.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
#ifndef VULKAN_H_
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
#include "vk_platform.h"
|
||||
#include "vulkan_core.h"
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#include "vulkan_android.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
#include <zircon/types.h>
|
||||
#include "vulkan_fuchsia.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
||||
#include "vulkan_ios.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
||||
#include "vulkan_macos.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#include "vulkan_vi.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <wayland-client.h>
|
||||
#include "vulkan_wayland.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
#include <windows.h>
|
||||
#include "vulkan_win32.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
#include <xcb/xcb.h>
|
||||
#include "vulkan_xcb.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
#include <X11/Xlib.h>
|
||||
#include "vulkan_xlib.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include "vulkan_xlib_xrandr.h"
|
||||
#endif
|
||||
|
||||
#endif // VULKAN_H_
|
55077
moltenvk/include/vulkan/vulkan.hpp
Normal file
55077
moltenvk/include/vulkan/vulkan.hpp
Normal file
File diff suppressed because it is too large
Load diff
126
moltenvk/include/vulkan/vulkan_android.h
Normal file
126
moltenvk/include/vulkan/vulkan_android.h
Normal file
|
@ -0,0 +1,126 @@
|
|||
#ifndef VULKAN_ANDROID_H_
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||
|
||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAndroidSurfaceCreateFlagsKHR flags;
|
||||
struct ANativeWindow* window;
|
||||
} VkAndroidSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||
|
||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t androidHardwareBufferUsage;
|
||||
} VkAndroidHardwareBufferUsageANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkDeviceSize allocationSize;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkAndroidHardwareBufferPropertiesANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
uint64_t externalFormat;
|
||||
VkFormatFeatureFlags formatFeatures;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkAndroidHardwareBufferFormatPropertiesANDROID;
|
||||
|
||||
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
struct AHardwareBuffer* buffer;
|
||||
} VkImportAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkExternalFormatANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t externalFormat;
|
||||
} VkExternalFormatANDROID;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
|
||||
VkDevice device,
|
||||
const struct AHardwareBuffer* buffer,
|
||||
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
|
||||
VkDevice device,
|
||||
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
|
||||
struct AHardwareBuffer** pBuffer);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
9229
moltenvk/include/vulkan/vulkan_core.h
Normal file
9229
moltenvk/include/vulkan/vulkan_core.h
Normal file
File diff suppressed because it is too large
Load diff
58
moltenvk/include/vulkan/vulkan_fuchsia.h
Normal file
58
moltenvk/include/vulkan/vulkan_fuchsia.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef VULKAN_FUCHSIA_H_
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_FUCHSIA_imagepipe_surface 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||
|
||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||
|
||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
|
||||
zx_handle_t imagePipeHandle;
|
||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
||||
VkInstance instance,
|
||||
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
58
moltenvk/include/vulkan/vulkan_ios.h
Normal file
58
moltenvk/include/vulkan/vulkan_ios.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef VULKAN_IOS_H_
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
|
||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkIOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkIOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
58
moltenvk/include/vulkan/vulkan_macos.h
Normal file
58
moltenvk/include/vulkan/vulkan_macos.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef VULKAN_MACOS_H_
|
||||
#define VULKAN_MACOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_MVK_macos_surface 1
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||
|
||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMacOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkMacOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
65
moltenvk/include/vulkan/vulkan_mir.h
Normal file
65
moltenvk/include/vulkan/vulkan_mir.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#ifndef VULKAN_MIR_H_
|
||||
#define VULKAN_MIR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_mir_surface 1
|
||||
#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
|
||||
#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
|
||||
|
||||
typedef VkFlags VkMirSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkMirSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMirSurfaceCreateFlagsKHR flags;
|
||||
MirConnection* connection;
|
||||
MirSurface* mirSurface;
|
||||
} VkMirSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkMirSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
MirConnection* connection);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
58
moltenvk/include/vulkan/vulkan_vi.h
Normal file
58
moltenvk/include/vulkan/vulkan_vi.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef VULKAN_VI_H_
|
||||
#define VULKAN_VI_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_NN_vi_surface 1
|
||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||
|
||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||
|
||||
typedef struct VkViSurfaceCreateInfoNN {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkViSurfaceCreateFlagsNN flags;
|
||||
void* window;
|
||||
} VkViSurfaceCreateInfoNN;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
|
||||
VkInstance instance,
|
||||
const VkViSurfaceCreateInfoNN* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
65
moltenvk/include/vulkan/vulkan_wayland.h
Normal file
65
moltenvk/include/vulkan/vulkan_wayland.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#ifndef VULKAN_WAYLAND_H_
|
||||
#define VULKAN_WAYLAND_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_wayland_surface 1
|
||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
||||
|
||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWaylandSurfaceCreateFlagsKHR flags;
|
||||
struct wl_display* display;
|
||||
struct wl_surface* surface;
|
||||
} VkWaylandSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
struct wl_display* display);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
276
moltenvk/include/vulkan/vulkan_win32.h
Normal file
276
moltenvk/include/vulkan/vulkan_win32.h
Normal file
|
@ -0,0 +1,276 @@
|
|||
#ifndef VULKAN_WIN32_H_
|
||||
#define VULKAN_WIN32_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_win32_surface 1
|
||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
||||
|
||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWin32SurfaceCreateFlagsKHR flags;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkWin32SurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_external_memory_win32 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkMemoryWin32HandlePropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkMemoryWin32HandlePropertiesKHR;
|
||||
|
||||
typedef struct VkMemoryGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkMemoryGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
||||
VkDevice device,
|
||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
||||
HANDLE handle,
|
||||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_win32_keyed_mutex 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeouts;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_external_semaphore_win32 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
||||
|
||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkSemaphoreImportFlags flags;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkD3D12FenceSubmitInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t waitSemaphoreValuesCount;
|
||||
const uint64_t* pWaitSemaphoreValues;
|
||||
uint32_t signalSemaphoreValuesCount;
|
||||
const uint64_t* pSignalSemaphoreValues;
|
||||
} VkD3D12FenceSubmitInfoKHR;
|
||||
|
||||
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_external_fence_win32 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
||||
|
||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkFenceImportFlags flags;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkFenceGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkFenceGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_external_memory_win32 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType;
|
||||
HANDLE handle;
|
||||
} VkImportMemoryWin32HandleInfoNV;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
} VkExportMemoryWin32HandleInfoNV;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
||||
VkDevice device,
|
||||
VkDeviceMemory memory,
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeoutMilliseconds;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoNV;
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
66
moltenvk/include/vulkan/vulkan_xcb.h
Normal file
66
moltenvk/include/vulkan/vulkan_xcb.h
Normal file
|
@ -0,0 +1,66 @@
|
|||
#ifndef VULKAN_XCB_H_
|
||||
#define VULKAN_XCB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_xcb_surface 1
|
||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
||||
|
||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXcbSurfaceCreateFlagsKHR flags;
|
||||
xcb_connection_t* connection;
|
||||
xcb_window_t window;
|
||||
} VkXcbSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
xcb_connection_t* connection,
|
||||
xcb_visualid_t visual_id);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
66
moltenvk/include/vulkan/vulkan_xlib.h
Normal file
66
moltenvk/include/vulkan/vulkan_xlib.h
Normal file
|
@ -0,0 +1,66 @@
|
|||
#ifndef VULKAN_XLIB_H_
|
||||
#define VULKAN_XLIB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_xlib_surface 1
|
||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
||||
|
||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXlibSurfaceCreateFlagsKHR flags;
|
||||
Display* dpy;
|
||||
Window window;
|
||||
} VkXlibSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
Display* dpy,
|
||||
VisualID visualID);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
54
moltenvk/include/vulkan/vulkan_xlib_xrandr.h
Normal file
54
moltenvk/include/vulkan/vulkan_xlib_xrandr.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
#ifndef VULKAN_XLIB_XRANDR_H_
|
||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
**
|
||||
** 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_EXT_acquire_xlib_display 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
VkDisplayKHR display);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
RROutput rrOutput,
|
||||
VkDisplayKHR* pDisplay);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
BIN
moltenvk/lib/libMoltenVK.dylib
Executable file
BIN
moltenvk/lib/libMoltenVK.dylib
Executable file
Binary file not shown.
Loading…
Reference in a new issue