Update dependency libraries to match Vulkan SDK 1.2.162.

Fix Mac Catalyst build failure, plus several build warnings on other platforms.
Update What's New document.
This commit is contained in:
Bill Hollings 2020-12-08 21:31:39 -05:00
parent 33b0e4fc55
commit 1ccc0ab7b5
11 changed files with 3271 additions and 3171 deletions

View File

@ -16,7 +16,7 @@ For best results, use a Markdown reader.*
MoltenVK 1.1.1 MoltenVK 1.1.1
-------------- --------------
Released 2010/12/07 Released 2010/12/09
- Add support for extensions: - Add support for extensions:
- `VK_KHR_sampler_mirror_clamp_to_edge` (iOS) - `VK_KHR_sampler_mirror_clamp_to_edge` (iOS)
@ -28,11 +28,17 @@ Released 2010/12/07
- `VK_EXT_texture_compression_astc_hdr` - `VK_EXT_texture_compression_astc_hdr`
- `VK_AMD_shader_image_load_store` (macOS) - `VK_AMD_shader_image_load_store` (macOS)
- `VK_IMG_format_pvrtc` (macOS) - `VK_IMG_format_pvrtc` (macOS)
- Support the *Mac Catalyst* platform for *iOS* apps on *macOS 11.0+*, under both `x86_64` and `arm64` architectures. - Support the *Mac Catalyst* platform for *iOS* apps on *macOS 11.0+*,
- Re-enable `MTLEvent`-based semaphores. under both `x86_64` and `arm64` architectures.
- Use `VK_KHR_image_format_list` to disable `MTLTextureUsagePixelFormatView` - Re-enable `MTLEvent`-based semaphores and fix several `MVKSync` issues.
- Use `VK_KHR_image_format_list` to disable `MTLTextureUsagePixelFormatView`
if only swizzles or `sRGB` conversion will be used for image views, improving if only swizzles or `sRGB` conversion will be used for image views, improving
performance on *iOS* by allowing Metal to use lossless texture compression. performance on *iOS* by allowing Metal to use lossless texture compression.
- Handle device loss.
- Fix crash in `vkUpdateDescriptorSets()` when copying inline block descriptors.
- Fix Metal validation error when unused elements in an array of sampler are not populated by descriptors.
- Fix crashes in `vkUseIOSurfaceMVK()` on chroma sampling and double releasing of`MTLTexture`.
- Fix potential drawable present race conditions.
- Fix crash in `vkUpdateDescriptorSets()` when copying inline block descriptors. - Fix crash in `vkUpdateDescriptorSets()` when copying inline block descriptors.
- Fix Metal validation error when unused elements in an array of sampler are not populated by descriptors. - Fix Metal validation error when unused elements in an array of sampler are not populated by descriptors.
- Move *Metal* drawable presentation from `MTLCommandBuffer` to `MTLDrawable` - Move *Metal* drawable presentation from `MTLCommandBuffer` to `MTLDrawable`
@ -40,8 +46,98 @@ Released 2010/12/07
- Allow binding descriptor set using layout different than it was created with. - Allow binding descriptor set using layout different than it was created with.
- Report `VkPhysicalDeviceLimits::maxPerStageDescriptorStorageImages` as Metal limit of `8`. - Report `VkPhysicalDeviceLimits::maxPerStageDescriptorStorageImages` as Metal limit of `8`.
- Increase per-stage texture count to `96` for A11 SoC's and above. - Increase per-stage texture count to `96` for A11 SoC's and above.
- Use variable descriptor count when determining descriptor binding count.
- Support setting sizes of SPIR-V unsized arrays.
- Support `MTLStorageTypeMemoryless` for Apple Silicon on Mac.
- Support Apple GPU pixel formats with Apple Silicon on Mac.
- Allow linear images on Apple GPUs in Blit and Clear commands.
- Apple family 7 GPUs (A14) on iOS support multisample layered rendering,
as well as sampler border colors and the mirror clamp to edge sampler address mode.
- Set fill mode, depth bias, viewport, and scissor states before clearing attachments
- Disable culling for the duration of `vkCmdClearAttachments()`
- `MVKDevice` increase minimum OS for shared-storage textures.
- `MVKDevice` set properties for Apple Silicon GPUs on macOS.
- `MVKQueue` only create one `GPUCaptureScope` per queue.
- `MVKSamplerYcbcrConversion` always make sure there is one plane.
- `MVKPhysicalDevice` correct fragment input component limit.
- `MVKPhysicalDevice` set max visibility buffer size to 256 kiB where supported.
- `MVKPhysicalDevice` expose support for interpolation functions.
- `MVKPhysicalDevice` enable 3D compressed textures on *iOS/tvOS*, and forbid ETC2 and EAC
3D textures on all platforms. Apple GPUs do not support 3D for those.
- `MVKPhysicalDevice` enable Apple family 7 features on *iOS*.
- `MVKPhysicalDevice` remove need to call `initGPUInfoProperties()` twice.
- `MVKPhysicalDevice` correct max descriptor set resources.
- `MVKPhysicalDevice` reduce maximum point size to 64.
- `MVKPhysicalDevice` enable strictLines for Intel and NVIDIA.
- `MVKPhysicalDevice` enable `shaderResourceMinLod` on *iOS*.
- `MVKPhysicalDevice` set correct subgroup properties.
- `MVKPhysicalDevice` enable texture swizzle on all Apple GPUs.
- `MVKPipelineLayout` only set configuration result if validating.
- `MVKPipeline` fix calculation of atomic image buffer addresses.
- `MVKPipeline` disable rasterization if culling both sides and don't try to add a fragment shader.
- `MVKPipeline` shorten vertex attribute format's length when `stride` < `size`.
- `MVKGraphicsPipeline` handle `minSampleShading`.
- `MVKImage` always use texel buffers for linear images in `MTLHeaps`.
- `MVKImage` make sure plane heap offsets are properly aligned.
- `MVKImage` always set the depth plane when rendering to a 3D image.
- `MVKImage` avoid swizzling storage and/or attachment image views.
- `MVKImage` avoid texel buffer for atomics if view format list
exists and does not include either `R32_UINT` or `R32_SINT` format.
- `MVKImageView` always ignore transfer usages.
- `MVKBufferView` avoid triggering `bytesPerRow` validation warning.
- `MVKDescriptorSetLayout` speed up lookup of descriptor index and streamline binding access.
- `MVKCmdBlitImage` use layered draws when possible.
- `MVKCmdBlitImage` add 0.5 to layer index before interpolating.
- `MVKCmdBlitImage` support depth/stencil blits with inversion and scaling.
- `MVKSwapchain` allow images whose size doesn't match the `CAMetalLayer`.
- `MVKPixelFormats` add 0.5 ULP to clear values for normalized formats.
- `MVKCommandEncoder` don't set `renderTargetArrayLength` for mixed 2D/3D renders.
- `MVKExtensions` add missing *tvOS* case for unsupported extensions.
- `MVKDescriptorSetLayout` sort and hold bindings by binding number.
- `MVKDescriptor` simplify subclass implementations.
- `MVKComputePipeline` override max threads per threadgroup.
- `MVKGPUCapture` make sure the `MTLCaptureScope` has only one reference.
- `MoltenShaderConverter` fix *tvOS* build to support *tvOS 9.0*.
- Support building external libraries and dylibs against sanitizers.
- Clarify documentation on mapping limitations for host-coherent image memory on *macOS*. - Clarify documentation on mapping limitations for host-coherent image memory on *macOS*.
- Add validation policy for MoltenVK development to `README.md` document.
- Update Xcode build settings check to Xcode 12.2.
- Update `VK_MVK_MOLTENVK_SPEC_VERSION` to `29`. - Update `VK_MVK_MOLTENVK_SPEC_VERSION` to `29`.
- Update dependency libraries to match *Vulkan SDK 1.2.162*.
- Update to latest SPIRV-Cross version:
- MSL: Support `SPV_EXT_demote_to_helper_invocation` for MSL 2.3.
- MSL: Support run-time sized image and sampler arrays
(`GL_EXT_nonuniform_qualifier/SPV_EXT_descriptor_indexing`).
- MSL: Support atomic access to images from argument buffers.
- MSL: Add missing interlock handling to atomic image buffers.
- MSL: Fix calculation of atomic image buffer address.
- MSL: Support querying and modifying generated combined sampler suffix.
- MSL: Don't use a bitcast for tessellation levels in tesc shaders.
- MSL: Handle Offset and Grad operands for 1D-as-2D textures.
- MSL: Don't remove periods from swizzle buffer index exprs.
- MSL: Correct definitions of subgroup ballot mask variables.
- MSL: Extract global variables from subgroup ballot operations.
- MSL: Mask ballots passed to ballot bit ops.
- MSL: Don't mask off inactive bits in ballot masks.
- MSL: Support vectors with `OpGroupNonUniformAllEqual`.
- MSL: Cast broadcast booleans to `ushort`.
- MSL: Do not use `component::x` gather for `depth2d` textures.
- MSL: For 2.1+, don't disable rasterization for vertex writes.
- MSL: Allow post-depth coverage on Mac in MSL 2.3.
- MSL: Allow framebuffer fetch on Mac in MSL 2.3.
- MSL: Allow Bias and Grad arguments with comparison on Mac in MSL 2.3.
- MSL: Support pull-model interpolation on MSL 2.3+
- MSL: Expand subgroup support.
- MSL: Adjust `FragCoord` for sample-rate shading.
- MSL: Expose some more features on iOS: `min_lod_clamp()`, `simd_is_helper_thread()`,
`barycentric_coord`, and `primitive_id`.
- MSL: Don't add fixup hooks for builtin variables if they're unused.
- MSL: Don't try to use `[[thread_index_in_simdgroup]]` in vertex shaders.
- Handle case where block is loop header, continue AND break block.
- MSL: Added `fmin3` and `fmax3` library functions to the illegal name list.
- Added Metal keyword: `level`.
- Parser: Don't assume `OpTypePointer` will always take a `SPIRType`.
- Add MIT dual license for the SPIRV-Cross API and CLI.

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
3d16060c3243e9f7bfd027de6e2e27c348d1791e 762c3082ae65e43f1c4f11546a21d3f9c1317160

