w_metadata dxvk_macos dlls \
    title="Vulkan-based D3D10/D3D11 implementation for macOS / Wine (1.7)" \
    publisher="Philip Rebohle / CodeWeavers" \
    year="2021" \
    media="download" \
    file1="dxvk-v1.7-14-gef993b2f_x86_64.tar.bz2" \
    installed_file1="${W_SYSTEM64_DLLS_WIN64}/dxgi.dll" \
    installed_file2="${W_SYSTEM64_DLLS_WIN64}/d3d11.dll" \
    installed_file3="${W_SYSTEM64_DLLS_WIN64}/d3d10.dll" \
    installed_file4="${W_SYSTEM64_DLLS_WIN64}/d3d10_1.dll" \
    installed_file5="${W_SYSTEM64_DLLS_WIN64}/d3d10core.dll" \

load_dxvk_macos()
{
    # MoltenVK uses Metal API for Vulkan on macOS so 64Bit only
    w_package_unsupported_win32

    w_download https://media.codeweavers.com/pub/crossover/dxvk/"${file1}"

    w_try tar --strip-components=3 --directory="${W_SYSTEM64_DLLS}" -xf "${W_CACHE}/${W_PACKAGE}/${file1}" lib64/wine/dxvk/dxgi.dll lib64/wine/dxvk/d3d11.dll lib64/wine/dxvk/d3d10.dll lib64/wine/dxvk/d3d10_1.dll lib64/wine/dxvk/d3d10core.dll

    # This setting is required as we only use the 64Bit dlls
    # overriding to "native" like Linux will break 32Bit
    w_override_dlls native,builtin \
        dxgi \
        d3d11 \
        d3d10 \
        d3d10_1 \
        d3d10core
}
