285 Commits

Author SHA1 Message Date
Bill Hollings
0ac1edbac0 Project build enhancements, and MoltenVKShaderConverter
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.
2019-03-22 19:36:21 -04:00
Bill Hollings
bdaf306233 Update VK_KHR_swapchain and VK_KHR_get_surface_capabilities2 extensions.
Add support for VK_KHR_get_surface_capabilities2 extension.
Implement newer VK_KHR_swapchain extension functions.
Fix when the following functions return VK_INCOMPLETE:
    vkGetPhysicalDeviceSurfaceFormatsKHR()
    vkGetSwapchainImagesKHR()
    vkEnumeratePhysicalDevices()
    vkEnumerateInstanceLayerProperties()
    vkGetPhysicalDeviceQueueFamilyProperties()
CTS: Pass supported *.macos.surface.* and *.macos.swapchain.* tests.
Update What's New document.
2019-03-21 08:53:18 -04:00
Bill Hollings
614ac65933 Add correct function entry point handling.
Add MVKEntryPoint struct to track entry points as
instance vs device, and core vs enabled extensions.
Add stubs for newer VK_KHR_swapchain functions.
Pass CTS dEQP-VK.api.version_check.entry_points.
Update What's New document.
2019-03-19 16:43:04 -04:00
Chip Davis
4468f36bc6 Support the VK_EXT_host_query_reset extension.
This allows clients to reset query pools on the host, instead of with a
GPU command.

