From 38c3b93283e15089ab31effa7de1beb041bc9f21 Mon Sep 17 00:00:00 2001 From: John Warburton Date: Tue, 12 Jun 2018 22:01:06 +0100 Subject: [PATCH] Add Vulkan graphics output/drivers --- 0000-build-fix.patch | 71 ++ SPIRV-Tools-shared.patch | 21 + build-mingw-updates.patch | 4 +- cross_compile_ffmpeg_shared.sh | 112 ++- glslang-install-missing-dll.patch | 14 + glslang-shared.patch | 42 ++ glslang-threads.patch | 112 +++ libbluray-java.patch | 18 + mpv-ytdl.patch | 36 + shaderc-build.patch | 31 + vulkan-threads.patch | 1159 +++++++++++++++++++++++++++++ 11 files changed, 1609 insertions(+), 11 deletions(-) create mode 100644 0000-build-fix.patch create mode 100644 SPIRV-Tools-shared.patch create mode 100644 glslang-install-missing-dll.patch create mode 100644 glslang-shared.patch create mode 100644 glslang-threads.patch create mode 100644 libbluray-java.patch create mode 100644 mpv-ytdl.patch create mode 100644 shaderc-build.patch create mode 100644 vulkan-threads.patch diff --git a/0000-build-fix.patch b/0000-build-fix.patch new file mode 100644 index 0000000..1c5eac3 --- /dev/null +++ b/0000-build-fix.patch @@ -0,0 +1,71 @@ +diff --git a/src/angle.gyp b/src/angle.gyp +index 4095547..3db4840 100644 +--- a/src/angle.gyp ++++ b/src/angle.gyp +@@ -76,7 +76,7 @@ + [ + { + 'destination': '<(angle_gen_path)', +- 'files': [ 'copy_compiler_dll.bat', '<(angle_id_script_base)' ], ++ 'files': [ '<(angle_id_script_base)' ], + }, + ], + 'conditions': +@@ -206,10 +206,10 @@ + 'outputs': [ '<(PRODUCT_DIR)/d3dcompiler_47.dll' ], + 'action': + [ +- "<(angle_gen_path)/copy_compiler_dll.bat", +- "$(PlatformName)", +- "<(windows_sdk_path)", +- "<(PRODUCT_DIR)" ++# "<(angle_gen_path)/copy_compiler_dll.bat", ++# "$(PlatformName)", ++# "<(windows_sdk_path)", ++# "<(PRODUCT_DIR)" + ], + }, + ], #actions +diff --git a/src/common/mathutil.h b/src/common/mathutil.h +index e096b1a..716aeb6 100644 +--- a/src/common/mathutil.h ++++ b/src/common/mathutil.h +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + + #include + +diff --git a/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h b/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h +index c4b79ee..f22609b 100644 +--- a/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h ++++ b/src/libANGLE/renderer/gl/wgl/functionswgl_typedefs.h +@@ -23,7 +23,7 @@ typedef HGLRC(WINAPI *PFNWGLCREATELAYERCONTEXTPROC)(HDC, int); + typedef BOOL(WINAPI *PFNWGLDELETECONTEXTPROC)(HGLRC); + typedef HGLRC(WINAPI *PFNWGLGETCURRENTCONTEXTPROC)(VOID); + typedef HDC(WINAPI *PFNWGLGETCURRENTDCPROC)(VOID); +-typedef PROC(WINAPI *PFNWGLGETPROCADDRESSPROC)(LPCSTR); ++typedef void*(WINAPI *PFNWGLGETPROCADDRESSPROC)(LPCSTR); + typedef BOOL(WINAPI *PFNWGLMAKECURRENTPROC)(HDC, HGLRC); + typedef BOOL(WINAPI *PFNWGLSHARELISTSPROC)(HGLRC, HGLRC); + typedef BOOL(WINAPI *PFNWGLUSEFONTBITMAPSAPROC)(HDC, DWORD, DWORD, DWORD); +diff --git a/util/util.gyp b/util/util.gyp +index bda8a0530..2a87e57e7 100644 +--- a/util/util.gyp ++++ b/util/util.gyp +@@ -118,6 +118,13 @@ + [ + '<@(util_win32_sources)', + ], ++ 'link_settings': ++ { ++ 'libraries': ++ [ ++ '-lgdi32', ++ ] ++ }, + }], + ['OS=="win" and angle_build_winrt==1', + { diff --git a/SPIRV-Tools-shared.patch b/SPIRV-Tools-shared.patch new file mode 100644 index 0000000..c267baa --- /dev/null +++ b/SPIRV-Tools-shared.patch @@ -0,0 +1,21 @@ +--- CMakeLists.txt.orig 2018-06-04 20:56:55.854029300 +0100 ++++ CMakeLists.txt 2018-06-04 20:58:02.399678900 +0100 +@@ -142,12 +142,12 @@ + + # For MinGW cross compile, statically link to the C++ runtime. + # But it still depends on MSVCRT.dll. +- if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") +- if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") +- set_target_properties(${TARGET} PROPERTIES +- LINK_FLAGS -static -static-libgcc -static-libstdc++) +- endif() +- endif() ++ #if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") ++ # if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") ++ # set_target_properties(${TARGET} PROPERTIES ++ # LINK_FLAGS -static -static-libgcc -static-libstdc++) ++ # endif() ++ #endif() + endfunction() + + if(NOT COMMAND find_host_package) diff --git a/build-mingw-updates.patch b/build-mingw-updates.patch index d7da6ef..f013f56 100755 --- a/build-mingw-updates.patch +++ b/build-mingw-updates.patch @@ -51,8 +51,8 @@ - --enable-static --disable-multilib --prefix="$prefix" \ - --enable-languages=c,c++ --disable-nls || error_exit + "../../src/gcc-$v_gcc/configure" --target="$host" --enable-shared \ -+ --disable-static --disable-multilib --prefix="$prefix" \ -+ --enable-languages=c,c++,fortran --disable-nls || error_exit ++ --enable-static --disable-multilib --prefix="$prefix" \ ++ --enable-languages=c,c++,fortran --enable-libstdcxx-threads --disable-nls || error_exit echo "running 'make-gcc' for gcc" >&3 make -j $cpus all-gcc || error_exit echo "running 'install-gcc' for gcc" >&3 diff --git a/cross_compile_ffmpeg_shared.sh b/cross_compile_ffmpeg_shared.sh index 4df0e65..cd7180d 100755 --- a/cross_compile_ffmpeg_shared.sh +++ b/cross_compile_ffmpeg_shared.sh @@ -488,6 +488,8 @@ do_cmake() { echo cmake $source_dir $extra_args -DBUILD_SHARED_LIB=1 -DBUILD_STATIC_LIBS=0 -DENABLE_STATIC_RUNTIME=0 -DENABLE_SHARED_RUNTIME=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RANLIB=${cross_prefix}ranlib -DCMAKE_C_COMPILER=${cross_prefix}gcc -DCMAKE_CXX_COMPILER=${cross_prefix}g++ -DCMAKE_Fortran_COMPILER:FILEPATH=${cross_prefix}gfortran -DCMAKE_RC_COMPILER=${cross_prefix}windres -DCMAKE_INSTALL_PREFIX=$mingw_w64_x86_64_prefix || exit 1 cmake $source_dir $extra_args -DBUILD_SHARED_LIBS=1 -DBUILD_STATIC_LIBS=0 -DENABLE_STATIC_RUNTIME=0 -DENABLE_SHARED_RUNTIME=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RANLIB=${cross_prefix}ranlib -DCMAKE_C_COMPILER=${cross_prefix}gcc -DCMAKE_CXX_COMPILER=${cross_prefix}g++ -DCMAKE_RC_COMPILER=${cross_prefix}windres -DCMAKE_INSTALL_PREFIX=$mingw_w64_x86_64_prefix || exit 1 touch $touch_name || exit 1 + unset CMAKE_INCLUDE_PATH + unset CMAKE_PREFIX_PATH fi } @@ -653,11 +655,28 @@ do_ninja_and_ninja_install() { local touch_name=$(get_small_touchfile_name already_ran_make_install "$extra_ninja_options") if [ ! -f $touch_name ]; then echo "ninja installing $(pwd) as $ PATH=$PATH ninja -C build install $extra_make_options" - ninja -C build install || exit 1 + ninja install || exit 1 touch $touch_name || exit 1 fi } + +do_ninja() { + local extra_make_options=" -j $cpu_count" + local cur_dir2=$(pwd) + local touch_name=$(get_small_touchfile_name already_ran_make "${extra_make_options}") + + if [ ! -f $touch_name ]; then + echo + echo "ninja-ing $cur_dir2 as $ PATH=$PATH ninja "${extra_make_options}" + echo + ninja "${extra_make_options} || exit 1 + touch $touch_name || exit 1 # only touch if the build was OK + else + echo "already did ninja $(basename "$cur_dir2")" + fi +} + do_make_and_make_install() { local extra_make_options="$1" do_make "$extra_make_options" @@ -1987,7 +2006,8 @@ build_libbluray() { # Overcome invalid detection of MSVC when using MinGW apply_patch file://${top_dir}/libudfread-udfread-c.patch cd ../.. - generic_configure_make_install #"--disable-bdjava" + #apply_patch file://${top_dir}/libbluray-java.patch + generic_configure_make_install "--disable-silent-rules" #"--disable-bdjava" cd .. sed -i.bak 's/-lbluray.*$/-lbluray -lxml2 -lws2_32/' "$PKG_CONFIG_PATH/libbluray.pc" # This is for mpv not linking against the right libraries @@ -2016,6 +2036,7 @@ build_icu() { cd icu_native #apply_patch file://${top_dir}/icu_native-xlocale.patch cd source + env # These might be set. They shouldn't be. unset AR unset LD @@ -2879,7 +2900,7 @@ build_mpv() { unset CC unset LD env - do_configure "configure -v -pp --prefix=${mingw_w64_x86_64_prefix} --enable-dvdread --enable-dvdnav --enable-cdda --enable-win32-internal-pthreads --disable-x11 --disable-debug-build --enable-sdl2 --enable-libmpv-shared --disable-libmpv-static" "./waf" + do_configure "configure -v -pp --prefix=${mingw_w64_x86_64_prefix} --enable-dvdread --enable-dvdnav --enable-cdda --disable-x11 --disable-debug-build --enable-sdl2 --enable-libmpv-shared --disable-libmpv-static" "./waf" # In this cross-compile for Windows, we keep the Python script up-to-date and therefore # must call it directly by its full name, because mpv can only explore for executables # with the .exe suffix. @@ -3358,7 +3379,7 @@ build_boost() { # ./b2 --prefix=${mingw_w64_x86_64_prefix} -j 2 --ignore-site-config --user-config=user-config.jam address-model=64 architecture=x86 binary-format=pe link=shared --runtime-link=shared --target-os=windows threadapi=win32 threading=multi toolset=gcc-mingw --layout=tagged --disable-icu cxxflags='-std=c++11' --with-system --with-filesystem --with-regex --with-date_time install || exit 1 # ./b2 -a -d+2 --debug-configuration --prefix=${mingw_w64_x86_64_prefix} variant=release target-os=windows toolset=gcc-mingw address-model=64 link=shared runtime-link=shared threading=multi threadapi=win32 architecture=x86 binary-format=pe --with-system --with-filesystem --with-regex --with-date_time --with-thread --with-test --user-config=user-config.jam install || exit 1 # ./b2 -a -d+2 --debug-configuration --prefix=${mingw_w64_x86_64_prefix} variant=debug target-os=windows toolset=gcc-mingw address-model=64 link=shared runtime-link=shared threading=multi threadapi=win32 architecture=x86 binary-format=pe boost.locale.winapi=on boost.locale.std=on boost.locale.icu=on boost.locale.iconv=on boost.locale.posix=off --with-locale --user-config=user-config.jam install || exit 1 - ./b2 -a -j ${cpu_count} --prefix=${mingw_w64_x86_64_prefix} variant=release target-os=windows toolset=gcc-mingw abi=ms address-model=64 link=shared runtime-link=shared threading=multi threadapi=win32 architecture=x86 binary-format=pe --without-python --without-serialization --layout=tagged --user-config=user-config.jam install || exit 1 # boost.locale.winapi=on boost.locale.std=on boost.locale.icu=on boost.locale.iconv=on boost.locale.posix=off --user-config=user-config.jam install || exit 1 + ./b2 -a -j ${cpu_count} --prefix=${mingw_w64_x86_64_prefix} variant=release target-os=windows toolset=gcc-mingw abi=ms address-model=64 link=shared,static runtime-link=shared threading=multi threadapi=win32 architecture=x86 binary-format=pe --without-python --without-serialization --layout=tagged --user-config=user-config.jam install || exit 1 # boost.locale.winapi=on boost.locale.std=on boost.locale.icu=on boost.locale.iconv=on boost.locale.posix=off --user-config=user-config.jam install || exit 1 touch -- "$touch_name" else echo "Already built and installed Boost libraries" @@ -4131,7 +4152,7 @@ build_loudness-scanner() { # Rename internal copy of libebur128 because of slight differences # update some code for latest FFmpeg apply_patch file://${top_dir}/ebur128-CMakeLists.txt-private.patch - apply_patch file://${top_dir}/loudness-scanner-ffmpeg.patch + #apply_patch file://${top_dir}/loudness-scanner-ffmpeg.patch sed -i.bak 's/avcodec_alloc_frame/av_frame_alloc/' scanner/inputaudio/ffmpeg/input_ffmpeg.c do_cmake_static "-DENABLE_INTERNAL_QUEUE_H=ON -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_POLICY_DEFAULT_CMP0020=NEW -DGTK2_GDKCONFIG_INCLUDE_DIR=${mingw_w64_x86_64_prefix}/include/gtk-2.0/ -DDISABLE_QT5=ON" sed -i.bak 's/-isystem /-I/g' scanner/scanner-tag/CMakeFiles/scanner-tag.dir/includes_CXX.rsp @@ -4732,7 +4753,7 @@ build_mimedb() { } build_qjackctl() { - do_git_checkout https://github.com/rncbc/qjackctl.git qjackctl 568b076f1ddd0fcb18a78828e0e5b833e52fd7a1 + do_git_checkout https://github.com/rncbc/qjackctl.git qjackctl # 568b076f1ddd0fcb18a78828e0e5b833e52fd7a1 cd qjackctl apply_patch file://${top_dir}/qjackctl-MainForm.patch generic_configure_make_install "LIBS=-lportaudio --enable-xunique=no" # enable-jack-version=yes @@ -4742,12 +4763,79 @@ build_qjackctl() { cd .. } +build_spirvtools() { +do_git_checkout https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Headers # 3ce3e49d73b8abbf2ffe33f829f941fb2a40f552 +do_git_checkout https://github.com/KhronosGroup/SPIRV-Tools.git SPIRV-Tools # fe2fbee294a8ad4434f828a8b4d99eafe9aac88c + cd SPIRV-Tools + ln -svf ../../SPIRV-Headers external + # apply_patch file://${top_dir}/SPIRV-Tools-shared.patch + do_cmake_static "-DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON" + do_make + do_make_install + cd .. +} + +build_glslang() { + do_git_checkout https://github.com/KhronosGroup/glslang.git glslang 32d3ec319909fcad0b2b308fe1635198773e8316 + #download_and_unpack_file https://github.com/KhronosGroup/glslang/archive/6.2.2596.tar.gz glslang-6.2.2596 + cd glslang #-6.2.2596 + #apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-glslang/001-install-missing-dll.patch + apply_patch file://${top_dir}/glslang-threads.patch + # apply_patch file://${top_dir}/glslang-shared.patch + do_cmake_static "-DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=YES" + do_make "V=1" + do_make_install + cd .. +} + +build_shaderc() { + do_git_checkout https://github.com/google/shaderc.git shaderc # be8e0879750303a1de09385465d6b20ecb8b380d + cd shaderc + export spirv-tools_SOURCE_DIR=${top_dir}/x86_64/SPIRV-Tools/ + export glslang_SOURCE_DIR=${top_dir}/x86_64/glslang/ + export shaderc_SOURCE_DIR=${top_dir}/x86_64/shaderc/ + apply_patch file://${top_dir}/shaderc.patch + mkdir build + do_cmake_static "-GNinja -DSHADERC_SKIP_TESTS=ON -DCMAKE_VERBOSE_MAKEFILE=YES " #-DSHADERC_ENABLE_SHARED_CRT=ON" # -DSHADERC_ENABLE_SHARED_CRT=ON" + apply_patch file://${top_dir}/shaderc-build.patch + do_ninja_and_ninja_install "V=1" +# do_make_install + cd .. +} + + +build_vulkan() { + download_and_unpack_file https://github.com/KhronosGroup/Vulkan-Loader/archive/sdk-1.1.73.0.tar.gz Vulkan-Loader-sdk-1.1.73.0 + cd Vulkan-Loader-sdk-1.1.73.0 + apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-vulkan/001-build-fix.patch + apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-vulkan/002-proper-def-files-for-32bit.patch + apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-vulkan/003-generate-pkgconfig-files.patch + apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-vulkan/004-installation-commands.patch + apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-vulkan/005-mingw-dll-name.patch + apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-vulkan/006-skip-commit-create.patch + echo "#define SPIRV_TOOLS_COMMIT_ID \"8d8a71278bf9e83dd0fb30d5474386d30870b74d\"" > spirv_tools_commit_id.h + cp -fv spirv_tools_commit_id.h loader/ + # Missing defines are already added to MinGW by our scripts earlier in the build process. + export CFLAGS="-D_WIN32_WINNT=0x0A00 -D__STDC_FORMAT_MACROS" + export CPPFLAGS="-D_WIN32_WINNT=0x0A00 -D__STDC_FORMAT_MACROS" + export CXXFLAGS="-D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO -D__STDC_FORMAT_MACROS -fpermissive" + do_cmake "-DCMAKE_BUILD_TYPE=Release -DBUILD_DEMOS=OFF -DBUILD_TESTS=OFF -DDISABLE_BUILD_PATH_DECORATION=ON -DDISABLE_BUILDTGT_DIR_DECORATION=ON" + apply_patch file://${top_dir}/vulkan-threads.patch + do_make + do_make_install + unset CFLAGS + unset CPPFLAGS + unset CXXFLAGS + cd .. +} + + build_angle() { -# do_git_checkout https://chromium.googlesource.com/angle/angle angle dd1b0c485561e0ce825a9426d7e223b4e158a358 # 57ce9ea23e54e7beb0526502bdf9094d1ddfde68 # 9f09037b073a7481bc5d94984a26b7c9d3427b16 +# do_git_checkout https://chromium.googlesource.com/angle/angle angle # dd1b0c485561e0ce825a9426d7e223b4e158a358 # 57ce9ea23e54e7beb0526502bdf9094d1ddfde68 # 9f09037b073a7481bc5d94984a26b7c9d3427b16 # If Angle has been built, then skip the whole process because Git barfs if [[ ! -f "angle/already_built_angle" ]]; then echo "Angle not built: building from scratch." - do_git_checkout https://github.com/google/angle.git angle #9f10b775c9b17f901d940157e43e5a74b75c2708 # 57ce9ea23e + do_git_checkout https://github.com/google/angle.git angle fa7cc9da878b1eba4df568084b97a981e046709c cd angle # remove .git directory to prevent: No rule to make target '../build-x86_64/.git/index', needed by 'out/Debug/obj/gen/angle/id/commit.h'. rm -rvf .git || exit 1 @@ -4769,7 +4857,7 @@ build_angle() { # provide a file to export symbols declared in ShaderLang.h as part of libGLESv2.dll # (required to build Qt WebKit which uses shader interface) # cp ${top_dir}/angle-entry_points_shader.cpp src/libGLESv2/entry_points_shader.cpp - apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-angleproject-git/0000-build-fix.patch + apply_patch_p1 file://${top_dir}/0000-build-fix.patch apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-angleproject-git/angleproject-include-import-library-and-use-def-file.patch apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-angleproject-git/0001-static-build-workaround.patch apply_patch_p1 https://raw.githubusercontent.com/Alexpux/MINGW-packages/master/mingw-w64-angleproject-git/0002-redist.patch @@ -5537,6 +5625,10 @@ build_dependencies() { build_libssh build_sdl2_image # build_mmcommon + build_spirvtools + build_glslang + build_shaderc + build_vulkan build_angle build_cairo build_cairomm @@ -5766,6 +5858,8 @@ install_cross_compiler # the header Windows.h needs to appear cd ${cur_dir}/x86_64-w64-mingw32/x86_64-w64-mingw32/include ln -s windows.h Windows.h + ln -s winsock2.h WinSock2.h + ln -s cfgmgr32.h Cfgmgr32.h ln -s devpkey.h Devpkey.h ln -s uiviewsettingsinterop.h UIViewSettingsInterop.h cd - diff --git a/glslang-install-missing-dll.patch b/glslang-install-missing-dll.patch new file mode 100644 index 0000000..c873b99 --- /dev/null +++ b/glslang-install-missing-dll.patch @@ -0,0 +1,14 @@ +--- StandAlone/CMakeLists.txt.orig 2018-06-04 21:21:02.304015300 +0100 ++++ StandAlone/CMakeLists.txt 2018-06-04 21:21:31.345615600 +0100 +@@ -44,9 +44,9 @@ + + install(TARGETS spirv-remap + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- ++ + if(BUILD_SHARED_LIBS) + install(TARGETS glslang-default-resource-limits +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + endif(ENABLE_GLSLANG_INSTALL) diff --git a/glslang-shared.patch b/glslang-shared.patch new file mode 100644 index 0000000..f56550a --- /dev/null +++ b/glslang-shared.patch @@ -0,0 +1,42 @@ +--- CMakeLists.txt.orig 2018-06-07 12:17:32.435758800 +0100 ++++ CMakeLists.txt 2018-06-07 12:18:27.861816500 +0100 +@@ -79,10 +79,11 @@ + function(glslang_set_link_args TARGET) + # For MinGW compiles, statically link against the GCC and C++ runtimes. + # This avoids the need to ship those runtimes as DLLs. +- if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") +- set_target_properties(${TARGET} PROPERTIES +- LINK_FLAGS "-static -static-libgcc -static-libstdc++") +- endif() ++ # JW addition: we are happy to ship DLLs. ++ #if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") ++ # set_target_properties(${TARGET} PROPERTIES ++ # LINK_FLAGS "-static -static-libgcc -static-libstdc++") ++ #endif() + endfunction(glslang_set_link_args) + + # We depend on these for later projects, so they should come first. +@@@--- StandAlone/CMakeLists.txt.orig 2018-06-09 09:36:48.489868600 +0100 +@@@+++ StandAlone/CMakeLists.txt 2018-06-09 09:37:10.333816200 +0100 +@@@@@ -44,9 +44,9 @@ +@@@ +@@@ install(TARGETS spirv-remap +@@@ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +@@@- +@@@+ +@@@ if(BUILD_SHARED_LIBS) +@@@ install(TARGETS glslang-default-resource-limits +@@@- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@@+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +@@@ endif() +@@@ endif(ENABLE_GLSLANG_INSTALL) +--- hlsl/CMakeLists.txt.orig 2018-06-09 09:48:49.042537000 +0100 ++++ hlsl/CMakeLists.txt 2018-06-09 09:49:19.293688500 +0100 +@@ -20,6 +20,7 @@ + add_library(HLSL ${LIB_TYPE} ${SOURCES} ${HEADERS}) + set_property(TARGET HLSL PROPERTY FOLDER hlsl) + set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON) ++target_link_libraries(glslang) + + if(WIN32 AND BUILD_SHARED_LIBS) + set_target_properties(HLSL PROPERTIES PREFIX "") diff --git a/glslang-threads.patch b/glslang-threads.patch new file mode 100644 index 0000000..fd55425 --- /dev/null +++ b/glslang-threads.patch @@ -0,0 +1,112 @@ +--- StandAlone/StandAlone.cpp.orig 2018-06-07 11:47:25.506296500 +0100 ++++ StandAlone/StandAlone.cpp 2018-06-07 11:49:26.189975600 +0100 +@@ -57,7 +57,8 @@ + #include + #include + #include +-#include ++#include ++#include + + #include "../glslang/OSDependent/osinclude.h" + +@@ -1115,16 +1116,16 @@ + bool printShaderNames = workList.size() > 1; + + if (Options & EOptionMultiThreaded) { +- std::array threads; ++ std::array threads; + for (unsigned int t = 0; t < threads.size(); ++t) { +- threads[t] = std::thread(CompileShaders, std::ref(workList)); +- if (threads[t].get_id() == std::thread::id()) { ++ threads[t] = boost::thread(CompileShaders, std::ref(workList)); ++ if (threads[t].get_id() == boost::thread::id()) { + fprintf(stderr, "Failed to create thread\n"); + return EFailThreadCreate; + } + } + +- std::for_each(threads.begin(), threads.end(), [](std::thread& t) { t.join(); }); ++ std::for_each(threads.begin(), threads.end(), [](boost::thread& t) { t.join(); }); + } else + CompileShaders(workList); + +--- StandAlone/Worklist.h.orig 2018-06-07 11:50:50.364365600 +0100 ++++ StandAlone/Worklist.h 2018-06-07 11:52:56.060310800 +0100 +@@ -37,7 +37,8 @@ + + #include "../glslang/OSDependent/osinclude.h" + #include +-#include ++#include ++#include + #include + + namespace glslang { +@@ -59,13 +59,13 @@ + + void add(TWorkItem* item) + { +- std::lock_guard guard(mutex); ++ boost::lock_guard guard(mutex); + worklist.push_back(item); + } + + bool remove(TWorkItem*& item) + { +- std::lock_guard guard(mutex); ++ boost::lock_guard guard(mutex); + + if (worklist.empty()) + return false; +@@ -86,7 +86,7 @@ + } + + protected: +- std::mutex mutex; ++ boost::mutex mutex; + std::list worklist; + }; + +--- StandAlone/CMakeLists.txt.orig 2018-06-07 11:54:19.618212900 +0100 ++++ StandAlone/CMakeLists.txt 2018-06-07 11:55:07.693118400 +0100 +@@ -24,10 +24,10 @@ + glslang-default-resource-limits) + + if(WIN32) +- set(LIBRARIES ${LIBRARIES} psapi) ++ set(LIBRARIES ${LIBRARIES} boost_exception-mt boost_thread-mt boost_system-mt) + elseif(UNIX) + if(NOT ANDROID) +- set(LIBRARIES ${LIBRARIES} pthread) ++ set(LIBRARIES ${LIBRARIES} boost_exception-mt boost_thread-mt boost_system-mt) + endif() + endif(WIN32) + +--- StandAlone/StandAlone.cpp.orig 2018-06-07 13:38:11.418696900 +0100 ++++ StandAlone/StandAlone.cpp 2018-06-07 13:37:16.146954900 +0100 +@@ -66,6 +66,13 @@ + SH_IMPORT_EXPORT void ShOutputHtml(); + } + ++namespace boost { ++ void throw_exception(std::exception const &e){} ++} ++ ++ ++ ++ + // Command-line options + enum TOptions { + EOptionNone = 0, +--- CMakeLists.txt.orig 2018-06-07 13:59:10.081332600 +0100 ++++ CMakeLists.txt 2018-06-07 13:59:49.442890700 +0100 +@@ -57,7 +57,7 @@ + + if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs +- -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions) ++ -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions -DBOOST_NO_EXCEPTIONS) + add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. + elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") + add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs diff --git a/libbluray-java.patch b/libbluray-java.patch new file mode 100644 index 0000000..d2956a5 --- /dev/null +++ b/libbluray-java.patch @@ -0,0 +1,18 @@ +--- src/libbluray/bdj/build.xml.orig 2018-06-06 19:59:41.091698100 +0100 ++++ src/libbluray/bdj/build.xml 2018-06-06 20:00:24.716547500 +0100 +@@ -21,13 +21,13 @@ + description="compile the source " > + ++ source="1.6" target="1.6"> + + + + ++ source="1.6" target="1.6"> + + + diff --git a/mpv-ytdl.patch b/mpv-ytdl.patch new file mode 100644 index 0000000..a39a154 --- /dev/null +++ b/mpv-ytdl.patch @@ -0,0 +1,36 @@ +--- player/lua/ytdl_hook.lua.orig 2018-06-03 18:06:51.326671500 +0100 ++++ player/lua/ytdl_hook.lua 2018-06-03 18:07:30.246106600 +0100 +@@ -443,7 +443,7 @@ + local ytdl_mcd = mp.find_config_file("youtube-dl" .. exesuf) + if not (ytdl_mcd == nil) then + msg.verbose("found youtube-dl at: " .. ytdl_mcd) +- ytdl.path = ytdl_mcd ++ ytdl.path = "C:\\Users\\john\\AppData\\Roaming\\mpv\\youtube-dl.exe" + end + ytdl.searched = true + end +--- player/lua/ytdl_hook.lua.orig 2018-06-03 19:23:29.946941800 +0100 ++++ player/lua/ytdl_hook.lua 2018-06-03 19:28:49.909539800 +0100 +@@ -510,14 +510,15 @@ + + if (es < 0) or (json == nil) or (json == "") then + local err = "youtube-dl failed: " +- if result.error and result.error == "init" then +- err = err .. "not found or not enough permissions" +- elseif not result.killed_by_us then +- err = err .. "unexpected error ocurred" +- else +- err = string.format("%s returned '%d'", err, es) +- end ++ --if result.error and result.error == "init" then ++ -- err = err .. "not found or not enough permissions" ++ --elseif not result.killed_by_us then ++ -- err = err .. "unexpected error ocurred" ++ --else ++ err = string.format("%s returned '%d'", err, es) ++ --end + msg.error(err) ++ msg.error(json) + return + end + diff --git a/shaderc-build.patch b/shaderc-build.patch new file mode 100644 index 0000000..975ddb8 --- /dev/null +++ b/shaderc-build.patch @@ -0,0 +1,31 @@ +--- build.ninja.orig 2018-06-10 21:58:21.247202800 +0100 ++++ build.ninja 2018-06-10 21:59:53.499330500 +0100 +@@ -364,7 +364,7 @@ + + build libshaderc/libshaderc_shared.dll libshaderc/libshaderc_shared.dll.a: CXX_SHARED_LIBRARY_LINKER__shaderc_shared libshaderc/CMakeFiles/shaderc_shared.dir/src/shaderc.cc.obj | libshaderc_util/libshaderc_util.a || libshaderc_util/libshaderc_util.a + LINK_FLAGS = -static -static-libgcc -static-libstdc++ +- LINK_LIBRARIES = -lglslang -lSPIRV-Tools-opt -lOSDependent -lOGLCompiler -lglslang -lpthread libshaderc_util/libshaderc_util.a -lSPIRV -lSPIRV-Tools -lHLSL -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -lOGLCompiler -lSPIRV-Tools-opt -lpthread -lSPIRV -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 ++ LINK_LIBRARIES = -lSPIRV-Tools -lHLSL -lglslang -lSPIRV-Tools-opt -lOSDependent -lOGLCompiler -lglslang -lpthread libshaderc_util/libshaderc_util.a -lSPIRV -lSPIRV-Tools -lHLSL -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -lOGLCompiler -lSPIRV-Tools-opt -lpthread -lSPIRV -lSPIRV-Tools -lHLSL -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = libshaderc/CMakeFiles/shaderc_shared.dir + POST_BUILD = : + PRE_LINK = : +@@ -502,7 +502,7 @@ + + build glslc/glslc.exe: CXX_EXECUTABLE_LINKER__glslc_exe glslc/CMakeFiles/glslc_exe.dir/src/main.cc.obj | glslc/libglslc.a libshaderc_util/libshaderc_util.a libshaderc/libshaderc.a libshaderc_util/libshaderc_util.a || build-version glslc/libglslc.a libshaderc/libshaderc.a libshaderc_util/libshaderc_util.a + LINK_FLAGS = -static -static-libgcc -static-libstdc++ +- LINK_LIBRARIES = -lHLSL glslc/libglslc.a libshaderc_util/libshaderc_util.a libshaderc/libshaderc.a -lHLSL libshaderc_util/libshaderc_util.a -lHLSL -lSPIRV-Tools-opt -lSPIRV-Tools -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -lOGLCompiler -lSPIRV -lpthread -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 ++ LINK_LIBRARIES = -lHLSL glslc/libglslc.a libshaderc_util/libshaderc_util.a libshaderc/libshaderc.a -lHLSL libshaderc_util/libshaderc_util.a -lHLSL -lSPIRV-Tools-opt -lSPIRV-Tools -lglslang -lOSDependent -lOGLCompiler -lglslang -lHLSL -lOSDependent -lOGLCompiler -lSPIRV -lHLSL -lpthread -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = glslc/CMakeFiles/glslc_exe.dir + POST_BUILD = : + PRE_LINK = : +--- build.ninja.orig 2018-06-10 22:04:46.992094200 +0100 ++++ build.ninja 2018-06-10 22:05:38.851562800 +0100 +@@ -364,7 +364,7 @@ + + build libshaderc/libshaderc_shared.dll libshaderc/libshaderc_shared.dll.a: CXX_SHARED_LIBRARY_LINKER__shaderc_shared libshaderc/CMakeFiles/shaderc_shared.dir/src/shaderc.cc.obj | libshaderc_util/libshaderc_util.a || libshaderc_util/libshaderc_util.a + LINK_FLAGS = -static -static-libgcc -static-libstdc++ +- LINK_LIBRARIES = -lSPIRV-Tools -lHLSL -lglslang -lSPIRV-Tools-opt -lOSDependent -lOGLCompiler -lglslang -lpthread libshaderc_util/libshaderc_util.a -lSPIRV -lSPIRV-Tools -lHLSL -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -lOGLCompiler -lSPIRV-Tools-opt -lpthread -lSPIRV -lSPIRV-Tools -lHLSL -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 ++ LINK_LIBRARIES = -lSPIRV-Tools -lHLSL -lSPIRV-Tools-opt -lglslang -lSPIRV-Tools-opt -lOSDependent -lOGLCompiler -lglslang -lpthread libshaderc_util/libshaderc_util.a -lSPIRV -lSPIRV-Tools -lHLSL -lglslang -lOSDependent -lOGLCompiler -lglslang -lOSDependent -lOGLCompiler -lSPIRV-Tools-opt -lpthread -lSPIRV -lSPIRV-Tools -lHLSL -lSPIRV-Tools-opt -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 + OBJECT_DIR = libshaderc/CMakeFiles/shaderc_shared.dir + POST_BUILD = : + PRE_LINK = : diff --git a/vulkan-threads.patch b/vulkan-threads.patch new file mode 100644 index 0000000..023697b --- /dev/null +++ b/vulkan-threads.patch @@ -0,0 +1,1159 @@ +--- scripts/mock_icd_generator.py.orig 2018-06-07 15:05:42.300106100 +0100 ++++ scripts/mock_icd_generator.py 2018-06-07 15:07:53.584091200 +0100 +@@ -31,9 +31,9 @@ + + # Mock header code + HEADER_C_CODE = ''' +-using mutex_t = std::mutex; +-using lock_guard_t = std::lock_guard; +-using unique_lock_t = std::unique_lock; ++using mutex_t = boost::mutex; ++using lock_guard_t = boost::lock_guard; ++using unique_lock_t = boost::unique_lock; + + static mutex_t global_lock; + static uint64_t global_unique_handle = 1; +@@ -783,7 +783,7 @@ + mapped_memory_map.erase(memory); + ''', + 'vkGetImageSubresourceLayout': ''' +- // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. ++ // Need safe values. Callers are computing memory offsets from pLayout, with no return code to flag failure. + *pLayout = VkSubresourceLayout(); // Default constructor zero values. + ''', + 'vkGetSwapchainImagesKHR': ''' +@@ -959,7 +959,7 @@ + write(s, file=self.outFile) + if self.header: + write('#include ', file=self.outFile) +- write('#include ', file=self.outFile) ++ write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + write('#include ', file=self.outFile) + write('#include "vulkan/vk_icd.h"', file=self.outFile) +--- loader/CMakeLists.txt.orig 2018-06-07 15:14:52.245050300 +0100 ++++ loader/CMakeLists.txt 2018-06-07 15:15:19.007927800 +0100 +@@ -157,7 +157,7 @@ + endforeach() + + if (ENABLE_WIN10_ONECORE) +- # Note When linking your app or driver to OneCore.lib, be sure to remove any links to non-umbrella libs (such as kernel32.lib). ++ # Note When linking your app or driver to OneCore.lib, be sure to remove any links to non-umbrella libs (such as kernel32.lib). + set(CMAKE_CXX_STANDARD_LIBRARIES " ") # space is intentional + set(CMAKE_C_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES}) + endif() +@@ -206,7 +206,7 @@ + target_link_libraries(${API_LOWERCASE}-${MAJOR} OneCoreUAP.lib LIBCMT.LIB LIBCMTD.LIB LIBVCRUNTIME.LIB LIBUCRT.LIB) + set_target_properties(${API_LOWERCASE}-${MAJOR} PROPERTIES LINK_FLAGS "/NODEFAULTLIB") + else() +- target_link_libraries(${API_LOWERCASE}-${MAJOR} Cfgmgr32) ++ target_link_libraries(${API_LOWERCASE}-${MAJOR} cfgmgr32) + endif() + + add_dependencies(${API_LOWERCASE}-${MAJOR} generate_helper_files loader_gen_files loader_asm_gen_files) +--- loader/CMakeLists.txt.orig 2018-06-07 15:23:52.092667100 +0100 ++++ loader/CMakeLists.txt 2018-06-07 15:24:19.926744300 +0100 +@@ -206,7 +206,7 @@ + target_link_libraries(${API_LOWERCASE}-${MAJOR} OneCoreUAP.lib LIBCMT.LIB LIBCMTD.LIB LIBVCRUNTIME.LIB LIBUCRT.LIB) + set_target_properties(${API_LOWERCASE}-${MAJOR} PROPERTIES LINK_FLAGS "/NODEFAULTLIB") + else() +- target_link_libraries(${API_LOWERCASE}-${MAJOR} cfgmgr32) ++ target_link_libraries(${API_LOWERCASE}-${MAJOR} boost_system-mt cfgmgr32) + endif() + + add_dependencies(${API_LOWERCASE}-${MAJOR} generate_helper_files loader_gen_files loader_asm_gen_files) +--- icd/CMakeLists.txt.orig 2018-06-07 15:44:00.311383400 +0100 ++++ icd/CMakeLists.txt 2018-06-07 15:44:39.320797400 +0100 +@@ -107,6 +107,7 @@ + set_target_properties(copy-${target}-def-file PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) + add_library(VkICD_${target} SHARED ${ARGN} VkICD_${target}.def) + add_dependencies(VkICD_${target} generate_icd_files) ++ target_link_Libraries(VkICD_${target} boost_system-mt) + #target_link_Libraries(VkICD_${target} VkICD_utils) + #add_dependencies(VkICD_${target} generate_helper_files VkICD_utils) + endmacro() +--- layers/object_tracker.h.orig 2018-06-07 15:49:48.567409600 +0100 ++++ layers/object_tracker.h 2018-06-07 15:50:40.825718700 +0100 +@@ -20,7 +20,7 @@ + * Author: Tobin Ehlis + */ + +-#include ++#include + #include + #include + #include +@@ -134,7 +134,7 @@ + extern std::unordered_map layer_data_map; + extern device_table_map ot_device_table_map; + extern instance_table_map ot_instance_table_map; +-extern std::mutex global_lock; ++extern boost::mutex global_lock; + extern uint64_t object_track_index; + extern uint32_t loader_layer_if_version; + extern const std::unordered_map name_to_funcptr_map; +--- scripts/object_tracker_generator.py.orig 2018-06-07 15:59:11.839243400 +0100 ++++ scripts/object_tracker_generator.py 2018-06-07 16:00:23.723129600 +0100 +@@ -611,7 +611,7 @@ + # + # Insert a lock_guard line + def lock_guard(self, indent): +- return '%sstd::lock_guard lock(global_lock);\n' % indent ++ return '%sboost::lock_guard lock(global_lock);\n' % indent + # + # Determine if a struct has an object as a member or an embedded member + def struct_contains_object(self, struct_item): +@@ -650,7 +650,7 @@ + return object_list + # + # Construct list of extension structs containing handles, or extension structs that share a +- # tag WITH an extension struct containing handles. ++ # tag WITH an extension struct containing handles. + def GenerateCommandWrapExtensionList(self): + for struct in self.structMembers: + if (len(struct.members) > 1) and struct.members[1].extstructs is not None: +@@ -693,7 +693,7 @@ + handle_name = params[-1].find('name') + create_obj_code += '%sif (VK_SUCCESS == result) {\n' % (indent) + indent = self.incIndent(indent) +- create_obj_code += '%sstd::lock_guard lock(global_lock);\n' % (indent) ++ create_obj_code += '%sboost::lock_guard lock(global_lock);\n' % (indent) + object_dest = '*%s' % handle_name.text + if object_array == True: + create_obj_code += '%sfor (uint32_t index = 0; index < %s; index++) {\n' % (indent, cmd_info[-1].len) +@@ -730,7 +730,7 @@ + # Call Destroy a single time + destroy_obj_code += '%sif (skip) return;\n' % indent + destroy_obj_code += '%s{\n' % indent +- destroy_obj_code += '%s std::lock_guard lock(global_lock);\n' % indent ++ destroy_obj_code += '%s boost::lock_guard lock(global_lock);\n' % indent + destroy_obj_code += '%s DestroyObject(%s, %s, %s, pAllocator, %s, %s);\n' % (indent, cmd_info[0].name, cmd_info[param].name, self.GetVulkanObjType(cmd_info[param].type), compatalloc_vuid, nullalloc_vuid) + destroy_obj_code += '%s}\n' % indent + return object_array, destroy_obj_code +--- scripts/unique_objects_generator.py.orig 2018-06-07 16:06:12.166956900 +0100 ++++ scripts/unique_objects_generator.py 2018-06-07 16:07:12.772471000 +0100 +@@ -408,7 +408,7 @@ + # + # Insert a lock_guard line + def lock_guard(self, indent): +- return '%sstd::lock_guard lock(global_lock);\n' % indent ++ return '%sboost::lock_guard lock(global_lock);\n' % indent + # + # Determine if a struct has an NDO as a member or an embedded member + def struct_contains_ndo(self, struct_item): +@@ -552,7 +552,7 @@ + handle_name = params[-1].find('name') + create_ndo_code += '%sif (VK_SUCCESS == result) {\n' % (indent) + indent = self.incIndent(indent) +- create_ndo_code += '%sstd::lock_guard lock(global_lock);\n' % (indent) ++ create_ndo_code += '%sboost::lock_guard lock(global_lock);\n' % (indent) + ndo_dest = '*%s' % handle_name.text + if ndo_array == True: + create_ndo_code += '%sfor (uint32_t index0 = 0; index0 < %s; index0++) {\n' % (indent, cmd_info[-1].len) +@@ -582,7 +582,7 @@ + # This API is freeing an array of handles. Remove them from the unique_id map. + destroy_ndo_code += '%sif ((VK_SUCCESS == result) && (%s)) {\n' % (indent, cmd_info[param].name) + indent = self.incIndent(indent) +- destroy_ndo_code += '%sstd::unique_lock lock(global_lock);\n' % (indent) ++ destroy_ndo_code += '%sboost::unique_lock lock(global_lock);\n' % (indent) + destroy_ndo_code += '%sfor (uint32_t index0 = 0; index0 < %s; index0++) {\n' % (indent, cmd_info[param].len) + indent = self.incIndent(indent) + destroy_ndo_code += '%s%s handle = %s[index0];\n' % (indent, cmd_info[param].type, cmd_info[param].name) +@@ -594,7 +594,7 @@ + destroy_ndo_code += '%s}\n' % indent + else: + # Remove a single handle from the map +- destroy_ndo_code += '%sstd::unique_lock lock(global_lock);\n' % (indent) ++ destroy_ndo_code += '%sboost::unique_lock lock(global_lock);\n' % (indent) + destroy_ndo_code += '%suint64_t %s_id = reinterpret_cast(%s);\n' % (indent, cmd_info[param].name, cmd_info[param].name) + destroy_ndo_code += '%s%s = (%s)unique_id_mapping[%s_id];\n' % (indent, cmd_info[param].name, cmd_info[param].type, cmd_info[param].name) + destroy_ndo_code += '%sunique_id_mapping.erase(%s_id);\n' % (indent, cmd_info[param].name) +--- scripts/parameter_validation_generator.py.orig 2018-06-07 16:12:31.928577900 +0100 ++++ scripts/parameter_validation_generator.py 2018-06-07 16:13:26.733247300 +0100 +@@ -287,7 +287,7 @@ + self.newline() + write('namespace parameter_validation {', file = self.outFile) + self.newline() +- write('extern std::mutex global_lock;', file = self.outFile) ++ write('extern boost::mutex global_lock;', file = self.outFile) + write('extern std::unordered_map layer_data_map;', file = self.outFile) + write('extern std::unordered_map instance_layer_data_map;', file = self.outFile) + self.newline() +@@ -1202,7 +1202,7 @@ + else: + raise Exception("Unknown result type: " + command.result) + +- cmdDef += '%sstd::unique_lock lock(global_lock);\n' % indent ++ cmdDef += '%sboost::unique_lock lock(global_lock);\n' % indent + for line in lines: + cmdDef += '\n' + if type(line) is list: +--- layers/hash_util.h.orig 2018-06-07 16:16:04.632929100 +0100 ++++ layers/hash_util.h 2018-06-07 16:17:05.698598500 +0100 +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -154,8 +154,8 @@ + bool operator()(const Id &lhs, const Id &rhs) const { return KeyEqual()(*lhs, *rhs); } + }; + using Dict = std::unordered_set; +- using Lock = std::mutex; +- using Guard = std::lock_guard; ++ using Lock = boost::mutex; ++ using Guard = boost::lock_guard; + Lock lock; + Dict dict; + }; +--- layers/threading.h.orig 2018-06-07 16:17:44.616619400 +0100 ++++ layers/threading.h 2018-06-07 16:19:51.946791900 +0100 +@@ -21,7 +21,7 @@ + #ifndef THREADING_H + #define THREADING_H + #include +-#include ++#include + #include + #include "vk_layer_config.h" + #include "vk_layer_logging.h" +@@ -83,7 +83,7 @@ + const char *typeName; + VkDebugReportObjectTypeEXT objectType; + std::unordered_map uses; +- std::mutex counter_lock; ++ boost::mutex counter_lock; + std::condition_variable counter_condition; + void startWrite(debug_report_data *report_data, T object) { + if (object == VK_NULL_HANDLE) { +@@ -91,7 +91,7 @@ + } + bool skipCall = false; + loader_platform_thread_id tid = loader_platform_get_thread_id(); +- std::unique_lock lock(counter_lock); ++ boost::unique_lock lock(counter_lock); + if (uses.find(object) == uses.end()) { + // There is no current use of the object. Record writer thread. + struct object_use_data *use_data = &uses[object]; +@@ -165,7 +165,7 @@ + return; + } + // Object is no longer in use +- std::unique_lock lock(counter_lock); ++ boost::unique_lock lock(counter_lock); + uses[object].writer_count -= 1; + if ((uses[object].reader_count == 0) && (uses[object].writer_count == 0)) { + uses.erase(object); +@@ -181,7 +181,7 @@ + } + bool skipCall = false; + loader_platform_thread_id tid = loader_platform_get_thread_id(); +- std::unique_lock lock(counter_lock); ++ boost::unique_lock lock(counter_lock); + if (uses.find(object) == uses.end()) { + // There is no current use of the object. Record reader count + struct object_use_data *use_data = &uses[object]; +@@ -217,7 +217,7 @@ + if (object == VK_NULL_HANDLE) { + return; + } +- std::unique_lock lock(counter_lock); ++ boost::unique_lock lock(counter_lock); + uses[object].reader_count -= 1; + if ((uses[object].reader_count == 0) && (uses[object].writer_count == 0)) { + uses.erase(object); +@@ -392,13 +392,13 @@ + #endif // DISTINCT_NONDISPATCHABLE_HANDLES + + static std::unordered_map layer_data_map; +-static std::mutex command_pool_lock; ++static boost::mutex command_pool_lock; + static std::unordered_map command_pool_map; + + // VkCommandBuffer needs check for implicit use of command pool + static void startWriteObject(struct layer_data *my_data, VkCommandBuffer object, bool lockPool = true) { + if (lockPool) { +- std::unique_lock lock(command_pool_lock); ++ boost::unique_lock lock(command_pool_lock); + VkCommandPool pool = command_pool_map[object]; + lock.unlock(); + startWriteObject(my_data, pool); +@@ -408,14 +408,14 @@ + static void finishWriteObject(struct layer_data *my_data, VkCommandBuffer object, bool lockPool = true) { + my_data->c_VkCommandBuffer.finishWrite(object); + if (lockPool) { +- std::unique_lock lock(command_pool_lock); ++ boost::unique_lock lock(command_pool_lock); + VkCommandPool pool = command_pool_map[object]; + lock.unlock(); + finishWriteObject(my_data, pool); + } + } + static void startReadObject(struct layer_data *my_data, VkCommandBuffer object) { +- std::unique_lock lock(command_pool_lock); ++ boost::unique_lock lock(command_pool_lock); + VkCommandPool pool = command_pool_map[object]; + lock.unlock(); + startReadObject(my_data, pool); +@@ -423,7 +423,7 @@ + } + static void finishReadObject(struct layer_data *my_data, VkCommandBuffer object) { + my_data->c_VkCommandBuffer.finishRead(object); +- std::unique_lock lock(command_pool_lock); ++ boost::unique_lock lock(command_pool_lock); + VkCommandPool pool = command_pool_map[object]; + lock.unlock(); + finishReadObject(my_data, pool); +--- layers/unique_objects.cpp.orig 2018-06-07 16:25:56.329153900 +0100 ++++ layers/unique_objects.cpp 2018-06-07 16:29:53.019613700 +0100 +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + // For Windows, this #include must come before other Vk headers. + #include "vk_loader_platform.h" +@@ -308,7 +309,7 @@ + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkComputePipelineCreateInfo *local_pCreateInfos = NULL; + if (pCreateInfos) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + local_pCreateInfos = new safe_VkComputePipelineCreateInfo[createInfoCount]; + for (uint32_t idx0 = 0; idx0 < createInfoCount; ++idx0) { + local_pCreateInfos[idx0].initialize(&pCreateInfos[idx0]); +@@ -324,7 +325,7 @@ + } + } + if (pipelineCache) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + pipelineCache = Unwrap(pipelineCache); + } + +@@ -332,7 +333,7 @@ + local_pCreateInfos->ptr(), pAllocator, pPipelines); + delete[] local_pCreateInfos; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t i = 0; i < createInfoCount; ++i) { + if (pPipelines[i] != VK_NULL_HANDLE) { + pPipelines[i] = WrapNew(pPipelines[i]); +@@ -349,7 +350,7 @@ + safe_VkGraphicsPipelineCreateInfo *local_pCreateInfos = nullptr; + if (pCreateInfos) { + local_pCreateInfos = new safe_VkGraphicsPipelineCreateInfo[createInfoCount]; +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t idx0 = 0; idx0 < createInfoCount; ++idx0) { + bool uses_color_attachment = false; + bool uses_depthstencil_attachment = false; +@@ -385,7 +386,7 @@ + } + } + if (pipelineCache) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + pipelineCache = Unwrap(pipelineCache); + } + +@@ -393,7 +394,7 @@ + local_pCreateInfos->ptr(), pAllocator, pPipelines); + delete[] local_pCreateInfos; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t i = 0; i < createInfoCount; ++i) { + if (pPipelines[i] != VK_NULL_HANDLE) { + pPipelines[i] = WrapNew(pPipelines[i]); +@@ -426,7 +427,7 @@ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkResult result = dev_data->dispatch_table.CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + if (VK_SUCCESS == result) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + + PostCallCreateRenderPass(dev_data, pCreateInfo, *pRenderPass); + +@@ -441,7 +442,7 @@ + + VKAPI_ATTR void VKAPI_CALL DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks *pAllocator) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + uint64_t renderPass_id = reinterpret_cast(renderPass); + renderPass = (VkRenderPass)unique_id_mapping[renderPass_id]; + unique_id_mapping.erase(renderPass_id); +@@ -457,7 +458,7 @@ + layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkSwapchainCreateInfoKHR *local_pCreateInfo = NULL; + if (pCreateInfo) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + local_pCreateInfo = new safe_VkSwapchainCreateInfoKHR(pCreateInfo); + local_pCreateInfo->oldSwapchain = Unwrap(pCreateInfo->oldSwapchain); + // Surface is instance-level object +@@ -468,7 +469,7 @@ + delete local_pCreateInfo; + + if (VK_SUCCESS == result) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + *pSwapchain = WrapNew(*pSwapchain); + } + return result; +@@ -480,7 +481,7 @@ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkSwapchainCreateInfoKHR *local_pCreateInfos = NULL; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pCreateInfos) { + local_pCreateInfos = new safe_VkSwapchainCreateInfoKHR[swapchainCount]; + for (uint32_t i = 0; i < swapchainCount; ++i) { +@@ -499,7 +500,7 @@ + pAllocator, pSwapchains); + delete[] local_pCreateInfos; + if (VK_SUCCESS == result) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t i = 0; i < swapchainCount; i++) { + pSwapchains[i] = WrapNew(pSwapchains[i]); + } +@@ -512,14 +513,14 @@ + layer_data *my_device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + VkSwapchainKHR wrapped_swapchain_handle = swapchain; + if (VK_NULL_HANDLE != swapchain) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + swapchain = Unwrap(swapchain); + } + VkResult result = + my_device_data->dispatch_table.GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); + if ((VK_SUCCESS == result) || (VK_INCOMPLETE == result)) { + if ((*pSwapchainImageCount > 0) && pSwapchainImages) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + auto &wrapped_swapchain_image_handles = my_device_data->swapchain_wrapped_image_handle_map[wrapped_swapchain_handle]; + for (uint32_t i = static_cast(wrapped_swapchain_image_handles.size()); i < *pSwapchainImageCount; i++) { + wrapped_swapchain_image_handles.emplace_back(WrapNew(pSwapchainImages[i])); +@@ -534,7 +535,7 @@ + + VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + + auto &image_array = dev_data->swapchain_wrapped_image_handle_map[swapchain]; + for (auto &image_handle : image_array) { +@@ -553,7 +554,7 @@ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); + safe_VkPresentInfoKHR *local_pPresentInfo = NULL; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pPresentInfo) { + local_pPresentInfo = new safe_VkPresentInfoKHR(pPresentInfo); + if (local_pPresentInfo->pWaitSemaphores) { +@@ -590,7 +591,7 @@ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkDescriptorUpdateTemplateCreateInfo *local_create_info = NULL; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pCreateInfo) { + local_create_info = new safe_VkDescriptorUpdateTemplateCreateInfo(pCreateInfo); + if (pCreateInfo->descriptorSetLayout) { +@@ -604,7 +605,7 @@ + VkResult result = dev_data->dispatch_table.CreateDescriptorUpdateTemplate(device, local_create_info->ptr(), pAllocator, + pDescriptorUpdateTemplate); + if (VK_SUCCESS == result) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + *pDescriptorUpdateTemplate = WrapNew(*pDescriptorUpdateTemplate); + + // Shadow template createInfo for later updates +@@ -622,7 +623,7 @@ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkDescriptorUpdateTemplateCreateInfo *local_create_info = NULL; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pCreateInfo) { + local_create_info = new safe_VkDescriptorUpdateTemplateCreateInfo(pCreateInfo); + if (pCreateInfo->descriptorSetLayout) { +@@ -636,7 +637,7 @@ + VkResult result = dev_data->dispatch_table.CreateDescriptorUpdateTemplateKHR(device, local_create_info->ptr(), pAllocator, + pDescriptorUpdateTemplate); + if (VK_SUCCESS == result) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + *pDescriptorUpdateTemplate = WrapNew(*pDescriptorUpdateTemplate); + + // Shadow template createInfo for later updates +@@ -650,7 +651,7 @@ + VKAPI_ATTR void VKAPI_CALL DestroyDescriptorUpdateTemplate(VkDevice device, VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + const VkAllocationCallbacks *pAllocator) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + uint64_t descriptor_update_template_id = reinterpret_cast(descriptorUpdateTemplate); + dev_data->desc_template_map.erase(descriptor_update_template_id); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)unique_id_mapping[descriptor_update_template_id]; +@@ -664,7 +665,7 @@ + VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + const VkAllocationCallbacks *pAllocator) { + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + uint64_t descriptor_update_template_id = reinterpret_cast(descriptorUpdateTemplate); + dev_data->desc_template_map.erase(descriptor_update_template_id); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)unique_id_mapping[descriptor_update_template_id]; +@@ -762,7 +763,7 @@ + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + uint64_t template_handle = reinterpret_cast(descriptorUpdateTemplate); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + descriptorSet = Unwrap(descriptorSet); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)unique_id_mapping[template_handle]; + } +@@ -779,7 +780,7 @@ + uint64_t template_handle = reinterpret_cast(descriptorUpdateTemplate); + void *unwrapped_buffer = nullptr; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + descriptorSet = Unwrap(descriptorSet); + descriptorUpdateTemplate = (VkDescriptorUpdateTemplate)unique_id_mapping[template_handle]; + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); +@@ -795,7 +796,7 @@ + uint64_t template_handle = reinterpret_cast(descriptorUpdateTemplate); + void *unwrapped_buffer = nullptr; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + descriptorUpdateTemplate = Unwrap(descriptorUpdateTemplate); + layout = Unwrap(layout); + unwrapped_buffer = BuildUnwrappedUpdateTemplateBuffer(dev_data, template_handle, pData); +@@ -813,7 +814,7 @@ + VkResult result = + my_map_data->dispatch_table.GetPhysicalDeviceDisplayPropertiesKHR(physicalDevice, pPropertyCount, pProperties); + if ((result == VK_SUCCESS || result == VK_INCOMPLETE) && pProperties) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { + pProperties[idx0].display = WrapNew(pProperties[idx0].display); + } +@@ -828,7 +829,7 @@ + my_map_data->dispatch_table.GetDisplayPlaneSupportedDisplaysKHR(physicalDevice, planeIndex, pDisplayCount, pDisplays); + if (VK_SUCCESS == result) { + if ((*pDisplayCount > 0) && pDisplays) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t i = 0; i < *pDisplayCount; i++) { + // TODO: this looks like it really wants a /reverse/ mapping. What's going on here? + auto it = unique_id_mapping.find(reinterpret_cast(pDisplays[i])); +@@ -844,13 +845,13 @@ + uint32_t *pPropertyCount, VkDisplayModePropertiesKHR *pProperties) { + instance_layer_data *my_map_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + display = Unwrap(display); + } + + VkResult result = my_map_data->dispatch_table.GetDisplayModePropertiesKHR(physicalDevice, display, pPropertyCount, pProperties); + if (result == VK_SUCCESS && pProperties) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + for (uint32_t idx0 = 0; idx0 < *pPropertyCount; ++idx0) { + pProperties[idx0].displayMode = WrapNew(pProperties[idx0].displayMode); + } +@@ -862,7 +863,7 @@ + uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR *pCapabilities) { + instance_layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + mode = Unwrap(mode); + } + VkResult result = dev_data->dispatch_table.GetDisplayPlaneCapabilitiesKHR(physicalDevice, mode, planeIndex, pCapabilities); +@@ -874,7 +875,7 @@ + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkDebugMarkerObjectTagInfoEXT local_tag_info(pTagInfo); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + auto it = unique_id_mapping.find(reinterpret_cast(local_tag_info.object)); + if (it != unique_id_mapping.end()) { + local_tag_info.object = it->second; +@@ -889,7 +890,7 @@ + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkDebugMarkerObjectNameInfoEXT local_name_info(pNameInfo); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + auto it = unique_id_mapping.find(reinterpret_cast(local_name_info.object)); + if (it != unique_id_mapping.end()) { + local_name_info.object = it->second; +@@ -905,7 +906,7 @@ + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkDebugUtilsObjectTagInfoEXT local_tag_info(pTagInfo); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + auto it = unique_id_mapping.find(reinterpret_cast(local_tag_info.objectHandle)); + if (it != unique_id_mapping.end()) { + local_tag_info.objectHandle = it->second; +@@ -920,7 +921,7 @@ + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + safe_VkDebugUtilsObjectNameInfoEXT local_name_info(pNameInfo); + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + auto it = unique_id_mapping.find(reinterpret_cast(local_name_info.objectHandle)); + if (it != unique_id_mapping.end()) { + local_name_info.objectHandle = it->second; +--- layers/core_validation.cpp.orig 2018-06-07 16:36:28.065066800 +0100 ++++ layers/core_validation.cpp 2018-06-07 16:37:30.215610600 +0100 +@@ -43,7 +43,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -84,9 +84,9 @@ + // This intentionally includes a cpp file + #include "vk_safe_struct.cpp" + +-using mutex_t = std::mutex; +-using lock_guard_t = std::lock_guard; +-using unique_lock_t = std::unique_lock; ++using mutex_t = boost::mutex; ++using lock_guard_t = boost::lock_guard; ++using unique_lock_t = boost::unique_lock; + + // These functions are defined *outside* the core_validation namespace as their type + // is also defined outside that namespace +--- layers/object_tracker_utils.cpp.orig 2018-06-07 16:41:38.305577700 +0100 ++++ layers/object_tracker_utils.cpp 2018-06-07 16:43:46.316776500 +0100 +@@ -27,7 +27,7 @@ + std::unordered_map layer_data_map; + device_table_map ot_device_table_map; + instance_table_map ot_instance_table_map; +-std::mutex global_lock; ++boost::mutex global_lock; + uint64_t object_track_index = 0; + uint32_t loader_layer_if_version = CURRENT_LOADER_LAYER_INTERFACE_VERSION; + +@@ -249,7 +249,7 @@ + const VkWriteDescriptorSet *pDescriptorWrites) { + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, VALIDATION_ERROR_1be02401, + VALIDATION_ERROR_1be00009); + skip |= ValidateObject(commandBuffer, layout, kVulkanObjectTypePipelineLayout, false, VALIDATION_ERROR_1be0be01, +@@ -322,7 +322,7 @@ + } + + VKAPI_ATTR void VKAPI_CALL DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + + dispatch_key key = get_dispatch_key(instance); + layer_data *instance_data = GetLayerDataPtr(key, layer_data_map); +@@ -413,7 +413,7 @@ + } + + VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + ValidateObject(device, device, kVulkanObjectTypeDevice, true, VALIDATION_ERROR_24a05601, VALIDATION_ERROR_UNDEFINED); + DestroyObject(device_data->instance, device, kVulkanObjectTypeDevice, pAllocator, VALIDATION_ERROR_24a002f6, +@@ -438,7 +438,7 @@ + } + + VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_29605601, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + +@@ -450,7 +450,7 @@ + } + + VKAPI_ATTR void VKAPI_CALL GetDeviceQueue2(VkDevice device, const VkDeviceQueueInfo2 *pQueueInfo, VkQueue *pQueue) { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_43405601, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + +@@ -468,7 +468,7 @@ + const VkCopyDescriptorSet *pDescriptorCopies) { + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= + ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_33c05601, VALIDATION_ERROR_UNDEFINED); + if (pDescriptorCopies) { +@@ -500,7 +500,7 @@ + const VkComputePipelineCreateInfo *pCreateInfos, + const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_1f205601, VALIDATION_ERROR_UNDEFINED); + if (pCreateInfos) { + for (uint32_t idx0 = 0; idx0 < createInfoCount; ++idx0) { +@@ -544,7 +544,7 @@ + VKAPI_ATTR VkResult VKAPI_CALL ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, + VkDescriptorPoolResetFlags flags) { + bool skip = false; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_32a05601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, descriptorPool, kVulkanObjectTypeDescriptorPool, false, VALIDATION_ERROR_32a04601, +@@ -572,7 +572,7 @@ + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(command_buffer), layer_data_map); + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= ValidateObject(command_buffer, command_buffer, kVulkanObjectTypeCommandBuffer, false, VALIDATION_ERROR_16e02401, + VALIDATION_ERROR_UNDEFINED); + if (begin_info) { +@@ -627,7 +627,7 @@ + // VK_EXT_debug_utils commands + VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectNameEXT(VkDevice device, const VkDebugUtilsObjectNameInfoEXT *pNameInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + if (skip) { +@@ -646,7 +646,7 @@ + + VKAPI_ATTR VkResult VKAPI_CALL SetDebugUtilsObjectTagEXT(VkDevice device, const VkDebugUtilsObjectTagInfoEXT *pTagInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + if (skip) { +@@ -659,7 +659,7 @@ + + VKAPI_ATTR void VKAPI_CALL QueueBeginDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT *pLabelInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); +@@ -673,7 +673,7 @@ + + VKAPI_ATTR void VKAPI_CALL QueueEndDebugUtilsLabelEXT(VkQueue queue) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); +@@ -687,7 +687,7 @@ + + VKAPI_ATTR void VKAPI_CALL QueueInsertDebugUtilsLabelEXT(VkQueue queue, const VkDebugUtilsLabelEXT *pLabelInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(queue, queue, kVulkanObjectTypeQueue, false, VALIDATION_ERROR_UNDEFINED, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(queue), layer_data_map); +@@ -701,7 +701,7 @@ + + VKAPI_ATTR void VKAPI_CALL CmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT *pLabelInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + lock.unlock(); +@@ -716,7 +716,7 @@ + + VKAPI_ATTR void VKAPI_CALL CmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + lock.unlock(); +@@ -731,7 +731,7 @@ + + VKAPI_ATTR void VKAPI_CALL CmdInsertDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, const VkDebugUtilsLabelEXT *pLabelInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(commandBuffer, commandBuffer, kVulkanObjectTypeCommandBuffer, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + lock.unlock(); +@@ -812,7 +812,7 @@ + + VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + bool skip = ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_1fc27a01, + VALIDATION_ERROR_UNDEFINED); + if (skip) return VK_ERROR_VALIDATION_FAILED_EXT; +@@ -854,7 +854,7 @@ + VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t *pSwapchainImageCount, + VkImage *pSwapchainImages) { + bool skip = false; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_30805601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, swapchain, kVulkanObjectTypeSwapchainKHR, false, VALIDATION_ERROR_3082f001, + VALIDATION_ERROR_UNDEFINED); +@@ -878,7 +878,7 @@ + VkDescriptorSetLayout *pSetLayout) { + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= + ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_1f805601, VALIDATION_ERROR_UNDEFINED); + if (pCreateInfo) { +@@ -902,7 +902,7 @@ + VkResult result = + get_dispatch_table(ot_device_table_map, device)->CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); + if (VK_SUCCESS == result) { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + CreateObject(device, *pSetLayout, kVulkanObjectTypeDescriptorSetLayout, pAllocator); + } + return result; +@@ -913,7 +913,7 @@ + VkQueueFamilyProperties *pQueueFamilyProperties) { + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_2da27a01, + VALIDATION_ERROR_UNDEFINED); + } +@@ -922,7 +922,7 @@ + } + get_dispatch_table(ot_instance_table_map, physicalDevice) + ->GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pQueueFamilyProperties != NULL) { + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); + if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { +@@ -978,7 +978,7 @@ + VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, + VkPhysicalDevice *pPhysicalDevices) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= + ValidateObject(instance, instance, kVulkanObjectTypeInstance, false, VALIDATION_ERROR_2800bc01, VALIDATION_ERROR_UNDEFINED); + lock.unlock(); +@@ -1002,7 +1002,7 @@ + VKAPI_ATTR VkResult VKAPI_CALL AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, + VkCommandBuffer *pCommandBuffers) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_16805601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, pAllocateInfo->commandPool, kVulkanObjectTypeCommandPool, false, VALIDATION_ERROR_02602801, + VALIDATION_ERROR_UNDEFINED); +@@ -1027,7 +1027,7 @@ + VKAPI_ATTR VkResult VKAPI_CALL AllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo *pAllocateInfo, + VkDescriptorSet *pDescriptorSets) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_16a05601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, pAllocateInfo->descriptorPool, kVulkanObjectTypeDescriptorPool, false, VALIDATION_ERROR_04c04601, + VALIDATION_ERROR_04c00009); +@@ -1057,7 +1057,7 @@ + VKAPI_ATTR void VKAPI_CALL FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, + const VkCommandBuffer *pCommandBuffers) { + bool skip = false; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_28405601, VALIDATION_ERROR_UNDEFINED); + ValidateObject(device, commandPool, kVulkanObjectTypeCommandPool, false, VALIDATION_ERROR_28402801, VALIDATION_ERROR_28402807); + for (uint32_t i = 0; i < commandBufferCount; i++) { +@@ -1080,7 +1080,7 @@ + + VKAPI_ATTR void VKAPI_CALL DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks *pAllocator) { + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + // A swapchain's images are implicitly deleted when the swapchain is deleted. + // Remove this swapchain's images from our map of such images. + std::unordered_map::iterator itr = device_data->swapchainImageMap.begin(); +@@ -1105,7 +1105,7 @@ + const VkDescriptorSet *pDescriptorSets) { + bool skip = false; + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_28605601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, descriptorPool, kVulkanObjectTypeDescriptorPool, false, VALIDATION_ERROR_28604601, + VALIDATION_ERROR_28604607); +@@ -1132,7 +1132,7 @@ + const VkAllocationCallbacks *pAllocator) { + bool skip = VK_FALSE; + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_24405601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, descriptorPool, kVulkanObjectTypeDescriptorPool, true, VALIDATION_ERROR_24404601, + VALIDATION_ERROR_24404607); +@@ -1161,7 +1161,7 @@ + VKAPI_ATTR void VKAPI_CALL DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks *pAllocator) { + layer_data *device_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= ValidateObject(device, device, kVulkanObjectTypeDevice, false, VALIDATION_ERROR_24005601, VALIDATION_ERROR_UNDEFINED); + skip |= ValidateObject(device, commandPool, kVulkanObjectTypeCommandPool, true, VALIDATION_ERROR_24002801, + VALIDATION_ERROR_24002807); +@@ -1195,7 +1195,7 @@ + VkQueueFamilyProperties2KHR *pQueueFamilyProperties) { + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + } +@@ -1204,7 +1204,7 @@ + } + get_dispatch_table(ot_instance_table_map, physicalDevice) + ->GetPhysicalDeviceQueueFamilyProperties2(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pQueueFamilyProperties != NULL) { + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); + if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { +@@ -1222,7 +1222,7 @@ + VkQueueFamilyProperties2KHR *pQueueFamilyProperties) { + bool skip = false; + { +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + skip |= ValidateObject(physicalDevice, physicalDevice, kVulkanObjectTypePhysicalDevice, false, VALIDATION_ERROR_UNDEFINED, + VALIDATION_ERROR_UNDEFINED); + } +@@ -1231,7 +1231,7 @@ + } + get_dispatch_table(ot_instance_table_map, physicalDevice) + ->GetPhysicalDeviceQueueFamilyProperties2KHR(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); +- std::lock_guard lock(global_lock); ++ boost::lock_guard lock(global_lock); + if (pQueueFamilyProperties != NULL) { + layer_data *instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), layer_data_map); + if (instance_data->queue_family_properties.size() < *pQueueFamilyPropertyCount) { +@@ -1245,7 +1245,7 @@ + + VKAPI_ATTR VkResult VKAPI_CALL DebugMarkerSetObjectNameEXT(VkDevice device, const VkDebugMarkerObjectNameInfoEXT *pNameInfo) { + bool skip = VK_FALSE; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + layer_data *dev_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + if (pNameInfo->pObjectName) { + dev_data->report_data->debugObjectNameMap->insert( +--- layers/parameter_validation.h.orig 2018-06-07 16:51:23.538857100 +0100 ++++ layers/parameter_validation.h 2018-06-07 16:51:38.492628400 +0100 +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +--- layers/unique_objects.h.orig 2018-06-07 17:08:47.922309600 +0100 ++++ layers/unique_objects.h 2018-06-07 17:09:44.372149300 +0100 +@@ -27,6 +27,7 @@ + #include "vk_layer_data.h" + #include "vk_safe_struct.h" + #include "vk_layer_utils.h" ++#include + #include "mutex" + + #pragma once +@@ -92,7 +93,7 @@ + static std::unordered_map instance_layer_data_map; + static std::unordered_map layer_data_map; + +-static std::mutex global_lock; // Protect map accesses and unique_id increments ++static boost::mutex global_lock; // Protect map accesses and unique_id increments + + struct GenericHeader { + VkStructureType sType; +--- layers/threading.cpp.orig 2018-06-07 17:15:10.203329300 +0100 ++++ layers/threading.cpp 2018-06-07 17:16:03.509509300 +0100 +@@ -404,7 +404,7 @@ + // Record mapping from command buffer to command pool + if (VK_SUCCESS == result) { + for (uint32_t index = 0; index < pAllocateInfo->commandBufferCount; index++) { +- std::lock_guard lock(command_pool_lock); ++ boost::lock_guard lock(command_pool_lock); + command_pool_map[pCommandBuffers[index]] = pAllocateInfo->commandPool; + } + } +@@ -452,7 +452,7 @@ + // These updates need to be done before calling down to the driver. + for (uint32_t index = 0; index < commandBufferCount; index++) { + finishWriteObject(my_data, pCommandBuffers[index], lockCommandPool); +- std::lock_guard lock(command_pool_lock); ++ boost::lock_guard lock(command_pool_lock); + command_pool_map.erase(pCommandBuffers[index]); + } + } +--- layers/parameter_validation_utils.cpp.orig 2018-06-07 17:20:51.307907300 +0100 ++++ layers/parameter_validation_utils.cpp 2018-06-07 17:22:43.751284300 +0100 +@@ -32,7 +32,7 @@ + #include + #include + #include +-#include ++#include + + #include "vk_loader_platform.h" + #include "vulkan/vk_layer.h" +@@ -92,7 +92,7 @@ + const VkAllocationCallbacks *pAllocator); + + // TODO : This can be much smarter, using separate locks for separate global data +-std::mutex global_lock; ++boost::mutex global_lock; + + static uint32_t loader_layer_if_version = CURRENT_LOADER_LAYER_INTERFACE_VERSION; + std::unordered_map layer_data_map; +@@ -526,7 +526,7 @@ + bool skip = false; + auto my_instance_data = GetLayerDataPtr(get_dispatch_key(physicalDevice), instance_layer_data_map); + assert(my_instance_data != nullptr); +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + + skip |= parameter_validation_vkCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice); + +@@ -613,7 +613,7 @@ + bool skip = false; + layer_data *device_data = GetLayerDataPtr(key, layer_data_map); + { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= parameter_validation_vkDestroyDevice(device, pAllocator); + } + +@@ -647,7 +647,7 @@ + layer_data *local_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); + bool skip = false; + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + + skip |= ValidateDeviceQueueFamily(local_data, pCreateInfo->queueFamilyIndex, "vkCreateCommandPool", + "pCreateInfo->queueFamilyIndex", VALIDATION_ERROR_02c0004e); +@@ -695,7 +695,7 @@ + VkResult result = VK_ERROR_VALIDATION_FAILED_EXT; + + { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= parameter_validation_vkCreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); + + typedef bool (*PFN_manual_vkCreateRenderPass)(VkDevice device, const VkRenderPassCreateInfo *pCreateInfo, +@@ -711,7 +711,7 @@ + + // track the state necessary for checking vkCreateGraphicsPipeline (subpass usage of depth and color attachments) + if (result == VK_SUCCESS) { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + const auto renderPass = *pRenderPass; + auto &renderpass_state = device_data->renderpasses_states[renderPass]; + +@@ -738,7 +738,7 @@ + bool skip = false; + + { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + skip |= parameter_validation_vkDestroyRenderPass(device, renderPass, pAllocator); + + typedef bool (*PFN_manual_vkDestroyRenderPass)(VkDevice device, VkRenderPass renderPass, +@@ -754,7 +754,7 @@ + + // track the state necessary for checking vkCreateGraphicsPipeline (subpass usage of depth and color attachments) + { +- std::unique_lock lock(global_lock); ++ boost::unique_lock lock(global_lock); + device_data->renderpasses_states.erase(renderPass); + } + } +--- layers/threading.h.orig 2018-06-07 17:27:48.891877400 +0100 ++++ layers/threading.h 2018-06-07 17:29:03.655168300 +0100 +@@ -84,7 +84,7 @@ + VkDebugReportObjectTypeEXT objectType; + std::unordered_map uses; + boost::mutex counter_lock; +- std::condition_variable counter_condition; ++ boost::condition_variable counter_condition; + void startWrite(debug_report_data *report_data, T object) { + if (object == VK_NULL_HANDLE) { + return; +--- layers/CMakeLists.txt.orig 2018-06-07 17:35:51.046043100 +0100 ++++ layers/CMakeLists.txt 2018-06-07 17:36:25.172310400 +0100 +@@ -154,7 +154,7 @@ + set_target_properties(copy-${target}-def-file PROPERTIES FOLDER ${LVL_TARGET_FOLDER}) + add_library(VkLayer_${target} SHARED ${ARGN} VkLayer_${target}${DEFFILE_SUFFIX}.def) + add_dependencies(VkLayer_${target} generate_helper_files) +- target_link_Libraries(VkLayer_${target} VkLayer_utils) ++ target_link_Libraries(VkLayer_${target} boost_thread-mt boost_system-mt VkLayer_utils) + add_dependencies(VkLayer_${target} generate_helper_files VkLayer_utils) + if(MINGW) + install(TARGETS VkLayer_${target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -165,10 +165,10 @@ + add_library(VkLayer_${target} SHARED ${ARGN}) + target_link_Libraries(VkLayer_${target} VkLayer_utils) + add_dependencies(VkLayer_${target} generate_helper_files VkLayer_utils) +- set_target_properties(VkLayer_${target} PROPERTIES ++ set_target_properties(VkLayer_${target} PROPERTIES + LINK_FLAGS "-Wl" + INSTALL_RPATH "@loader_path/" +- ) ++ ) + install(TARGETS VkLayer_${target} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) + endmacro() + else() +@@ -208,7 +208,7 @@ + + # Clang (and not gcc) warns about unused const variables. + # Generated files may purposely contain unused consts, so +-# silence this warning in Clang. ++# silence this warning in Clang. + if (CMAKE_C_COMPILER_ID MATCHES "Clang") + set_source_files_properties(parameter_validation.cpp PROPERTIES + COMPILE_FLAGS "-Wno-unused-const-variable")