[PATCH vkd3d v2 5/5] Add support for MoltenVK on Mac OS.
cdavis at codeweavers.com
Tue Aug 7 16:24:56 CDT 2018
August 7, 2018 1:42 PM, "Henri Verbeet" <hverbeet at gmail.com> wrote:
> On 4 August 2018 at 01:42, Chip Davis <cdavis at codeweavers.com> wrote:
>> diff --git a/configure.ac b/configure.ac
>> index 7c2a560..76ed60c 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -75,9 +75,12 @@ AC_CHECK_LIB([pthread], [pthread_create],
>> [AC_MSG_ERROR([libpthread not found.])])
>> -AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr],
>> - [VULKAN_LIBS="-lvulkan"],
>> - [AC_MSG_ERROR([libvulkan not found.])])
>> +VKD3D_CHECK_SONAME([vulkan], [vkGetInstanceProcAddr],
>> + [VULKAN_LIBS="-lvulkan"],
>> + [VKD3D_CHECK_SONAME([MoltenVK], [vkGetInstanceProcAddr],
>> + [VULKAN_LIBS="-lMoltenVK"
>> + AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$ac_cv_lib_soname_MoltenVK"])],
>> + [AC_MSG_ERROR([libvulkan and libMoltenVK not found.])])])
> Introducing SONAME_LIBVULKAN is a separate change from adding MoltenVK support.
Yeah, I realized that shortly after submitting the patch. I wanted to wait for what other feedback you might have, though. (Yeah, *sure* I did... *suspiciously looks around the room*)
>> diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c
>> index 2c4d89a..a96ba68 100644
>> --- a/libs/vkd3d-utils/vkd3d_utils_main.c
>> +++ b/libs/vkd3d-utils/vkd3d_utils_main.c
>> @@ -34,7 +34,11 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter,
>> static const char * const instance_extensions =
>> +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H
>> + VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
>> +#elif defined(HAVE_XCB_XCB_H)
> I don't think those are necessarily mutually exclusive.
Except that these are passed as required extensions. That means that if any aren't present, VkInstance creation will fail.
>> diff --git a/m4/check-soname.m4 b/m4/check-soname.m4
>> new file mode 100644
>> index 0000000..0b231ff
>> --- /dev/null
>> +++ b/m4/check-soname.m4
>> @@ -0,0 +1,36 @@
>> +dnl This file contains code derived from WINE_CHECK_SONAME() and is used courtesy of Alexandre
> I don't think you can add that unless you actually asked Alexandre.
> However, that's not an issue anymore since we can just use this under
> the LGPL. It should probably just have the regular copyright header
Yeah, that was just me blindly cargo-culting.
More information about the wine-devel