This updates Vulkan headers to 1.1.104... but, there's a problem. This
change has not been merged to `master` in the `Vulkan-Headers` repo yet,
because of an issue building the C++ binding headers. Luckily, we only
need the core C header.
2019-03-17 19:59:15 -05:00
Bill Hollings
a2b1e04e8d Update to latest SPIRV-Cross version.
Adapt to API changes resulting from the introduction of the SPIRV-Cross C API.
Update What's New document.
2019-03-15 20:25:55 -04:00
Bill Hollings
e13444e305 Allow zero offset and stride combo in VkVertexInputBindingDescription.
Also fix memory overrun if no VB found with same binding as a VA.
2019-03-14 17:50:20 -04:00
Bill Hollings
3b1e53002e Increase shader float constant accuracy beyond 6 digits of precision. 2019-03-06 08:58:27 -05:00
Bill Hollings
d8ee4873b6 Update What's New document. 2019-02-27 18:04:42 -05:00
Bill Hollings
1fbc1333f8 Update What's New document.
Fix issue loading from Vulkan-Portability_repo_revision in fetchDependencies.
2019-02-27 17:47:15 -05:00
Bill Hollings
6f2dc4bdcb Add static and dynamic libraries to MoltenVKShaderConverter project.
Refactor build scripts.
Update paths to MoltenVKGLSLToSPIRVConverter framework in demos.
Fix rare build race condition on MoltenVKShaderConverter link to MoltenVK.
2019-02-18 22:19:37 +00:00
Bill Hollings
c57e29bc5c Clarify Xcode version requirements in documentation. 2019-02-13 14:34:55 -05:00
Bill Hollings
e0b75dbc2c Fix crash from use of MTLDevice registryID on early OS versions.
Add mvkGetRegistryID() function to check OS support for registry ID.
Rename build setting MVK_FORCE_LOW_POWER_GPU to MVK_CONFIG_FORCE_LOW_POWER_GPU
and make it an env var / build setting combo.
Rename env var MVK_LOG_LEVEL to MVK_CONFIG_LOG_LEVEL.
Rename MVKLogging.mm to MVKLogging.cpp.
2019-02-11 10:49:58 -05:00
Bill Hollings
d83d934150 Update to latest version of SPIRV-Cross.
Track version of spvAux buffer struct in SPRIV-Cross and
fail build if different than version expected by MoltenVK.
Update MoltenVK version to 1.0.33.
Update What's New document.
2019-02-08 21:31:14 -05:00
Bill Hollings
e4c196c3b6
Merge pull request #484 from cdavis5e/memory-budget
Support the VK_EXT_memory_budget extension.
2019-01-31 16:12:07 -06:00
Chip Davis
3df6d2d00f Support the VK_EXT_memory_budget extension.
This requires macOS 10.13 or iOS 11, for the `currentAllocatedSize`
property of `MTLDevice`. Ideally, we'd check for that method instead of
keying on the version.
2019-01-31 12:10:57 -06:00
Bill Hollings
f591fed43e Update to latest SPIRV-Cross version. 2019-01-28 19:58:32 -05:00
Bill Hollings
18a31fb3dd vkSetMTLTextureMVK() function retains texture object. 2019-01-28 17:09:57 -05:00
Bill Hollings
cb0c91cbd0 Update to latest SPIRV-Cross and update What's new document. 2019-01-27 21:18:47 -05:00
Bill Hollings
e5a890775b Add support for VK_EXTX_portability_subset extension.
Add KhronosGroup/Vulkan-Portability as external dependency repo.
Add ExternalRevisions/Vulkan-Portability_repo_revision.
Add vk_extx_portability_subset.h header file to mvk_vulkan.h.
MVKImageView allow constructor with no image or device.
Add mvkVkComponentMappingsMatch() & mvkVkComponentSwizzlesMatch() functions.
Cleanup some local var init warnings.
2019-01-27 19:52:59 -05:00
Bill Hollings
991a1944fe Update to latest dependency libraries for Vulkan SDK 1.1.97.
Update to latest SPIRV-Cross version:
2019-01-17 15:27:20 -05:00
Bill Hollings
cf22742c40 MoltenVKShaderConverter tool returns failure exit code when any file in directory fails. 2019-01-16 13:36:43 -05:00
Chip Davis
acefcca1ff Support the VK_KHR_variable_pointers extension. 2019-01-15 16:53:08 -06:00
Chip Davis
9862e2a458 Update "What's new" doc. 2019-01-15 15:47:15 -06:00
Chip Davis
2450c890dd
Merge branch 'master' into amd-gpu-shader-half-float 2019-01-15 15:44:47 -06:00
Chip Davis
361cbd61e9 Advertise the VK_AMD_gpu_shader_half_float extension. 2019-01-15 15:01:12 -06:00
Bill Hollings
ec1b237806 Add support for copying to and from PVRTC images. 2019-01-15 15:03:23 -05:00
Bill Hollings
7f03e1fb3b Pad fragment output to 4 components when needed.
Update to latest SPIRV-Cross.
2019-01-15 13:52:01 -05:00
Bill Hollings
ff03ef3edd Log Vulkan versions in human readable form when reporting Vulkan version error. 2019-01-14 19:23:29 -05:00
Bill Hollings
a7ab108166 Log error and assertion if ImageView swizzling is disabled but needed.
MVKConfiguration::fullTextureSwizzle renamed to fullImageViewSwizzle.
Env var MVK_CONFIG_FULL_TEXTURE_SWIZZLE renamed to MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE.
Refactor MVKResourcesCommandEncoderState swizzle updates.
Add mvkPackSwizzle(), mvkUnpackSwizzle() & mvkVkComponentSwizzleName() and remove from MVKImage.
Refactor mvkVkResultName() to use literal strings.
2019-01-14 17:36:39 -05:00
Bill Hollings
0f9aabfc7b Update What's New document. 2019-01-12 12:40:40 -05:00
Bill Hollings
02aeb0797a Add full texture swizzling to config, and disable it by default.
Add MVKConfiguration::fullTextureSwizzle and corresponding MVK_CONFIG_FULL_TEXTURE_SWIZZLE
env var & build setting, and set to false, to disable texture swizzling by default.
Add SPIRVToMSLConverterOptions::shouldSwizzleTextureSamples.
Lazily init queue families to allow time for specializedQueueFamilies config change.
Fix consistency of pipeline encoding state auxiliary buffer binding.
Improve documentation of MVKConfiguration environment variables and build settings.
2019-01-12 12:19:01 -05:00
Bill Hollings
fe55930fd5 Update Brenwill copyright noticies to 2019. 2019-01-01 21:13:25 -05:00
Bill Hollings
76146fc2a8
Merge pull request #437 from billhollings/master
Support iOS builds for arm64e architecture.
2018-12-31 18:07:37 -05:00
Bill Hollings
36f3cedbc9 Revert What's New document. 2018-12-31 17:17:35 -05:00
Bill Hollings
b70bc49fb3 Update What's New document. 2018-12-31 17:10:29 -05:00
Chip Davis
16231fcd86 Update "What's new" doc. 2018-12-31 15:51:58 -06:00
Bill Hollings
66a407dcc6 Support iOS builds for arm64e architecture. 2018-12-31 16:46:45 -05:00
Bill Hollings
682523d27e Update What's New document. 2018-12-31 15:34:13 -05:00
Bill Hollings
92c03d9dc6 Update What's New document redux. 2018-12-15 16:52:36 -05:00
Bill Hollings
b3fb1ecfdf Update What's New document. 2018-12-15 16:37:12 -05:00
Chip Davis
89aaaee0b8 Support the VK_KHR_bind_memory2 extension.
This extension allows multiple device memory objects to be bound in one
call. It also provides extensible versions of the memory binding calls.
It is a prerequisite for both the `VK_KHR_device_group` and
`VK_KHR_sampler_ycbcr_conversion` extensions.

