Test for _pMetalFeatures->layeredRendering before setting
MTLRenderPassDescriptor.renderTargetArrayLength.
Change NSString comparisons using isEqualTo: to isEqualToString:.
Sometimes, the `CAMetalLayer` backing a view can be replaced--for
example, when the window is moved to another screen, or the style bits
on the window are changed. In that case, we must allow the client the
opportunity to recreate the surface and swapchain.
Layer-backed views always set themselves as the layer's delegate; we use
this fact to Key-Value Observe the view's `layer` property.
Other alternatives considered:
* Registering for `NSViewGlobalFrameDidChange` notifications. Aside from
only working on macOS, this doesn't actually catch every case where we
want to report a lost surface. I'm not even sure it works at all for
Metal.
* Holding a reference to the view, and checking when its layer property
has changed.
* Holding a weak reference to the layer; that way, the reference will
become `nil` when the layer is replaced. But this requires ARC.
Some projects also link against SPIRV-Cross statically, and in order to
avoid ABI conflicts, we should use a private namespace for the
SPIRV-Cross dependency to avoid bugs. See SPIRV-Cross issue #902 for
more information. The new namespace is MVK_spirv_cross, and the code
now makes use of the SPIRV_CROSS_NAMESPACE macro rather than spirv_cross.
The resource options must match between an `MTLBuffer` and any linear
texture created from it. Further, to be writable, the
`MTLTextureDescriptor` should have the `MTLTextureUsageShaderWrite` bit
set.
Fixes#542.
graphics pipeline during a compute stage.
MVKPushConstantsCommandEncoderState test for tessellation only during graphics stages.
Guard against possible missing graphics pipeline even during graphics stages.
Enable device features based on content of pCreateDeviceInfo.
Validate requested features are available and return if not.
Support returning error from vkCreateDevice(), vkFlushMappedMemoryRanges()
and vkInvalidateMappedMemoryRanges().
Update What's New Document.
tool now validates converted MSL with a test compilation.
Project build scripts now build dylib and framework in separate build directories
to enable MoltenVKShaderConverter to link to static library instead of dynamic library.
Final Package structure remains the same.
In Debug build, copy dylib dSYM files to Package.
Package/Latest directory now links relative to local Debug or Release directory.
Add install option to Makefile.
MoltenVKShaderConverter tool now validates converted MSL with a test compilation.
Clean up various MSL conversion and compilation error logging.
MVKCommandResourceFactory wrap Metal library compile with autorelease pool.
Build ExternalDependencies with same symbol hiding as MoltenVK to suppress visibility warnings.
Update What's New document.
According to the Vulkan spec:
> * If either of `srcImage` or `dstImage` was created with a
> depth/stencil format, the other **must** have exactly the same format
So this should not happen in well-behaved clients.