500 Commits

Author SHA1 Message Date
Bill Hollings
04cf30a0b5 Update to latest version of SPIRV-Cross. 2019-05-08 17:19:24 -04:00
Bill Hollings
173d8cc5f3 Add support for the VK_EXT_debug_report extension.
Add MVKDebugReportCallback class.
Add MVKVulkanAPIObject class as base class of classes exposed in Vulkan API.
Remove MVKRefCountedDeviceObject class and move ref-counting to MVKVulkanAPIObject.
Rename MVKDispatchableObject class to MVKDispatchableVulkanAPIObject.
Introduce multiple inheritance mixin classes into class hierarchy.
Add MVKBaseObject::getVulkanAPIObject() function to find Vulkan API object
controlling any subobject that needs to report something.
MVKCommandResourceFactory functions pass in calling object for reporting.
Add MVKBaseObject::reportMessage() & reportError() functions.
Replace mvkNotifyErrorWithText() static function with reportError()
instance function to allow access to debug reporting.
Redefine MVKLog*() functions to call reportError() instance method.
Delete MVKLogging.cpp.
Remove MVKLogging.h from MoltenVKShaderConverter project.
Add mvk_datatypes.hpp to redirect errors in mvk_datatypes.h functions to debug
reporting. Use mvk_datatypes.hpp internally for all references to these functions.
Convert several static methods to instance methods.
Refactor platform defines in MVKSurface.h.
Explicitly count MVKExtensionList extension count to avoid relying on struct size.
Remove MVKCommandBuffer::recordResult() and use setConfigurationResult().
Change log indication of error in logs from [***MoltenVK ERROR***] to [mvk-error],
for consistency with other log level indications.
Update MoltenVK version to 1.0.35.
2019-05-01 22:27:03 -04:00
Bill Hollings
c2bb18e264 Update What's New document. 2019-04-18 18:38:11 -04:00
Bill Hollings
62f374bf7e Allow building external dependency libraries in Debug mode.
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.
2019-04-18 15:08:39 -04:00
Bill Hollings
eca03b8de1 MoltenVKShaderConverter tool add MSL version and platform command-line options.
Add SPIRVToMSLConverterOptions::platform to track platform. Default to build platform.
Update default SPIRVToMSLConverterOptions MSL version to 2.1.
MoltenVKShaderConverter test MSL compilation use same MSL version as conversion.
Default min perf tracking value to 0.0.
SPIRVToMSLConverter.h reference spirv.hpp via SPIRV-Cross framework.
Update What's New document.
2019-04-17 16:09:07 -04:00
Bill Hollings
189a41e8d2 Update dependency libraries for SDK 1.1.106. 2019-04-11 17:52:50 -04:00
Bill Hollings
f326f0caec Log shader performance statistics in any runtime if
MVKConfiguration::performanceLoggingFrameCount is non-zero.
2019-04-09 23:24:44 -04:00
Bill Hollings
ef86d58552 Update to latest version of SPIRV-Cross.
Clean up demo build warnings.
Update What's New document.
2019-04-05 12:08:32 -04:00
Bill Hollings
3e5b735355 Add MVK_CONFIG_TRACE_VULKAN_CALLS env var and build setting to log Vulkan calls made by application. 2019-04-03 16:39:27 -04:00
Bill Hollings
cf13ab08a2 Set MTLRenderPassDescriptor renderTargetWidth & renderTargetHeight
only when layered rendering supported, to avoid GPU crashes on older devices.
2019-04-03 14:58:57 -04:00
Bill Hollings
75a088dbe0 API: Add MVKPhysicalDeviceMetalFeatures::depthSampleCompare.
Set MTLSamplerDescriptor.compareFunction only if depthSampleCompare enabled.
Update VK_MVK_MOLTENVK_SPEC_VERSION to 19.
2019-04-02 00:40:57 -04:00
Bill Hollings
dfd5638a0f Clean up use of SPIRV_CROSS_NAMESPACE_OVERRIDE in Xcode projects.
Setting of SPIRV_CROSS_NAMESPACE_OVERRIDE in Xcode projects was stomping on DEBUG setting.
Update What's New document.
2019-04-01 22:41:20 -04:00
Bill Hollings
0f22e2a70e MSL: Fix crash where variable storage buffer pointers are passed down.
Explicitly build dSYM files in BUILT_PRODUCTS_DIR
to avoid conflict between macOS and iOS build locations.
Update to latest SPIRV-Cross version.
2019-03-28 11:58:05 -04:00
Bill Hollings
b3240794fc Fix PVRTC texture content loading via memory mapping.
MoltenVK_Runtime_UserGuide.md: Add limitation explanation
about loading PVRTC using host-visible memory only.
Update What's New document.
2019-03-26 13:31:26 -04:00
Bill Hollings
91f78b6bea Add support for tracking device features enabled during vkCreateDevice().
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.
2019-03-25 19:58:36 -04:00
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