View File

@ -1 +1 @@
7f9879b1b1fab53f719a9ed5e6e29533b10972b2 87aaa16d4c8e1ac70f8f04acdcd46eed4bd77209

View File

@ -1 +1 @@
2bfd6a752dc6cb26ceda4ec9d56e7dce98527680 0387f633882df56347c368149759b825ec55fd71

View File

@ -1 +1 @@
a1fe1176690ec2574deb4dd3be6c4e62d1f5d186 753fc69bac132e58da6d8864a9930cc587fde60a

View File

@ -1 +1 @@
bacaef3237c515e40d1a24722be48c0a0b30f75f c594de23cdd790d64ad5f9c8b059baae0ee2941d

View File

@ -60,6 +60,11 @@ using namespace std;
#define supportsMTLGPUFamily(GPUF) ([_mtlDevice respondsToSelector: @selector(supportsFamily:)] && [_mtlDevice supportsFamily: MTLGPUFamily ##GPUF]) #define supportsMTLGPUFamily(GPUF) ([_mtlDevice respondsToSelector: @selector(supportsFamily:)] && [_mtlDevice supportsFamily: MTLGPUFamily ##GPUF])
// Suppress unused variable warnings to allow us to define these all in one place,
// but use them in platform-conditional code blocks.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"
static const uint32_t kAMDVendorId = 0x1002; static const uint32_t kAMDVendorId = 0x1002;
static const uint32_t kAppleVendorId = 0x106b; static const uint32_t kAppleVendorId = 0x106b;
static const uint32_t kIntelVendorId = 0x8086; static const uint32_t kIntelVendorId = 0x8086;
@ -68,6 +73,8 @@ static const uint32_t kNVVendorId = 0x10de;
static const uint32_t kAMDRadeonRX5700XTDeviceId = 0x731f; static const uint32_t kAMDRadeonRX5700XTDeviceId = 0x731f;
static const uint32_t kAMDRadeonRX5500XTDeviceId = 0x7340; static const uint32_t kAMDRadeonRX5500XTDeviceId = 0x7340;
#pragma clang diagnostic pop
#pragma mark - #pragma mark -
#pragma mark MVKPhysicalDevice #pragma mark MVKPhysicalDevice
@ -3681,6 +3688,10 @@ MVKDevice::MVKDevice(MVKPhysicalDevice* physicalDevice, const VkDeviceCreateInfo
_commandResourceFactory = new MVKCommandResourceFactory(this); _commandResourceFactory = new MVKCommandResourceFactory(this);
// This code will be refactored in an upcoming release, but for now,
// suppress deprecation warnings for startCaptureWithDevice: on MacCatalyst.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (getInstance()->_autoGPUCaptureScope == MVK_CONFIG_AUTO_GPU_CAPTURE_SCOPE_DEVICE) { if (getInstance()->_autoGPUCaptureScope == MVK_CONFIG_AUTO_GPU_CAPTURE_SCOPE_DEVICE) {
MTLCaptureManager *captureMgr = [MTLCaptureManager sharedCaptureManager]; MTLCaptureManager *captureMgr = [MTLCaptureManager sharedCaptureManager];
if (!getInstance()->_autoGPUCaptureOutputFile.empty()) { if (!getInstance()->_autoGPUCaptureOutputFile.empty()) {
@ -3710,6 +3721,7 @@ MVKDevice::MVKDevice(MVKPhysicalDevice* physicalDevice, const VkDeviceCreateInfo
[captureMgr startCaptureWithDevice: getMTLDevice()]; [captureMgr startCaptureWithDevice: getMTLDevice()];
} }
} }
#pragma clang diagnostic pop
MVKLogInfo("Created VkDevice to run on GPU %s with the following %d Vulkan extensions enabled:%s", MVKLogInfo("Created VkDevice to run on GPU %s with the following %d Vulkan extensions enabled:%s",
_pProperties->deviceName, _pProperties->deviceName,

View File

@ -300,15 +300,15 @@ void MVKQueueCommandBufferSubmission::commitActiveMTLCommandBuffer(bool signalCo
MVKDevice* device = _queue->getDevice(); MVKDevice* device = _queue->getDevice();
id<MTLCommandBuffer> mtlCmdBuff = _activeMTLCommandBuffer; id<MTLCommandBuffer> mtlCmdBuff = _activeMTLCommandBuffer;
// If command buffer execution fails, log it, and mark the device lost. // If command buffer execution fails, log it, and mark the device lost.
[mtlCmdBuff addCompletedHandler: ^(id<MTLCommandBuffer> mtlCmdBuff) { [mtlCmdBuff addCompletedHandler: ^(id<MTLCommandBuffer> mtlCB) {
if (mtlCmdBuff.status == MTLCommandBufferStatusError) { if (mtlCB.status == MTLCommandBufferStatusError) {
device->reportError(device->markLost(), "Command buffer %p \"%s\" execution failed (code %li): %s", mtlCmdBuff, mtlCmdBuff.label ? mtlCmdBuff.label.UTF8String : "", mtlCmdBuff.error.code, mtlCmdBuff.error.localizedDescription.UTF8String); device->reportError(device->markLost(), "Command buffer %p \"%s\" execution failed (code %li): %s", mtlCB, mtlCB.label ? mtlCB.label.UTF8String : "", mtlCB.error.code, mtlCB.error.localizedDescription.UTF8String);
// Some errors indicate we lost the physical device as well. // Some errors indicate we lost the physical device as well.
switch (mtlCmdBuff.error.code) { switch (mtlCB.error.code) {
case MTLCommandBufferErrorBlacklisted: case MTLCommandBufferErrorBlacklisted:
// XXX This may also be used for command buffers executed in the background without the right entitlement. // XXX This may also be used for command buffers executed in the background without the right entitlement.
case MTLCommandBufferErrorNotPermitted: case MTLCommandBufferErrorNotPermitted:
#if MVK_MACOS #if MVK_MACOS && !MVK_MACCAT
case MTLCommandBufferErrorDeviceRemoved: case MTLCommandBufferErrorDeviceRemoved:
#endif #endif
device->getPhysicalDevice()->setConfigurationResult(VK_ERROR_DEVICE_LOST); device->getPhysicalDevice()->setConfigurationResult(VK_ERROR_DEVICE_LOST);

Binary file not shown.

View File

@ -493,7 +493,7 @@ else
echo "WARNING: You did not specify a platform to build." echo "WARNING: You did not specify a platform to build."
echo "To build the external libraries, include one or" echo "To build the external libraries, include one or"
echo "more of the following platform options:" echo "more of the following platform options:"
echo " --macos --ios --iossim --tvos --tvossim --all" echo " --macos --ios --iossim --maccat --tvos --tvossim --all"
echo "See the instructions in the fetchDependencies script for more info." echo "See the instructions in the fetchDependencies script for more info."
fi fi
fi fi