20 Commits

Author SHA1 Message Date
Bill Hollings
8ec682938b Update copyright to 2020. 2020-01-07 16:47:29 -05:00
Bill Hollings
9b13006018 Support linear filtering when using vkCmdBlitImage().
Fixes linear filtering when using vkCmdBlitImage(), useful for mipmap generation.
Move MVKCmdBlitImage sampler definition to shader as a constexpr sampler,
and ensure mip_filter and filter are set correctly.
Add MVKRPSKeyBlitImg::srcFilter.
Include MVKCommonEnvironment.h in MVKLogging.h.
Update MoltenVK version to 1.0.39.
2019-11-12 16:47:33 -05:00
Bill Hollings
c6ea99e4db Support Metal 3.0.
Merge Metal-3.0 branch into master branch.
Update What's New document with merged features.
2019-10-16 18:26:58 -04:00
Bill Hollings
5c87700732 Reduce memory usage by adjusting default memory allocs for many MVKVectorInline uses.
MVKRenderPass use emplace_back() instead of push_back()
when populating _subpasses  & _attachments vectors.
Add mvkLogSizeOf(T) development debugging function.
2019-10-10 16:46:17 -04:00
Bill Hollings
5c7904c3a7 Add request for feedback from people who reject MoltenVK to README.md document.
Update MoltenVK version to 1.0.38.
2019-09-25 15:41:40 -05:00
Chip Davis
92f0bec6e2 MVKDevice: Report a second heap for non-UMA devices.
This is the heap representing system memory. The memory type
corresponding to `MTLStorageModeShared` is reported as belonging to this
heap.

I've tried to correct the reported size of the heaps as well while I'm
at it. UMA GPUs and the system heap for NUMA GPUs use the system memory
size as the heap size, and the amount of available memory as the budget.
iOS 13 uses the new `os_proc_available_memory()` API for this purpose.
NUMA GPUs additionally use the memory used by the process as a crude
measure of system heap usage.
2019-08-09 11:53:39 -05:00
Bill Hollings
d1a6b5a40d Remove exposure to leakable instances of NSString, NSArray & NSDictionary.
Reduce creation of autoreleased instances of NSString, NSArray & NSDictionary.
Ensure remaining are covered by deliberate autorelease pools.
2019-07-15 18:59:52 -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
ebce19b0b7 Add MoltenVKShaderConverter tool option to log shader conversion performance.
Move MVKOSExtension.h/mm to from MoltenVK to Common
and move MTLDevice functions to MVKDevice.
2019-04-11 14:26:35 -04:00
Bill Hollings
0984b11bc0 Set MSL version for shader compiling from Metal feature set.
Add MVKPhysicalDeviceMetalFeatures::mslVersionEnum and set from Metal feature sets.
Derive MVKPhysicalDeviceMetalFeatures:: mslVersion from mslVersionEnum.
MVKDevice::getMTLCompileOptions() sets MTLCompileOptions::languageVersion
from MVKPhysicalDeviceMetalFeatures::mslVersionEnum.
MVKAssert logs error even when assertions disabled.
Update VK_MVK_MOLTENVK_SPEC_VERSION to 18.
2019-02-25 18:11:47 -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
216e86de19 Allow logging level to be controlled via runtime environment variable. 2019-01-29 21:10:31 -05:00
Chip Davis
e59ffbb84b Log to stderr instead of stdout. 2019-01-28 13:29:41 -06:00
Bill Hollings
fe55930fd5 Update Brenwill copyright noticies to 2019. 2019-01-01 21:13:25 -05:00
Bill Hollings
86bb51554b Support IOSurface on iOS only if IPHONEOS_DEPLOYMENT_TARGET is at least iOS 11.0.
On iOS, only compile IOSurface support, and link IOSurface framework to
libMoltenVK.dylib, if IPHONEOS_DEPLOYMENT_TARGET is at least iOS 11.0.
Update to latest version of SPIRV-Cross.
Update MoltenVK version to 1.0.15.
2018-07-12 18:26:54 -04:00
Bill Hollings
20c98e5e46 Add support for caching converted MSL shader code offline from pipeline cache
via vkGetPipelineCacheData(), vkCreatePipelineCache() & vkMergePipelineCaches().

Add the cereal serialization framework as a dependency.
Update documentation. Update project settings to Xcode 9.3.
2018-03-30 12:13:50 -04:00
Bill Hollings
9e9aae4687 Remove executable permissions from non-executable files. 2018-03-12 16:59:34 -04:00
C.W. Betts
0c91b1e613 Add printf-like macros to MVKLogImpl and mvkNotifyErrorWithText.
This will make the compiler point out improper formatting of variadic functions.
2018-02-26 15:28:28 -07:00
Bill Hollings
98b050e6e2 Update copyright dates to 2018. 2018-01-31 16:57:59 -05:00
Bill Hollings
fd7b8234f9 Initial open-source commit. 2017-11-17 11:14:29 -05:00