Fix support for MVK_HIDE_VULKAN_SYMBOLS build setting.
- Remove separate extension entry points for 1.3 promoted vkCmdBeginRenderingKHR() and vkCmdEndRenderingKHR() functions, which caused build breaks when MVK_HIDE_VULKAN_SYMBOLS=1. - For consistency, hide vkGetMoltenVKConfigurationMVK(), vkSetMoltenVKConfigurationMVK(), and vkGetVersionStringsMVK() when MVK_HIDE_VULKAN_SYMBOLS=1, which was an oversight in original implementation of hiding Vulkan functions. - Update build `README.md` for generic command line build settings and MVK_HIDE_VULKAN_SYMBOLS in particular.
This commit is contained in:
parent
5f52f38f2e
commit
0cc6e1d3a4
@ -706,8 +706,6 @@ void MVKInstance::initProcAddrs() {
|
||||
ADD_INST_EXT_ENTRY_POINT(vkGetMTLCommandQueueMVK, MVK_MOLTENVK);
|
||||
|
||||
// Device extension functions:
|
||||
ADD_DVC_EXT_ENTRY_POINT(vkCmdBeginRenderingKHR, KHR_DYNAMIC_RENDERING);
|
||||
ADD_DVC_EXT_ENTRY_POINT(vkCmdEndRenderingKHR, KHR_DYNAMIC_RENDERING);
|
||||
ADD_DVC_EXT_ENTRY_POINT(vkCmdPushDescriptorSetKHR, KHR_PUSH_DESCRIPTOR);
|
||||
ADD_DVC_EXT2_ENTRY_POINT(vkCmdPushDescriptorSetWithTemplateKHR, KHR_PUSH_DESCRIPTOR, KHR_DESCRIPTOR_UPDATE_TEMPLATE);
|
||||
ADD_DVC_EXT_ENTRY_POINT(vkCreateSwapchainKHR, KHR_SWAPCHAIN);
|
||||
|
@ -49,7 +49,7 @@ VkResult mvkCopy(S* pDst, const S* pSrc, size_t* pCopySize) {
|
||||
}
|
||||
}
|
||||
|
||||
MVK_PUBLIC_SYMBOL VkResult vkGetMoltenVKConfigurationMVK(
|
||||
MVK_PUBLIC_VULKAN_SYMBOL VkResult vkGetMoltenVKConfigurationMVK(
|
||||
VkInstance ignored,
|
||||
MVKConfiguration* pConfiguration,
|
||||
size_t* pConfigurationSize) {
|
||||
@ -57,7 +57,7 @@ MVK_PUBLIC_SYMBOL VkResult vkGetMoltenVKConfigurationMVK(
|
||||
return mvkCopy(pConfiguration, &mvkConfig(), pConfigurationSize);
|
||||
}
|
||||
|
||||
MVK_PUBLIC_SYMBOL VkResult vkSetMoltenVKConfigurationMVK(
|
||||
MVK_PUBLIC_VULKAN_SYMBOL VkResult vkSetMoltenVKConfigurationMVK(
|
||||
VkInstance ignored,
|
||||
const MVKConfiguration* pConfiguration,
|
||||
size_t* pConfigurationSize) {
|
||||
@ -88,7 +88,7 @@ MVK_PUBLIC_VULKAN_SYMBOL VkResult vkGetPerformanceStatisticsMVK(
|
||||
return mvkCopy(pPerf, &mvkPerf, pPerfSize);
|
||||
}
|
||||
|
||||
MVK_PUBLIC_SYMBOL void vkGetVersionStringsMVK(
|
||||
MVK_PUBLIC_VULKAN_SYMBOL void vkGetVersionStringsMVK(
|
||||
char* pMoltenVersionStringBuffer,
|
||||
uint32_t moltenVersionStringBufferLength,
|
||||
char* pVulkanVersionStringBuffer,
|
||||
|
25
README.md
25
README.md
@ -254,20 +254,33 @@ The `make` targets all require that *Xcode* is installed on your system.
|
||||
Building from the command line creates the same `Package` folder structure described above when
|
||||
building from within *Xcode*.
|
||||
|
||||
When building from the command line, you can set any of the build settings documented in
|
||||
the `vk_mvk_moltenvk.h` file for `MVKConfiguration`, by passing them in the command line,
|
||||
as in the following examples:
|
||||
|
||||
make MVK_CONFIG_LOG_LEVEL=0
|
||||
or
|
||||
|
||||
make macos MVK_CONFIG_PREFILL_METAL_COMMAND_BUFFERS=1
|
||||
|
||||
...etc.
|
||||
|
||||
|
||||
### Hiding Vulkan API Symbols
|
||||
|
||||
You can optionally build MoltenVK with the Vulkan API static call symbols (`vk*`) hidden,
|
||||
to avoid library linking conflicts when bound to a Vulkan Loader that also exports identical symbols.
|
||||
|
||||
To do so, when building MoltenVK, set the build setting or environment varible `MVK_HIDE_VULKAN_SYMBOLS=1`.
|
||||
This build setting can be changed in the `MoltenVK.xcodeproj` *Xcode* project, or it can be included in
|
||||
any of the `make` build commands. For example:
|
||||
To do so, when building MoltenVK, set the build setting `MVK_HIDE_VULKAN_SYMBOLS=1`.
|
||||
This build setting can be set in the `MoltenVK.xcodeproj` *Xcode* project,
|
||||
or it can be included in any of the `make` build commands. For example:
|
||||
|
||||
make MVK_HIDE_VULKAN_SYMBOLS=1
|
||||
...
|
||||
make macos-debug MVK_HIDE_VULKAN_SYMBOLS=1
|
||||
...etc.
|
||||
or
|
||||
|
||||
make macos MVK_HIDE_VULKAN_SYMBOLS=1
|
||||
|
||||
...etc.
|
||||
|
||||
|
||||
<a name="demos"></a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user