Advertise the VK_EXT_post_depth_coverage extension.
iOS only, and only on A11/A12 devices (GPU Family 4/5).
This commit is contained in:
parent
b2ae0f011c
commit
3f3810afbd
@ -255,6 +255,7 @@ In addition to the core *Vulkan* API, **MoltenVK** also supports the following
|
||||
- `VK_EXT_host_query_reset`
|
||||
- `VK_EXT_memory_budget` *(requires Metal 2.0)*
|
||||
- `VK_EXT_metal_surface`
|
||||
- `VK_EXT_post_depth_coverage` *(iOS, requires GPU family 4)*
|
||||
- `VK_EXT_scalar_block_layout`
|
||||
- `VK_EXT_shader_stencil_export` *(requires Mac GPU family 2 or iOS GPU family 5)*
|
||||
- `VK_EXT_shader_viewport_index_layer`
|
||||
|
@ -539,6 +539,7 @@ typedef struct {
|
||||
VkBool32 multisampleLayeredRendering; /**< If true, layered rendering to multiple multi-sampled cube or texture array layers is supported. */
|
||||
VkBool32 stencilFeedback; /**< If true, fragment shaders that write to [[stencil]] outputs are supported. */
|
||||
VkBool32 textureBuffers; /**< If true, textures of type MTLTextureTypeBuffer are supported. */
|
||||
VkBool32 postDepthCoverage; /**< If true, coverage masks in fragment shaders post-depth-test are supported. */
|
||||
} MVKPhysicalDeviceMetalFeatures;
|
||||
|
||||
/**
|
||||
|
@ -791,6 +791,10 @@ void MVKPhysicalDevice::initMetalFeatures() {
|
||||
_metalFeatures.arrayOfSamplers = true;
|
||||
}
|
||||
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_iOS_GPUFamily4_v1] ) {
|
||||
_metalFeatures.postDepthCoverage = true;
|
||||
}
|
||||
|
||||
if ( [_mtlDevice supportsFeatureSet: MTLFeatureSet_iOS_GPUFamily5_v1] ) {
|
||||
_metalFeatures.layeredRendering = true;
|
||||
_metalFeatures.stencilFeedback = true;
|
||||
@ -1616,6 +1620,9 @@ void MVKPhysicalDevice::initMemoryProperties() {
|
||||
}
|
||||
|
||||
void MVKPhysicalDevice::initExtensions() {
|
||||
if (!_metalFeatures.postDepthCoverage) {
|
||||
_supportedExtensions.vk_EXT_post_depth_coverage.enabled = false;
|
||||
}
|
||||
if (!_metalFeatures.stencilFeedback) {
|
||||
_supportedExtensions.vk_EXT_shader_stencil_export.enabled = false;
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ MVK_EXTENSION(EXT_debug_utils, EXT_DEBUG_UTILS)
|
||||
MVK_EXTENSION(EXT_host_query_reset, EXT_HOST_QUERY_RESET)
|
||||
MVK_EXTENSION(EXT_memory_budget, EXT_MEMORY_BUDGET)
|
||||
MVK_EXTENSION(EXT_metal_surface, EXT_METAL_SURFACE)
|
||||
MVK_EXTENSION(EXT_post_depth_coverage, EXT_POST_DEPTH_COVERAGE)
|
||||
MVK_EXTENSION(EXT_scalar_block_layout, EXT_SCALAR_BLOCK_LAYOUT)
|
||||
MVK_EXTENSION(EXT_shader_stencil_export, EXT_SHADER_STENCIL_EXPORT)
|
||||
MVK_EXTENSION(EXT_shader_viewport_index_layer, EXT_SHADER_VIEWPORT_INDEX_LAYER)
|
||||
|
@ -50,6 +50,7 @@ static bool mvkIsSupportedOnPlatform(VkExtensionProperties* pProperties) {
|
||||
if (pProperties == &kVkExtProps_EXT_MEMORY_BUDGET) {
|
||||
return mvkOSVersion() >= 10.13;
|
||||
}
|
||||
if (pProperties == &kVkExtProps_EXT_POST_DEPTH_COVERAGE) { return false; }
|
||||
if (pProperties == &kVkExtProps_EXT_SHADER_STENCIL_EXPORT) {
|
||||
return mvkOSVersion() >= 10.14;
|
||||
}
|
||||
@ -65,6 +66,9 @@ static bool mvkIsSupportedOnPlatform(VkExtensionProperties* pProperties) {
|
||||
if (pProperties == &kVkExtProps_EXT_MEMORY_BUDGET) {
|
||||
return mvkOSVersion() >= 11.0;
|
||||
}
|
||||
if (pProperties == &kVkExtProps_EXT_POST_DEPTH_COVERAGE) {
|
||||
return mvkOSVersion() >= 11.0;
|
||||
}
|
||||
if (pProperties == &kVkExtProps_EXT_SHADER_STENCIL_EXPORT) {
|
||||
return mvkOSVersion() >= 12.0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user