Techt3o commited on
Commit
1305225
·
verified ·
1 Parent(s): 590af55

be711d1eb8f3313a8f43146fc96d608bfc03b5b32edae1546461b5d6ed8cc02f

Browse files
Files changed (50) hide show
  1. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_attribute.patch +11 -0
  2. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_cmakelists_and_cpp.patch +38 -0
  3. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_default_graph_init.patch +21 -0
  4. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_mglDataList.patch +28 -0
  5. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/portfile.cmake +85 -0
  6. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/vcpkg.json +95 -0
  7. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matio/fix-dependencies.patch +28 -0
  8. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matio/portfile.cmake +37 -0
  9. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matio/vcpkg.json +40 -0
  10. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotlib-cpp/portfile.cmake +14 -0
  11. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotlib-cpp/vcpkg.json +7 -0
  12. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/fix-dependencies.patch +96 -0
  13. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/install-3rd-libraries.patch +15 -0
  14. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/portfile.cmake +55 -0
  15. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/vcpkg.json +67 -0
  16. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matroska/portfile.cmake +26 -0
  17. third-party/DPVO/Pangolin/scripts/vcpkg/ports/matroska/vcpkg.json +18 -0
  18. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/enable-pthread.patch +102 -0
  19. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/portfile.cmake +38 -0
  20. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/vcpkg-cmake-wrapper.cmake +29 -0
  21. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/vcpkg.json +29 -0
  22. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch +38 -0
  23. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mcpp/portfile.cmake +28 -0
  24. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mcpp/vcpkg.json +7 -0
  25. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdns/portfile.cmake +20 -0
  26. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdns/vcpkg.json +12 -0
  27. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdnsresponder/portfile.cmake +93 -0
  28. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdnsresponder/vcpkg.json +8 -0
  29. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdspan/portfile.cmake +19 -0
  30. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdspan/vcpkg.json +16 -0
  31. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/CMakeLists.txt +67 -0
  32. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/Config.cmake.in +4 -0
  33. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/fix_wpath_unsigned.patch +40 -0
  34. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/portfile.cmake +28 -0
  35. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/vcpkg.json +7 -0
  36. third-party/DPVO/Pangolin/scripts/vcpkg/ports/memorymodule/portfile.cmake +43 -0
  37. third-party/DPVO/Pangolin/scripts/vcpkg/ports/memorymodule/vcpkg.json +22 -0
  38. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/d3d10sw.patch +383 -0
  39. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/portfile.cmake +158 -0
  40. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/radv-msvc-llvm13-2.patch +14 -0
  41. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/swr-llvm13.patch +334 -0
  42. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/swr-msvc-2.patch +57 -0
  43. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/swravx512-post-static-link.patch +22 -0
  44. third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/vcpkg.json +108 -0
  45. third-party/DPVO/Pangolin/scripts/vcpkg/ports/meschach/CMakeLists.txt +85 -0
  46. third-party/DPVO/Pangolin/scripts/vcpkg/ports/meschach/portfile.cmake +26 -0
  47. third-party/DPVO/Pangolin/scripts/vcpkg/ports/meschach/vcpkg.json +7 -0
  48. third-party/DPVO/Pangolin/scripts/vcpkg/ports/meshoptimizer/portfile.cmake +26 -0
  49. third-party/DPVO/Pangolin/scripts/vcpkg/ports/meshoptimizer/vcpkg.json +16 -0
  50. third-party/DPVO/Pangolin/scripts/vcpkg/ports/metis/disable-programs.patch +8 -0
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_attribute.patch ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/include/mgl2/define.h 2021-12-08 13:59:55.000000000 +0800
2
+ +++ a/include/mgl2/define.h 2021-12-15 10:39:09.701079400 +0800
3
+ @@ -66,6 +66,8 @@
4
+ #else
5
+ #define MGL_FUNC_CONST
6
+ #define MGL_FUNC_PURE
7
+ +#define MGL_FUNC_INIT
8
+ +#define MGL_FUNC_FINI
9
+ #endif
10
+ #define MGL_EXPORT_CONST MGL_EXPORT MGL_FUNC_CONST
11
+ #define MGL_EXPORT_PURE MGL_EXPORT MGL_FUNC_PURE
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_cmakelists_and_cpp.patch ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/mgllab/CMakeLists.txt b/mgllab/CMakeLists.txt
2
+ index 1649104..eeec1c1 100644
3
+ --- a/mgllab/CMakeLists.txt
4
+ +++ b/mgllab/CMakeLists.txt
5
+ @@ -38,7 +38,11 @@ if(MGL_HAVE_FLTK)
6
+ set(mgllab_src ${mgllab_src} mgllab.rc)
7
+ endif(WIN32)
8
+ add_executable(mgllab ${mgllab_src} ${mgllab_hdr})
9
+ - target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES})
10
+ + if(WIN32)
11
+ + target_link_libraries(mgllab mgl mgl-fltk mgl-fltk-static mgl-static getopt-static ${FLTK_LIBRARIES})
12
+ + else(WIN32)
13
+ + target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES})
14
+ + endif(WIN32)
15
+ install(
16
+ TARGETS mgllab
17
+ RUNTIME DESTINATION bin )
18
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
19
+ index d0c779d..acd9d7f 100644
20
+ --- a/CMakeLists.txt
21
+ +++ b/CMakeLists.txt
22
+ @@ -579,10 +579,15 @@ if(enable-glut)
23
+ if(NOT MGL_HAVE_OPENGL)
24
+ message(SEND_ERROR "You have to enable OpenGL if you plan to use GLUT.")
25
+ endif(NOT MGL_HAVE_OPENGL)
26
+ - include(FindGLUT)
27
+ + find_path(GLUT_INCLUDE_DIR freeglut.h PATH_SUFFIXES GL)
28
+ + include(SelectLibraryConfigurations)
29
+ + find_library(GLUT_LIBRARY_RELEASE NAMES freeglut)
30
+ + find_library(GLUT_LIBRARY_DEBUG NAMES freeglutd)
31
+ + select_library_configurations(GLUT)
32
+ if(NOT GLUT_FOUND)
33
+ message(SEND_ERROR "Couldn't find GLUT library.")
34
+ endif(NOT GLUT_FOUND)
35
+ + include_directories(${GLUT_INCLUDE_DIR}/GL)
36
+ else(enable-glut)
37
+ set(MGL_HAVE_GLUT 0)
38
+ endif(enable-glut)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_default_graph_init.patch ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git "a/src/canvas_cf.cpp" "b/src/canvas_cf.cpp"
2
+ index 5e1443a..26a0a8e 100644
3
+ --- "a/src/canvas_cf.cpp"
4
+ +++ "b/src/canvas_cf.cpp"
5
+ @@ -50,7 +50,6 @@ void MGL_EXPORT MGL_FUNC_INIT mgl_init() // TODO try to add ld option: "-init mg
6
+ #endif
7
+ for(long i=0;i<360;i++) mgl_cos[i] = cos(i*M_PI/180.);
8
+ if(!mglDefFont) mglDefFont = new mglFont(MGL_DEF_FONT_NAME);
9
+ - if(!mglDefaultGr) mglDefaultGr = new mglCanvas(600,400);
10
+ }
11
+ }
12
+ void MGL_EXPORT MGL_FUNC_FINI mgl_fini() // TODO try to add ld option: "-fini mgl_fini"
13
+ @@ -434,7 +433,7 @@ void MGL_EXPORT mgl_set_legend_marks(HMGL gr, int num)
14
+ uintptr_t MGL_EXPORT mgl_create_graph_(int *width, int *height)
15
+ { return uintptr_t(new mglCanvas(*width,*height)); }
16
+ void MGL_EXPORT mgl_delete_graph_(uintptr_t *gr) { delete _GR_; }
17
+ -uintptr_t MGL_EXPORT mgl_default_graph_() { return uintptr_t(&mglDefaultGr); }
18
+ +uintptr_t MGL_EXPORT mgl_default_graph_() { return uintptr_t(mgl_default_graph()); }
19
+ void MGL_EXPORT mgl_set_size_scl_(double *scl) { mgl_set_size_scl(*scl); }
20
+ void MGL_EXPORT mgl_set_size_(uintptr_t *gr, int *width, int *height)
21
+ { mgl_set_size(_GR_,*width,*height); }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/fix_mglDataList.patch ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/include/mgl2/abstract.h b/include/mgl2/abstract.h
2
+ index c8c53b8..245333b 100644
3
+ --- a/include/mgl2/abstract.h
4
+ +++ b/include/mgl2/abstract.h
5
+ @@ -235,7 +235,11 @@ struct MGL_EXPORT mglNum
6
+ };
7
+ //-----------------------------------------------------------------------------
8
+ /// List of user-defined data arrays
9
+ +#ifndef MGL_WIDGETS_DLL
10
+ MGL_EXPORT extern std::vector<mglDataA*> mglDataList;
11
+ +#else
12
+ +__declspec(dllimport) extern std::vector<mglDataA*> mglDataList;
13
+ +#endif
14
+ //-----------------------------------------------------------------------------
15
+ /// Abstract class for data array
16
+ class MGL_EXPORT mglDataA
17
+ diff --git a/widgets/CMakeLists.txt b/widgets/CMakeLists.txt
18
+ index a9e1269..4c1d0d4 100644
19
+ --- a/widgets/CMakeLists.txt
20
+ +++ b/widgets/CMakeLists.txt
21
+ @@ -2,6 +2,7 @@ include(GenerateExportHeader)
22
+
23
+ if(MSVC)
24
+ add_definitions(-DMGL_LIB_MSVC)
25
+ + add_definitions(-DMGL_WIDGETS_DLL)
26
+ endif(MSVC)
27
+
28
+ if(MGL_HAVE_FLTK)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/portfile.cmake ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(MATHGL_VERSION "2.5")
2
+
3
+ vcpkg_from_sourceforge(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO mathgl/mathgl
6
+ REF mathgl%20${MATHGL_VERSION}
7
+ FILENAME "mathgl-${MATHGL_VERSION}.tar.gz"
8
+ SHA512 1fe27962ffef8d7127c4e1294d735e5da4dd2d647397f09705c3ca860f90bd06fd447ff614e584f3d2b874a02262c5518be37d59e9e0a838dd5b8b64fd77ef9d
9
+ PATCHES
10
+ fix_cmakelists_and_cpp.patch
11
+ fix_attribute.patch
12
+ fix_default_graph_init.patch
13
+ fix_mglDataList.patch
14
+ fix_arma_sprintf.patch
15
+ )
16
+
17
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
18
+ FEATURES
19
+ hdf5 enable-hdf5
20
+ fltk enable-fltk
21
+ gif enable-gif
22
+ arma enable-arma
23
+ png enable-png
24
+ zlib enable-zlib
25
+ jpeg enable-jpeg
26
+ gsl enable-gsl
27
+ opengl enable-opengl
28
+ glut enable-glut
29
+ wx enable-wx
30
+ qt5 enable-qt5
31
+ )
32
+
33
+ vcpkg_cmake_configure(
34
+ SOURCE_PATH "${SOURCE_PATH}"
35
+ OPTIONS ${FEATURE_OPTIONS}
36
+ )
37
+
38
+ vcpkg_cmake_install()
39
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
40
+
41
+ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
42
+ vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
43
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/mathgl2-config.cmake")
44
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/mathgl2-config.cmake")
45
+ else()
46
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mathgl2)
47
+ endif()
48
+
49
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
50
+
51
+ #somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it
52
+ if(CMAKE_HOST_WIN32)
53
+ set(EXECUTABLE_SUFFIX ".exe")
54
+ else()
55
+ set(EXECUTABLE_SUFFIX "")
56
+ endif()
57
+
58
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/mgllab${EXECUTABLE_SUFFIX}")
59
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/mglview${EXECUTABLE_SUFFIX}")
60
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/mglconv${EXECUTABLE_SUFFIX}")
61
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/mgltask${EXECUTABLE_SUFFIX}")
62
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/udav${EXECUTABLE_SUFFIX}")
63
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/mathgl/")
64
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mglconv${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/mathgl/mglconv${EXECUTABLE_SUFFIX}")
65
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mgltask${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/mathgl/mgltask${EXECUTABLE_SUFFIX}")
66
+ if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/mgllab${EXECUTABLE_SUFFIX}")
67
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mgllab${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/mathgl/mgllab${EXECUTABLE_SUFFIX}")
68
+ endif()
69
+ if ("EXISTS ${CURRENT_PACKAGES_DIR}/bin/mglview${EXECUTABLE_SUFFIX}")
70
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/mglview${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/mathgl/mglview${EXECUTABLE_SUFFIX}")
71
+ endif()
72
+ if (EXISTS "${CURRENT_PACKAGES_DIR}/bin/udav${EXECUTABLE_SUFFIX}")
73
+ file(RENAME "${CURRENT_PACKAGES_DIR}/bin/udav${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/mathgl/udav${EXECUTABLE_SUFFIX}")
74
+ endif()
75
+
76
+ vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/mathgl")
77
+
78
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
79
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
80
+ endif()
81
+
82
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mgl2/config.h" "#define MGL_INSTALL_DIR \"${CURRENT_PACKAGES_DIR}\"" "")
83
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mgl2/config.h" "#define MGL_FONT_PATH \"${CURRENT_PACKAGES_DIR}/fonts\"" "") # there is no fonts folder
84
+
85
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/mathgl" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mathgl/vcpkg.json ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mathgl",
3
+ "version": "2.5",
4
+ "description": "MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions",
5
+ "dependencies": [
6
+ {
7
+ "name": "vcpkg-cmake",
8
+ "host": true
9
+ },
10
+ {
11
+ "name": "vcpkg-cmake-config",
12
+ "host": true
13
+ }
14
+ ],
15
+ "default-features": [
16
+ "jpeg",
17
+ "opengl",
18
+ "png",
19
+ "zlib"
20
+ ],
21
+ "features": {
22
+ "arma": {
23
+ "description": "Armadillo support",
24
+ "dependencies": [
25
+ "armadillo"
26
+ ]
27
+ },
28
+ "fltk": {
29
+ "description": "fltk module",
30
+ "dependencies": [
31
+ "fltk"
32
+ ]
33
+ },
34
+ "gif": {
35
+ "description": "gif module",
36
+ "dependencies": [
37
+ "giflib"
38
+ ]
39
+ },
40
+ "glut": {
41
+ "description": "glut module",
42
+ "dependencies": [
43
+ "freeglut"
44
+ ]
45
+ },
46
+ "gsl": {
47
+ "description": "gsl module",
48
+ "dependencies": [
49
+ "gsl"
50
+ ]
51
+ },
52
+ "hdf5": {
53
+ "description": "hdf5 module",
54
+ "dependencies": [
55
+ "hdf5"
56
+ ]
57
+ },
58
+ "jpeg": {
59
+ "description": "jpeg module",
60
+ "dependencies": [
61
+ "libjpeg-turbo"
62
+ ]
63
+ },
64
+ "opengl": {
65
+ "description": "opengl module",
66
+ "dependencies": [
67
+ "opengl"
68
+ ]
69
+ },
70
+ "png": {
71
+ "description": "png module",
72
+ "dependencies": [
73
+ "libpng"
74
+ ]
75
+ },
76
+ "qt5": {
77
+ "description": "qt5 module",
78
+ "dependencies": [
79
+ "qt5"
80
+ ]
81
+ },
82
+ "wx": {
83
+ "description": "wx module",
84
+ "dependencies": [
85
+ "wxwidgets"
86
+ ]
87
+ },
88
+ "zlib": {
89
+ "description": "zlib module",
90
+ "dependencies": [
91
+ "zlib"
92
+ ]
93
+ }
94
+ }
95
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matio/fix-dependencies.patch ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/cmake/thirdParties.cmake b/cmake/thirdParties.cmake
2
+ index 41d8529..392d455 100644
3
+ --- a/cmake/thirdParties.cmake
4
+ +++ b/cmake/thirdParties.cmake
5
+ @@ -19,7 +19,7 @@ if(MATIO_WITH_HDF5)
6
+ endif()
7
+ set(HDF5_FOUND TRUE)
8
+ else()
9
+ - find_package(HDF5)
10
+ + find_package(HDF5 CONFIG REQUIRED)
11
+ if(HDF5_FOUND)
12
+ set(HDF_MIN_VER 1.8)
13
+ if(HDF5_VERSION VERSION_LESS ${HDF_MIN_VER})
14
+ @@ -44,9 +44,12 @@ if(HDF5_FOUND)
15
+ elseif(TARGET hdf5)
16
+ # target from hdf5 1.8 config
17
+ target_link_libraries(MATIO::HDF5 INTERFACE hdf5)
18
+ - elseif(TARGET HDF5::HDF5)
19
+ + elseif(TARGET hdf5::hdf5-shared)
20
+ # target defined in CMake FindHDF5 (since 3.19)
21
+ - target_link_libraries(MATIO::HDF5 INTERFACE HDF5::HDF5)
22
+ + target_link_libraries(MATIO::HDF5 INTERFACE hdf5::hdf5-shared)
23
+ + elseif(TARGET hdf5::hdf5-static)
24
+ + # target defined in CMake FindHDF5 (since 3.19)
25
+ + target_link_libraries(MATIO::HDF5 INTERFACE hdf5-static)
26
+ else()
27
+ # results from CMake FindHDF5
28
+ set_target_properties(MATIO::HDF5 PROPERTIES
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matio/portfile.cmake ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO tbeu/matio
4
+ REF ca56394e5672115df1981996ed12524d1d551259 # v1.5.19
5
+ SHA512 67c239d8aabafaa935775f3b260ba0756c196b0d845ef5116365c9aa6a0b24dae70d92c4e74d5d43ae073ae0744f084f0f58ead864eb77c813d43dbbb3e4ec5e
6
+ HEAD_REF master
7
+ PATCHES fix-dependencies.patch
8
+ )
9
+
10
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
11
+
12
+ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
13
+ FEATURES
14
+ hdf5 MATIO_WITH_HDF5
15
+ zlib MATIO_WITH_ZLIB
16
+ extended-sparse MATIO_EXTENDED_SPARSE
17
+ mat73 MATIO_MAT73
18
+ pic MATIO_PIC
19
+ )
20
+
21
+ vcpkg_cmake_configure(
22
+ SOURCE_PATH ${SOURCE_PATH}
23
+ PREFER_NINJA
24
+ OPTIONS ${FEATURE_OPTIONS}
25
+ -DMATIO_SHARED=${BUILD_SHARED}
26
+ -DMATIO_USE_CONAN=OFF
27
+ )
28
+
29
+ vcpkg_cmake_install()
30
+
31
+ vcpkg_copy_pdbs()
32
+
33
+ vcpkg_copy_tools(TOOL_NAMES matdump AUTO_CLEAN)
34
+
35
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
36
+
37
+ file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matio/vcpkg.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "matio",
3
+ "version-semver": "1.5.19",
4
+ "port-version": 1,
5
+ "description": "MATLAB MAT File I/O Library",
6
+ "homepage": "https://github.com/tbeu/matio",
7
+ "dependencies": [
8
+ {
9
+ "name": "vcpkg-cmake",
10
+ "host": true
11
+ }
12
+ ],
13
+ "default-features": [
14
+ "hdf5",
15
+ "zlib"
16
+ ],
17
+ "features": {
18
+ "extended-sparse": {
19
+ "description": "Enable extended sparse matrix data types not supported in MATLAB"
20
+ },
21
+ "hdf5": {
22
+ "description": "Check for HDF5 library",
23
+ "dependencies": [
24
+ "hdf5"
25
+ ]
26
+ },
27
+ "mat73": {
28
+ "description": "Enable support for version 7.3 MAT files"
29
+ },
30
+ "pic": {
31
+ "description": "Enable position-independent code (PIC), i.e., compilation with the -fPIC flag"
32
+ },
33
+ "zlib": {
34
+ "description": "Check for zlib library",
35
+ "dependencies": [
36
+ "zlib"
37
+ ]
38
+ }
39
+ }
40
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotlib-cpp/portfile.cmake ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # header-only library
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO lava/matplotlib-cpp
6
+ REF 70d508fcb7febc66535ba923eac1b1a4e571e4d1
7
+ SHA512 4da452fc38b6c349a1b08b97775ef2d90354fabd3c8c3a0383f08609b22dea222b7f3e091efc1b833755f6b5c1e8564e675d2ed54cdc21f8b07b1b7bb44a82f4
8
+ HEAD_REF master
9
+ )
10
+
11
+ file(COPY ${SOURCE_PATH}/matplotlibcpp.h DESTINATION ${CURRENT_PACKAGES_DIR}/include)
12
+
13
+ # Handle copyright
14
+ configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotlib-cpp/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "matplotlib-cpp",
3
+ "version-string": "2020-08-27",
4
+ "port-version": 1,
5
+ "description": "Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib",
6
+ "homepage": "https://github.com/lava/matplotlib-cpp"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/fix-dependencies.patch ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/source/3rd_party/CMakeLists.txt b/source/3rd_party/CMakeLists.txt
2
+ index ab58bbd..f9fed7e 100644
3
+ --- a/source/3rd_party/CMakeLists.txt
4
+ +++ b/source/3rd_party/CMakeLists.txt
5
+ @@ -67,57 +67,69 @@ find_package(PkgConfig)
6
+ # Lots of optional packages are not a good idea in general.
7
+ # It makes the library much less "packagable" (https://youtu.be/sBP17HQAQjk)
8
+ # and much more difficult to make sure it works on multiple OSs
9
+ -find_package(JPEG)
10
+ -if(JPEG_FOUND)
11
+ +
12
+ +if (WITH_JPEG)
13
+ +find_package(JPEG REQUIRED)
14
+ +if(1)
15
+ target_compile_definitions(cimg INTERFACE cimg_use_jpeg)
16
+ target_link_libraries(cimg INTERFACE ${JPEG_LIBRARIES})
17
+ target_include_directories(cimg INTERFACE ${JPEG_INCLUDE_DIRS})
18
+ endif()
19
+ +endif()
20
+
21
+ -find_package(TIFF)
22
+ -if(TIFF_FOUND)
23
+ +if (WITH_TIFF)
24
+ +find_package(TIFF REQUIRED)
25
+ +if(1)
26
+ target_compile_definitions(cimg INTERFACE cimg_use_tiff)
27
+ target_link_libraries(cimg INTERFACE ${TIFF_LIBRARIES})
28
+ target_include_directories(cimg INTERFACE ${TIFF_INCLUDE_DIRS})
29
+ endif()
30
+ +endif()
31
+
32
+ -find_package(ZLIB)
33
+ -if(ZLIB_FOUND)
34
+ - find_package(PNG)
35
+ - if (PNG_FOUND)
36
+ +if (WITH_ZLIB)
37
+ +find_package(ZLIB REQUIRED)
38
+ +if(1)
39
+ + find_package(libpng CONFIG REQUIRED)
40
+ + if (1)
41
+ target_compile_definitions(cimg INTERFACE cimg_use_zlib cimg_use_png)
42
+ - target_include_directories(cimg INTERFACE ${ZLIB_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS})
43
+ - target_link_libraries(cimg INTERFACE ${ZLIB_LIBRARIES} ${PNG_LIBRARIES})
44
+ + target_link_libraries(cimg INTERFACE ZLIB::ZLIB png)
45
+ endif ()
46
+ endif()
47
+ +endif()
48
+
49
+ -find_package(LAPACK)
50
+ -if(LAPACK_FOUND)
51
+ +if (WITH_LAPACK)
52
+ +find_package(LAPACK REQUIRED)
53
+ +if(1)
54
+ target_compile_definitions(cimg INTERFACE cimg_use_lapack)
55
+ target_link_libraries(cimg INTERFACE ${LAPACK_LIBRARIES})
56
+ target_include_directories(cimg INTERFACE ${LAPACK_INCLUDE_DIRS})
57
+ endif()
58
+ +endif()
59
+
60
+ -find_package(BLAS)
61
+ -if(BLAS_FOUND)
62
+ +if (WITH_BLAS)
63
+ +find_package(BLAS REQUIRED)
64
+ +if(1)
65
+ target_compile_definitions(cimg INTERFACE cimg_use_blas)
66
+ target_link_libraries(cimg INTERFACE ${BLAS_LIBRARIES})
67
+ target_include_directories(cimg INTERFACE ${BLAS_INCLUDE_DIRS})
68
+ endif()
69
+ +endif()
70
+
71
+ -find_package(FFTW)
72
+ -if(FFTW_FOUND)
73
+ +if (WITH_FFTW3)
74
+ +find_package(FFTW3 CONFIG REQUIRED)
75
+ +if(1)
76
+ target_compile_definitions(cimg INTERFACE cimg_use_fftw3)
77
+ - target_link_libraries(cimg INTERFACE ${FFTW_LIBRARIES})
78
+ - target_include_directories(cimg INTERFACE ${FFTW_INCLUDE_DIRS})
79
+ + target_link_libraries(cimg INTERFACE FFTW3::fftw3)
80
+ +endif()
81
+ endif()
82
+
83
+ if (CMAKE_MODULE_PATH)
84
+ - find_package(OpenCV QUIET)
85
+ - if (OpenCV_FOUND)
86
+ + if (WITH_OPENCV)
87
+ + find_package(OpenCV CONFIG REQUIRED)
88
+ + if (1)
89
+ target_compile_definitions(cimg INTERFACE cimg_use_opencv)
90
+ - target_link_libraries(cimg INTERFACE ${OpenCV_LIBRARIES})
91
+ - target_include_directories(cimg INTERFACE ${OpenCV_INCLUDE_DIRS})
92
+ + target_link_libraries(cimg INTERFACE opencv_core)
93
+ + endif()
94
+ endif()
95
+ else()
96
+ message("No CMAKE_MODULE_PATH path for OpenCV configured")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/install-3rd-libraries.patch ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/source/3rd_party/CMakeLists.txt b/source/3rd_party/CMakeLists.txt
2
+ index bef0c08..e7521a7 100644
3
+ --- a/source/3rd_party/CMakeLists.txt
4
+ +++ b/source/3rd_party/CMakeLists.txt
5
+ @@ -41,7 +41,9 @@ endif()
6
+ if(MASTER_PROJECT AND NOT BUILD_SHARED_LIBS)
7
+ install(TARGETS nodesoup
8
+ EXPORT Matplot++Targets
9
+ - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/Matplot++)
10
+ + RUNTIME DESTINATION bin
11
+ + LIBRARY DESTINATION lib
12
+ + ARCHIVE DESTINATION lib)
13
+ endif()
14
+
15
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/portfile.cmake ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ message(STATUS " ${PORT}'s gnuplot backend currently requires Gnuplot 5.2.6+.
2
+ Windows users may get a pre-built binary installer from http://www.gnuplot.info/download.html.
3
+ Linux and MacOS users may install it from the system package manager.
4
+ Please visit https://alandefreitas.github.io/matplotplusplus/ for more information."
5
+ )
6
+
7
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
8
+
9
+ vcpkg_from_github(
10
+ OUT_SOURCE_PATH SOURCE_PATH
11
+ REPO alandefreitas/matplotplusplus
12
+ REF 36d8dc6c3b94b7a71c4f129763f2c6ad8fc0b54a
13
+ SHA512 ac8902e953a2a9f6bd62e14e2eb0bd42e407bae6c0b2921ad16ce547e4921ba2c8d8a9cc68e75831676dce3cd89cdf8294862710e838510b68e20f8a6cdf806f
14
+ HEAD_REF master
15
+ PATCHES
16
+ install-3rd-libraries.patch # Remove this patch when nodesoup is added in vcpkg
17
+ fix-dependencies.patch
18
+ )
19
+
20
+ vcpkg_check_features(
21
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
22
+ FEATURES
23
+ opengl BUILD_EXPERIMENTAL_OPENGL_BACKEND
24
+ jpeg WITH_JPEG
25
+ tiff WITH_TIFF
26
+ zlib WITH_ZLIB
27
+ lapack WITH_LAPACK
28
+ blas WITH_BLAS
29
+ fftw3 WITH_FFTW3
30
+ opencv WITH_OPENCV
31
+ )
32
+
33
+ vcpkg_cmake_configure(
34
+ SOURCE_PATH ${SOURCE_PATH}
35
+ PREFER_NINJA
36
+ OPTIONS ${FEATURE_OPTIONS}
37
+ -DCPM_USE_LOCAL_PACKAGES=ON
38
+ -DBUILD_EXAMPLES=OFF
39
+ -DBUILD_TESTS=OFF
40
+ -DBUILD_INSTALLER=ON
41
+ -DBUILD_PACKAGE=OFF
42
+ -DBUILD_WITH_PEDANTIC_WARNINGS=OFF
43
+ -DWITH_SYSTEM_CIMG=ON
44
+ -DBUILD_HIGH_RESOLUTION_WORLD_MAP=${BUILD_WORLD_MAP}
45
+ )
46
+
47
+ vcpkg_cmake_install()
48
+
49
+ vcpkg_copy_pdbs()
50
+
51
+ vcpkg_cmake_config_fixup(PACKAGE_NAME matplot++ CONFIG_PATH lib/cmake/Matplot++)
52
+
53
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
54
+
55
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matplotplusplus/vcpkg.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "matplotplusplus",
3
+ "version-date": "2021-04-11",
4
+ "port-version": 5,
5
+ "description": "A C++ graphics library for data visualization",
6
+ "homepage": "https://alandefreitas.github.io/matplotplusplus/",
7
+ "license": "MIT",
8
+ "supports": "!uwp & !(windows & arm)",
9
+ "dependencies": [
10
+ "cimg",
11
+ {
12
+ "name": "vcpkg-cmake",
13
+ "host": true
14
+ },
15
+ {
16
+ "name": "vcpkg-cmake-config",
17
+ "host": true
18
+ }
19
+ ],
20
+ "features": {
21
+ "blas": {
22
+ "description": "BLAS support for Matplot++",
23
+ "dependencies": [
24
+ "blas"
25
+ ]
26
+ },
27
+ "fftw": {
28
+ "description": "fftw3 support for Matplot++",
29
+ "dependencies": [
30
+ "fftw3"
31
+ ]
32
+ },
33
+ "jpeg": {
34
+ "description": "JPEG support for Matplot++",
35
+ "dependencies": [
36
+ "libjpeg-turbo"
37
+ ]
38
+ },
39
+ "lapack": {
40
+ "description": "LAPACK support for Matplot++",
41
+ "dependencies": [
42
+ "lapack"
43
+ ]
44
+ },
45
+ "opencv": {
46
+ "description": "opencv support for Matplot++",
47
+ "dependencies": [
48
+ "opencv"
49
+ ]
50
+ },
51
+ "opengl": {
52
+ "description": "OpenGL backend for Matplot++",
53
+ "dependencies": [
54
+ "glad",
55
+ "glfw3",
56
+ "opengl"
57
+ ]
58
+ },
59
+ "zlib": {
60
+ "description": "ZLIB and libpng support for Matplot++",
61
+ "dependencies": [
62
+ "libpng",
63
+ "zlib"
64
+ ]
65
+ }
66
+ }
67
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matroska/portfile.cmake ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
2
+ message(FATAL_ERROR "matroska does not currently support UWP")
3
+ endif()
4
+
5
+ vcpkg_from_github(
6
+ OUT_SOURCE_PATH SOURCE_PATH
7
+ REPO Matroska-Org/libmatroska
8
+ REF release-1.6.3
9
+ SHA512 f4b4cd5b5e76c452fb559ead28c4bcb5ec4e28d74898f13c1709a6ab75d95cf82b319118445d7a7f895708bb0d5d1f3c09040d3e3263c6a2f2a27ffc92d35c2f
10
+ HEAD_REF master
11
+ )
12
+
13
+ vcpkg_cmake_configure(
14
+ SOURCE_PATH "${SOURCE_PATH}"
15
+ OPTIONS
16
+ -DDISABLE_PKGCONFIG=1
17
+ )
18
+
19
+ vcpkg_cmake_install()
20
+
21
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Matroska)
22
+
23
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
24
+
25
+ # Handle copyright
26
+ file(INSTALL "${SOURCE_PATH}/LICENSE.LGPL" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/matroska/vcpkg.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "matroska",
3
+ "version": "1.6.3",
4
+ "description": "a C++ library to parse Matroska files (.mkv and .mka)",
5
+ "homepage": "https://github.com/Matroska-Org/libmatroska",
6
+ "supports": "!uwp",
7
+ "dependencies": [
8
+ "ebml",
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ },
13
+ {
14
+ "name": "vcpkg-cmake-config",
15
+ "host": true
16
+ }
17
+ ]
18
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/enable-pthread.patch ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2
+ index 8833246..f68ab02 100644
3
+ --- a/CMakeLists.txt
4
+ +++ b/CMakeLists.txt
5
+ @@ -28,6 +28,7 @@ set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
6
+
7
+ option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF)
8
+ option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
9
+ +option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF)
10
+
11
+ option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
12
+
13
+ @@ -231,6 +232,8 @@ else()
14
+ set(LIB_INSTALL_DIR lib)
15
+ endif()
16
+
17
+ +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
18
+ +
19
+ if(ENABLE_ZLIB_SUPPORT)
20
+ find_package(ZLIB)
21
+
22
+ @@ -239,6 +242,17 @@ if(ENABLE_ZLIB_SUPPORT)
23
+ endif(ZLIB_FOUND)
24
+ endif(ENABLE_ZLIB_SUPPORT)
25
+
26
+ +if(ENABLE_PTHREAD)
27
+ + if(WIN32)
28
+ + find_package(pthreads_windows REQUIRED)
29
+ + include_directories(${PThreads4W_INCLUDE_DIR})
30
+ + else()
31
+ + set(CMAKE_THREAD_PREFER_PTHREAD ON)
32
+ + find_package(Threads REQUIRED)
33
+ + endif()
34
+ + set(LINK_WITH_PTHREAD ON)
35
+ +endif()
36
+ +
37
+ add_subdirectory(include)
38
+
39
+ add_subdirectory(3rdparty)
40
+ diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
41
+ index 62c0f62..7923202 100644
42
+ --- a/include/CMakeLists.txt
43
+ +++ b/include/CMakeLists.txt
44
+ @@ -1,10 +1,14 @@
45
+ option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON)
46
+
47
+ +configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h)
48
+ +
49
+ if(INSTALL_MBEDTLS_HEADERS)
50
+
51
+ file(GLOB headers "mbedtls/*.h")
52
+ file(GLOB psa_headers "psa/*.h")
53
+ -
54
+ +
55
+ + set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h)
56
+ +
57
+ install(FILES ${headers}
58
+ DESTINATION include/mbedtls
59
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
60
+ diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
61
+ index 1e6e052..51c20da 100644
62
+ --- a/include/mbedtls/config.h
63
+ +++ b/include/mbedtls/config.h
64
+ @@ -24,6 +24,8 @@
65
+ * limitations under the License.
66
+ */
67
+
68
+ +#include "mbedtls/config_threading.h"
69
+ +
70
+ #ifndef MBEDTLS_CONFIG_H
71
+ #define MBEDTLS_CONFIG_H
72
+
73
+ diff --git a/include/mbedtls/config_threading.h.in b/include/mbedtls/config_threading.h.in
74
+ new file mode 100644
75
+ index 0000000..9d5d42e
76
+ --- /dev/null
77
+ +++ b/include/mbedtls/config_threading.h.in
78
+ @@ -0,0 +1,6 @@
79
+ +#cmakedefine ENABLE_PTHREAD
80
+ +
81
+ +#ifdef ENABLE_PTHREAD
82
+ +#define MBEDTLS_THREADING_C
83
+ +#define MBEDTLS_THREADING_PTHREAD
84
+ +#endif
85
+
86
+ diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
87
+ index 33e2cfc..4b99331 100644
88
+ --- a/library/CMakeLists.txt
89
+ +++ b/library/CMakeLists.txt
90
+ @@ -137,7 +137,11 @@ if(ENABLE_ZLIB_SUPPORT)
91
+ endif(ENABLE_ZLIB_SUPPORT)
92
+
93
+ if(LINK_WITH_PTHREAD)
94
+ - set(libs ${libs} pthread)
95
+ + if(WIN32)
96
+ + set(libs ${libs} ${PThreads4W_LIBRARY})
97
+ + else()
98
+ + set(libs ${libs} pthread)
99
+ + endif()
100
+ endif()
101
+
102
+ if(LINK_WITH_TRUSTED_STORAGE)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/portfile.cmake ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ set(VCPKG_LIBRARY_LINKAGE static)
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO ARMmbed/mbedtls
6
+ REF 8b3f26a5ac38d4fdccbc5c5366229f3e01dafcc0 # mbedtls-2.28.0
7
+ SHA512 a5d2694ae87347be7ebf5c32b86d7bb809cc696b549947efb3d12d41d5f726d4f7caed3cc6ee3f3c9b9e46b3c42c4ce8a5f9741b1b0a3c644b6ae615d2f4c55a
8
+ HEAD_REF mbedtls-2.28
9
+ PATCHES
10
+ enable-pthread.patch
11
+ )
12
+
13
+ vcpkg_check_features(
14
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
15
+ FEATURES
16
+ pthreads ENABLE_PTHREAD
17
+ )
18
+
19
+ vcpkg_cmake_configure(
20
+ SOURCE_PATH ${SOURCE_PATH}
21
+ OPTIONS
22
+ ${FEATURE_OPTIONS}
23
+ -DENABLE_TESTING=OFF
24
+ -DENABLE_PROGRAMS=OFF
25
+ -DMBEDTLS_FATAL_WARNINGS=FALSE
26
+ )
27
+
28
+ vcpkg_cmake_install()
29
+
30
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
31
+
32
+ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
33
+
34
+ if (VCPKG_TARGET_IS_WINDOWS AND pthreads IN_LIST FEATURES)
35
+ file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
36
+ endif ()
37
+
38
+ vcpkg_copy_pdbs()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/vcpkg-cmake-wrapper.cmake ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ include(FindPackageHandleStandardArgs)
2
+
3
+ find_path(MBEDTLS_INCLUDE_DIR mbedtls/ssl.h)
4
+
5
+ find_library(MBEDTLS_CRYPTO_LIBRARY mbedcrypto)
6
+ find_package(pthreads_windows QUIET)
7
+ set(MBEDTLS_CRYPTO_LIBRARY ${MBEDTLS_CRYPTO_LIBRARY} ${PThreads4W_LIBRARY})
8
+ find_library(MBEDTLS_X509_LIBRARY mbedx509)
9
+ find_library(MBEDTLS_TLS_LIBRARY mbedtls)
10
+ set(MBEDTLS_LIBRARIES ${MBEDTLS_CRYPTO_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_TLS_LIBRARY})
11
+
12
+ if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h")
13
+ file(
14
+ STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h _MBEDTLS_VERLINE
15
+ REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*"
16
+ )
17
+ string(REGEX REPLACE ".*MBEDTLS_VERSION_STRING[\t ]+\"(.*)\"" "\\1" MBEDTLS_VERSION ${_MBEDTLS_VERLINE})
18
+ endif()
19
+
20
+ find_package_handle_standard_args(
21
+ mbedTLS
22
+ REQUIRED_VARS
23
+ MBEDTLS_INCLUDE_DIR
24
+ MBEDTLS_CRYPTO_LIBRARY
25
+ MBEDTLS_X509_LIBRARY
26
+ MBEDTLS_TLS_LIBRARY
27
+ PThreads4W_FOUND
28
+ VERSION_VAR MBEDTLS_VERSION
29
+ )
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mbedtls/vcpkg.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mbedtls",
3
+ "version": "2.28.0",
4
+ "description": "An open source, portable, easy to use, readable and flexible SSL library",
5
+ "homepage": "https://github.com/ARMmbed/mbedtls",
6
+ "license": "Apache-2.0",
7
+ "supports": "!uwp",
8
+ "dependencies": [
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ },
13
+ {
14
+ "name": "vcpkg-cmake-config",
15
+ "host": true
16
+ }
17
+ ],
18
+ "features": {
19
+ "pthreads": {
20
+ "description": "Multi-threading support",
21
+ "dependencies": [
22
+ {
23
+ "name": "pthreads",
24
+ "platform": "windows"
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From d2625f80e08ff811a173ca3dbe76a0e004c26c65 Mon Sep 17 00:00:00 2001
2
+ From: Nicole Mazzuca <[email protected]>
3
+ Date: Tue, 22 Sep 2020 16:21:43 -0700
4
+ Subject: [PATCH] fix _POSIX_C_SOURCE
5
+
6
+ set it to correctly ask for 200112L, for readlink
7
+ ---
8
+ configed.H | 8 +-------
9
+ 1 file changed, 1 insertion(+), 7 deletions(-)
10
+
11
+ diff --git a/configed.H b/configed.H
12
+ index 2e01c15..250f441 100644
13
+ --- a/configed.H
14
+ +++ b/configed.H
15
+ @@ -189,19 +189,13 @@
16
+ #define _POSIX_ 1
17
+ #define _POSIX_SOURCE 1
18
+ #ifndef _POSIX_C_SOURCE
19
+ -#define _POSIX_C_SOURCE 1
20
+ +#define _POSIX_C_SOURCE 200112L
21
+ #define _POSIX_C_SOURCE_defined 1
22
+ #endif
23
+ #include "limits.h"
24
+ #ifdef _AIX
25
+ #include "sys/stat.h"
26
+ #endif
27
+ -#undef _POSIX_
28
+ -#undef _POSIX_SOURCE
29
+ -#ifdef _POSIX_C_SOURCE_defined
30
+ -#undef _POSIX_C_SOURCE
31
+ -#undef _POSIX_C_SOURCE_defined
32
+ -#endif
33
+ #define CHARBIT CHAR_BIT
34
+ #define UCHARMAX UCHAR_MAX
35
+ #define USHRTMAX USHRT_MAX
36
+ --
37
+ 2.24.3 (Apple Git-128)
38
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mcpp/portfile.cmake ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO zeroc-ice/mcpp
4
+ REF e6abf9a561294b667bb931b80cf749c9be2d1a2f
5
+ SHA512 131b68401683bcfb947ac4969a59aa4c1683412c30f76c50e9e9c5c952a881b9950127db2ef22c96968d8c90d26bcdb5a90fb1b77d4dda7dee67bfe4a2676b35
6
+ HEAD_REF master
7
+ PATCHES
8
+ 0001-fix-_POSIX_C_SOURCE.patch
9
+ )
10
+
11
+ vcpkg_configure_cmake(
12
+ SOURCE_PATH ${SOURCE_PATH}
13
+ PREFER_NINJA
14
+ )
15
+
16
+ vcpkg_install_cmake()
17
+
18
+ file(
19
+ INSTALL
20
+ ${SOURCE_PATH}/mcpp_lib.h
21
+ ${SOURCE_PATH}/mcpp_out.h
22
+ DESTINATION
23
+ ${CURRENT_PACKAGES_DIR}/include
24
+ )
25
+
26
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
27
+
28
+ file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mcpp/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mcpp",
3
+ "version-string": "2.7.2.14",
4
+ "port-version": 3,
5
+ "description": "Fork of mcpp, a C/C++ preprocessor",
6
+ "homepage": "https://github.com/zeroc-ice/mcpp"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdns/portfile.cmake ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #header-only library
2
+
3
+ vcpkg_from_github(
4
+ OUT_SOURCE_PATH SOURCE_PATH
5
+ REPO mjansson/mdns
6
+ REF 1.4.1
7
+ SHA512 f1268841b5e4ba40ba62e7e08d55ac7f83b675f76c694976097a1c17dd6c662ced953230a4556b81ff5a39a969c67e01d040f1b6c83b9dd27b2cb0adc6af05b9
8
+ HEAD_REF master
9
+ )
10
+
11
+ vcpkg_cmake_configure(
12
+ SOURCE_PATH "${SOURCE_PATH}"
13
+ OPTIONS
14
+ -DMDNS_BUILD_EXAMPLE=OFF
15
+ )
16
+
17
+ vcpkg_cmake_install()
18
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
19
+
20
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdns/vcpkg.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mdns",
3
+ "version": "1.4.1",
4
+ "description": "Public domain mDNS/DNS-SD library in C",
5
+ "homepage": "https://github.com/mjansson/mdns",
6
+ "dependencies": [
7
+ {
8
+ "name": "vcpkg-cmake",
9
+ "host": true
10
+ }
11
+ ]
12
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdnsresponder/portfile.cmake ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_download_distfile(ARCHIVE
2
+ URLS https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-878.270.2.tar.gz
3
+ FILENAME mDNSResponder-878.270.2.tar.gz
4
+ SHA512 dbc1805c757fceb2b37165ad2575e4084447c10f47ddc871f5476e25affd91f5f759662c17843e30857a9ea1ffd25132bc8012737cf22700ac329713e6a3ac0a
5
+ )
6
+
7
+ vcpkg_extract_source_archive_ex(
8
+ OUT_SOURCE_PATH SOURCE_PATH
9
+ ARCHIVE ${ARCHIVE}
10
+ )
11
+
12
+ IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
13
+ SET(BUILD_ARCH "Win32")
14
+ ELSE()
15
+ SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
16
+ ENDIF()
17
+
18
+ function(FIX_VCXPROJ VCXPROJ_PATH)
19
+ file(READ ${VCXPROJ_PATH} ORIG)
20
+ if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic")
21
+ string(REGEX REPLACE
22
+ "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
23
+ "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
24
+ ORIG "${ORIG}")
25
+ string(REGEX REPLACE
26
+ "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
27
+ "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
28
+ ORIG "${ORIG}")
29
+ else()
30
+ string(REGEX REPLACE
31
+ "<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>"
32
+ "<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>"
33
+ ORIG "${ORIG}")
34
+ string(REGEX REPLACE
35
+ "<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>"
36
+ "<RuntimeLibrary>MultiThreaded</RuntimeLibrary>"
37
+ ORIG "${ORIG}")
38
+ endif()
39
+ if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic")
40
+ string(REPLACE
41
+ "<ConfigurationType>StaticLibrary</ConfigurationType>"
42
+ "<ConfigurationType>DynamicLibrary</ConfigurationType>"
43
+ ORIG "${ORIG}")
44
+ else()
45
+ string(REPLACE
46
+ "<ConfigurationType>DynamicLibrary</ConfigurationType>"
47
+ "<ConfigurationType>StaticLibrary</ConfigurationType>"
48
+ ORIG "${ORIG}")
49
+ endif()
50
+
51
+ string(REPLACE
52
+ "<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>"
53
+ "<DebugInformationFormat>OldStyle</DebugInformationFormat>"
54
+ ORIG "${ORIG}")
55
+ file(WRITE ${VCXPROJ_PATH} "${ORIG}")
56
+ endfunction()
57
+
58
+ FIX_VCXPROJ("${SOURCE_PATH}/mDNSWindows/DLL/dnssd.vcxproj")
59
+ FIX_VCXPROJ("${SOURCE_PATH}/Clients/DNS-SD.VisualStudio/dns-sd.vcxproj")
60
+
61
+ vcpkg_build_msbuild(
62
+ PROJECT_PATH "${SOURCE_PATH}/mDNSResponder.sln"
63
+ PLATFORM ${BUILD_ARCH}
64
+ TARGET dns-sd
65
+ )
66
+
67
+ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
68
+ file(INSTALL
69
+ "${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Release/dnssd.dll"
70
+ DESTINATION "${CURRENT_PACKAGES_DIR}/bin"
71
+ )
72
+ file(INSTALL
73
+ "${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Debug/dnssd.dll"
74
+ DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin"
75
+ )
76
+ endif()
77
+ file(INSTALL
78
+ "${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Release/dnssd.lib"
79
+ DESTINATION "${CURRENT_PACKAGES_DIR}/lib"
80
+ )
81
+ file(INSTALL
82
+ "${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Debug/dnssd.lib"
83
+ DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib"
84
+ )
85
+ file(INSTALL
86
+ "${SOURCE_PATH}/mDNSShared/dns_sd.h"
87
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include"
88
+ )
89
+ file(INSTALL
90
+ "${SOURCE_PATH}/LICENSE"
91
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright"
92
+ )
93
+ vcpkg_copy_pdbs()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdnsresponder/vcpkg.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mdnsresponder",
3
+ "version": "878.270.2",
4
+ "port-version": 1,
5
+ "description": "The mDNSResponder project is a component of Bonjour, Apple's ease-of-use IP networking initiative.",
6
+ "homepage": "https://developer.apple.com/bonjour/",
7
+ "supports": "windows & !uwp & !arm"
8
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdspan/portfile.cmake ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO kokkos/mdspan
4
+ REF aced2cebd362a1e15830da030bd16748131d28bd # stable as of 2021-11-03
5
+ SHA512 a1950430be537497fb84c4a8c5e681cacead93512775098f38ea6c1a20b95d0f7110d9d0802fbdcf8ce3c40ade766cc697773f6ea6fcf8c363b3ebee55620f7c
6
+ HEAD_REF stable
7
+ )
8
+
9
+ vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
10
+
11
+ vcpkg_cmake_install()
12
+
13
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/mdspan)
14
+
15
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/debug")
16
+
17
+ vcpkg_copy_pdbs()
18
+
19
+ file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mdspan/vcpkg.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mdspan",
3
+ "version-date": "2021-11-03",
4
+ "description": "A non-owning multi-dimensional array reference type.",
5
+ "homepage": "https://github.com/kokkos/mdspan",
6
+ "dependencies": [
7
+ {
8
+ "name": "vcpkg-cmake",
9
+ "host": true
10
+ },
11
+ {
12
+ "name": "vcpkg-cmake-config",
13
+ "host": true
14
+ }
15
+ ]
16
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/CMakeLists.txt ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
2
+
3
+ PROJECT(mecab VERSION 1.0)
4
+
5
+ file(GLOB SOURCE_FILE
6
+ "*.cpp"
7
+ "*.c"
8
+ )
9
+ file(GLOB HEADERS_FILE
10
+ "*.h"
11
+ )
12
+
13
+ message(STATUS "current cmake path: ${CMAKE_CURRENT_SOURCE_DIR}")
14
+ list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-cost-train.cpp)
15
+ list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-dict-gen.cpp)
16
+ list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-dict-index.cpp)
17
+ list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-system-eval.cpp)
18
+ list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-test-gen.cpp)
19
+ #list(REMOVE_ITEM SOURCE_FILE "mecab-cost-train.cpp" "mecab-dict-gen.cpp" "mecab-dict-index.cpp" "mecab-system-eval.cpp" "mecab-test-gen.cpp")
20
+
21
+ add_library (mecab ${SOURCE_FILE})
22
+ target_include_directories(mecab PUBLIC
23
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
24
+ $<INSTALL_INTERFACE:include>)
25
+
26
+ if(UNIX)
27
+ target_compile_definitions(mecab PUBLIC -DHAVE_UNISTD_H -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_TYPES_H -DHAVE_SYS_STAT_H -DHAVE_DIRENT_H -DDIC_VERSION=102 -DVERSION="@VERSION@" -DPACKAGE="mecab" -DMECAB_DEFAULT_RC="./mecabrc")
28
+ endif(UNIX)
29
+ if(WIN32)
30
+ target_compile_definitions(mecab PUBLIC -D_CRT_SECURE_NO_DEPRECATE -DMECAB_USE_THREAD -DDLL_EXPORT -DHAVE_GETENV -DHAVE_WINDOWS_H -DDIC_VERSION=102 -DVERSION="@VERSION@" -DPACKAGE="mecab" -DUNICODE -D_UNICODE -DMECAB_DEFAULT_RC="mecabrc")
31
+ endif(WIN32)
32
+
33
+
34
+ include (GNUInstallDirs)
35
+ include(CMakePackageConfigHelpers)
36
+
37
+ set (mecab_CMAKE_DIR share/mecab CACHE STRING "Installation dir")
38
+ set (targets_export_name mecabTargets CACHE INTERNAL "")
39
+
40
+ install(TARGETS mecab
41
+ EXPORT ${targets_export_name}
42
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
43
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
44
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
45
+ )
46
+
47
+ install(FILES ${HEADERS_FILE} DESTINATION include/mecab CONFIGURATIONS Release)
48
+
49
+ install(EXPORT ${targets_export_name}
50
+ NAMESPACE mecab::
51
+ DESTINATION ${mecab_CMAKE_DIR})
52
+
53
+ configure_package_config_file(
54
+ "${PROJECT_SOURCE_DIR}/Config.cmake.in"
55
+ "${PROJECT_BINARY_DIR}/mecabConfig.cmake"
56
+ INSTALL_DESTINATION ${mecab_CMAKE_DIR})
57
+
58
+
59
+ write_basic_package_version_file(
60
+ ${PROJECT_BINARY_DIR}/mecabConfigVersion.cmake
61
+ VERSION ${PROJECT_VERSION}
62
+ COMPATIBILITY SameMajorVersion )
63
+
64
+ install(FILES
65
+ ${PROJECT_BINARY_DIR}/mecabConfig.cmake
66
+ ${PROJECT_BINARY_DIR}/mecabConfigVersion.cmake
67
+ DESTINATION ${mecab_CMAKE_DIR})
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/Config.cmake.in ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ @PACKAGE_INIT@
2
+
3
+ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
4
+ check_required_components(mecab)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/fix_wpath_unsigned.patch ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/mecab/src/common.h b/mecab/src/common.h
2
+ index d1fc459..2951d5a 100644
3
+ --- a/mecab/src/common.h
4
+ +++ b/mecab/src/common.h
5
+ @@ -86,7 +86,8 @@
6
+ #define WPATH_FORCE(path) (MeCab::Utf8ToWide(path).c_str())
7
+ #define WPATH(path) (path)
8
+ #else
9
+ -#define WPATH(path) WPATH_FORCE(path)
10
+ +#define WPATH_FORCE(path) (MeCab::Utf8ToWide(path).c_str())
11
+ +#define WPATH(path) (path)
12
+ #endif
13
+ #else
14
+ #define WPATH_FORCE(path) (path)
15
+ diff --git a/mecab/src/feature_index.cpp b/mecab/src/feature_index.cpp
16
+ index 051bdf8..fdd0145 100644
17
+ --- a/mecab/src/feature_index.cpp
18
+ +++ b/mecab/src/feature_index.cpp
19
+ @@ -353,7 +353,7 @@ bool FeatureIndex::buildUnigramFeature(LearnerPath *path,
20
+ if (!r) goto NEXT;
21
+ os_ << r;
22
+ } break;
23
+ - case 't': os_ << (size_t)path->rnode->char_type; break;
24
+ + case 't': os_ << (int)(size_t)path->rnode->char_type; break;
25
+ case 'u': os_ << ufeature; break;
26
+ case 'w':
27
+ if (path->rnode->stat == MECAB_NOR_NODE) {
28
+ diff --git a/mecab/src/writer.cpp b/mecab/src/writer.cpp
29
+ index 0ef6975..f068fa3 100644
30
+ --- a/mecab/src/writer.cpp
31
+ +++ b/mecab/src/writer.cpp
32
+ @@ -257,7 +257,7 @@ bool Writer::writeNode(Lattice *lattice,
33
+ // input sentence
34
+ case 'S': os->write(lattice->sentence(), lattice->size()); break;
35
+ // sentence length
36
+ - case 'L': *os << lattice->size(); break;
37
+ + case 'L': *os << (int)lattice->size(); break;
38
+ // morph
39
+ case 'm': os->write(node->surface, node->length); break;
40
+ case 'M': os->write(reinterpret_cast<const char *>
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/portfile.cmake ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (VCPKG_TARGET_TRIPLET STREQUAL "x64-uwp" OR VCPKG_TARGET_TRIPLET STREQUAL "arm64-windows" OR VCPKG_TARGET_TRIPLET STREQUAL "arm-uwp")
2
+ message(FATAL_ERROR "mecab does not support on this platform")
3
+ endif()
4
+
5
+ vcpkg_from_github(
6
+ OUT_SOURCE_PATH SOURCE_PATH
7
+ REPO taku910/mecab
8
+ REF 3a07c4eefaffb4e7a0690a7f4e5e0263d3ddb8a3
9
+ SHA512 d3288cca7207daf66df4349819b64fc9cc069c775512cf0607ca855e9e5512509c36b0e2bb0e955478acae13ff0c35df7442f18a8458fab0ed664d62854c0b25
10
+ HEAD_REF master
11
+ PATCHES
12
+ fix_wpath_unsigned.patch
13
+ )
14
+
15
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/mecab/src)
16
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/mecab/src)
17
+ file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${SOURCE_PATH}/mecab/src)
18
+
19
+ vcpkg_configure_cmake(
20
+ SOURCE_PATH ${SOURCE_PATH}/mecab/src
21
+ )
22
+
23
+ vcpkg_install_cmake()
24
+ vcpkg_fixup_cmake_targets()
25
+ vcpkg_copy_pdbs()
26
+
27
+ file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mecab)
28
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share/mecab/COPYING ${CURRENT_PACKAGES_DIR}/share/mecab/copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mecab/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mecab",
3
+ "version-string": "2019-09-25",
4
+ "port-version": 2,
5
+ "description": "A morphological analysis engine based on CRF",
6
+ "supports": "!(uwp | arm | arm64)"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/memorymodule/portfile.cmake ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO fancycode/MemoryModule
4
+ REF 5f83e41c3a3e7c6e8284a5c1afa5a38790809461
5
+ SHA512 6d42bd80dfeaf7bc662adafe7d6a7d7301eff5ea53bb59fce7e9c1a6ee22d31d2ab5696afc0a92c1501aa4161a60366418bfc3bed7ed2dcb6cae24243f4fa6d4
6
+ HEAD_REF master
7
+ )
8
+
9
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
10
+
11
+ vcpkg_check_features(
12
+ OUT_FEATURE_OPTIONS FEATURE_OPTIONS
13
+ FEATURES
14
+ unicode UNICODE
15
+ )
16
+
17
+ vcpkg_cmake_configure(
18
+ SOURCE_PATH "${SOURCE_PATH}"
19
+ DISABLE_PARALLEL_CONFIGURE
20
+ OPTIONS
21
+ -DTESTSUITE=OFF
22
+ ${FEATURE_OPTIONS}
23
+ )
24
+
25
+ vcpkg_cmake_build(TARGET MemoryModule)
26
+
27
+ file(INSTALL "${SOURCE_PATH}/MemoryModule.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
28
+
29
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib")
30
+ file(INSTALL
31
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib"
32
+ DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib"
33
+ )
34
+ endif()
35
+
36
+ if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib")
37
+ file(INSTALL
38
+ "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib"
39
+ DESTINATION "${CURRENT_PACKAGES_DIR}/lib"
40
+ )
41
+ endif()
42
+
43
+ file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/memorymodule/vcpkg.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "memorymodule",
3
+ "version-string": "2019-12-31",
4
+ "port-version": 2,
5
+ "description": "Library to load a DLL from memory",
6
+ "homepage": "https://github.com/fancycode/MemoryModule",
7
+ "supports": "!linux & !osx & !uwp",
8
+ "dependencies": [
9
+ {
10
+ "name": "vcpkg-cmake",
11
+ "host": true
12
+ }
13
+ ],
14
+ "default-features": [
15
+ "unicode"
16
+ ],
17
+ "features": {
18
+ "unicode": {
19
+ "description": "Compile with UNICODE support"
20
+ }
21
+ }
22
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/d3d10sw.patch ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/gallium/frontends/d3d10umd/D3DKMT.cpp b/src/gallium/frontends/d3d10umd/D3DKMT.cpp
2
+ index 1649eddc41e8f17fd9e0854acbb8e0c882d94cb5..dc31e9931876cac6ae4e52a80f6da7aa5284415c 100644
3
+ --- a/src/gallium/frontends/d3d10umd/D3DKMT.cpp
4
+ +++ b/src/gallium/frontends/d3d10umd/D3DKMT.cpp
5
+ @@ -244,7 +244,7 @@ D3DKMTGetMultisampleMethodList(D3DKMT_GETMULTISAMPLEMETHODLIST *pData)
6
+
7
+
8
+ EXTERN_C NTSTATUS APIENTRY
9
+ -D3DKMTPresent(CONST D3DKMT_PRESENT *pData)
10
+ +D3DKMTPresent(D3DKMT_PRESENT *pData)
11
+ {
12
+ LOG_UNSUPPORTED_ENTRYPOINT();
13
+ return STATUS_NOT_IMPLEMENTED;
14
+ @@ -409,7 +409,7 @@ D3DKMTSetVidPnSourceOwner(CONST D3DKMT_SETVIDPNSOURCEOWNER *pData)
15
+
16
+
17
+ EXTERN_C NTSTATUS APIENTRY
18
+ -D3DKMTSetVidPnSourceOwner1(const void *pData)
19
+ +D3DKMTSetVidPnSourceOwner1(CONST D3DKMT_SETVIDPNSOURCEOWNER1 *pData)
20
+ {
21
+ LOG_UNSUPPORTED_ENTRYPOINT();
22
+ return STATUS_NOT_IMPLEMENTED;
23
+ diff --git a/src/gallium/frontends/d3d10umd/Device.cpp b/src/gallium/frontends/d3d10umd/Device.cpp
24
+ index afca18819ce04f28b23fee9ebdaa57b52a04426c..cd2c6cd9180eb03612500aa8d8475994a2f836fc 100644
25
+ --- a/src/gallium/frontends/d3d10umd/Device.cpp
26
+ +++ b/src/gallium/frontends/d3d10umd/Device.cpp
27
+ @@ -32,7 +32,7 @@
28
+
29
+
30
+ #include "Draw.h"
31
+ -#include "Dxgi.h"
32
+ +#include "DxgiFns.h"
33
+ #include "InputAssembly.h"
34
+ #include "OutputMerger.h"
35
+ #include "Query.h"
36
+ diff --git a/src/gallium/frontends/d3d10umd/DriverIncludes.h b/src/gallium/frontends/d3d10umd/DriverIncludes.h
37
+ index e78d46fafc55557f3266e700fdc2a72305827ce6..c7df64042b5b013680ec3c8190cfac7b4b958ded 100644
38
+ --- a/src/gallium/frontends/d3d10umd/DriverIncludes.h
39
+ +++ b/src/gallium/frontends/d3d10umd/DriverIncludes.h
40
+ @@ -43,12 +43,21 @@
41
+
42
+ #include <windows.h>
43
+
44
+ -#include "winddk/winddk_compat.h"
45
+ +#include "winddk_compat.h"
46
+
47
+ //typedef LARGE_INTEGER PHYSICAL_ADDRESS;
48
+ //typedef __success(return >= 0) LONG NTSTATUS;
49
+
50
+ -#define D3D10DDI_MINOR_HEADER_VERSION 1
51
+ +#define D3D10DDI_MINOR_HEADER_VERSION 2
52
+ +
53
+ +/* Unfortunately WinDDK's d3d10umddi.h defines D3D10.x constants as global
54
+ + * const variables instead of preprocessor defines, causing LINK to fail due
55
+ + * to duplicate symbols. Include d3d10_1.h to avoid the issue.
56
+ + */
57
+ +#ifdef _MSC_VER
58
+ +#include <d3d10_1.h>
59
+ +#endif
60
+ +
61
+ #include <d3d10umddi.h>
62
+
63
+ #include "Debug.h"
64
+ diff --git a/src/gallium/frontends/d3d10umd/Dxgi.cpp b/src/gallium/frontends/d3d10umd/DxgiFns.cpp
65
+ similarity index 97%
66
+ rename from src/gallium/frontends/d3d10umd/Dxgi.cpp
67
+ rename to src/gallium/frontends/d3d10umd/DxgiFns.cpp
68
+ index 253f81ed283b55dd4bff29df8658f386c08cbc95..cd844a2b0fa19e23c46da0ddc3a92a9a2c9d81b6 100644
69
+ --- a/src/gallium/frontends/d3d10umd/Dxgi.cpp
70
+ +++ b/src/gallium/frontends/d3d10umd/DxgiFns.cpp
71
+ @@ -26,13 +26,13 @@
72
+ **************************************************************************/
73
+
74
+ /*
75
+ - * Dxgi.cpp --
76
+ + * DxgiFns.cpp --
77
+ * DXGI related functions.
78
+ */
79
+
80
+ #include <stdio.h>
81
+
82
+ -#include "Dxgi.h"
83
+ +#include "DxgiFns.h"
84
+ #include "Format.h"
85
+ #include "State.h"
86
+
87
+ @@ -97,11 +97,11 @@ _Present(DXGI_DDI_ARG_PRESENT *pPresentData)
88
+
89
+ void *map;
90
+ struct pipe_transfer *transfer;
91
+ - map = pipe_transfer_map(pipe,
92
+ - pSrcResource->resource,
93
+ - 0, 0, PIPE_MAP_READ,
94
+ - 0, 0, w, h,
95
+ - &transfer);
96
+ + map = pipe_texture_map(pipe,
97
+ + pSrcResource->resource,
98
+ + 0, 0, PIPE_MAP_READ,
99
+ + 0, 0, w, h,
100
+ + &transfer);
101
+ if (map) {
102
+
103
+ BITMAPINFO bmi;
104
+ @@ -172,7 +172,7 @@ _Present(DXGI_DDI_ARG_PRESENT *pPresentData)
105
+ DeleteDC(hdcMem);
106
+ DeleteObject(hBmp);
107
+
108
+ - pipe_transfer_unmap(pipe, transfer);
109
+ + pipe_texture_unmap(pipe, transfer);
110
+ }
111
+
112
+ ReleaseDC(hWnd, hDC);
113
+ diff --git a/src/gallium/frontends/d3d10umd/Dxgi.h b/src/gallium/frontends/d3d10umd/DxgiFns.h
114
+ similarity index 96%
115
+ rename from src/gallium/frontends/d3d10umd/Dxgi.h
116
+ rename to src/gallium/frontends/d3d10umd/DxgiFns.h
117
+ index dedc2542d6ab016111a78b713b9cbe54581ba92a..3689faa307c07deb62c3f5c39b4788dd8d60cb35 100644
118
+ --- a/src/gallium/frontends/d3d10umd/Dxgi.h
119
+ +++ b/src/gallium/frontends/d3d10umd/DxgiFns.h
120
+ @@ -26,8 +26,8 @@
121
+ **************************************************************************/
122
+
123
+ /*
124
+ - * Dxgi.h --
125
+ - * Functions that manipulate GPU resources.
126
+ + * DxgiFns.h --
127
+ + * DXGI related functions
128
+ */
129
+
130
+ #ifndef WRAP_DXGI_H
131
+ diff --git a/src/gallium/frontends/d3d10umd/Resource.cpp b/src/gallium/frontends/d3d10umd/Resource.cpp
132
+ index a7910d2e3cf186597bb35d7c5a98464c4e844cf7..3dd91365b23e5608108a0e09e1296cb0a7bc65df 100644
133
+ --- a/src/gallium/frontends/d3d10umd/Resource.cpp
134
+ +++ b/src/gallium/frontends/d3d10umd/Resource.cpp
135
+ @@ -270,6 +270,7 @@ CreateResource(D3D10DDI_HDEVICE hDevice, // IN
136
+
137
+ templat.target = translate_texture_target( pCreateResource->ResourceDimension,
138
+ pCreateResource->ArraySize );
139
+ + pResource->buffer = templat.target == PIPE_BUFFER;
140
+
141
+ if (pCreateResource->Format == DXGI_FORMAT_UNKNOWN) {
142
+ assert(pCreateResource->ResourceDimension == D3D10DDIRESOURCE_BUFFER);
143
+ @@ -315,37 +316,62 @@ CreateResource(D3D10DDI_HDEVICE hDevice, // IN
144
+ sizeof *pResource->transfers);
145
+
146
+ if (pCreateResource->pInitialDataUP) {
147
+ - for (UINT SubResource = 0; SubResource < pResource->NumSubResources; ++SubResource) {
148
+ + if (pResource->buffer) {
149
+ + assert(pResource->NumSubResources == 1);
150
+ const D3D10_DDIARG_SUBRESOURCE_UP* pInitialDataUP =
151
+ - &pCreateResource->pInitialDataUP[SubResource];
152
+ + &pCreateResource->pInitialDataUP[0];
153
+
154
+ unsigned level;
155
+ struct pipe_box box;
156
+ - subResourceBox(pResource->resource, SubResource, &level, &box);
157
+ + subResourceBox(pResource->resource, 0, &level, &box);
158
+
159
+ struct pipe_transfer *transfer;
160
+ void *map;
161
+ - map = pipe->transfer_map(pipe,
162
+ - pResource->resource,
163
+ - level,
164
+ - PIPE_MAP_WRITE |
165
+ - PIPE_MAP_UNSYNCHRONIZED,
166
+ - &box,
167
+ - &transfer);
168
+ + map = pipe->buffer_map(pipe,
169
+ + pResource->resource,
170
+ + level,
171
+ + PIPE_MAP_WRITE |
172
+ + PIPE_MAP_UNSYNCHRONIZED,
173
+ + &box,
174
+ + &transfer);
175
+ assert(map);
176
+ if (map) {
177
+ - for (int z = 0; z < box.depth; ++z) {
178
+ - ubyte *dst = (ubyte*)map + z*transfer->layer_stride;
179
+ - const ubyte *src = (const ubyte*)pInitialDataUP->pSysMem + z*pInitialDataUP->SysMemSlicePitch;
180
+ - util_copy_rect(dst,
181
+ - templat.format,
182
+ - transfer->stride,
183
+ - 0, 0, box.width, box.height,
184
+ - src,
185
+ - pInitialDataUP->SysMemPitch,
186
+ - 0, 0);
187
+ + memcpy(map, pInitialDataUP->pSysMem, box.width);
188
+ + pipe_buffer_unmap(pipe, transfer);
189
+ + }
190
+ + } else {
191
+ + for (UINT SubResource = 0; SubResource < pResource->NumSubResources; ++SubResource) {
192
+ + const D3D10_DDIARG_SUBRESOURCE_UP* pInitialDataUP =
193
+ + &pCreateResource->pInitialDataUP[SubResource];
194
+ +
195
+ + unsigned level;
196
+ + struct pipe_box box;
197
+ + subResourceBox(pResource->resource, SubResource, &level, &box);
198
+ +
199
+ + struct pipe_transfer *transfer;
200
+ + void *map;
201
+ + map = pipe->texture_map(pipe,
202
+ + pResource->resource,
203
+ + level,
204
+ + PIPE_MAP_WRITE |
205
+ + PIPE_MAP_UNSYNCHRONIZED,
206
+ + &box,
207
+ + &transfer);
208
+ + assert(map);
209
+ + if (map) {
210
+ + for (int z = 0; z < box.depth; ++z) {
211
+ + ubyte *dst = (ubyte*)map + z*transfer->layer_stride;
212
+ + const ubyte *src = (const ubyte*)pInitialDataUP->pSysMem + z*pInitialDataUP->SysMemSlicePitch;
213
+ + util_copy_rect(dst,
214
+ + templat.format,
215
+ + transfer->stride,
216
+ + 0, 0, box.width, box.height,
217
+ + src,
218
+ + pInitialDataUP->SysMemPitch,
219
+ + 0, 0);
220
+ + }
221
+ + pipe_texture_unmap(pipe, transfer);
222
+ }
223
+ - pipe_transfer_unmap(pipe, transfer);
224
+ }
225
+ }
226
+ }
227
+ @@ -423,7 +449,11 @@ DestroyResource(D3D10DDI_HDEVICE hDevice, // IN
228
+
229
+ for (UINT SubResource = 0; SubResource < pResource->NumSubResources; ++SubResource) {
230
+ if (pResource->transfers[SubResource]) {
231
+ - pipe_transfer_unmap(pipe, pResource->transfers[SubResource]);
232
+ + if (pResource->buffer) {
233
+ + pipe_buffer_unmap(pipe, pResource->transfers[SubResource]);
234
+ + } else {
235
+ + pipe_texture_unmap(pipe, pResource->transfers[SubResource]);
236
+ + }
237
+ pResource->transfers[SubResource] = NULL;
238
+ }
239
+ }
240
+ @@ -493,12 +523,21 @@ ResourceMap(D3D10DDI_HDEVICE hDevice, // IN
241
+ assert(!pResource->transfers[SubResource]);
242
+
243
+ void *map;
244
+ - map = pipe->transfer_map(pipe,
245
+ - resource,
246
+ - level,
247
+ - usage,
248
+ - &box,
249
+ - &pResource->transfers[SubResource]);
250
+ + if (pResource->buffer) {
251
+ + map = pipe->buffer_map(pipe,
252
+ + resource,
253
+ + level,
254
+ + usage,
255
+ + &box,
256
+ + &pResource->transfers[SubResource]);
257
+ + } else {
258
+ + map = pipe->texture_map(pipe,
259
+ + resource,
260
+ + level,
261
+ + usage,
262
+ + &box,
263
+ + &pResource->transfers[SubResource]);
264
+ + }
265
+ if (!map) {
266
+ DebugPrintf("%s: failed to map resource\n", __FUNCTION__);
267
+ SetError(hDevice, E_FAIL);
268
+ @@ -534,7 +573,11 @@ ResourceUnmap(D3D10DDI_HDEVICE hDevice, // IN
269
+ assert(SubResource < pResource->NumSubResources);
270
+
271
+ if (pResource->transfers[SubResource]) {
272
+ - pipe_transfer_unmap(pipe, pResource->transfers[SubResource]);
273
+ + if (pResource->buffer) {
274
+ + pipe_buffer_unmap(pipe, pResource->transfers[SubResource]);
275
+ + } else {
276
+ + pipe_texture_unmap(pipe, pResource->transfers[SubResource]);
277
+ + }
278
+ pResource->transfers[SubResource] = NULL;
279
+ }
280
+ }
281
+ @@ -834,7 +877,8 @@ ResourceUpdateSubResourceUP(D3D10DDI_HDEVICE hDevice, // IN
282
+ }
283
+
284
+ struct pipe_context *pipe = pDevice->pipe;
285
+ - struct pipe_resource *dst_resource = CastPipeResource(hDstResource);
286
+ + Resource *pDstResource = CastResource(hDstResource);
287
+ + struct pipe_resource *dst_resource = pDstResource->resource;
288
+
289
+ unsigned level;
290
+ struct pipe_box box;
291
+ @@ -855,12 +899,21 @@ ResourceUpdateSubResourceUP(D3D10DDI_HDEVICE hDevice, // IN
292
+
293
+ struct pipe_transfer *transfer;
294
+ void *map;
295
+ - map = pipe->transfer_map(pipe,
296
+ - dst_resource,
297
+ - level,
298
+ - PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE,
299
+ - &box,
300
+ - &transfer);
301
+ + if (pDstResource->buffer) {
302
+ + map = pipe->buffer_map(pipe,
303
+ + dst_resource,
304
+ + level,
305
+ + PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE,
306
+ + &box,
307
+ + &transfer);
308
+ + } else {
309
+ + map = pipe->texture_map(pipe,
310
+ + dst_resource,
311
+ + level,
312
+ + PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE,
313
+ + &box,
314
+ + &transfer);
315
+ + }
316
+ assert(map);
317
+ if (map) {
318
+ for (int z = 0; z < box.depth; ++z) {
319
+ @@ -874,7 +927,11 @@ ResourceUpdateSubResourceUP(D3D10DDI_HDEVICE hDevice, // IN
320
+ RowPitch,
321
+ 0, 0);
322
+ }
323
+ - pipe_transfer_unmap(pipe, transfer);
324
+ + if (pDstResource->buffer) {
325
+ + pipe_buffer_unmap(pipe, transfer);
326
+ + } else {
327
+ + pipe_texture_unmap(pipe, transfer);
328
+ + }
329
+ }
330
+ }
331
+
332
+ diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.c b/src/gallium/frontends/d3d10umd/ShaderParse.c
333
+ index e4b6b88aa72909b6dc02c23dd13e442f9d3f4361..1995d381880d172ac49fe0d4461d439f35cf32b5 100644
334
+ --- a/src/gallium/frontends/d3d10umd/ShaderParse.c
335
+ +++ b/src/gallium/frontends/d3d10umd/ShaderParse.c
336
+ @@ -392,7 +392,7 @@ Shader_parse_opcode(struct Shader_parser *parser,
337
+ if (opcode_is_extended) {
338
+ /* NOTE: DECODE_IS_D3D10_SB_OPCODE_DOUBLE_EXTENDED is broken.
339
+ */
340
+ - assert(!((*curr & D3D10_SB_OPCODE_DOUBLE_EXTENDED_MASK) >> D3D10_SB_OPERAND_DOUBLE_EXTENDED_SHIFT));
341
+ + assert(!((*curr & D3D10_SB_OPERAND_DOUBLE_EXTENDED_MASK) >> D3D10_SB_OPERAND_DOUBLE_EXTENDED_SHIFT));
342
+
343
+ switch (DECODE_D3D10_SB_EXTENDED_OPCODE_TYPE(*curr)) {
344
+ case D3D10_SB_EXTENDED_OPCODE_EMPTY:
345
+ diff --git a/src/gallium/frontends/d3d10umd/ShaderParse.h b/src/gallium/frontends/d3d10umd/ShaderParse.h
346
+ index 5e8fba044ab5faf92f78d4f2bb75ec110752adb8..df95536f2b53eef900961f221100d4f2821a0f5d 100644
347
+ --- a/src/gallium/frontends/d3d10umd/ShaderParse.h
348
+ +++ b/src/gallium/frontends/d3d10umd/ShaderParse.h
349
+ @@ -35,9 +35,6 @@
350
+
351
+ #include "DriverIncludes.h"
352
+
353
+ -//#include "winddk/winddk_compat.h"
354
+ -#include "winddk/d3d10tokenizedprogramformat.hpp"
355
+ -
356
+ #ifdef __cplusplus
357
+ extern "C" {
358
+ #endif
359
+ diff --git a/src/gallium/frontends/d3d10umd/State.h b/src/gallium/frontends/d3d10umd/State.h
360
+ index 5cb865ce69573a16e24e14df88e53a0e48c80130..3e45cb797435b40da0a4a1f5476fab2aecca08fd 100644
361
+ --- a/src/gallium/frontends/d3d10umd/State.h
362
+ +++ b/src/gallium/frontends/d3d10umd/State.h
363
+ @@ -150,6 +150,7 @@ struct Resource
364
+ DXGI_FORMAT Format;
365
+ UINT MipLevels;
366
+ UINT NumSubResources;
367
+ + bool buffer;
368
+ struct pipe_resource *resource;
369
+ struct pipe_transfer **transfers;
370
+ struct pipe_stream_output_target *so_target;
371
+ diff --git a/src/gallium/frontends/d3d10umd/meson.build b/src/gallium/frontends/d3d10umd/meson.build
372
+ index 90774d9217d3ab5f4267974ae9018f55ab709f42..7141c8da17f7500b2d6e8e20faba9b5c70ab01d8 100644
373
+ --- a/src/gallium/frontends/d3d10umd/meson.build
374
+ +++ b/src/gallium/frontends/d3d10umd/meson.build
375
+ @@ -14,7 +14,7 @@ libd3d10umd = static_library(
376
+ 'Debug.cpp',
377
+ 'Device.cpp',
378
+ 'Draw.cpp',
379
+ - 'Dxgi.cpp',
380
+ + 'DxgiFns.cpp',
381
+ 'Format.cpp',
382
+ 'InputAssembly.cpp',
383
+ 'OutputMerger.cpp',
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/portfile.cmake ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Build-Depends: From X Window PR: zstd, drm (!windows), elfutils (!windows), wayland (!windows), wayland-protocols (!windows), xdamage, xshmfence (!windows), x11, xcb, xfixes, xext, xxf86vm, xrandr, xv, xvmc (!windows), egl-registry, opengl-registry, tool-meson
2
+ # Required LLVM modules: LLVM (modules: bitwriter, core, coroutines, engine, executionengine, instcombine, mcdisassembler, mcjit, scalaropts, transformutils) found: YES
3
+
4
+ # Patches are from https://github.com/pal1000/mesa-dist-win/tree/master/patches
5
+ set(PATCHES
6
+ # Fix swrAVX512 build
7
+ swravx512-post-static-link.patch
8
+ # Fix swr build with MSVC
9
+ swr-msvc-2.patch
10
+ # Fix swr build with LLVM 13
11
+ swr-llvm13.patch
12
+ # Fix radv MSVC build with LLVM 13
13
+ radv-msvc-llvm13-2.patch
14
+ # Fix d3d10sw MSVC build
15
+ d3d10sw.patch
16
+ )
17
+
18
+ vcpkg_check_linkage(ONLY_DYNAMIC_CRT)
19
+ if(VCPKG_TARGET_IS_WINDOWS)
20
+ set(VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY enabled) # some parts of this port can only build as a shared library.
21
+ endif()
22
+
23
+ vcpkg_from_gitlab(
24
+ GITLAB_URL https://gitlab.freedesktop.org
25
+ OUT_SOURCE_PATH SOURCE_PATH
26
+ REPO mesa/mesa
27
+ REF mesa-21.2.5
28
+ SHA512 a9ead27f08e862738938cf728928b7937ff37e4c26967f2e46e40a3c8419159397f75b2f4ce43f9b453b35bb3716df581087fb7ba8434fafdfab9488c3db6f92
29
+ FILE_DISAMBIGUATOR 1
30
+ HEAD_REF master
31
+ PATCHES ${PATCHES}
32
+ )
33
+ vcpkg_find_acquire_program(PYTHON3)
34
+ get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
35
+ vcpkg_add_to_path("${PYTHON3_DIR}")
36
+ vcpkg_add_to_path("${PYTHON3_DIR}/Scripts")
37
+ set(ENV{PYTHON} "${PYTHON3}")
38
+
39
+ x_vcpkg_get_python_packages(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES setuptools mako)
40
+
41
+ vcpkg_find_acquire_program(FLEX)
42
+ get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY )
43
+ vcpkg_add_to_path(PREPEND "${FLEX_DIR}")
44
+ vcpkg_find_acquire_program(BISON)
45
+ get_filename_component(BISON_DIR "${BISON}" DIRECTORY )
46
+ vcpkg_add_to_path(PREPEND "${BISON_DIR}")
47
+
48
+ if(WIN32) # WIN32 HOST probably has win_flex and win_bison!
49
+ if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
50
+ if(FLEX_DIR MATCHES "${DOWNLOADS}")
51
+ file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
52
+ else()
53
+ message(FATAL_ERROR "${PORT} requires flex being named flex on windows and not win_flex!\n(Can be solved by creating a simple link from win_flex to flex)")
54
+ endif()
55
+ endif()
56
+ if(NOT EXISTS "${BISON_DIR}/BISON${VCPKG_HOST_EXECUTABLE_SUFFIX}")
57
+ if(BISON_DIR MATCHES "${DOWNLOADS}")
58
+ file(CREATE_LINK "${BISON}" "${BISON_DIR}/bison${VCPKG_HOST_EXECUTABLE_SUFFIX}")
59
+ else()
60
+ message(FATAL_ERROR "${PORT} requires bison being named bison on windows and not win_bison!\n(Can be solved by creating a simple link from win_bison to bison)")
61
+ endif()
62
+ endif()
63
+ endif()
64
+
65
+ # For features https://github.com/pal1000/mesa-dist-win should be probably studied a bit more.
66
+ #string(APPEND GALLIUM_DRIVERS 'auto')
67
+ list(APPEND MESA_OPTIONS -Dzstd=enabled)
68
+ list(APPEND MESA_OPTIONS -Dshared-llvm=auto)
69
+ list(APPEND MESA_OPTIONS -Dlibunwind=disabled)
70
+ list(APPEND MESA_OPTIONS -Dlmsensors=disabled)
71
+ list(APPEND MESA_OPTIONS -Dvalgrind=disabled)
72
+ list(APPEND MESA_OPTIONS -Dglvnd=false)
73
+ list(APPEND MESA_OPTIONS -Dglx=disabled)
74
+ list(APPEND MESA_OPTIONS -Dgbm=disabled)
75
+ list(APPEND MESA_OPTIONS -Dosmesa=true)
76
+
77
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
78
+ list(APPEND MESA_OPTIONS -Dshared-swr=false)
79
+ list(APPEND MESA_OPTIONS "-Dswr-arches=['avx']")
80
+ else()
81
+ list(APPEND MESA_OPTIONS -Dshared-swr=true)
82
+ list(APPEND MESA_OPTIONS "-Dswr-arches=['avx','avx2','knl','skx']")
83
+ endif()
84
+
85
+ string(APPEND GALLIUM_DRIVERS 'swrast')
86
+ if("llvm" IN_LIST FEATURES)
87
+ list(APPEND MESA_OPTIONS -Dllvm=enabled)
88
+ string(APPEND GALLIUM_DRIVERS ",'swr'") # SWR always requires llvm
89
+ else()
90
+ list(APPEND MESA_OPTIONS -Dllvm=disabled)
91
+ endif()
92
+
93
+ list(APPEND MESA_OPTIONS -Dgallium-drivers=[${GALLIUM_DRIVERS}])
94
+
95
+ if("gles1" IN_LIST FEATURES)
96
+ list(APPEND MESA_OPTIONS -Dgles1=enabled)
97
+ else()
98
+ list(APPEND MESA_OPTIONS -Dgles1=disabled)
99
+ endif()
100
+ if("gles2" IN_LIST FEATURES)
101
+ list(APPEND MESA_OPTIONS -Dgles2=enabled)
102
+ else()
103
+ list(APPEND MESA_OPTIONS -Dgles2=disabled)
104
+ endif()
105
+ if("opengl" IN_LIST FEATURES)
106
+ list(APPEND MESA_OPTIONS -Dopengl=true)
107
+ else()
108
+ list(APPEND MESA_OPTIONS -Dopengl=false)
109
+ endif()
110
+ if("egl" IN_LIST FEATURES) # EGL feature only works on Linux
111
+ list(APPEND MESA_OPTIONS -Degl=enabled)
112
+ else()
113
+ list(APPEND MESA_OPTIONS -Degl=disabled)
114
+ endif()
115
+
116
+ list(APPEND MESA_OPTIONS -Dshared-glapi=enabled) #shared GLAPI required when building two or more of the following APIs - opengl, gles1 gles2
117
+
118
+ if(VCPKG_TARGET_IS_WINDOWS)
119
+ list(APPEND MESA_OPTIONS -Dplatforms=['windows'])
120
+ list(APPEND MESA_OPTIONS -Dmicrosoft-clc=disabled)
121
+ if(NOT VCPKG_TARGET_IS_MINGW)
122
+ set(VCPKG_CXX_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_CXX_FLAGS}")
123
+ set(VCPKG_C_FLAGS "/D_CRT_DECLARE_NONSTDC_NAMES ${VCPKG_C_FLAGS}")
124
+ endif()
125
+ endif()
126
+
127
+ vcpkg_configure_meson(
128
+ SOURCE_PATH "${SOURCE_PATH}"
129
+ OPTIONS
130
+ -Dgles-lib-suffix=_mesa
131
+ #-D egl-lib-suffix=_mesa
132
+ -Dbuild-tests=false
133
+ ${MESA_OPTIONS}
134
+ )
135
+ vcpkg_install_meson()
136
+ vcpkg_fixup_pkgconfig()
137
+
138
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
139
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
140
+
141
+ #installed by egl-registry
142
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/KHR")
143
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/include/EGL/egl.h")
144
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/include/EGL/eglext.h")
145
+ file(REMOVE "${CURRENT_PACKAGES_DIR}/include/EGL/eglplatform.h")
146
+ #installed by opengl-registry
147
+ set(_double_files include/GL/glcorearb.h include/GL/glext.h include/GL/glxext.h
148
+ include/GLES/egl.h include/GLES/gl.h include/GLES/glext.h include/GLES/glplatform.h
149
+ include/GLES2/gl2.h include/GLES2/gl2ext.h include/GLES2/gl2platform.h
150
+ include/GLES3/gl3.h include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3platform.h)
151
+ list(TRANSFORM _double_files PREPEND "${CURRENT_PACKAGES_DIR}/")
152
+ file(REMOVE ${_double_files})
153
+
154
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/GLES")
155
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/GLES2")
156
+ # Handle copyright
157
+ file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}")
158
+ file(TOUCH "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/radv-msvc-llvm13-2.patch ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/amd/compiler/aco_print_asm.cpp b/src/amd/compiler/aco_print_asm.cpp
2
+ index dcc7c4bc747..413e6464c79 100644
3
+ --- a/src/amd/compiler/aco_print_asm.cpp
4
+ +++ b/src/amd/compiler/aco_print_asm.cpp
5
+ @@ -24,6 +24,9 @@
6
+
7
+ #include "aco_ir.h"
8
+
9
+ +#if defined(_MSC_VER) && defined(restrict)
10
+ +#undef restrict
11
+ +#endif
12
+ #include "llvm/ac_llvm_util.h"
13
+
14
+ #include "llvm-c/Disassembler.h"
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/swr-llvm13.patch ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
2
+ index 44482939c7649a2bcc39f3b2eb75720de90bcef0..1124e3773b99430c8da5ccb061d92b1b3a1bf1a6 100644
3
+ --- a/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
4
+ +++ b/src/gallium/drivers/swr/rasterizer/jitter/JitManager.cpp
5
+ @@ -56,6 +56,14 @@
6
+ using namespace llvm;
7
+ using namespace SwrJit;
8
+
9
+ +#if LLVM_VERSION_MAJOR >= 7
10
+ +static constexpr llvm::sys::fs::OpenFlags OF_NONE = llvm::sys::fs::OF_None;
11
+ +static constexpr llvm::sys::fs::OpenFlags OF_TEXT = llvm::sys::fs::OF_Text;
12
+ +#else
13
+ +static constexpr llvm::sys::fs::OpenFlags OF_NONE = llvm::sys::fs::F_None;
14
+ +static constexpr llvm::sys::fs::OpenFlags OF_TEXT = llvm::sys::fs::F_Text;
15
+ +#endif
16
+ +
17
+ //////////////////////////////////////////////////////////////////////////
18
+ /// @brief Contructor for JitManager.
19
+ /// @param simdWidth - SIMD width to be used in generated program.
20
+ @@ -437,7 +445,7 @@ void JitManager::DumpAsm(Function* pFunction, const char* fileName)
21
+ sprintf(fName, "%s.%s.asm", funcName, fileName);
22
+ #endif
23
+
24
+ - raw_fd_ostream filestream(fName, EC, llvm::sys::fs::F_None);
25
+ + raw_fd_ostream filestream(fName, EC, OF_NONE);
26
+
27
+ legacy::PassManager* pMPasses = new legacy::PassManager();
28
+ auto* pTarget = mpExec->getTargetMachine();
29
+ @@ -490,7 +498,7 @@ void JitManager::DumpToFile(Module* M,
30
+ #else
31
+ sprintf(fName, "%s.%s.ll", funcName, fileName);
32
+ #endif
33
+ - raw_fd_ostream fd(fName, EC, llvm::sys::fs::F_None);
34
+ + raw_fd_ostream fd(fName, EC, OF_NONE);
35
+ M->print(fd, annotater);
36
+ fd.flush();
37
+ }
38
+ @@ -512,7 +520,7 @@ void JitManager::DumpToFile(Function* f, const char* fileName)
39
+ #else
40
+ sprintf(fName, "%s.%s.ll", funcName, fileName);
41
+ #endif
42
+ - raw_fd_ostream fd(fName, EC, llvm::sys::fs::F_None);
43
+ + raw_fd_ostream fd(fName, EC, OF_NONE);
44
+ f->print(fd, nullptr);
45
+
46
+ #if defined(_WIN32)
47
+ @@ -522,7 +530,7 @@ void JitManager::DumpToFile(Function* f, const char* fileName)
48
+ #endif
49
+ fd.flush();
50
+
51
+ - raw_fd_ostream fd_cfg(fName, EC, llvm::sys::fs::F_Text);
52
+ + raw_fd_ostream fd_cfg(fName, EC, OF_TEXT);
53
+ WriteGraph(fd_cfg, (const Function*)f);
54
+
55
+ fd_cfg.flush();
56
+ @@ -726,7 +734,7 @@ void JitCache::notifyObjectCompiled(const llvm::Module* M, llvm::MemoryBufferRef
57
+
58
+ {
59
+ std::error_code err;
60
+ - llvm::raw_fd_ostream fileObj(objPath.c_str(), err, llvm::sys::fs::F_None);
61
+ + llvm::raw_fd_ostream fileObj(objPath.c_str(), err, OF_NONE);
62
+ fileObj << Obj.getBuffer();
63
+ fileObj.flush();
64
+ }
65
+ @@ -734,7 +742,7 @@ void JitCache::notifyObjectCompiled(const llvm::Module* M, llvm::MemoryBufferRef
66
+
67
+ {
68
+ std::error_code err;
69
+ - llvm::raw_fd_ostream fileObj(filePath.c_str(), err, llvm::sys::fs::F_None);
70
+ + llvm::raw_fd_ostream fileObj(filePath.c_str(), err, OF_NONE);
71
+
72
+ uint32_t objcrc = ComputeCRC(0, Obj.getBufferStart(), Obj.getBufferSize());
73
+
74
+ diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h
75
+ index c361959b76ff0799f5102ad4b8ddf23d345105d9..64a690b47fac9ee99eba8f1259ffccf20f0e5fa0 100644
76
+ --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h
77
+ +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_gfx_mem.h
78
+ @@ -41,31 +41,29 @@ namespace SwrJit
79
+ BuilderGfxMem(JitManager* pJitMgr);
80
+ virtual ~BuilderGfxMem() {}
81
+
82
+ - virtual Value* GEP(Value* Ptr, Value* Idx, Type* Ty = nullptr, bool isReadOnly = true, const Twine& Name = "");
83
+ - virtual Value* GEP(Type* Ty, Value* Ptr, Value* Idx, const Twine& Name = "");
84
+ - virtual Value*
85
+ - GEP(Value* Ptr, const std::initializer_list<Value*>& indexList, Type* Ty = nullptr);
86
+ - virtual Value*
87
+ - GEP(Value* Ptr, const std::initializer_list<uint32_t>& indexList, Type* Ty = nullptr);
88
+ + virtual Value* GEP(Value* Ptr, Value* Idx, Type* Ty = nullptr, bool isReadOnly = true, const Twine& Name = "") override;
89
+ + virtual Value* GEP(Type* Ty, Value* Ptr, Value* Idx, const Twine& Name = "") override;
90
+ + virtual Value* GEP(Value* Ptr, const std::initializer_list<Value*>& indexList, Type* Ty = nullptr) override;
91
+ + virtual Value* GEP(Value* Ptr, const std::initializer_list<uint32_t>& indexList, Type* Ty = nullptr) override;
92
+
93
+ virtual LoadInst* LOAD(Value* Ptr,
94
+ const char* Name,
95
+ Type* Ty = nullptr,
96
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
97
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
98
+ virtual LoadInst* LOAD(Value* Ptr,
99
+ const Twine& Name = "",
100
+ Type* Ty = nullptr,
101
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
102
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
103
+ virtual LoadInst* LOAD(Value* Ptr,
104
+ bool isVolatile,
105
+ const Twine& Name = "",
106
+ Type* Ty = nullptr,
107
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
108
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
109
+ virtual LoadInst* LOAD(Value* BasePtr,
110
+ const std::initializer_list<uint32_t>& offset,
111
+ const llvm::Twine& Name = "",
112
+ Type* Ty = nullptr,
113
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
114
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
115
+
116
+ virtual CallInst* MASKED_LOAD(Value* Ptr,
117
+ unsigned Align,
118
+ @@ -73,32 +71,32 @@ namespace SwrJit
119
+ Value* PassThru = nullptr,
120
+ const Twine& Name = "",
121
+ Type* Ty = nullptr,
122
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
123
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
124
+
125
+ - virtual StoreInst* STORE(Value *Val, Value *Ptr, bool isVolatile = false, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
126
+ -
127
+ - virtual StoreInst* STORE(Value* Val, Value* BasePtr, const std::initializer_list<uint32_t>& offset, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
128
+ + virtual StoreInst* STORE(Value *Val, Value *Ptr, bool isVolatile = false, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
129
+
130
+ - virtual CallInst* MASKED_STORE(Value *Val, Value *Ptr, unsigned Align, Value *Mask, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
131
+ + virtual StoreInst* STORE(Value* Val, Value* BasePtr, const std::initializer_list<uint32_t>& offset, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
132
+ +
133
+ + virtual CallInst* MASKED_STORE(Value *Val, Value *Ptr, unsigned Align, Value *Mask, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
134
+
135
+ virtual Value* GATHERPS(Value* src,
136
+ Value* pBase,
137
+ Value* indices,
138
+ Value* mask,
139
+ uint8_t scale = 1,
140
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
141
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
142
+ virtual Value* GATHERDD(Value* src,
143
+ Value* pBase,
144
+ Value* indices,
145
+ Value* mask,
146
+ uint8_t scale = 1,
147
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
148
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
149
+
150
+ virtual void SCATTERPS(Value* pDst,
151
+ Value* vSrc,
152
+ Value* vOffsets,
153
+ Value* vMask,
154
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
155
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL) override;
156
+
157
+ Value* TranslateGfxAddressForRead(Value* xpGfxAddress,
158
+ Type* PtrTy = nullptr,
159
+ @@ -108,13 +106,13 @@ namespace SwrJit
160
+ Type* PtrTy = nullptr,
161
+ const Twine& Name = "",
162
+ MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
163
+ -
164
+ +
165
+ protected:
166
+ void AssertGFXMemoryParams(Value* ptr, MEM_CLIENT usage);
167
+
168
+ virtual void NotifyPrivateContextSet();
169
+
170
+ - virtual Value* OFFSET_TO_NEXT_COMPONENT(Value* base, Constant* offset);
171
+ + virtual Value* OFFSET_TO_NEXT_COMPONENT(Value* base, Constant* offset) override;
172
+
173
+ Value* TranslationHelper(Value* Ptr, Type* Ty, Value* pfnTranslateGfxAddress);
174
+ void TrackerHelper(Value* Ptr, Type* Ty, MEM_CLIENT usage, bool isRead);
175
+ diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp
176
+ index b5eb0a782b15214bcf954a7893cd628649a990fc..a16b5d11dbb2f2f1a0bcdc07e4d306b14a90dc4c 100644
177
+ --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp
178
+ +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.cpp
179
+ @@ -82,7 +82,12 @@ namespace SwrJit
180
+ std::vector<Value*> indices;
181
+ for (auto i : indexList)
182
+ indices.push_back(i);
183
+ +#if LLVM_VERSION_MAJOR >= 13
184
+ + Type *EltTy = cast<PointerType>(ptr->getType())->getElementType();
185
+ + return IN_BOUNDS_GEP(EltTy, ptr, indices);
186
+ +#else
187
+ return IN_BOUNDS_GEP(ptr, indices);
188
+ +#endif
189
+ }
190
+
191
+ Value* Builder::IN_BOUNDS_GEP(Value* ptr, const std::initializer_list<uint32_t>& indexList)
192
+ @@ -90,7 +95,12 @@ namespace SwrJit
193
+ std::vector<Value*> indices;
194
+ for (auto i : indexList)
195
+ indices.push_back(C(i));
196
+ +#if LLVM_VERSION_MAJOR >= 13
197
+ + Type *EltTy = cast<PointerType>(ptr->getType())->getElementType();
198
+ + return IN_BOUNDS_GEP(EltTy, ptr, indices);
199
+ +#else
200
+ return IN_BOUNDS_GEP(ptr, indices);
201
+ +#endif
202
+ }
203
+
204
+ LoadInst* Builder::LOAD(Value* Ptr, const char* Name, Type* Ty, MEM_CLIENT usage)
205
+ @@ -130,6 +140,22 @@ namespace SwrJit
206
+ return Builder::LOAD(GEPA(basePtr, valIndices), name);
207
+ }
208
+
209
+ + CallInst* Builder::MASKED_LOAD(Value* Ptr,
210
+ + unsigned Align,
211
+ + Value* Mask,
212
+ + Value* PassThru,
213
+ + const Twine& Name,
214
+ + Type* Ty,
215
+ + MEM_CLIENT usage)
216
+ + {
217
+ +#if LLVM_VERSION_MAJOR >= 13
218
+ + Type *EltTy = cast<PointerType>(Ptr->getType())->getElementType();
219
+ + return IRB()->CreateMaskedLoad(EltTy, Ptr, AlignType(Align), Mask, PassThru, Name);
220
+ +#else
221
+ + return IRB()->CreateMaskedLoad(Ptr, AlignType(Align), Mask, PassThru, Name);
222
+ +#endif
223
+ + }
224
+ +
225
+ LoadInst* Builder::LOADV(Value* basePtr,
226
+ const std::initializer_list<Value*>& indices,
227
+ const llvm::Twine& name)
228
+ @@ -234,7 +260,12 @@ namespace SwrJit
229
+ /// @param pVecPassthru - SIMD wide vector of values to load when lane is inactive
230
+ Value* Builder::GATHER_PTR(Value* pVecSrcPtr, Value* pVecMask, Value* pVecPassthru)
231
+ {
232
+ +#if LLVM_VERSION_MAJOR >= 13
233
+ + Type *EltTy = cast<PointerType>(pVecSrcPtr->getType())->getElementType();
234
+ + return MASKED_GATHER(EltTy, pVecSrcPtr, AlignType(4), pVecMask, pVecPassthru);
235
+ +#else
236
+ return MASKED_GATHER(pVecSrcPtr, AlignType(4), pVecMask, pVecPassthru);
237
+ +#endif
238
+ }
239
+
240
+ void Builder::SCATTER_PTR(Value* pVecDstPtr, Value* pVecSrc, Value* pVecMask)
241
+ diff --git a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
242
+ index 429d5779a4db2a6a3b6c7a7d02169773c935bb95..6682ad892b4038d4b3172b932a34e31a89cd7790 100644
243
+ --- a/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
244
+ +++ b/src/gallium/drivers/swr/rasterizer/jitter/builder_mem.h
245
+ @@ -82,10 +82,7 @@ virtual CallInst* MASKED_LOAD(Value* Ptr,
246
+ Value* PassThru = nullptr,
247
+ const Twine& Name = "",
248
+ Type* Ty = nullptr,
249
+ - MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL)
250
+ -{
251
+ - return IRB()->CreateMaskedLoad(Ptr, AlignType(Align), Mask, PassThru, Name);
252
+ -}
253
+ + MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL);
254
+
255
+ virtual StoreInst* STORE(Value *Val, Value *Ptr, bool isVolatile = false, Type* Ty = nullptr, MEM_CLIENT usage = MEM_CLIENT::MEM_CLIENT_INTERNAL)
256
+ {
257
+ diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
258
+ index bd5f7588c9189275ddaf3075b0a75e2e8fc1ecf5..2a4cf74722bc9ef1831d25fe6c2bb2f510b8fceb 100644
259
+ --- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
260
+ +++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
261
+ @@ -276,7 +276,8 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& fetchState)
262
+ JitManager::DumpToFile(fetch, "src");
263
+
264
+ #if defined(_DEBUG)
265
+ - verifyFunction(*fetch);
266
+ + // Note that false is returned if there are no errors
267
+ + SWR_ASSERT(!verifyFunction(*fetch, &llvm::errs()));
268
+ #endif
269
+
270
+ ::FunctionPassManager setupPasses(JM()->mpCurrentModule);
271
+ diff --git a/src/gallium/drivers/swr/swr_shader.cpp b/src/gallium/drivers/swr/swr_shader.cpp
272
+ index 315036920fb3ad364d0039349e148c70e5ba1818..a643b46cd081c026b5a3558d22be557338d4f220 100644
273
+ --- a/src/gallium/drivers/swr/swr_shader.cpp
274
+ +++ b/src/gallium/drivers/swr/swr_shader.cpp
275
+ @@ -1557,8 +1557,10 @@ BuilderSWR::CompileGS(struct swr_context *ctx, swr_jit_gs_key &key)
276
+ AttributeSet attrSet = AttributeSet::get(
277
+ JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
278
+ pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
279
+ -#else
280
+ +#elif LLVM_VERSION_MAJOR < 14
281
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
282
+ +#else
283
+ + pFunction->addFnAttrs(attrBuilder);
284
+ #endif
285
+
286
+ BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
287
+ @@ -1785,8 +1787,10 @@ BuilderSWR::CompileTES(struct swr_context *ctx, swr_jit_tes_key &key)
288
+ AttributeSet attrSet = AttributeSet::get(
289
+ JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
290
+ pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
291
+ -#else
292
+ +#elif LLVM_VERSION_MAJOR < 14
293
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
294
+ +#else
295
+ + pFunction->addFnAttrs(attrBuilder);
296
+ #endif
297
+
298
+ BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
299
+ @@ -2086,8 +2090,10 @@ BuilderSWR::CompileTCS(struct swr_context *ctx, swr_jit_tcs_key &key)
300
+ AttributeSet attrSet = AttributeSet::get(
301
+ JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
302
+ pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
303
+ -#else
304
+ +#elif LLVM_VERSION_MAJOR < 14
305
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
306
+ +#else
307
+ + pFunction->addFnAttrs(attrBuilder);
308
+ #endif
309
+
310
+ BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
311
+ @@ -2341,8 +2347,10 @@ BuilderSWR::CompileVS(struct swr_context *ctx, swr_jit_vs_key &key)
312
+ AttributeSet attrSet = AttributeSet::get(
313
+ JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
314
+ pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
315
+ -#else
316
+ +#elif LLVM_VERSION_MAJOR < 14
317
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
318
+ +#else
319
+ + pFunction->addFnAttrs(attrBuilder);
320
+ #endif
321
+
322
+ BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
323
+ @@ -2646,8 +2654,10 @@ BuilderSWR::CompileFS(struct swr_context *ctx, swr_jit_fs_key &key)
324
+ AttributeSet attrSet = AttributeSet::get(
325
+ JM()->mContext, AttributeSet::FunctionIndex, attrBuilder);
326
+ pFunction->addAttributes(AttributeSet::FunctionIndex, attrSet);
327
+ -#else
328
+ +#elif LLVM_VERSION_MAJOR < 14
329
+ pFunction->addAttributes(AttributeList::FunctionIndex, attrBuilder);
330
+ +#else
331
+ + pFunction->addFnAttrs(attrBuilder);
332
+ #endif
333
+
334
+ BasicBlock *block = BasicBlock::Create(JM()->mContext, "entry", pFunction);
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/swr-msvc-2.patch ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ From 68d1addf6f0cf693fdb42db3555112e257a3d771 Mon Sep 17 00:00:00 2001
2
+ From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <[email protected]>
3
+ Date: Sun, 24 Oct 2021 21:36:09 -0400
4
+ Subject: [PATCH] swr: fix MSVC build
5
+
6
+ ---
7
+ src/gallium/drivers/swr/swr_draw.cpp | 6 +++---
8
+ src/gallium/drivers/swr/swr_state.cpp | 2 +-
9
+ 2 files changed, 4 insertions(+), 4 deletions(-)
10
+
11
+ diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp
12
+ index 4b42a8e0390..5d862adb39d 100644
13
+ --- a/src/gallium/drivers/swr/swr_draw.cpp
14
+ +++ b/src/gallium/drivers/swr/swr_draw.cpp
15
+ @@ -62,7 +62,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
16
+
17
+ if (!indirect &&
18
+ !info->primitive_restart &&
19
+ - !u_trim_pipe_prim(info->mode, (unsigned*)&draws[0].count))
20
+ + !u_trim_pipe_prim((enum pipe_prim_type)info->mode, (unsigned*)&draws[0].count))
21
+ return;
22
+
23
+ if (!swr_check_render_cond(pipe))
24
+ @@ -102,7 +102,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
25
+ STREAMOUT_COMPILE_STATE state = {0};
26
+ struct pipe_stream_output_info *so = &ctx->vs->pipe.stream_output;
27
+
28
+ - state.numVertsPerPrim = u_vertices_per_prim(info->mode);
29
+ + state.numVertsPerPrim = u_vertices_per_prim((enum pipe_prim_type)info->mode);
30
+
31
+ uint32_t offsets[MAX_SO_STREAMS] = {0};
32
+ uint32_t num = 0;
33
+ @@ -221,7 +221,7 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info,
34
+ if (ctx->gs)
35
+ topology = (pipe_prim_type)ctx->gs->info.base.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM];
36
+ else
37
+ - topology = info->mode;
38
+ + topology = (enum pipe_prim_type)info->mode;
39
+
40
+ switch (topology) {
41
+ case PIPE_PRIM_TRIANGLE_FAN:
42
+ diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
43
+ index 5f1464e6d0e..818328750bd 100644
44
+ --- a/src/gallium/drivers/swr/swr_state.cpp
45
+ +++ b/src/gallium/drivers/swr/swr_state.cpp
46
+ @@ -1731,7 +1731,7 @@ swr_update_derived(struct pipe_context *pipe,
47
+ /* Has to be before fragment shader, since it sets SWR_NEW_FS */
48
+ if (p_draw_info) {
49
+ bool new_prim_is_poly =
50
+ - (u_reduced_prim(p_draw_info->mode) == PIPE_PRIM_TRIANGLES) &&
51
+ + (u_reduced_prim((enum pipe_prim_type)p_draw_info->mode) == PIPE_PRIM_TRIANGLES) &&
52
+ (ctx->derived.rastState.fillMode == SWR_FILLMODE_SOLID);
53
+ if (new_prim_is_poly != ctx->poly_stipple.prim_is_poly) {
54
+ ctx->dirty |= SWR_NEW_FS;
55
+ --
56
+ 2.25.1
57
+
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/swravx512-post-static-link.patch ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/src/gallium/drivers/swr/meson.build b/src/gallium/drivers/swr/meson.build
2
+ index 11ea7d3f43e..f34e88b1eec 100644
3
+ --- a/src/gallium/drivers/swr/meson.build
4
+ +++ b/src/gallium/drivers/swr/meson.build
5
+ @@ -213,7 +213,7 @@ endif
6
+
7
+ if with_swr_arches.contains('skx')
8
+ swr_skx_args = cpp.first_supported_argument(
9
+ - '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512',
10
+ + '-march=skylake-avx512', '-target-cpu=x86-skylake', '-xCORE-AVX512', '/arch:AVX512',
11
+ )
12
+ if swr_skx_args == []
13
+ error('Cannot find SKX support for swr.')
14
+ @@ -252,7 +252,7 @@ endif
15
+
16
+ if with_swr_arches.contains('knl')
17
+ swr_knl_args = cpp.first_supported_argument(
18
+ - '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512',
19
+ + '-march=knl', '-target-cpu=mic-knl', '-xMIC-AVX512', '/arch:AVX512',
20
+ )
21
+ if swr_knl_args == []
22
+ error('Cannot find KNL support for swr.')
third-party/DPVO/Pangolin/scripts/vcpkg/ports/mesa/vcpkg.json ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "mesa",
3
+ "version": "21.2.5",
4
+ "port-version": 3,
5
+ "description": "Mesa - The 3D Graphics Library",
6
+ "homepage": "https://www.mesa3d.org/",
7
+ "license": "MIT AND BSL-1.0 AND SGI-B-2.0",
8
+ "supports": "!(windows & arm)",
9
+ "dependencies": [
10
+ {
11
+ "name": "vcpkg-get-python-packages",
12
+ "host": true
13
+ },
14
+ {
15
+ "name": "vcpkg-tool-meson",
16
+ "host": true
17
+ },
18
+ "zlib",
19
+ "zstd"
20
+ ],
21
+ "default-features": [
22
+ "default-features"
23
+ ],
24
+ "features": {
25
+ "default-features": {
26
+ "description": "Platform dependent default features",
27
+ "dependencies": [
28
+ {
29
+ "name": "mesa",
30
+ "default-features": false,
31
+ "features": [
32
+ "gles1"
33
+ ]
34
+ },
35
+ {
36
+ "name": "mesa",
37
+ "default-features": false,
38
+ "features": [
39
+ "gles2"
40
+ ]
41
+ },
42
+ {
43
+ "name": "mesa",
44
+ "default-features": false,
45
+ "features": [
46
+ "opengl"
47
+ ]
48
+ },
49
+ {
50
+ "name": "mesa",
51
+ "default-features": false,
52
+ "features": [
53
+ "llvm"
54
+ ],
55
+ "platform": "x64"
56
+ }
57
+ ]
58
+ },
59
+ "egl": {
60
+ "description": "Build support for EGL platform",
61
+ "dependencies": [
62
+ {
63
+ "name": "mesa",
64
+ "default-features": false
65
+ }
66
+ ]
67
+ },
68
+ "gles1": {
69
+ "description": "Build support for OpenGL ES 1.x",
70
+ "dependencies": [
71
+ {
72
+ "name": "mesa",
73
+ "default-features": false
74
+ }
75
+ ]
76
+ },
77
+ "gles2": {
78
+ "description": "Build support for OpenGL ES 2.x and 3.x",
79
+ "dependencies": [
80
+ {
81
+ "name": "mesa",
82
+ "default-features": false
83
+ }
84
+ ]
85
+ },
86
+ "llvm": {
87
+ "description": "Build with llvmpipe",
88
+ "dependencies": [
89
+ {
90
+ "name": "llvm",
91
+ "default-features": false,
92
+ "features": [
93
+ "libclc"
94
+ ]
95
+ }
96
+ ]
97
+ },
98
+ "opengl": {
99
+ "description": "Build support for OpenGL (all versions)",
100
+ "dependencies": [
101
+ {
102
+ "name": "mesa",
103
+ "default-features": false
104
+ }
105
+ ]
106
+ }
107
+ }
108
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/meschach/CMakeLists.txt ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cmake_minimum_required(VERSION 3.8.0)
2
+ project(meschach)
3
+
4
+ if(MSVC)
5
+ add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
6
+ endif()
7
+
8
+ set(meschach_srcs
9
+ bdfactor.c
10
+ bkpfacto.c
11
+ chfactor.c
12
+ copy.c
13
+ err.c
14
+ extras.c
15
+ fft.c
16
+ givens.c
17
+ hessen.c
18
+ hsehldr.c
19
+ init.c
20
+ iter0.c
21
+ iternsym.c
22
+ itersym.c
23
+ ivecop.c
24
+ lufactor.c
25
+ machine.c
26
+ matlab.c
27
+ matop.c
28
+ matrixio.c
29
+ meminfo.c
30
+ memory.c
31
+ memstat.c
32
+ mfunc.c
33
+ norm.c
34
+ otherio.c
35
+ pxop.c
36
+ qrfactor.c
37
+ schur.c
38
+ solve.c
39
+ sparse.c
40
+ sparseio.c
41
+ spbkp.c
42
+ spchfctr.c
43
+ splufctr.c
44
+ sprow.c
45
+ spswap.c
46
+ submat.c
47
+ svd.c
48
+ symmeig.c
49
+ update.c
50
+ vecop.c
51
+ version.c
52
+ zcopy.c
53
+ zfunc.c
54
+ zgivens.c
55
+ zhessen.c
56
+ zhsehldr.c
57
+ zlufctr.c
58
+ zmachine.c
59
+ zmatio.c
60
+ zmatlab.c
61
+ zmatop.c
62
+ zmemory.c
63
+ znorm.c
64
+ zqrfctr.c
65
+ zschur.c
66
+ zsolve.c
67
+ ztorture.c
68
+ zvecop.c
69
+ )
70
+ file(GLOB meschach_headers "*.h")
71
+
72
+ include_directories(".")
73
+
74
+ add_library(meschach ${meschach_srcs})
75
+ target_compile_definitions(meschach PRIVATE -DHAVE_MEMORY_H -DHAVE_COMPLEX_H)
76
+
77
+ install(
78
+ TARGETS meschach
79
+ RUNTIME DESTINATION bin
80
+ LIBRARY DESTINATION lib
81
+ ARCHIVE DESTINATION lib
82
+ )
83
+ if(NOT DISABLE_INSTALL_HEADERS)
84
+ install(FILES ${meschach_headers} DESTINATION include/meschach)
85
+ endif()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/meschach/portfile.cmake ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
2
+
3
+ vcpkg_download_distfile(ARCHIVE
4
+ URLS "http://homepage.math.uiowa.edu/~dstewart/meschach/mesch12b.tar.gz"
5
+ FILENAME "mesch12b.tar.gz"
6
+ SHA512 9051e1502b8c9741400c61fd6038e514887f305f267ba4e97d747423de3da1270f835f65b2d1f538f8938677060bc0fcfd7a94022d74fbfd31a0450116e9d79e
7
+ )
8
+
9
+ vcpkg_extract_source_archive_ex(
10
+ OUT_SOURCE_PATH SOURCE_PATH
11
+ ARCHIVE ${ARCHIVE}
12
+ NO_REMOVE_ONE_LEVEL
13
+ )
14
+
15
+ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
16
+
17
+ vcpkg_configure_cmake(
18
+ SOURCE_PATH ${SOURCE_PATH}
19
+ PREFER_NINJA
20
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
21
+ )
22
+
23
+ vcpkg_install_cmake()
24
+ vcpkg_copy_pdbs()
25
+
26
+ file(INSTALL ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/meschach)
third-party/DPVO/Pangolin/scripts/vcpkg/ports/meschach/vcpkg.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "meschach",
3
+ "version-string": "1.2b",
4
+ "port-version": 4,
5
+ "description": "Matrix computations in C",
6
+ "homepage": "https://homepage.math.uiowa.edu/~dstewart/meschach"
7
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/meshoptimizer/portfile.cmake ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ vcpkg_from_github(
2
+ OUT_SOURCE_PATH SOURCE_PATH
3
+ REPO zeux/meshoptimizer
4
+ REF v0.16
5
+ SHA512 CC6D28359FB99A615E1046A4AF1B247CBC6EA0266D9E7F41EA0516C1FC09FA1E67376071DAF138A126C77BCA3BAF9D565636ED0E3ADF045F1A08498C38B7A7E7
6
+ HEAD_REF master
7
+ )
8
+
9
+ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
10
+
11
+ vcpkg_cmake_configure(
12
+ SOURCE_PATH "${SOURCE_PATH}"
13
+ OPTIONS
14
+ -DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
15
+ )
16
+
17
+ vcpkg_cmake_install()
18
+
19
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
20
+
21
+ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/meshoptimizer)
22
+
23
+ # Handle copyright
24
+ file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
25
+
26
+ vcpkg_copy_pdbs()
third-party/DPVO/Pangolin/scripts/vcpkg/ports/meshoptimizer/vcpkg.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "meshoptimizer",
3
+ "version": "0.16",
4
+ "description": "Mesh optimization library that makes meshes smaller and faster to render",
5
+ "homepage": "https://github.com/zeux/meshoptimizer",
6
+ "dependencies": [
7
+ {
8
+ "name": "vcpkg-cmake",
9
+ "host": true
10
+ },
11
+ {
12
+ "name": "vcpkg-cmake-config",
13
+ "host": true
14
+ }
15
+ ]
16
+ }
third-party/DPVO/Pangolin/scripts/vcpkg/ports/metis/disable-programs.patch ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ --- a/CMakeLists.txt Wed Dec 21 18:24:22 2016
2
+ +++ b/CMakeLists.txt Wed Dec 21 18:24:26 2016
3
+ @@ -20,4 +20,4 @@
4
+ # Recursively look for CMakeLists.txt in subdirs.
5
+ add_subdirectory("include")
6
+ add_subdirectory("libmetis")
7
+ -add_subdirectory("programs")
8
+ +# add_subdirectory("programs")