Log ext lib build steps to provide user feedback.
Add package_ext_libs_finish.sh script to separate packaging
libraries from building them, to avoid build database conflicts.
Travis only build macOS ext libs.
Create fat builds of static, dynamic & framework libraries if both iOS
and simulator versions have been created from separate manual Xcode builds.
Refactor scripts for creating fat libraries to reuse across projects.
Add MVK_BUILT_PROD_DIR to replace use of BUILT_PRODUCTS_DIR in most scripts
to allow flexibility across per-platform compilation.
Create fat builds of external libraries if both iOS and simulator versions
have been created from separate manual Xcode builds.
Add Scripts/create_fat_libs.sh.
Remove Scripts/package_ext_libs_ios.sh and Scripts/package_ext_libs_macos.sh.
Add Scripts/packagePregenSpirvToolsHeaders script to automate packaging Spirv-Tools
headers in support of the fetchDependencies --skip-spirv-tools-build option.
Update Docs/Whats_New.md.
Declare _formatDescriptions[] in mvk_datatypes.mm as officially writable
because Clang now locates static const in non-writable memory.
Update build settings to Xcode 11.
Update MoltenVK_Runtime_UserGuide.md about embedding `libMoltenVK.dylib` in an application.
Remove obsolescence log message for vkCreateMacOSSurfaceMVK()
and vkCreateIOSSurfaceMVK() functions.
Fix test for alignment of invalid pixel formats.
Update dependency libraries to match Vulkan SDK 1.1.121.
Update to renaming of VK_INTEL_shader_integer_functions2
enums and structs in latest Vulkan headers.
Update Whats_New.md document.
Update to latest external dependency libraries.
Rename components of VK_INTEL_shader_integer_functions2 to match 1.1.114 Vulkan spec.
Update What's New document.
Add ExternalDependencies (Debug) scheme to ExternalDependencies Xcode project.
Add --debug option to fetchDependencies script.
Support Release, Debug & Latest directories in External/build directory.
Enable DEPLOYMENT_POSTPROCESSING build setting when compiling
SPIRV-Tools to avoid warning spam when building dylibs.
Disable visibility warnings when building MoltenVKShaderConverter
in Release mode from external libraries built in Debug mode.
Always use -Xlinker -w option when creating dylibs to disable visibility warnings.
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.
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.
At long last, tessellation comes to MoltenVK! With this change, clients
will now be able to specify tessellation shaders when creating
pipelines, and then draw tessellated patches with them.
Unfortunately, there seem to be a few gotchas with tessellation in
Metal. For one thing, tessellation pipelines in Metal are structured
very differently from Vulkan. There is no tessellation control or even
vertex stage. Instead, the tessellation evaluation shader takes the
place of the vertex function as a "post-tessellation vertex function."
The tessellation levels are supplied in a buffer to the tessellator,
which you are expected to populate. The most common way to do this is by
running a compute shader. MoltenVK thus runs the vertex shader and
tessellation control shader by themselves; a single `VkPipeline` object
then requires at least *three* `MTLPipelineState` objects.
But wait, there's more! The tessellation-control-as-compute stage uses
Metal's support for vertex-style stage input to a compute shader. But,
this support requires one to declare indexing *ahead of time*, when the
pipeline state is created. So a single `VkPipeline` object could have as
many as *five* `MTLPipelineState` objects.
Further, if there are more output than input control points for the
tessellation control stage, then later invocations may end up fetching
the wrong attributes! To get around this, this change uses index buffers
to ensure that all tessellation control shaders see the correct input.
Unfortunately, in the indexed draw case, this means that the incoming
index buffer needs to be munged.
Instancing is another pain point here. In Vulkan, as in OpenGL and
Direct3D, instancing is done in the vertex shader; but in Metal, it is
done at the tessellation evaluation stage. For this reason, only the
vertex stage of a tessellated draw supports instancing. Additional
memory is required to hold data for the extra vertices generated by
instancing. This also requires still more munging of index buffers for
indexed draws.
Indirect draws are even more painful. Because the number of vertices and
instances is unknown, storage for the maximum possible number of
vertices must be allocated. This change imposes a totally arbitrary
limit of 131072 vertices from a single draw, including all vertices
generated by instancing. On a Mac, this requires about 194-256 MB of
VRAM for all the temporary buffers.
There are some possible optimizations here. If we could prove that the
vertex shader's output doesn't depend on the instance ID, either
directly or through a per-instance attribute, then we could avoid
running the vertex and tess. control stages per instance, and take
advantage of Metal's support for tess. eval instancing. If we could
also prove that the vertex shader simply passes instance attributes
through (similarly with the tess. control shader), we could do this for
many more instanced draws as well. It should also be possible to cache
the output from the tess. control stage; if the draw comes up again, we
can then skip the vertex and tess. control stages entirely!
Fixes#56 and #501.
The fetchDependencies script puts build files in External/build directory.
Xcode puts build files in standard Library/.../DerivedData directory.
Copy compiled external static library files to External/build/iOS &
External/build/macOS regardless of location of intermediates.
Add separate ExternalDependencies Xcode project.
Move external dependencies to ExternalDependencies project.
The fetchDependencies script builds external dependencies libraries into External/build.
The fetchDependencies script prepares SPIRV-Tools without preparing glslang.
MoltenVK links to pre-built external dependency static libraries.
MoltenVK includes external library headers using full relative paths.