Update from master branch.
diff --git a/.gitignore b/.gitignore
index b275fef..a277955 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@
External/Vulkan-Portability
External/Vulkan-Tools
External/VulkanSamples
+External/vulkan
# Mac OS X Finder
.DS_Store
diff --git a/ExternalRevisions/Vulkan-Portability_repo_revision b/ExternalRevisions/Vulkan-Portability_repo_revision
deleted file mode 100644
index 3a9f9eb..0000000
--- a/ExternalRevisions/Vulkan-Portability_repo_revision
+++ /dev/null
@@ -1 +0,0 @@
-53be040f04ce55463d0e5b25fd132f45f003e903
diff --git a/MoltenVK/MoltenVK.xcodeproj/project.pbxproj b/MoltenVK/MoltenVK.xcodeproj/project.pbxproj
index fb23b98..0ade7b8 100644
--- a/MoltenVK/MoltenVK.xcodeproj/project.pbxproj
+++ b/MoltenVK/MoltenVK.xcodeproj/project.pbxproj
@@ -604,7 +604,6 @@
isa = PBXGroup;
children = (
A9AD67C72054DD6C00ED3C08 /* vulkan */,
- A9F2559121F96814008C7785 /* vulkan-portability */,
);
path = include;
sourceTree = "<group>";
diff --git a/MoltenVK/MoltenVK/API/mvk_vulkan.h b/MoltenVK/MoltenVK/API/mvk_vulkan.h
index 757bb7e..8760890 100644
--- a/MoltenVK/MoltenVK/API/mvk_vulkan.h
+++ b/MoltenVK/MoltenVK/API/mvk_vulkan.h
@@ -44,6 +44,5 @@
#endif
#include <vulkan/vulkan.h>
-#include <vulkan-portability/vk_extx_portability_subset.h>
#endif
diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
index 4179fb5..a5ae030 100644
--- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
+++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm
@@ -132,11 +132,17 @@
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_EXTX: {
auto* portabilityFeatures = (VkPhysicalDevicePortabilitySubsetFeaturesEXTX*)next;
+ portabilityFeatures->constantAlphaColorBlendFactors = true;
portabilityFeatures->triangleFans = false;
+ portabilityFeatures->pointPolygons = false;
portabilityFeatures->separateStencilMaskRef = true;
portabilityFeatures->events = true;
portabilityFeatures->standardImageViews = _mvkInstance->getMoltenVKConfiguration()->fullImageViewSwizzle || _metalFeatures.nativeTextureSwizzle;
portabilityFeatures->samplerMipLodBias = false;
+ portabilityFeatures->mutableComparisonSamplers = _metalFeatures.depthSampleCompare;
+ portabilityFeatures->tessellationIsolines = false;
+ portabilityFeatures->tessellationPointMode = false;
+ portabilityFeatures->shaderSampleRateInterpolationFunctions = false;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES: {
@@ -453,26 +459,12 @@
bool MVKPhysicalDevice::getImageViewIsSupported(const VkPhysicalDeviceImageFormatInfo2 *pImageFormatInfo) {
for (const auto* next = (VkBaseInStructure*)pImageFormatInfo->pNext; next; next = next->pNext) {
switch ((uint32_t)next->sType) {
- case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_SUPPORT_EXTX: {
- auto* portImgViewInfo = (VkPhysicalDeviceImageViewSupportEXTX*)next;
+ case VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO: {
- // Create an image view and test whether it could be configured
- VkImageViewCreateInfo viewInfo = {
- .sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO,
- .pNext = portImgViewInfo->pNext,
- .flags = portImgViewInfo->flags,
- .image = nullptr,
- .viewType = portImgViewInfo->viewType,
- .format = portImgViewInfo->format,
- .components = portImgViewInfo->components,
- .subresourceRange = {
- .aspectMask = portImgViewInfo->aspectMask,
- .baseMipLevel = 0,
- .levelCount = 1,
- .baseArrayLayer = 0,
- .layerCount = 1},
- };
- MTLPixelFormat mtlPixFmt = _pixelFormats.getMTLPixelFormat(viewInfo.format);
+ VkImageViewCreateInfo viewInfo = *(VkImageViewCreateInfo*)next;
+ viewInfo.image = VK_NULL_HANDLE;
+
+ MTLPixelFormat mtlPixFmt;
bool useSwizzle;
return (MVKImageView::validateSwizzledMTLPixelFormat(&viewInfo, this,
_metalFeatures.nativeTextureSwizzle,
@@ -3039,9 +3031,9 @@
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_EXTX: {
auto* requestedFeatures = (VkPhysicalDevicePortabilitySubsetFeaturesEXTX*)next;
- enableFeatures(&_enabledPortabilityFeatures.triangleFans,
- &requestedFeatures->triangleFans,
- &pdPortabilityFeatures.triangleFans, 5);
+ enableFeatures(&_enabledPortabilityFeatures.constantAlphaColorBlendFactors,
+ &requestedFeatures->constantAlphaColorBlendFactors,
+ &pdPortabilityFeatures.constantAlphaColorBlendFactors, 11);
break;
}
default:
diff --git a/MoltenVK/include/vulkan-portability b/MoltenVK/include/vulkan-portability
deleted file mode 120000
index cfe721d..0000000
--- a/MoltenVK/include/vulkan-portability
+++ /dev/null
@@ -1 +0,0 @@
-../../External/Vulkan-Portability/include/vulkan
\ No newline at end of file
diff --git a/fetchDependencies b/fetchDependencies
index cd4f3a8..827ca6e 100755
--- a/fetchDependencies
+++ b/fetchDependencies
@@ -170,19 +170,22 @@
REPO_REV=$(cat "${EXT_REV_DIR}/${REPO_NAME}_repo_revision")
update_repo ${REPO_NAME} ${REPO_URL} ${REPO_REV}
+
+# During development of integrated VK_EXTX_portability_subset, update the Vulkan-Header
+# files by pulling from GitLab VK_EXTX_portability_subset branch HEAD, building the
+# headers from XML, and copying them to Vulkan-Header.
+ REPO_URL="https://gitlab.khronos.org/vulkan/vulkan.git"
+ REPO_REV=VK_EXTX_portability_subset
+
+ update_repo vulkan ${REPO_URL} ${REPO_REV}
+
+ cd vulkan/xml
+ make
+ cd - > /dev/null
+
+ cp -pRL ./vulkan/include/vulkan/ ./Vulkan-Headers/include/vulkan/
fi
-# ----------------- Vulkan-Portability -------------------
-
-echo
-echo ========== Vulkan-Portability ==========
-echo
-
-REPO_NAME=Vulkan-Portability
-REPO_URL="https://github.com/KhronosGroup/${REPO_NAME}.git"
-REPO_REV=$(cat "${EXT_REV_DIR}/${REPO_NAME}_repo_revision")
-
-update_repo ${REPO_NAME} ${REPO_URL} ${REPO_REV}
# ----------------- SPIRV-Cross -------------------