The `VK_IMAGE_CREATE_ALIAS_BIT`, also added in this extension, would be
more interesting if we used `MTLHeap` objects for device memory, since
that would determine whether or not we would make images aliasable.
2018-12-06 11:50:43 -06:00
Chip Davis
528d3daf2a Support the VK_KHR_swapchain_mutable_format extension.
This allows clients to create views of a swapchain image with a
different format, just like a regular image created with the
`VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT` set. This extension also supports
the additional features provided by `VK_KHR_maintenance2` and
`VK_KHR_image_format_list` for swapchain images.

We... admittedly don't do much with any of this. There wasn't really
anything in Metal stopping clients from doing this to begin with. This
change does, however, set the `MUTABLE_FORMAT` and `EXTENDED_USAGE`
image bits on any swapchain created with the new
`VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR`.
2018-12-05 12:15:55 -06:00
Chip Davis
f4295ab3f1 Support the VK_KHR_shader_float16_int8 extension.
Only the `shaderFloat16` feature is supported for now. The `shaderInt8`
feature may require additional work on SPIRV-Cross.

Update Vulkan-Headers to 1.1.95 to pull in the definitions for this new
extension.
2018-12-05 10:32:30 -06:00
Chip Davis
faa455cec6 Support the VK_KHR_8bit_storage extension.
This isn't part of Vulkan 1.1, but it will almost certainly be part of
Vulkan 1.2. (Or whatever the new version is.)
2018-12-05 09:50:32 -06:00
Chip Davis
533e25c342 Add all the extensions I added over the past few months to the user guide.
Sort the list.
2018-12-04 15:55:18 -06:00
Bill Hollings
d99984e064 Align MoltenVK with Vulkan SDK 1.1.92.
Update to latest dependency libraries for Vulkan SDK 1.1.92.
Generate Hologram demo dispatch files in fetchDependencies and remove them from git.
Update MoltenVK version to 1.0.27.
Update What's New document.
2018-11-15 17:40:15 +01:00
Bill Hollings
38160b3eb3 MoltenVK 1.0.26.
Fixes to create_dylib.sh to cleanup bitcode and architecture support.
Update to latest SPIRV-Cross version.
Update MoltenVK version to 1.0.26.
Update Xcode projects to Xcode 10.1.
Update What's New document.
2018-11-06 16:01:36 -05:00
Bill Hollings
025259426c Refactor the build environment.
Support creation of static library and build framework and dynamic library from it.
Add Makefile to better support command line or script building integration.
Update demos to each use one of framework, static library, and dynamic library.
Refactor and rename the build scripts.
Refactor and rename the Xcode Schemes.
Update build and runtime documentation.
Update What's New document.
2018-10-30 23:16:12 -04:00
Bill Hollings
6215bbe04a Update What's New document. 2018-10-25 16:06:57 -04:00
Bill Hollings
209ed01acc Update VulkanSamples to latest version, and update What's New document. 2018-10-09 15:18:48 -04:00