Merge branch 'bf-blender' into mb-0014-bpy-images
This commit is contained in:
commit
183ad17df5
30
AUTHORS
30
AUTHORS
|
@ -26,8 +26,10 @@ Aaron Franke <arnfranke@yahoo.com>
|
|||
Adam Nydahl <Loginer>
|
||||
Adi Sage <adisage.connect@gmail.com>
|
||||
Aditya Y Jeppu <quantimoney>
|
||||
Adrian Bibby Walther <adrianbibbywalther@gmail.com>
|
||||
Adrian Newton <TFS>
|
||||
AgAmemnno <kaz380@hotmail.co.jp>
|
||||
Ahmad Rifai <riff.blend@gmail.com>
|
||||
Aidan Davey <ShadowDragon>
|
||||
Aidan Haile <tactical_fluke>
|
||||
Alan Babu <alanaman>
|
||||
|
@ -69,7 +71,7 @@ Andrej730 <azhilenkov@gmail.com>
|
|||
Andres Stephens <ondraise15@hotmail.com>
|
||||
Andrew Buttery <axb2035@gmail.com>
|
||||
Andrew Hale <TrumanBlending@gmail.com>
|
||||
Andrew Oates <aoates>
|
||||
Andrew Oates <andrew@andrewoates.com>
|
||||
Andrew Wiggin <ender79bl@gmail.com>
|
||||
Andrew Williams <sobakasu>
|
||||
Andrii Symkin <pembem22>
|
||||
|
@ -96,10 +98,12 @@ Arystanbek Dyussenov <arystan.d@gmail.com>
|
|||
Asad-ullah Khan <kh4n>
|
||||
Asher <ThatAsherGuy>
|
||||
Ashley Ruglys <ashley.ruglys@gmail.com>
|
||||
Attila Afra <attila.t.afra@intel.com>
|
||||
Aurel Wildfellner <aurel.w@gmail.com>
|
||||
Aurelien Jarno <aurel32>
|
||||
Azeem Bande-Ali <azeemba>
|
||||
Baardaap <blender@aaltjegron.nl>
|
||||
Bartosz Kosiorek <gang65@poczta.onet.pl>
|
||||
Bartosz Moniewski <monio>
|
||||
Bassam Kurdali <bassam@urchn.org>
|
||||
Bastien Montagne <bastien@blender.org>
|
||||
|
@ -197,6 +201,7 @@ Dorian <BD3D>
|
|||
Doug Hammond <doughammond@hamsterfight.co.uk>
|
||||
Douglas Paul <douglas.w.paul@gmail.com>
|
||||
Dyvine57 <dulana57@gmail.com>
|
||||
ESASHIKA Kaoru <git@pluser.dev>
|
||||
Ed Halley <ed@halley.cc>
|
||||
Edgar Roman Cervantes <redvant>
|
||||
Edmund Kapusniak <edmundmk>
|
||||
|
@ -207,6 +212,7 @@ Ejner Fergo <ejnersan@gmail.com>
|
|||
Elia Sarti <vekoon@gmail.com>
|
||||
Emanuel Claesson <emanuel.claesson@gmail.com>
|
||||
Enrico Fracasso <enrico.fracasso@email.it>
|
||||
Enrique-de-la-Calle <encalle@ucm.es>
|
||||
Eric Bickle <ShadowChaser>
|
||||
Eric Cosky <eric_cosky>
|
||||
Erik Abrahamsson <ecke101@gmail.com>
|
||||
|
@ -231,6 +237,7 @@ Fulk33 <spaceshipwars@gmx.de>
|
|||
Fynn Grotehans <fynngr@noreply.localhost>
|
||||
Félix <Miadim>
|
||||
Gaia Clary <gaia.clary@machinimatrix.org>
|
||||
Gangneron <clementgangneron@gmail.com>
|
||||
Garry R. Osgood <grosgood>
|
||||
Gavin Li <gav@developer.blender.org>
|
||||
Geoffrey Bantle <hairbat@yahoo.com>
|
||||
|
@ -323,6 +330,7 @@ John Quillan <jquillan>
|
|||
Johnny Matthews <johnny.matthews@gmail.com>
|
||||
Joilnen Leite <joilnen.leite@gmail.com>
|
||||
Jonas Holzman <jonas@holzman.fr>
|
||||
JonasDichelle <jonasdichelle@gmail.com>
|
||||
Jonathan Williamson <jonathan@cgcookie.com>
|
||||
Jorge Bernal <jbernalmartinez@gmail.com>
|
||||
Jorijn de Graaf <bonj@noreply.localhost>
|
||||
|
@ -345,7 +353,7 @@ Julian Eisel <julian@blender.org>
|
|||
Julian Plak <julian.plak@live.nl>
|
||||
Julian Squires <julian@cipht.net>
|
||||
Julien Kaspar <julien@blender.org>
|
||||
Jun Mizutani <jmztn@noreply.localhost>
|
||||
Jun Mizutani <mizutani.jun@nifty.ne.jp>
|
||||
Jung Jaeyun <cube-c>
|
||||
Jure Triglav <juretriglav@gmail.com>
|
||||
Justin Dailey <dail8859@yahoo.com>
|
||||
|
@ -356,7 +364,7 @@ Kai Jægersen <kaio>
|
|||
Karsten Schwenk <macnihilist@gmx.net>
|
||||
Karthik Rangasai Sivaraman <rangasai>
|
||||
Kaspian Jakobsson <kaspian.jakobsson@gmail.com>
|
||||
Kazashi Yoshioka <vnapdv@noreply.localhost>
|
||||
Kazashi Yoshioka <kaz380@hotmail.co.jp>
|
||||
Kdaf <Kdaf>
|
||||
Keir Mierle <mierle@gmail.com>
|
||||
Keith Boshoff <wahooney>
|
||||
|
@ -373,6 +381,7 @@ Kevin Mackay <mackay.ka@gmail.com>
|
|||
Khanh Ha <khanhhh89@gmail.com>
|
||||
Konrad Kleine <konrad.wilhelm.kleine@gmail.com>
|
||||
Konrad Puklicki <puklicki>
|
||||
Koranir <101683475+Koranir@users.noreply.github.com>
|
||||
Kris <Metricity>
|
||||
Krzysztof Recko <yetioszek@gmail.com>
|
||||
Kévin Dietrich <kevin.dietrich@mailoo.org>
|
||||
|
@ -484,6 +493,7 @@ Nick Milios <semaphore>
|
|||
Nick Samarin <nicks1987@bigmir.net>
|
||||
Nicola De Mitri <nicolasap>
|
||||
Nicolas Fauvet <droune2001>
|
||||
Nika Kutsniashvili <nickberckley@gmail.com>
|
||||
Nikhil Shringarpurey <Nikhil.Net>
|
||||
Nikita Sirgienko <nikita.sirgienko@intel.com>
|
||||
Nikolaus Leopold <nikolaus.leopold@gmail.com>
|
||||
|
@ -512,6 +522,7 @@ Paul Golter <paulgolter>
|
|||
Paul Melis <paulmelis>
|
||||
PaulKristoffersson <57681017+PaulKristoffersson@users.noreply.github.com>
|
||||
Pawel Franitza <Rongix>
|
||||
Pedro A <povmaniac@noreply.localhost>
|
||||
Pedro Reis <veryprofessionaldodo>
|
||||
Peng Yan <1105012124@qq.com>
|
||||
Petar Dosev <pdosev@gmail.com>
|
||||
|
@ -532,8 +543,10 @@ Phoenix Katsch <phoenixkatsch>
|
|||
Pi Lanningham <Quantumplation>
|
||||
Pierluigi Grassi <pierluigi@tukano.it>
|
||||
Pierre Risch <prisch>
|
||||
Pierrick Bouvier <pierrick.bouvier@linaro.org>
|
||||
Piotr Makal <pmakal>
|
||||
Piotr Ostrowski <postrowski>
|
||||
Prakhar Singh Chouhan <tunealso@gmail.com>
|
||||
Pratik Borhade <pratikborhade302@gmail.com>
|
||||
Prikshit singh <prikshitsingh79@gmail.com>
|
||||
Quentin Wenger <matpi@protonmail.ch>
|
||||
|
@ -545,6 +558,7 @@ Rajesh Malviya <rajveer0malviya@gmail.com>
|
|||
Ralf Hölzemer <r.hoelzemer@googlemail.com>
|
||||
Ramil Roosileht <Limarest>
|
||||
Rateeb Riyasat <bmollusc>
|
||||
Raul Fernandez <farsthary84@gmail.com>
|
||||
Rawalanche <rawalanche@gmail.com>
|
||||
Ray Molenkamp <github@lazydodo.com>
|
||||
Rebecca Dengate <beckyd>
|
||||
|
@ -573,15 +587,18 @@ Ryan Inch <Imaginer>
|
|||
S J Bennett (quollism) <quollism@ii.net>
|
||||
Sahar A. Kashi <sahar.alipourkashi@amd.com>
|
||||
Sam Miller <samuelmiller>
|
||||
Samuel Bilek <samuel-bilek-1@noreply.localhost>
|
||||
Sandy Carter <bwrsandman@gmail.com>
|
||||
Sayak Biswas <sayakAMD>
|
||||
Scott Petrovic <scottpetrovic@gmail.com>
|
||||
Scott Spadea <scottspadea>
|
||||
Scott Wilson <propersquid>
|
||||
Scurest <scurest>
|
||||
Sean Kim <SeanCTKim@protonmail.com>
|
||||
Sebastian Herholz <sebastian.herholz@intel.com>
|
||||
Sebastian Koenig <sebastiankoenig@posteo.de>
|
||||
Sebastian Parborg <darkdefende@gmail.com>
|
||||
Sebastian Parborg <sebastian@blender.org>
|
||||
SebastianWitt <w.basti@gmx.de>
|
||||
Sebastiano Barrera <bars>
|
||||
Sebastián Barschkis <sebbas@sebbas.org>
|
||||
Sergej Reich <sergej.reich@googlemail.com>
|
||||
|
@ -629,6 +646,7 @@ Thomas Beck <software@plasmasolutions.de>
|
|||
Thomas Dinges <thomas@blender.org>
|
||||
Thomas Lachmann <TL>
|
||||
Thomas Szepe <HG1_public@gmx.net>
|
||||
Thomas Wilshaw <thomaswilshaw@gmail.com>
|
||||
Tiago Chaves <laurelkeys>
|
||||
Tianwei Shen <shentianweipku@gmail.com>
|
||||
Tim Stullich <tstullich>
|
||||
|
@ -677,6 +695,7 @@ Willian Padovani Germano <wpgermano@gmail.com>
|
|||
Wouter <waterflames>
|
||||
Wouter van Heyst <larstiq-bforge@larstiq.dyndns.org>
|
||||
Wybren van Keulen <wybren>
|
||||
XDzZyq <xiaodouzizyq@gmail.com>
|
||||
Xavier Cho <mysticfall>
|
||||
Xavier Hallade <xavier.hallade@intel.com>
|
||||
Xavier Thomas <xavier.thomas.1980@gmail.com>
|
||||
|
@ -697,12 +716,14 @@ Zijun Zhou <eary@noreply.localhost>
|
|||
andreas atteneder <atti>
|
||||
ariva00 <ariva00.it@gmail.com>
|
||||
b-init <b-init>
|
||||
bartus <bartus@noreply.localhost>
|
||||
bird_d <bird_d>
|
||||
brunoT <drehuwann@gmail.com>
|
||||
cgtinker <Denys.Hsu@gmail.com>
|
||||
coyo_t <constachugga@gmail.com>
|
||||
dupoxy <dupoxy@noreply.localhost>
|
||||
fiord <hyoga_quasar@yahoo.co.jp>
|
||||
grady <mgradysaunders@gmail.com>
|
||||
himisa <himisa@noreply.localhost>
|
||||
jim man <jimman2003>
|
||||
jon denning <gfxcoder@gmail.com>
|
||||
|
@ -718,6 +739,7 @@ nBurn <nbwashburn@gmail.com>
|
|||
nutti <nutti.metro@gmail.com>
|
||||
ok_what <ip1149a@gmail.com>
|
||||
persun <perplexing.sun@gmail.com>
|
||||
rifai.id <arifai.dev@gmail.com>
|
||||
swann <slumber>
|
||||
unclezeiv <davide.vercelli@gmail.com>
|
||||
yves <valfeur>
|
||||
|
|
|
@ -84,6 +84,11 @@ if(POLICY CMP0074)
|
|||
cmake_policy(SET CMP0074 NEW)
|
||||
endif()
|
||||
|
||||
# find_package() uses uppercase <PackageName>_ROOT variables.
|
||||
if(POLICY CMP0144)
|
||||
cmake_policy(SET CMP0144 NEW)
|
||||
endif()
|
||||
|
||||
# Install CODE|SCRIPT allow the use of generator expressions.
|
||||
if(POLICY CMP0087)
|
||||
cmake_policy(SET CMP0087 NEW)
|
||||
|
@ -124,7 +129,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||
The minimum supported version of CLANG is 8.0, found ${CMAKE_C_COMPILER_VERSION}"
|
||||
)
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
if(MSVC_VERSION VERSION_LESS "1928")
|
||||
# MSVC_VERSION is an internal version number, it doesn't map to something
|
||||
# the end user would recognize as a version. Because of this, for MSVC we do
|
||||
|
@ -640,7 +645,7 @@ mark_as_advanced(WITH_CYCLES_PRECOMPUTE)
|
|||
mark_as_advanced(CYCLES_TEST_DEVICES)
|
||||
|
||||
# NVIDIA CUDA & OptiX
|
||||
if(NOT APPLE)
|
||||
if(NOT APPLE AND NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64"))
|
||||
option(WITH_CYCLES_DEVICE_CUDA "Enable Cycles NVIDIA CUDA compute support" ON)
|
||||
option(WITH_CYCLES_DEVICE_OPTIX "Enable Cycles NVIDIA OptiX support" ON)
|
||||
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
|
||||
|
@ -675,7 +680,7 @@ When set, this path will be used at runtime to compile OptiX kernels."
|
|||
endif()
|
||||
|
||||
# AMD HIP
|
||||
if(NOT APPLE)
|
||||
if(NOT APPLE AND NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64"))
|
||||
option(WITH_CYCLES_DEVICE_HIP "Enable Cycles AMD HIP support" ON)
|
||||
option(WITH_CYCLES_HIP_BINARIES "Build Cycles AMD HIP binaries" OFF)
|
||||
# Radeon VII (gfx906) not currently working with HIP SDK, so left out of the list.
|
||||
|
@ -702,7 +707,7 @@ if(APPLE)
|
|||
endif()
|
||||
|
||||
# oneAPI
|
||||
if(NOT APPLE)
|
||||
if(NOT APPLE AND NOT (WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64"))
|
||||
option(WITH_CYCLES_DEVICE_ONEAPI "Enable Cycles oneAPI compute support" OFF)
|
||||
option(WITH_CYCLES_ONEAPI_BINARIES "\
|
||||
Enable Ahead-Of-Time compilation for Cycles oneAPI device"
|
||||
|
@ -792,9 +797,19 @@ endif()
|
|||
|
||||
# Unit testing
|
||||
option(WITH_GTESTS "Enable GTest unit testing" OFF)
|
||||
option(WITH_GPU_RENDER_TESTS "Enable GPU render related unit testing (EEVEE, Workbench and Grease Pencil)" OFF)
|
||||
option(WITH_GPU_RENDER_TESTS_SILENT "Run GPU render tests silently (finished tests will pass). Generated report will show failing tests" ON)
|
||||
option(WITH_GPU_DRAW_TESTS "Enable GPU drawing related unit testing (GPU backends and draw manager)" OFF)
|
||||
option(WITH_GPU_RENDER_TESTS "\
|
||||
Enable GPU render related unit testing (EEVEE, Workbench and Grease Pencil)"
|
||||
OFF
|
||||
)
|
||||
option(WITH_GPU_RENDER_TESTS_SILENT "\
|
||||
Run GPU render tests silently (finished tests will pass). \
|
||||
Generated report will show failing tests"
|
||||
ON
|
||||
)
|
||||
option(WITH_GPU_DRAW_TESTS "\
|
||||
Enable GPU drawing related unit testing (GPU backends and draw manager)"
|
||||
OFF
|
||||
)
|
||||
option(WITH_COMPOSITOR_REALTIME_TESTS "Enable regression testing for realtime compositor" OFF)
|
||||
if(UNIX AND NOT (APPLE OR HAIKU))
|
||||
option(WITH_UI_TESTS "\
|
||||
|
@ -811,7 +826,10 @@ endif()
|
|||
# Enabled by default for typical use cases to speed up development cycles. However, when looking
|
||||
# into threading or memory related issues (in dependency graph, out-of-bounds, etc) forcing single
|
||||
# test per Blender instance could give much better clues about the root of the problem.
|
||||
option(WITH_TESTS_BATCHED "Run multiple tests in a single Blender invocation, for faster test execution" ON)
|
||||
option(WITH_TESTS_BATCHED "\
|
||||
Run multiple tests in a single Blender invocation, for faster test execution"
|
||||
ON
|
||||
)
|
||||
mark_as_advanced(WITH_TESTS_BATCHED)
|
||||
|
||||
option(WITH_TESTS_SINGLE_BINARY "\
|
||||
|
@ -1349,7 +1367,7 @@ if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
|||
# affect on the printed backtrace, and exception handling was correct as well.
|
||||
#
|
||||
# Related discussion:
|
||||
# https://stackoverflow.com/questions/26300819/why-gcc-compiled-c-program-needs-eh-frame-section
|
||||
# https://stackoverflow.com/questions/26300819
|
||||
add_compile_options("$<${_is_CONFIG_DEBUG}:-fno-unwind-tables>")
|
||||
add_compile_options("$<${_is_CONFIG_DEBUG}:-fno-asynchronous-unwind-tables>")
|
||||
|
||||
|
@ -1559,8 +1577,10 @@ if(WITH_OPENMP)
|
|||
if(NOT WITH_OPENMP_STATIC)
|
||||
string(APPEND CMAKE_C_FLAGS " ${OpenMP_C_FLAGS}")
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${OpenMP_CXX_FLAGS}")
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
if(DEFINED OpenMP_LINKER_FLAGS)
|
||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
string(APPEND CMAKE_MODULE_LINKER_FLAGS " ${OpenMP_LINKER_FLAGS}")
|
||||
endif()
|
||||
else()
|
||||
# Typically avoid adding flags as defines but we can't
|
||||
# pass OpenMP flags to the linker for static builds, meaning
|
||||
|
@ -1668,12 +1688,14 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja" AND WITH_NINJA_POOL_JOBS)
|
|||
# but this also accounts for the part of the physical RAM being used by other unrelated
|
||||
# processes on the system, and the part being used by the 'regular' compile and linking jobs.
|
||||
#
|
||||
# Also always cap heavy jobs amount to `number of available threads - 1`, to ensure that even if
|
||||
# there would be enough RAM, the machine never ends up handling only heavy jobs at some point.
|
||||
# This can have annoying sides effects, like lack of output in the console for several minutes,
|
||||
# which can lead to a wrong detection of 'unresponsive' state by the buildbots e.g.
|
||||
# Also always cap heavy jobs amount to `number of available threads - 1`,
|
||||
# to ensure that even if there would be enough RAM, the machine never ends up
|
||||
# handling only heavy jobs at some point.
|
||||
# This can have annoying sides effects, like lack of output in the console for several
|
||||
# minutes, which can lead to a wrong detection of 'unresponsive' state by the build-bots e.g.
|
||||
#
|
||||
# Currently, these settings applied to a 64GB/16threads linux machine will use, for a full build:
|
||||
# Currently, these settings applied to a 64GB/16threads linux machine will use,
|
||||
# for a full build:
|
||||
# - release build:
|
||||
# * RAM: typically less than 20%, with some peaks at 25%.
|
||||
# * CPU: over 90% of usage on average over the whole build time.
|
||||
|
@ -1920,6 +1942,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
endif()
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
# Matches both "Clang" & "AppleClang" on macOS.
|
||||
|
||||
add_check_c_compiler_flags(
|
||||
C_WARNINGS
|
||||
|
@ -2027,7 +2050,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||
CXX_WARN_NO_UNDEF_PREFIX -Wno-undef-prefix
|
||||
)
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||
|
||||
add_check_c_compiler_flags(
|
||||
C_WARNINGS
|
||||
|
@ -2048,7 +2071,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
|||
# Disable numbered, false positives.
|
||||
string(APPEND C_WARNINGS " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
|
||||
string(APPEND CXX_WARNINGS " -wd188,186,144,913,556,858,597,177,1292,167,279,592,94,2722,3199")
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
# most msvc warnings are C & C++
|
||||
set(_WARNINGS
|
||||
# warning level:
|
||||
|
@ -2135,19 +2158,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||
# Do not enable compiler specific language extensions.
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
# Make MSVC properly report the value of the __cplusplus preprocessor macro
|
||||
# Available MSVC 15.7 (1914) and up, without this it reports 199711L regardless
|
||||
# of the C++ standard chosen above.
|
||||
if(MSVC)
|
||||
string(APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus")
|
||||
endif()
|
||||
|
||||
# Visual Studio has all standards it supports available by default
|
||||
# Clang on windows copies this behavior and does not support these switches
|
||||
if(
|
||||
CMAKE_COMPILER_IS_GNUCC OR
|
||||
(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT MSVC)) OR
|
||||
(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||
)
|
||||
# Use C11 + GNU extensions, works with GCC, Clang, ICC
|
||||
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
||||
|
|
|
@ -100,8 +100,10 @@ include(cmake/fribidi.cmake)
|
|||
include(cmake/harfbuzz.cmake)
|
||||
if(NOT APPLE)
|
||||
include(cmake/xr_openxr.cmake)
|
||||
include(cmake/dpcpp.cmake)
|
||||
include(cmake/dpcpp_deps.cmake)
|
||||
if(NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
include(cmake/dpcpp.cmake)
|
||||
include(cmake/dpcpp_deps.cmake)
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
include(cmake/igc.cmake)
|
||||
include(cmake/gmmlib.cmake)
|
||||
|
@ -109,13 +111,20 @@ if(NOT APPLE)
|
|||
endif()
|
||||
endif()
|
||||
include(cmake/ispc.cmake)
|
||||
if(NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
include(cmake/openpgl.cmake)
|
||||
endif()
|
||||
# Embree needs to be included after dpcpp as it uses it for compiling with GPU support
|
||||
include(cmake/embree.cmake)
|
||||
include(cmake/openpgl.cmake)
|
||||
if(BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
# WoA needs embree to be built with the VS Generator + LLVM,
|
||||
# put it in its own file to avoid clutter.
|
||||
include(cmake/embree_windows_arm.cmake)
|
||||
else()
|
||||
include(cmake/embree.cmake)
|
||||
endif()
|
||||
include(cmake/fmt.cmake)
|
||||
include(cmake/robinmap.cmake)
|
||||
include(cmake/xml2.cmake)
|
||||
|
||||
# OpenColorIO and dependencies.
|
||||
include(cmake/expat.cmake)
|
||||
include(cmake/pystring.cmake)
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(NOT WIN32)
|
||||
if(BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
set(AOM_EXTRA_ARGS_WIN32 -DAOM_TARGET_CPU=generic)
|
||||
else()
|
||||
set(AOM_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
|
||||
endif()
|
||||
|
||||
|
|
|
@ -10,7 +10,10 @@ else()
|
|||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(MSVC_VERSION GREATER_EQUAL 1920) # 2019
|
||||
if(MSVC_TOOLSET_VERSION GREATER_EQUAL 143) # 2022
|
||||
set(BOOST_TOOLSET toolset=msvc-14.3)
|
||||
set(BOOST_COMPILER_STRING -vc143)
|
||||
elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 142) # 2019
|
||||
set(BOOST_TOOLSET toolset=msvc-14.2)
|
||||
set(BOOST_COMPILER_STRING -vc142)
|
||||
else() # 2017
|
||||
|
|
|
@ -15,7 +15,8 @@ foreach(_variableName ${_variableNames})
|
|||
# First see if DEP_HOMEPAGE is set, if it is use that.
|
||||
set(DEP_HOMEPAGE ${${DEP_NAME}_HOMEPAGE})
|
||||
if(NOT DEP_HOMEPAGE)
|
||||
# If the xxx_HOMEPAGE is not set but the URI for the archive is a known github format extract the reprository/project from the URI
|
||||
# If the xxx_HOMEPAGE is not set but the URI for the archive is a known github format
|
||||
# extract the repository/project from the URI.
|
||||
string(REGEX MATCH "https:\/\/(.*)github\.com\/(.+)\/(archive|releases|release|tar.gz)\/(.*)" DEP_PROJECT "${${_variableName}}")
|
||||
if(CMAKE_MATCH_2)
|
||||
set(DEP_HOMEPAGE "https://www.github.com/${CMAKE_MATCH_2}")
|
||||
|
|
|
@ -12,9 +12,9 @@ function(download_source dep)
|
|||
if(PACKAGE_USE_UPSTREAM_SOURCES)
|
||||
set(TARGET_URI ${${dep}_URI})
|
||||
elseif(BLENDER_VERSION)
|
||||
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/tags/blender-${BLENDER_VERSION}-release/lib/packages/${TARGET_FILE})
|
||||
set(TARGET_URI https://projects.blender.org/blender/lib-source/media/branch/blender-v${BLENDER_VERSION}-release/${TARGET_FILE})
|
||||
else()
|
||||
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
|
||||
set(TARGET_URI https://projects.blender.org/blender/lib-source/media/branch/main/${TARGET_FILE})
|
||||
endif()
|
||||
# Validate all required variables are set and give an explicit error message
|
||||
# rather than CMake erroring out later on with a more ambigious error.
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Authors
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
set(EMBREE_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
|
||||
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
-DEMBREE_ISPC_SUPPORT=OFF
|
||||
-DEMBREE_TUTORIALS=OFF
|
||||
-DEMBREE_STATIC_LIB=OFF
|
||||
-DEMBREE_RAY_MASK=ON
|
||||
-DEMBREE_FILTER_FUNCTION=ON
|
||||
-DEMBREE_BACKFACE_CULLING=OFF
|
||||
-DEMBREE_BACKFACE_CULLING_CURVES=ON
|
||||
-DEMBREE_BACKFACE_CULLING_SPHERES=ON
|
||||
-DEMBREE_NO_SPLASH=ON
|
||||
-DEMBREE_TASKING_SYSTEM=TBB
|
||||
-DEMBREE_TBB_ROOT=${LIBDIR}/tbb
|
||||
-DTBB_ROOT=${LIBDIR}/tbb
|
||||
)
|
||||
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
${EMBREE_EXTRA_ARGS}
|
||||
-DCMAKE_DEBUG_POSTFIX=_d
|
||||
)
|
||||
|
||||
set(EMBREE_LLVM_INSTALL_PATH ${LIBDIR}/llvm)
|
||||
|
||||
set(EMBREE_CMAKE_FLAGS
|
||||
-DCMAKE_BUILD_TYPE=${BUILD_MODE}
|
||||
)
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
-DCMAKE_CXX_COMPILER=${EMBREE_LLVM_INSTALL_PATH}/bin/clang-cl.exe
|
||||
-DCMAKE_C_COMPILER=${EMBREE_LLVM_INSTALL_PATH}/bin/clang-cl.exe
|
||||
-DCMAKE_C_FLAGS_INIT="--target=arm64-pc-windows-msvc"
|
||||
-DCMAKE_CXX_FLAGS_INIT="--target=arm64-pc-windows-msvc"
|
||||
-DCMAKE_SHARED_LINKER_FLAGS=-L"${LIBDIR}/llvm/lib"
|
||||
${EMBREE_EXTRA_ARGS}
|
||||
)
|
||||
|
||||
# We want the VS2019 tools for embree, as they are stable.
|
||||
# We cannot use VS2022 easily, unless we specify an older (unsupported) toolset such as 17.35,
|
||||
# as the newer toolsets mandate LLVM 16, which we cannot use currently,
|
||||
# due to lack of support in OSL and ISPC.
|
||||
set(EMBREE_VCTOOLS_REQUIRED_VERSION 14.29)
|
||||
|
||||
# Extract the list of installed tools that match the required version from the
|
||||
# `VCToolsInstallDir` env var
|
||||
file(TO_CMAKE_PATH $ENV{VCToolsInstallDir} EMBREE_VCTOOLSINSTALLDIR_PATH)
|
||||
cmake_path(GET EMBREE_VCTOOLSINSTALLDIR_PATH PARENT_PATH EMBREE_VCTOOLSDIR_PATH)
|
||||
file(GLOB EMBREE_INSTALLED_VCTOOLS RELATIVE ${EMBREE_VCTOOLSDIR_PATH} ${EMBREE_VCTOOLSDIR_PATH}/${EMBREE_VCTOOLS_REQUIRED_VERSION}*)
|
||||
|
||||
# Check that at least one the installed tool versions
|
||||
# (there may be different subversions) is present.
|
||||
if(NOT EMBREE_INSTALLED_VCTOOLS)
|
||||
message(FATAL_ERROR "When building for Windows ARM64 platforms, embree requires VC Tools ${EMBREE_VCTOOLS_REQUIRED_VERSION} to be installed alongside the current version.")
|
||||
endif()
|
||||
|
||||
# Get the last item in the list (latest, when list is sorted)
|
||||
list(SORT EMBREE_INSTALLED_VCTOOLS)
|
||||
list(GET EMBREE_INSTALLED_VCTOOLS -1 EMBREE_VCTOOLS_VERSION)
|
||||
|
||||
# Configure our in file and temporarily store it in the build dir
|
||||
# (with modified extension so nothing else picks it up)
|
||||
# This feels icky, but boost does something similar, and we haven't called
|
||||
# `ExternalProject_Add` yet, so the embree dir does not yet exist.
|
||||
configure_file(
|
||||
${PATCH_DIR}/embree_Directory.Build.Props.in
|
||||
${BUILD_DIR}/embree_Directory.Build.Props_temp
|
||||
)
|
||||
|
||||
# Update the patch command to copy the configured build props file in
|
||||
set(EMBREE_PATCH_COMMAND
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${BUILD_DIR}/embree_Directory.Build.Props_temp
|
||||
${BUILD_DIR}/embree/src/external_embree-build/Directory.Build.Props &&
|
||||
${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
|
||||
)
|
||||
|
||||
# This all only works if we use the VS generator (with `clangcl` toolset), so switch back to that
|
||||
# Note: there is literally no way to get ninja to use a different toolset other than manually
|
||||
# overwriting every env var, or calling a nested `vcvarsall`, both of which are *messy*.
|
||||
set(EMBREE_GENERATOR ${CMAKE_GENERATOR})
|
||||
set(EMBREE_GENERATOR_TOOLSET ClangCL)
|
||||
|
||||
if(TBB_STATIC_LIBRARY)
|
||||
set(EMBREE_EXTRA_ARGS
|
||||
${EMBREE_EXTRA_ARGS}
|
||||
-DEMBREE_TBB_COMPONENT=tbb_static
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_embree
|
||||
URL file://${PACKAGE_DIR}/${EMBREE_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${EMBREE_HASH_TYPE}=${EMBREE_HASH}
|
||||
CMAKE_GENERATOR ${EMBREE_GENERATOR}
|
||||
CMAKE_GENERATOR_TOOLSET ${EMBREE_GENERATOR_TOOLSET}
|
||||
PREFIX ${BUILD_DIR}/embree
|
||||
PATCH_COMMAND ${EMBREE_PATCH_COMMAND}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${EMBREE_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/embree
|
||||
)
|
||||
|
||||
add_dependencies(
|
||||
external_embree
|
||||
external_tbb
|
||||
ll
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_embree after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${LIBDIR}/embree/include
|
||||
${HARVEST_TARGET}/embree/include
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${LIBDIR}/embree/lib
|
||||
${HARVEST_TARGET}/embree/lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
${LIBDIR}/embree/share
|
||||
${HARVEST_TARGET}/embree/share
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/embree/bin/embree4.dll
|
||||
${HARVEST_TARGET}/embree/bin/embree4.dll
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add_Step(external_embree after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/embree/bin/embree4_d.dll
|
||||
${HARVEST_TARGET}/embree/bin/embree4_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/embree/lib/embree4_d.lib
|
||||
${HARVEST_TARGET}/embree/lib/embree4_d.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
|
@ -3,7 +3,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Generated configuration files use an old `aclocal-1.15` on RockyLinux8.
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_autoconf_cmd_optional ./autogen.sh &&)
|
||||
else()
|
||||
set(_autoconf_cmd_optional)
|
||||
|
|
|
@ -32,6 +32,8 @@ if(WIN32)
|
|||
ac_cv_prog_YACC=:
|
||||
ac_cv_prog_ac_ct_STRIP=:
|
||||
ac_cv_prog_RANLIB=:
|
||||
lt_cv_to_host_file_cmd=func_convert_file_noop
|
||||
lt_cv_to_tool_file_cmd=func_convert_file_noop
|
||||
)
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
|
|
|
@ -29,9 +29,7 @@ if(WIN32)
|
|||
${HARVEST_TARGET}/png/lib/libpng.lib &&
|
||||
${CMAKE_COMMAND} -E copy_directory
|
||||
${LIBDIR}/png/include/
|
||||
${HARVEST_TARGET}/png/include/ &&
|
||||
|
||||
DEPENDS
|
||||
${HARVEST_TARGET}/png/include/
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -7,9 +7,14 @@ if(WIN32)
|
|||
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
|
||||
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
|
||||
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/msys2/msys64/usr/bin/m4.exe
|
||||
-DARM_ENABLED=Off
|
||||
-DPython3_FIND_REGISTRY=NEVER
|
||||
)
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(ISPC_EXTRA_ARGS_WIN ${ISPC_EXTRA_ARGS_WIN} -DARM_ENABLED=On)
|
||||
else()
|
||||
set(ISPC_EXTRA_ARGS_WIN ${ISPC_EXTRA_ARGS_WIN} -DARM_ENABLED=Off)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
# Use bison and flex installed via Homebrew.
|
||||
# The ones that come with Xcode toolset are too old.
|
||||
|
|
|
@ -4,7 +4,11 @@
|
|||
|
||||
set(LAME_EXTRA_ARGS)
|
||||
if(MSVC)
|
||||
set(LAME_ARCH Win64)
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(LAME_ARCH ARM64)
|
||||
else()
|
||||
set(LAME_ARCH Win64)
|
||||
endif()
|
||||
set(LAME_CONFIGURE echo .)
|
||||
set(LAME_BUILD
|
||||
cd ${BUILD_DIR}/lame/src/external_lame/ &&
|
||||
|
|
|
@ -13,8 +13,10 @@ if(APPLE)
|
|||
-DLIBXML2_LIBRARY=${LIBDIR}/xml2/lib/libxml2.a
|
||||
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
||||
)
|
||||
set(LLVM_BUILD_CLANG_TOOLS_EXTRA ^^clang-tools-extra)
|
||||
set(LLVM_EXTRA_PROJECTS ^^clang-tools-extra)
|
||||
set(BUILD_CLANG_TOOLS ON)
|
||||
elseif(MSVC AND BLENDER_PLATFORM_ARM)
|
||||
set(LLVM_EXTRA_PROJECTS ^^lld)
|
||||
else()
|
||||
# NVIDIA PTX for OSL on Windows and Linux.
|
||||
set(LLVM_TARGETS ${LLVM_TARGETS}$<SEMICOLON>NVPTX)
|
||||
|
@ -31,7 +33,7 @@ set(LLVM_EXTRA_ARGS
|
|||
-DLLVM_ENABLE_UNWIND_TABLES=OFF
|
||||
-DLLVM_ENABLE_ZSTD=OFF
|
||||
-DLLVM_ENABLE_ZLIB=OFF
|
||||
-DLLVM_ENABLE_PROJECTS=clang${LLVM_BUILD_CLANG_TOOLS_EXTRA}
|
||||
-DLLVM_ENABLE_PROJECTS=clang${LLVM_EXTRA_PROJECTS}
|
||||
-DPython3_ROOT_DIR=${LIBDIR}/python/
|
||||
-DPython3_EXECUTABLE=${PYTHON_BINARY}
|
||||
${LLVM_XML2_ARGS}
|
||||
|
|
|
@ -17,15 +17,22 @@ if(APPLE)
|
|||
else()
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DOIDN_DEVICE_SYCL=ON
|
||||
-DOIDN_DEVICE_SYCL_AOT=OFF
|
||||
-DOIDN_DEVICE_CUDA=ON
|
||||
-DOIDN_DEVICE_HIP=ON
|
||||
-DOIDN_DEVICE_CPU=ON
|
||||
-DLEVEL_ZERO_ROOT=${LIBDIR}/level-zero
|
||||
)
|
||||
|
||||
# x64 platforms support SyCL, ARM64 don't
|
||||
if(NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DOIDN_DEVICE_SYCL=ON
|
||||
-DOIDN_DEVICE_SYCL_AOT=OFF
|
||||
-DOIDN_DEVICE_CUDA=ON
|
||||
-DOIDN_DEVICE_HIP=ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 AND NOT BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DTBB_DEBUG_LIBRARY=${LIBDIR}/tbb/lib/tbb.lib
|
||||
|
@ -41,7 +48,7 @@ if(WIN32)
|
|||
-DCMAKE_EXE_LINKER_FLAGS=-L"${LIBDIR}/dpcpp/lib"
|
||||
)
|
||||
else()
|
||||
if(NOT APPLE)
|
||||
if(NOT (APPLE OR BLENDER_PLATFORM_WINDOWS_ARM))
|
||||
set(OIDN_EXTRA_ARGS
|
||||
${OIDN_EXTRA_ARGS}
|
||||
-DCMAKE_CXX_COMPILER=${LIBDIR}/dpcpp/bin/clang++
|
||||
|
@ -52,6 +59,21 @@ else()
|
|||
set(OIDN_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
|
||||
endif()
|
||||
|
||||
set(ODIN_PATCH_COMMAND
|
||||
${PATCH_CMD} --verbose -p 1 -N -d
|
||||
${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise <
|
||||
${PATCH_DIR}/oidn.diff
|
||||
)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Replace `attrib.memoryType` with `attrib.type`.
|
||||
# See: https://github.com/ROCm/HIP/pull/2164
|
||||
set(ODIN_PATCH_COMMAND ${ODIN_PATCH_COMMAND} &&
|
||||
sed -i "s/(attrib\\.memoryType)/(attrib.type)/g"
|
||||
${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise/devices/hip/hip_device.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_openimagedenoise
|
||||
URL file://${PACKAGE_DIR}/${OIDN_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
|
@ -64,13 +86,12 @@ ExternalProject_Add(external_openimagedenoise
|
|||
${OIDN_CMAKE_FLAGS}
|
||||
${OIDN_EXTRA_ARGS}
|
||||
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d
|
||||
${BUILD_DIR}/openimagedenoise/src/external_openimagedenoise <
|
||||
${PATCH_DIR}/oidn.diff
|
||||
|
||||
PATCH_COMMAND ${ODIN_PATCH_COMMAND}
|
||||
INSTALL_DIR ${LIBDIR}/openimagedenoise
|
||||
)
|
||||
|
||||
unset(ODIN_PATCH_COMMAND)
|
||||
|
||||
add_dependencies(
|
||||
external_openimagedenoise
|
||||
external_tbb
|
||||
|
|
|
@ -17,7 +17,11 @@ else()
|
|||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(OIIO_SIMD_FLAGS -DUSE_SIMD=0)
|
||||
else()
|
||||
set(OIIO_SIMD_FLAGS -DUSE_SIMD=sse2)
|
||||
endif()
|
||||
set(OPENJPEG_POSTFIX _msvc)
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
set(TIFF_POSTFIX d)
|
||||
|
|
|
@ -49,11 +49,11 @@ if(WIN32)
|
|||
)
|
||||
else()
|
||||
ExternalProject_Add_Step(external_openpgl after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $
|
||||
{LIBDIR}/openpgl/lib/openpgl_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/openpgl/lib/openpgl_d.lib
|
||||
${HARVEST_TARGET}/openpgl/lib/openpgl_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $
|
||||
{LIBDIR}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake
|
||||
${HARVEST_TARGET}/openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION}/openpgl_Exports-debug.cmake
|
||||
|
||||
DEPENDEES install
|
||||
|
|
|
@ -58,8 +58,8 @@ if(WIN32)
|
|||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/opensubdiv/lib/osdCPU.lib
|
||||
${HARVEST_TARGET}/opensubdiv/lib/osdCPU_d.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $
|
||||
{LIBDIR}/opensubdiv/lib/osdGPU.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/opensubdiv/lib/osdGPU.lib
|
||||
${HARVEST_TARGET}/opensubdiv/lib/osdGPU_d.lib
|
||||
|
||||
DEPENDEES install
|
||||
|
|
|
@ -87,6 +87,11 @@ add_dependencies(
|
|||
)
|
||||
|
||||
if(WIN32)
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(OPENVDB_ARCH arm64)
|
||||
else()
|
||||
set(OPENVDB_ARCH amd64)
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(openvdb after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
|
@ -99,8 +104,8 @@ if(WIN32)
|
|||
${LIBDIR}/openvdb/bin/openvdb.dll
|
||||
${HARVEST_TARGET}/openvdb/bin/openvdb.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_amd64.pyd
|
||||
${HARVEST_TARGET}openvdb/python/pyopenvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_amd64.pyd
|
||||
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
|
||||
${HARVEST_TARGET}openvdb/python/pyopenvdb.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
|
@ -114,8 +119,8 @@ if(WIN32)
|
|||
${LIBDIR}/openvdb/bin/openvdb_d.dll
|
||||
${HARVEST_TARGET}/openvdb/bin/openvdb_d.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_amd64.pyd
|
||||
${HARVEST_TARGET}openvdb/python/pyopenvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_amd64.pyd
|
||||
${LIBDIR}/openvdb/lib/python${PYTHON_SHORT_VERSION}/site-packages/pyopenvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
|
||||
${HARVEST_TARGET}openvdb/python/pyopenvdb_d.cp${PYTHON_SHORT_VERSION_NO_DOTS}-win_${OPENVDB_ARCH}.pyd
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
|
|
|
@ -41,6 +41,10 @@ message("PATCH_DIR = ${PATCH_DIR}")
|
|||
message("BUILD_DIR = ${BUILD_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
set(BLENDER_PLATFORM_ARM ON)
|
||||
set(BLENDER_PLATFORM_WINDOWS_ARM ON)
|
||||
endif()
|
||||
set(PATCH_CMD ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/patch.exe)
|
||||
set(LIBEXT ".lib")
|
||||
set(SHAREDLIBEXT ".lib")
|
||||
|
@ -112,7 +116,25 @@ if(WIN32)
|
|||
|
||||
set(PLATFORM_FLAGS)
|
||||
set(PLATFORM_CXX_FLAGS)
|
||||
set(PLATFORM_CMAKE_FLAGS)
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
# In some cases on ARM64 (unsure why), dep builds using the "Ninja" generator appear to use
|
||||
# the x86 host tools (ie, x86 cl.exe producing ARM64 binaries). This is problematic when
|
||||
# building things like LLVM, as memory is limited to 3GB, giving internal compiler errors.
|
||||
# Here, we set CMAKE_C_COMPILER et al via PLATFORM_CMAKE_FLAGS to point to the ARM64 native
|
||||
# binary, which doesn't have this issue.
|
||||
# We make an assumption that the tools (ie, right now in the code) are the ones we want
|
||||
set(PLATFORM_CMAKE_FLAGS
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_AR=${CMAKE_AR}
|
||||
-DCMAKE_LINKER=${CMAKE_LINKER}
|
||||
-DCMAKE_MT=${CMAKE_MT}
|
||||
-DCMAKE_RC_COMPILER=${CMAKE_RC_COMPILER}
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_CMAKE_FLAGS)
|
||||
endif()
|
||||
|
||||
set(MINGW_PATH ${DOWNLOAD_DIR}/msys2/msys64/)
|
||||
set(MINGW_SHELL ming64sh.cmd)
|
||||
|
|
|
@ -9,13 +9,24 @@ if(BUILD_MODE STREQUAL Debug)
|
|||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_BINARY ${LIBDIR}/python/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_SRC ${BUILD_DIR}/python/src/external_python/)
|
||||
macro(cmake_to_dos_path MsysPath ResultingPath)
|
||||
string(REPLACE "/" "\\" ${ResultingPath} "${MsysPath}")
|
||||
endmacro()
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/arm64/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_BAT_ARCH arm64)
|
||||
set(PYTHON_INSTALL_ARCH_FOLDER ${PYTHON_SRC}/PCbuild/arm64)
|
||||
set(PYTHON_PATCH_FILE python_windows_arm64.diff)
|
||||
else()
|
||||
set(PYTHON_BINARY_INTERNAL ${BUILD_DIR}/python/src/external_python/PCBuild/amd64/python${PYTHON_POSTFIX}.exe)
|
||||
set(PYTHON_BAT_ARCH x64)
|
||||
set(PYTHON_INSTALL_ARCH_FOLDER ${PYTHON_SRC}/PCbuild/amd64)
|
||||
set(PYTHON_PATCH_FILE python_windows_x64.diff)
|
||||
endif()
|
||||
|
||||
set(PYTHON_EXTERNALS_FOLDER ${BUILD_DIR}/python/src/external_python/externals)
|
||||
set(ZLIB_SOURCE_FOLDER ${BUILD_DIR}/zlib/src/external_zlib)
|
||||
set(SSL_SOURCE_FOLDER ${BUILD_DIR}/ssl/src/external_ssl)
|
||||
|
@ -44,7 +55,7 @@ if(WIN32)
|
|||
${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.13/zconf.h &&
|
||||
${PATCH_CMD} --verbose -p1 -d
|
||||
${BUILD_DIR}/python/src/external_python <
|
||||
${PATCH_DIR}/python_windows.diff
|
||||
${PATCH_DIR}/${PYTHON_PATCH_FILE}
|
||||
|
||||
CONFIGURE_COMMAND echo "."
|
||||
|
||||
|
@ -53,10 +64,10 @@ if(WIN32)
|
|||
set IncludeTkinter=false &&
|
||||
set LDFLAGS=/DEBUG &&
|
||||
call prepare_ssl.bat &&
|
||||
call build.bat -e -p x64 -c ${BUILD_MODE}
|
||||
call build.bat -e -p ${PYTHON_BAT_ARCH} -c ${BUILD_MODE}
|
||||
|
||||
INSTALL_COMMAND ${PYTHON_BINARY_INTERNAL} ${PYTHON_SRC}/PC/layout/main.py
|
||||
-b ${PYTHON_SRC}/PCbuild/amd64
|
||||
-b ${PYTHON_INSTALL_ARCH_FOLDER}
|
||||
-s ${PYTHON_SRC}
|
||||
-t ${PYTHON_SRC}/tmp/
|
||||
--include-stable
|
||||
|
@ -105,12 +116,14 @@ else()
|
|||
endif()
|
||||
set(PYTHON_BINARY ${LIBDIR}/python/bin/python${PYTHON_SHORT_VERSION})
|
||||
|
||||
# Various flags to convince Python to use our own versions of ffi, sqlite, ssl, bzip2, lzma and zlib.
|
||||
# Various flags to convince Python to use our own versions of:
|
||||
# `ffi`, `sqlite`, `ssl`, `bzip2`, `lzma` and `zlib`.
|
||||
# Using pkg-config is only supported for some, and even then we need to work around issues.
|
||||
set(PYTHON_CONFIGURE_EXTRA_ARGS --with-openssl=${LIBDIR}/ssl)
|
||||
set(PYTHON_CFLAGS "${PLATFORM_CFLAGS} ")
|
||||
# Manually specify some library paths. For ffi there is no other way, for sqlite is needed because
|
||||
# LIBSQLITE3_LIBS does not work, and ssl because it uses the wrong ssl/lib dir instead of ssl/lib64.
|
||||
# Manually specify some library paths. For ffi there is no other way,
|
||||
# for sqlite is needed because LIBSQLITE3_LIBS does not work,
|
||||
# and ssl because it uses the wrong ssl/lib dir instead of ssl/lib64.
|
||||
set(PYTHON_LDFLAGS "-L${LIBDIR}/ffi/lib -L${LIBDIR}/sqlite/lib -L${LIBDIR}/ssl/lib -L${LIBDIR}/ssl/lib64 ${PLATFORM_LDFLAGS} ")
|
||||
set(PYTHON_CONFIGURE_EXTRA_ENV
|
||||
export CFLAGS=${PYTHON_CFLAGS} &&
|
||||
|
|
|
@ -58,7 +58,7 @@ if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd") AND
|
|||
# Do initial upgrade of pacman packages (only required for initial setup, to get
|
||||
# latest packages as opposed to to what the installer comes with)
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -Syu --noconfirm && exit"
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -Sy --noconfirm && exit"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
endif()
|
||||
|
@ -87,7 +87,8 @@ if(EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/perl.exe")
|
|||
)
|
||||
endif()
|
||||
|
||||
# Strip out the copy of link that comes with some packages if it exists, otherwise meson builds break
|
||||
# Strip out the copy of link that comes with some packages if it exists,
|
||||
# otherwise meson builds break.
|
||||
if(EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/link.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E rm ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/link.exe
|
||||
|
|
|
@ -9,9 +9,13 @@ ExternalProject_Add(external_sse2neon
|
|||
PREFIX ${BUILD_DIR}/sse2neon
|
||||
CONFIGURE_COMMAND echo sse2neon - Nothing to configure
|
||||
BUILD_COMMAND echo sse2neon - nothing to build
|
||||
|
||||
INSTALL_COMMAND mkdir -p ${LIBDIR}/sse2neon &&
|
||||
cp ${BUILD_DIR}/sse2neon/src/external_sse2neon/sse2neon.h ${LIBDIR}/sse2neon
|
||||
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sse2neon/src/external_sse2neon/sse2neon.h ${LIBDIR}/sse2neon
|
||||
INSTALL_DIR ${LIBDIR}/sse2neon
|
||||
)
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_sse2neon after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/sse2neon ${HARVEST_TARGET}/sse2neon
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
set(SSL_CONFIGURE_COMMAND ./Configure)
|
||||
|
||||
if(WIN32)
|
||||
# Python will build this with its preferred build options and patches. We only need to unpack openssl
|
||||
# Python will build this with its preferred build options and patches.
|
||||
# We only need to unpack openssl.
|
||||
ExternalProject_Add(external_ssl
|
||||
URL file://${PACKAGE_DIR}/${SSL_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
|
|
|
@ -41,7 +41,8 @@ if(NOT WIN32)
|
|||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
else()
|
||||
# We are kind of naughty here and steal vorbis' FindOgg.cmake, but given it's a dependency anyway...
|
||||
# We are kind of naughty here and steal vorbis' `FindOgg.cmake`,
|
||||
# but given it's a dependency anyway.
|
||||
ExternalProject_Add(external_theora
|
||||
URL file://${PACKAGE_DIR}/${THEORA_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
if(WIN32)
|
||||
# OIIO and OSL are statically linked for us, but USD doesn't know
|
||||
set(USD_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DOIIO_STATIC_DEFINE /DOSL_STATIC_DEFINE")
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(USD_CXX_FLAGS "${USD_CXX_FLAGS} /DOIIO_NO_SSE")
|
||||
endif()
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
# USD does not look for debug libs, nor does it link them
|
||||
# when building static, so this is just to keep find_package happy
|
||||
|
|
|
@ -219,9 +219,9 @@ set(TIFF_HOMEPAGE http://www.simplesystems.org/libtiff/)
|
|||
# Recent commit from 1.13.5.0 under development, which includes string table
|
||||
# changes that make the Cycles OptiX implementation work. Official 1.12 OSL
|
||||
# releases should also build but without OptiX support.
|
||||
set(OSL_VERSION 3d52f3906b12d38ad0f4b991a8f9ea678171bd28)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH dfe5d69f48930badc1ad39a4e11e2e98)
|
||||
set(OSL_VERSION 1.13.7.0)
|
||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/refs/tags/v${OSL_VERSION}.tar.gz)
|
||||
set(OSL_HASH 769ae444a7df0e6561b3e745fd2eb50d)
|
||||
set(OSL_HASH_TYPE MD5)
|
||||
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
|
||||
|
||||
|
@ -529,9 +529,9 @@ set(MATERIALX_HASH fad8f4e19305fb2ee920cbff638f3560)
|
|||
set(MATERIALX_HASH_TYPE MD5)
|
||||
set(MATERIALX_FILE materialx-v${MATERIALX_VERSION}.tar.gz)
|
||||
|
||||
set(OIDN_VERSION 2.2.0-rc2)
|
||||
set(OIDN_VERSION 2.2.1)
|
||||
set(OIDN_URI https://github.com/OpenImageDenoise/oidn/releases/download/v${OIDN_VERSION}/oidn-${OIDN_VERSION}.src.tar.gz)
|
||||
set(OIDN_HASH 14b261af3a719c49ab10e71583f1a61a)
|
||||
set(OIDN_HASH a1c5299b2b640a0e0569afcf405c82bf)
|
||||
set(OIDN_HASH_TYPE MD5)
|
||||
set(OIDN_FILE oidn-${OIDN_VERSION}.src.tar.gz)
|
||||
|
||||
|
@ -722,9 +722,9 @@ set(UNIFIED_RUNTIME_FILE unified-runtime-${UNIFIED_RUNTIME_VERSION}.tar.gz)
|
|||
# compiler, the versions used are taken from the following location
|
||||
# https://github.com/intel/intel-graphics-compiler/releases
|
||||
|
||||
set(IGC_VERSION 1.0.14828.26)
|
||||
set(IGC_VERSION 1.0.15468.25)
|
||||
set(IGC_URI https://github.com/intel/intel-graphics-compiler/archive/refs/tags/igc-${IGC_VERSION}.tar.gz)
|
||||
set(IGC_HASH acad90b3e149cf87875e6b9100152f9e7644d6cc79ed54eaf52698abdb42076c)
|
||||
set(IGC_HASH c2c36af98ead4f4f6975633eaa53f45b84cb96ce48d9bfa879bebfaf12367b79)
|
||||
set(IGC_HASH_TYPE SHA256)
|
||||
set(IGC_FILE igc-${IGC_VERSION}.tar.gz)
|
||||
|
||||
|
@ -768,9 +768,9 @@ set(IGC_SPIRV_TOOLS_HASH 327b2dba4515646eee28c1a5fe1332891e81c8b6ff289363f52877f
|
|||
set(IGC_SPIRV_TOOLS_HASH_TYPE SHA256)
|
||||
set(IGC_SPIRV_TOOLS_FILE SPIR-V-Tools-${IGC_SPIRV_TOOLS_VERSION}.tar.gz)
|
||||
|
||||
set(IGC_SPIRV_TRANSLATOR_VERSION 23f398bf369093b1fd67459db8071ffcc6b92658)
|
||||
set(IGC_SPIRV_TRANSLATOR_VERSION 7e332d0acc8ee57462d9fbedefaf411fc193fdd0)
|
||||
set(IGC_SPIRV_TRANSLATOR_URI https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/${IGC_SPIRV_TRANSLATOR_VERSION}.tar.gz)
|
||||
set(IGC_SPIRV_TRANSLATOR_HASH a96447656ff6b40d9ad286524e22f4e7319d439c54136026fe72550d1162cd35)
|
||||
set(IGC_SPIRV_TRANSLATOR_HASH 29aadf5fd4e64ff1d4f86446eacd6a7439efeb280478988c36314c4441072c36)
|
||||
set(IGC_SPIRV_TRANSLATOR_HASH_TYPE SHA256)
|
||||
set(IGC_SPIRV_TRANSLATOR_FILE SPIR-V-Translator-${IGC_SPIRV_TRANSLATOR_VERSION}.tar.gz)
|
||||
|
||||
|
@ -778,15 +778,15 @@ set(IGC_SPIRV_TRANSLATOR_FILE SPIR-V-Translator-${IGC_SPIRV_TRANSLATOR_VERSION}.
|
|||
### Intel Graphics Compiler DEPS END ###
|
||||
########################################
|
||||
|
||||
set(GMMLIB_VERSION intel-gmmlib-22.3.0)
|
||||
set(GMMLIB_VERSION intel-gmmlib-22.3.11)
|
||||
set(GMMLIB_URI https://github.com/intel/gmmlib/archive/refs/tags/${GMMLIB_VERSION}.tar.gz)
|
||||
set(GMMLIB_HASH c1f33e1519edfc527127baeb0436b783430dfd256c643130169a3a71dc86aff9)
|
||||
set(GMMLIB_HASH b97f4e501c1e902a559cbd6597c008a700f4ab8c495680bf1968db99c6547afe)
|
||||
set(GMMLIB_HASH_TYPE SHA256)
|
||||
set(GMMLIB_FILE ${GMMLIB_VERSION}.tar.gz)
|
||||
|
||||
set(OCLOC_VERSION 23.30.26918.47)
|
||||
set(OCLOC_VERSION 23.43.27642.40)
|
||||
set(OCLOC_URI https://github.com/intel/compute-runtime/archive/refs/tags/${OCLOC_VERSION}.tar.gz)
|
||||
set(OCLOC_HASH 9890f29cbf27ce7eb845f3f7711fe8f3b0c4ee2164b77871fe51102548553f8f)
|
||||
set(OCLOC_HASH 67d0c6f3103ff12408a628e14f7170da3e0220313e10799693d576cea7821fe2)
|
||||
set(OCLOC_HASH_TYPE SHA256)
|
||||
set(OCLOC_FILE ocloc-${OCLOC_VERSION}.tar.gz)
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ if(WIN32)
|
|||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
# ARM64 requires a min of vc142
|
||||
set(VPX_EXTRA_FLAGS --target=arm64-win64-vs16 --as=nasm)
|
||||
set(VPX_INCL_ARCH nopost-nodocs-arm64)
|
||||
set(VPX_EXTRA_FLAGS --target=arm64-win64-vs16 --as=nasm --disable-neon_dotprod --disable-neon_i8mm)
|
||||
set(VPX_INCL_ARCH nopost-nodocs-arm64-win64)
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-win64-${VPX_COMPILER_STRING} --as=nasm)
|
||||
set(VPX_INCL_ARCH nodocs-x86_64-win64)
|
||||
|
|
|
@ -30,6 +30,11 @@ if(UNIX AND NOT APPLE)
|
|||
-DPKG_WAYLAND_INCLUDE_DIRS=${LIBDIR}/wayland/include
|
||||
-DPKG_WAYLAND_LIBRARY_DIRS=${LIBDIR}/wayland/lib64
|
||||
)
|
||||
elseif(BLENDER_PLATFORM_WINDOWS_ARM)
|
||||
set(VULKAN_LOADER_EXTRA_ARGS
|
||||
-DUSE_MASM=OFF
|
||||
-DVulkanHeaders_DIR=${LIBDIR}/vulkan_headers/share/cmake/VulkanHeaders
|
||||
)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_vulkan_loader
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
set -e
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Required by: config manager command below to enable powertools.
|
||||
|
@ -46,8 +46,7 @@ dnf config-manager --add-repo http://developer.download.nvidia.com/compute/cuda/
|
|||
PACKAGES_FOR_LIBS=(
|
||||
# Used to checkout Blender's code.
|
||||
git
|
||||
# Used to checkout Blender's `../lib/` directory.
|
||||
subversion
|
||||
git-lfs
|
||||
# Used to extract packages.
|
||||
bzip2
|
||||
# Used to extract packages.
|
||||
|
|
|
@ -145,7 +145,7 @@ if (UNIX)
|
|||
|
||||
elseif(WIN32)
|
||||
target_compile_definitions(tbb_interface INTERFACE USE_WINTHREAD _WIN32_WINNT=0x0600)
|
||||
if (MSVC)
|
||||
if (MSVC AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES ARM64)
|
||||
enable_language(ASM_MASM)
|
||||
target_compile_options(tbb_interface INTERFACE /GS- /Zc:wchar_t /Zc:forScope)
|
||||
check_cxx_compiler_flag ("/volatile:iso" SUPPORTS_VOLATILE_FLAG)
|
||||
|
@ -209,7 +209,11 @@ endif()
|
|||
if (APPLE)
|
||||
set (ARCH_PREFIX "mac")
|
||||
elseif(WIN32)
|
||||
set (ARCH_PREFIX "win")
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES ARM64)
|
||||
set (ARCH_PREFIX "winarm")
|
||||
else()
|
||||
set (ARCH_PREFIX "win")
|
||||
endif()
|
||||
else()
|
||||
set (ARCH_PREFIX "lin")
|
||||
endif()
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7fa9423e2..6de9b072b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -242,7 +242,7 @@ OPTION(EMBREE_MIN_WIDTH "Enables min-width feature to enlarge curve and point th
|
||||
IF (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64"))
|
||||
MESSAGE(STATUS "Building for Apple silicon")
|
||||
SET(EMBREE_ARM ON)
|
||||
-ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
+ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
MESSAGE(STATUS "Building for AArch64")
|
||||
SET(EMBREE_ARM ON)
|
||||
ENDIF()
|
||||
diff --git a/kernels/CMakeLists.txt b/kernels/CMakeLists.txt
|
||||
index 7c2f43d..106b1d5 100644
|
||||
index fae31f4a4..8bb3601e7 100644
|
||||
--- a/kernels/CMakeLists.txt
|
||||
+++ b/kernels/CMakeLists.txt
|
||||
@@ -208,6 +208,12 @@ embree_files(EMBREE_LIBRARY_FILES_AVX512 ${AVX512})
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<LLVMInstallDir>${EMBREE_LLVM_INSTALL_PATH}</LLVMInstallDir>
|
||||
<LLVMToolsVersion>${LLVM_VERSION}</LLVMToolsVersion>
|
||||
<VCToolsVersion>${EMBREE_VCTOOLS_VERSION}</VCToolsVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,6 +1,7 @@
|
|||
diff -Naur external_levelzero_org/CMakeLists.txt external_levelzero/CMakeLists.txt
|
||||
--- external_levelzero_org/CMakeLists.txt 2022-03-07 13:22:11 -0700
|
||||
+++ external_levelzero/CMakeLists.txt 2022-03-29 13:22:15 -0600
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7e27816..bd34055 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -81,13 +81,6 @@ if(MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /DYNAMICBASE")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DYNAMICBASE")
|
||||
|
@ -13,5 +14,16 @@ diff -Naur external_levelzero_org/CMakeLists.txt external_levelzero/CMakeLists.t
|
|||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
|
||||
- endif()
|
||||
endif()
|
||||
|
||||
|
||||
#CXX compiler support
|
||||
@@ -128,7 +121,9 @@ if(MSVC)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
|
||||
|
||||
# enable CET shadow stack
|
||||
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /CETCOMPAT")
|
||||
+ if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES ARM64)
|
||||
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /CETCOMPAT")
|
||||
+ endif()
|
||||
|
||||
#Use of sccache with MSVC requires workaround of replacing /Zi with /Z7
|
||||
#https://github.com/mozilla/sccache
|
||||
|
|
|
@ -52,3 +52,24 @@ diff -Naur oidn-2.2.0/devices/CMakeLists.txt external_openimagedenoise/devices/C
|
|||
BUILD_ALWAYS TRUE
|
||||
DEPENDS
|
||||
OpenImageDenoise_core
|
||||
diff --git a/devices/hip/hip_device.cpp b/devices/hip/hip_device.cpp
|
||||
index ae14ced..a49e131 100644
|
||||
--- a/devices/hip/hip_device.cpp
|
||||
+++ b/devices/hip/hip_device.cpp
|
||||
@@ -93,10 +93,16 @@ OIDN_NAMESPACE_BEGIN
|
||||
{
|
||||
const std::string name = getArchName(prop);
|
||||
|
||||
+ // BLENDER: this comment is meant to generate a merge conflict if the code
|
||||
+ // here changes, so we know that hipSupportsDeviceOIDN should be updated.
|
||||
if (name == "gfx1030")
|
||||
return HIPArch::DL;
|
||||
+ // BLENDER: this comment is meant to generate a merge conflict if the code
|
||||
+ // here changes, so we know that hipSupportsDeviceOIDN should be updated.
|
||||
if (name == "gfx1100" || name == "gfx1101" || name == "gfx1102")
|
||||
return HIPArch::WMMA;
|
||||
+ // BLENDER: this comment is meant to generate a merge conflict if the code
|
||||
+ // here changes, so we know that hipSupportsDeviceOIDN should be updated.
|
||||
else
|
||||
return HIPArch::Unknown;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/lib/openjp2/ht_dec.c b/src/lib/openjp2/ht_dec.c
|
||||
index 1eb4d525..e2f3afd6 100644
|
||||
--- a/src/lib/openjp2/ht_dec.c
|
||||
+++ b/src/lib/openjp2/ht_dec.c
|
||||
@@ -69,7 +69,7 @@ static OPJ_BOOL only_cleanup_pass_is_decoded = OPJ_FALSE;
|
||||
static INLINE
|
||||
OPJ_UINT32 population_count(OPJ_UINT32 val)
|
||||
{
|
||||
-#ifdef OPJ_COMPILER_MSVC
|
||||
+#if defined(OPJ_COMPILER_MSVC) && (defined(_M_IX86) || defined(_M_AMD64))
|
||||
return (OPJ_UINT32)__popcnt(val);
|
||||
#elif (defined OPJ_COMPILER_GNUC)
|
||||
return (OPJ_UINT32)__builtin_popcount(val);
|
|
@ -1,6 +1,6 @@
|
|||
diff -Naur orig/Makefile external_pthreads/Makefile
|
||||
--- orig/Makefile 2018-08-08 04:47:40 -0600
|
||||
+++ external_pthreads/Makefile 2020-05-09 11:20:28 -0600
|
||||
diff -Naur pthreads4w-clean/Makefile pthreads4w-dirty/Makefile
|
||||
--- pthreads4w-clean/Makefile 2022-11-18 10:08:27.266563200 +0000
|
||||
+++ pthreads4w-dirty/Makefile 2022-11-18 10:16:59.465704400 +0000
|
||||
@@ -185,7 +185,7 @@
|
||||
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
|
||||
|
@ -10,3 +10,36 @@ diff -Naur orig/Makefile external_pthreads/Makefile
|
|||
|
||||
VC-static-debug:
|
||||
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
diff -Naur pthreads4w-clean/context.h pthreads4w-dirty/context.h
|
||||
--- pthreads4w-clean/context.h 2022-11-18 10:08:27.564507100 +0000
|
||||
+++ pthreads4w-dirty/context.h 2022-11-18 10:13:50.209986300 +0000
|
||||
@@ -62,7 +62,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(_ARM_) || defined(ARM) || defined(_M_ARM) || defined(_M_ARM64)
|
||||
-#define PTW32_PROGCTR(Context) ((Context).Pc)
|
||||
+#define __PTW32_PROGCTR(Context) ((Context).Pc)
|
||||
#endif
|
||||
|
||||
#if !defined (__PTW32_PROGCTR)
|
||||
diff -Naur pthreads4w-clean/version.rc pthreads4w-dirty/version.rc
|
||||
--- pthreads4w-clean/version.rc 2022-11-18 10:08:30.101359500 +0000
|
||||
+++ pthreads4w-dirty/version.rc 2022-11-18 10:14:44.651478200 +0000
|
||||
@@ -63,6 +63,17 @@
|
||||
# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0"
|
||||
# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH x86\0"
|
||||
# endif
|
||||
+# elif defined (__PTW32_ARCHARM64)
|
||||
+# if defined(__PTW32_CLEANUP_C)
|
||||
+# define __PTW32_VERSIONINFO_NAME "pthreadVC2.DLL\0"
|
||||
+# define __PTW32_VERSIONINFO_DESCRIPTION "MS C arm64\0"
|
||||
+# elif defined(__PTW32_CLEANUP_CXX)
|
||||
+# define __PTW32_VERSIONINFO_NAME "pthreadVCE2.DLL\0"
|
||||
+# define __PTW32_VERSIONINFO_DESCRIPTION "MS C++ arm64\0"
|
||||
+# elif defined(__PTW32_CLEANUP_SEH)
|
||||
+# define __PTW32_VERSIONINFO_NAME "pthreadVSE2.DLL\0"
|
||||
+# define __PTW32_VERSIONINFO_DESCRIPTION "MS C SEH arm64\0"
|
||||
+# endif
|
||||
# endif
|
||||
#elif defined(__GNUC__)
|
||||
# if defined(_M_X64)
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
--- a/PCbuild/prepare_ssl.bat 2022-10-30 11:48:14 -0600
|
||||
+++ b/PCbuild/prepare_ssl.bat 2022-10-30 11:53:16 -0600
|
||||
@@ -47,12 +47,13 @@
|
||||
if "%PERL%" == "" where perl > "%TEMP%\perl.loc" 2> nul && set /P PERL= <"%TEMP%\perl.loc" & del "%TEMP%\perl.loc"
|
||||
if "%PERL%" == "" (echo Cannot locate perl.exe on PATH or as PERL variable & exit /b 4)
|
||||
|
||||
-%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=Win32
|
||||
-if errorlevel 1 exit /b
|
||||
+REM Blender: we only need x64, ssl is kind of a long build, so just build what we need
|
||||
+REM %MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=Win32
|
||||
+REM if errorlevel 1 exit /b
|
||||
-%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=x64
|
||||
-if errorlevel 1 exit /b
|
||||
-%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM
|
||||
-if errorlevel 1 exit /b
|
||||
+REM %MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=x64
|
||||
+REM if errorlevel 1 exit /b
|
||||
+REM %MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM
|
||||
+REM if errorlevel 1 exit /b
|
||||
%MSBUILD% "%PCBUILD%\openssl.vcxproj" /p:Configuration=Release /p:Platform=ARM64
|
||||
if errorlevel 1 exit /b
|
||||
|
||||
diff -aurw Python-3.10.12/PCbuild/openssl.vcxproj external_python/PCbuild/openssl.vcxproj
|
||||
--- Python-3.10.12/PCbuild/openssl.vcxproj 2023-06-06 16:30:33 -0600
|
||||
+++ external_python/PCbuild/openssl.vcxproj 2023-06-20 08:50:43 -0600
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<Target Name="_CopyToOutput" AfterTargets="Build">
|
||||
<ItemGroup>
|
||||
- <_Built Include="$(opensslDir)\LICENSE" />
|
||||
+ <_Built Include="$(opensslDir)\LICENSE.txt" />
|
||||
<_Built Include="$(IntDir)\libcrypto.lib;$(IntDir)\libcrypto-*.dll;$(IntDir)\libcrypto-*.pdb" />
|
||||
<_Built Include="$(IntDir)\libssl.lib;$(IntDir)\libssl-*.dll;$(IntDir)\libssl-*.pdb" />
|
||||
<_AppLink Include="$(opensslDir)\ms\applink.c" />
|
|
@ -1,16 +1,191 @@
|
|||
diff --git a/include/tbb/tbb_config.h b/include/tbb/tbb_config.h
|
||||
index 7a8d06a0..886699d8 100644
|
||||
--- a/include/tbb/tbb_config.h
|
||||
+++ b/include/tbb/tbb_config.h
|
||||
@@ -620,7 +620,7 @@ There are four cases that are supported:
|
||||
// instantiation site, which is too late for suppression of the corresponding messages for internal
|
||||
// stuff.
|
||||
#if !defined(__INTEL_COMPILER) && (!defined(TBB_SUPPRESS_DEPRECATED_MESSAGES) || (TBB_SUPPRESS_DEPRECATED_MESSAGES == 0))
|
||||
- #if (__cplusplus >= 201402L)
|
||||
+ #if (__cplusplus >= 201402L && (!defined(_MSC_VER) || _MSC_VER >= 1920))
|
||||
#define __TBB_DEPRECATED [[deprecated]]
|
||||
#define __TBB_DEPRECATED_MSG(msg) [[deprecated(msg)]]
|
||||
#elif _MSC_VER
|
||||
diff --git a/include/tbb/machine/msvc_armv8.h b/include/tbb/machine/msvc_armv8.h
|
||||
new file mode 100644
|
||||
index 00000000..13d56678
|
||||
--- /dev/null
|
||||
+++ b/include/tbb/machine/msvc_armv8.h
|
||||
@@ -0,0 +1,167 @@
|
||||
+/*
|
||||
+ Copyright (c) 2005-2020 Intel Corporation
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+*/
|
||||
+
|
||||
+#if !defined(__TBB_machine_H) || defined(__TBB_msvc_armv8_H)
|
||||
+#error Do not #include this internal file directly; use public TBB headers instead.
|
||||
+#endif
|
||||
+
|
||||
+#define __TBB_msvc_armv8_H
|
||||
+
|
||||
+#include <intrin.h>
|
||||
+#include <float.h>
|
||||
+
|
||||
+#define __TBB_WORDSIZE 8
|
||||
+
|
||||
+#define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED
|
||||
+
|
||||
+#if defined(TBB_WIN32_USE_CL_BUILTINS)
|
||||
+// We can test this on _M_IX86
|
||||
+#pragma intrinsic(_ReadWriteBarrier)
|
||||
+#pragma intrinsic(_mm_mfence)
|
||||
+#define __TBB_compiler_fence() _ReadWriteBarrier()
|
||||
+#define __TBB_full_memory_fence() _mm_mfence()
|
||||
+#define __TBB_control_consistency_helper() __TBB_compiler_fence()
|
||||
+#define __TBB_acquire_consistency_helper() __TBB_compiler_fence()
|
||||
+#define __TBB_release_consistency_helper() __TBB_compiler_fence()
|
||||
+#else
|
||||
+//Now __dmb(_ARM_BARRIER_SY) is used for both compiler and memory fences
|
||||
+//This might be changed later after testing
|
||||
+#define __TBB_compiler_fence() __dmb(_ARM64_BARRIER_SY)
|
||||
+#define __TBB_full_memory_fence() __dmb(_ARM64_BARRIER_SY)
|
||||
+#define __TBB_control_consistency_helper() __TBB_compiler_fence()
|
||||
+#define __TBB_acquire_consistency_helper() __TBB_full_memory_fence()
|
||||
+#define __TBB_release_consistency_helper() __TBB_full_memory_fence()
|
||||
+#endif
|
||||
+
|
||||
+//--------------------------------------------------
|
||||
+// Compare and swap
|
||||
+//--------------------------------------------------
|
||||
+
|
||||
+/**
|
||||
+ * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr
|
||||
+ * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand
|
||||
+ * @param value value to assign *ptr to if *ptr==comparand
|
||||
+ * @param comparand value to compare with *ptr
|
||||
+ * @return value originally in memory at ptr, regardless of success
|
||||
+*/
|
||||
+
|
||||
+#define __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(S,T,F) \
|
||||
+inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \
|
||||
+ return _InterlockedCompareExchange##F(reinterpret_cast<volatile T *>(ptr),value,comparand); \
|
||||
+} \
|
||||
+
|
||||
+#define __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(S,T,F) \
|
||||
+inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \
|
||||
+ return _InterlockedExchangeAdd##F(reinterpret_cast<volatile T *>(ptr),value); \
|
||||
+} \
|
||||
+
|
||||
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(1,char,8)
|
||||
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(2,short,16)
|
||||
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(4,long,)
|
||||
+__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(8,__int64,64)
|
||||
+__TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(4,long,)
|
||||
+#if defined(TBB_WIN32_USE_CL_BUILTINS)
|
||||
+// No _InterlockedExchangeAdd64 intrinsic on _M_IX86
|
||||
+#define __TBB_64BIT_ATOMICS 0
|
||||
+#else
|
||||
+__TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(8,__int64,64)
|
||||
+#endif
|
||||
+
|
||||
+inline void __TBB_machine_pause (int32_t delay )
|
||||
+{
|
||||
+ while(delay>0)
|
||||
+ {
|
||||
+ __TBB_compiler_fence();
|
||||
+ delay--;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+// API to retrieve/update FPU control setting
|
||||
+#define __TBB_CPU_CTL_ENV_PRESENT 1
|
||||
+
|
||||
+namespace tbb {
|
||||
+namespace internal {
|
||||
+
|
||||
+template <typename T, size_t S>
|
||||
+struct machine_load_store_relaxed {
|
||||
+ static inline T load ( const volatile T& location ) {
|
||||
+ const T value = location;
|
||||
+
|
||||
+ /*
|
||||
+ * An extra memory barrier is required for errata #761319
|
||||
+ * Please see http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a
|
||||
+ */
|
||||
+ __TBB_acquire_consistency_helper();
|
||||
+ return value;
|
||||
+ }
|
||||
+
|
||||
+ static inline void store ( volatile T& location, T value ) {
|
||||
+ location = value;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+class cpu_ctl_env {
|
||||
+private:
|
||||
+ unsigned int my_ctl;
|
||||
+public:
|
||||
+ bool operator!=( const cpu_ctl_env& ctl ) const { return my_ctl != ctl.my_ctl; }
|
||||
+ void get_env() { my_ctl = _control87(0, 0); }
|
||||
+ void set_env() const { _control87( my_ctl, ~0U ); }
|
||||
+};
|
||||
+
|
||||
+} // namespace internal
|
||||
+} // namespaces tbb
|
||||
+
|
||||
+// Machine specific atomic operations
|
||||
+#define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C)
|
||||
+#define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C)
|
||||
+#define __TBB_Pause(V) __TBB_machine_pause(V)
|
||||
+
|
||||
+// Use generics for some things
|
||||
+#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1
|
||||
+#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1
|
||||
+#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1
|
||||
+#define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1
|
||||
+#define __TBB_USE_GENERIC_FETCH_STORE 1
|
||||
+#define __TBB_USE_GENERIC_DWORD_LOAD_STORE 0
|
||||
+#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1
|
||||
+
|
||||
+#if defined(TBB_WIN32_USE_CL_BUILTINS)
|
||||
+#if !__TBB_WIN8UI_SUPPORT
|
||||
+extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void );
|
||||
+#define __TBB_Yield() SwitchToThread()
|
||||
+#else
|
||||
+#include<thread>
|
||||
+#define __TBB_Yield() std::this_thread::yield()
|
||||
+#endif
|
||||
+#else
|
||||
+#define __TBB_Yield() __yield()
|
||||
+#endif
|
||||
+
|
||||
+// Machine specific atomic operations
|
||||
+#define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V)
|
||||
+#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V)
|
||||
+
|
||||
+template <typename T1,typename T2>
|
||||
+inline void __TBB_machine_OR( T1 *operand, T2 addend ) {
|
||||
+ _InterlockedOr((long volatile *)operand, (long)addend);
|
||||
+}
|
||||
+
|
||||
+template <typename T1,typename T2>
|
||||
+inline void __TBB_machine_AND( T1 *operand, T2 addend ) {
|
||||
+ _InterlockedAnd((long volatile *)operand, (long)addend);
|
||||
+}
|
||||
+
|
||||
diff --git a/include/tbb/tbb_machine.h b/include/tbb/tbb_machine.h
|
||||
index 9752be58..ebb98ec2 100644
|
||||
--- a/include/tbb/tbb_machine.h
|
||||
+++ b/include/tbb/tbb_machine.h
|
||||
@@ -208,6 +208,8 @@ template<> struct atomic_selector<8> {
|
||||
#include "machine/windows_intel64.h"
|
||||
#elif defined(_M_ARM) || defined(__TBB_WIN32_USE_CL_BUILTINS)
|
||||
#include "machine/msvc_armv7.h"
|
||||
+ #elif defined(_M_ARM64)
|
||||
+ #include "machine/msvc_armv8.h"
|
||||
#endif
|
||||
|
||||
#ifdef _MANAGED
|
||||
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
|
||||
index bdb4ec29..7c363f4f 100644
|
||||
--- a/src/tbb/tools_api/ittnotify_config.h
|
||||
+++ b/src/tbb/tools_api/ittnotify_config.h
|
||||
@@ -162,7 +162,7 @@
|
||||
|
@ -18,7 +193,428 @@ index 7a8d06a0..886699d8 100644
|
|||
# elif defined _M_IA64 || defined __ia64__
|
||||
# define ITT_ARCH ITT_ARCH_IA64
|
||||
-# elif defined _M_ARM || defined __arm__
|
||||
+# elif defined _M_ARM || defined __arm__ || defined __aarch64__
|
||||
+# elif defined _M_ARM || defined _M_ARM64 || defined __arm__ || defined __arm64__
|
||||
# define ITT_ARCH ITT_ARCH_ARM
|
||||
# elif defined __powerpc64__
|
||||
# define ITT_ARCH ITT_ARCH_PPC64
|
||||
diff --git a/src/tbb/winarm64-tbb-export.def b/src/tbb/winarm64-tbb-export.def
|
||||
new file mode 100644
|
||||
index 00000000..813eb002
|
||||
--- /dev/null
|
||||
+++ b/src/tbb/winarm64-tbb-export.def
|
||||
@@ -0,0 +1,21 @@
|
||||
+; Copyright (c) 2005-2020 Intel Corporation
|
||||
+; Copyright (c) 2022 Linaro Ltd.
|
||||
+;
|
||||
+; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+; you may not use this file except in compliance with the License.
|
||||
+; You may obtain a copy of the License at
|
||||
+;
|
||||
+; http://www.apache.org/licenses/LICENSE-2.0
|
||||
+;
|
||||
+; Unless required by applicable law or agreed to in writing, software
|
||||
+; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+; See the License for the specific language governing permissions and
|
||||
+; limitations under the License.
|
||||
+
|
||||
+EXPORTS
|
||||
+
|
||||
+#define __TBB_SYMBOL( sym ) sym
|
||||
+#include "winarm64-tbb-export.lst"
|
||||
+
|
||||
+
|
||||
diff --git a/src/tbb/winarm64-tbb-export.lst b/src/tbb/winarm64-tbb-export.lst
|
||||
new file mode 100644
|
||||
index 00000000..a25d545e
|
||||
--- /dev/null
|
||||
+++ b/src/tbb/winarm64-tbb-export.lst
|
||||
@@ -0,0 +1,310 @@
|
||||
+; Copyright (c) 2005-2020 Intel Corporation
|
||||
+;
|
||||
+; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+; you may not use this file except in compliance with the License.
|
||||
+; You may obtain a copy of the License at
|
||||
+;
|
||||
+; http://www.apache.org/licenses/LICENSE-2.0
|
||||
+;
|
||||
+; Unless required by applicable law or agreed to in writing, software
|
||||
+; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+; See the License for the specific language governing permissions and
|
||||
+; limitations under the License.
|
||||
+
|
||||
+#include "tbb/tbb_config.h"
|
||||
+
|
||||
+// cache_aligned_allocator.cpp
|
||||
+__TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPEAX_K0PEAX@Z )
|
||||
+__TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YA_KXZ )
|
||||
+__TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPEAX@Z )
|
||||
+__TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPEAX_K@Z )
|
||||
+__TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPEAX@Z )
|
||||
+__TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ )
|
||||
+
|
||||
+// task.cpp v3
|
||||
+__TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
|
||||
+__TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
|
||||
+__TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
|
||||
+__TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAEAVtask@3@_K@Z )
|
||||
+__TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAEAVtask@4@@Z )
|
||||
+__TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
|
||||
+__TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
|
||||
+__TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
|
||||
+__TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAEAVtask@3@@Z )
|
||||
+__TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AEAAXH@Z )
|
||||
+__TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AEAA_JXZ )
|
||||
+__TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QEBA_NXZ )
|
||||
+__TBB_SYMBOL( ?note_affinity@task@tbb@@UEAAXG@Z )
|
||||
+__TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AEAAXI@Z )
|
||||
+__TBB_SYMBOL( ?self@task@tbb@@SAAEAV12@XZ )
|
||||
+__TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QEAAXAEAVtask_list@2@@Z )
|
||||
+__TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ )
|
||||
+__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH_K@Z )
|
||||
+__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH@Z )
|
||||
+__TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QEAAXXZ )
|
||||
+#if __TBB_SCHEDULER_OBSERVER
|
||||
+__TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QEAAX_N@Z )
|
||||
+#endif /* __TBB_SCHEDULER_OBSERVER */
|
||||
+
|
||||
+/* arena.cpp */
|
||||
+__TBB_SYMBOL( ?internal_max_concurrency@task_arena_base@internal@interface7@tbb@@KAHPEBVtask_arena@34@@Z )
|
||||
+__TBB_SYMBOL( ?internal_current_slot@task_arena_base@internal@interface7@tbb@@KAHXZ )
|
||||
+__TBB_SYMBOL( ?internal_initialize@task_arena_base@internal@interface7@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_terminate@task_arena_base@internal@interface7@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_attach@task_arena_base@internal@interface7@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_enqueue@task_arena_base@internal@interface7@tbb@@IEBAXAEAVtask@4@_J@Z )
|
||||
+__TBB_SYMBOL( ?internal_execute@task_arena_base@internal@interface7@tbb@@IEBAXAEAVdelegate_base@234@@Z )
|
||||
+__TBB_SYMBOL( ?internal_wait@task_arena_base@internal@interface7@tbb@@IEBAXXZ )
|
||||
+#if __TBB_TASK_ISOLATION
|
||||
+__TBB_SYMBOL( ?isolate_within_arena@internal@interface7@tbb@@YAXAEAVdelegate_base@123@_J@Z )
|
||||
+#endif /* __TBB_TASK_ISOLATION */
|
||||
+
|
||||
+#if !TBB_NO_LEGACY
|
||||
+// task_v2.cpp
|
||||
+__TBB_SYMBOL( ?destroy@task@tbb@@QEAAXAEAV12@@Z )
|
||||
+#endif
|
||||
+
|
||||
+// exception handling support
|
||||
+#if __TBB_TASK_GROUP_CONTEXT
|
||||
+__TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z )
|
||||
+__TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z )
|
||||
+__TBB_SYMBOL( ?change_group@task@tbb@@QEAAXAEAVtask_group_context@2@@Z )
|
||||
+__TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QEBA_NXZ )
|
||||
+__TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?reset@task_group_context@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?capture_fp_settings@task_group_context@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?init@task_group_context@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ??1task_group_context@tbb@@QEAA@XZ )
|
||||
+#if __TBB_TASK_PRIORITY
|
||||
+__TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QEAAXW4priority_t@2@@Z )
|
||||
+__TBB_SYMBOL( ?priority@task_group_context@tbb@@QEBA?AW4priority_t@2@XZ )
|
||||
+#endif /* __TBB_TASK_PRIORITY */
|
||||
+__TBB_SYMBOL( ?name@captured_exception@tbb@@UEBAPEBDXZ )
|
||||
+__TBB_SYMBOL( ?what@captured_exception@tbb@@UEBAPEBDXZ )
|
||||
+__TBB_SYMBOL( ??1captured_exception@tbb@@UEAA@XZ )
|
||||
+__TBB_SYMBOL( ?move@captured_exception@tbb@@UEAAPEAV12@XZ )
|
||||
+__TBB_SYMBOL( ?destroy@captured_exception@tbb@@UEAAXXZ )
|
||||
+__TBB_SYMBOL( ?set@captured_exception@tbb@@QEAAXPEBD0@Z )
|
||||
+__TBB_SYMBOL( ?clear@captured_exception@tbb@@QEAAXXZ )
|
||||
+#endif /* __TBB_TASK_GROUP_CONTEXT */
|
||||
+
|
||||
+// Symbols for exceptions thrown from TBB
|
||||
+__TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ )
|
||||
+__TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z )
|
||||
+__TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UEBAPEBDXZ )
|
||||
+__TBB_SYMBOL( ?what@missing_wait@tbb@@UEBAPEBDXZ )
|
||||
+__TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UEBAPEBDXZ )
|
||||
+__TBB_SYMBOL( ?what@improper_lock@tbb@@UEBAPEBDXZ )
|
||||
+__TBB_SYMBOL( ?what@user_abort@tbb@@UEBAPEBDXZ )
|
||||
+
|
||||
+// tbb_misc.cpp
|
||||
+__TBB_SYMBOL( ?assertion_failure@tbb@@YAXPEBDH00@Z )
|
||||
+__TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YA_KXZ )
|
||||
+__TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPEBD@Z )
|
||||
+__TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPEBDH00@ZP6AX0H00@Z@Z )
|
||||
+__TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPEBDZZ )
|
||||
+__TBB_SYMBOL( TBB_runtime_interface_version )
|
||||
+
|
||||
+// tbb_main.cpp
|
||||
+__TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPEAXPEBX@Z )
|
||||
+__TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPEAX0@Z )
|
||||
+__TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPEAX@Z )
|
||||
+__TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPEAXPEB_W@Z )
|
||||
+__TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPEAXPEBX@Z )
|
||||
+__TBB_SYMBOL( ?itt_make_task_group_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z )
|
||||
+__TBB_SYMBOL( ?itt_metadata_str_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_KW4string_index@12@PEBD@Z )
|
||||
+__TBB_SYMBOL( ?itt_relation_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_KW4itt_relation@12@12@Z )
|
||||
+__TBB_SYMBOL( ?itt_task_begin_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z )
|
||||
+__TBB_SYMBOL( ?itt_task_end_v7@internal@tbb@@YAXW4itt_domain_enum@12@@Z )
|
||||
+__TBB_SYMBOL( ?itt_region_begin_v9@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z )
|
||||
+__TBB_SYMBOL( ?itt_region_end_v9@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K@Z )
|
||||
+
|
||||
+
|
||||
+// pipeline.cpp
|
||||
+__TBB_SYMBOL( ??0pipeline@tbb@@QEAA@XZ )
|
||||
+__TBB_SYMBOL( ??1filter@tbb@@UEAA@XZ )
|
||||
+__TBB_SYMBOL( ??1pipeline@tbb@@UEAA@XZ )
|
||||
+__TBB_SYMBOL( ??_7pipeline@tbb@@6B@ )
|
||||
+__TBB_SYMBOL( ?add_filter@pipeline@tbb@@QEAAXAEAVfilter@2@@Z )
|
||||
+__TBB_SYMBOL( ?clear@pipeline@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?inject_token@pipeline@tbb@@AEAAXAEAVtask@2@@Z )
|
||||
+__TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_K@Z )
|
||||
+#if __TBB_TASK_GROUP_CONTEXT
|
||||
+__TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_KAEAVtask_group_context@2@@Z )
|
||||
+#endif
|
||||
+__TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ )
|
||||
+__TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ )
|
||||
+__TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IEAAXXZ )
|
||||
+
|
||||
+// queuing_rw_mutex.cpp
|
||||
+__TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAAXAEAV23@_N@Z )
|
||||
+__TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NAEAV23@_N@Z )
|
||||
+
|
||||
+// reader_writer_lock.cpp
|
||||
+__TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z )
|
||||
+__TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z )
|
||||
+__TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXXZ )
|
||||
+
|
||||
+#if !TBB_NO_LEGACY
|
||||
+// spin_rw_mutex.cpp v2
|
||||
+__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPEAV12@@Z )
|
||||
+#endif
|
||||
+
|
||||
+// spin_rw_mutex v3
|
||||
+__TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ )
|
||||
+
|
||||
+// spin_mutex.cpp
|
||||
+__TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AEAAXAEAV23@@Z )
|
||||
+__TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AEAA_NAEAV23@@Z )
|
||||
+
|
||||
+// mutex.cpp
|
||||
+__TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AEAAXAEAV23@@Z )
|
||||
+__TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AEAA_NAEAV23@@Z )
|
||||
+__TBB_SYMBOL( ?internal_construct@mutex@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AEAAXXZ )
|
||||
+
|
||||
+// recursive_mutex.cpp
|
||||
+__TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AEAAXAEAV23@@Z )
|
||||
+__TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AEAA_NAEAV23@@Z )
|
||||
+__TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AEAAXXZ )
|
||||
+
|
||||
+// queuing_mutex.cpp
|
||||
+__TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QEAAXAEAV23@@Z )
|
||||
+__TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QEAA_NAEAV23@@Z )
|
||||
+
|
||||
+// critical_section.cpp
|
||||
+__TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QEAAXXZ )
|
||||
+
|
||||
+#if !TBB_NO_LEGACY
|
||||
+// concurrent_hash_map.cpp
|
||||
+__TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QEBA_NXZ )
|
||||
+
|
||||
+// concurrent_queue.cpp v2
|
||||
+__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IEAAXAEBV123@@Z )
|
||||
+__TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IEBA_JXZ )
|
||||
+__TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IEAA@_K@Z )
|
||||
+__TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IEAA@AEBVconcurrent_queue_base@12@@Z )
|
||||
+__TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MEAA@XZ )
|
||||
+__TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IEAA@XZ )
|
||||
+__TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IEAAXPEAX@Z )
|
||||
+__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IEAA_NPEAX@Z )
|
||||
+__TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IEAAXPEBX@Z )
|
||||
+__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IEAA_NPEBX@Z )
|
||||
+__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IEAAX_J_K@Z )
|
||||
+#endif
|
||||
+
|
||||
+// concurrent_queue v3
|
||||
+__TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@XZ )
|
||||
+__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@@Z )
|
||||
+__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@_K@Z )
|
||||
+__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXAEBV123@@Z )
|
||||
+__TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IEAA@_K@Z )
|
||||
+__TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MEAA@XZ )
|
||||
+__TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IEAAXPEAX@Z )
|
||||
+__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEAX@Z )
|
||||
+__TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IEAAXPEBX@Z )
|
||||
+__TBB_SYMBOL( ?internal_push_move@concurrent_queue_base_v8@internal@tbb@@IEAAXPEBX@Z )
|
||||
+__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEBX@Z )
|
||||
+__TBB_SYMBOL( ?internal_push_move_if_not_full@concurrent_queue_base_v8@internal@tbb@@IEAA_NPEBX@Z )
|
||||
+__TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IEBA_JXZ )
|
||||
+__TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IEBA_NXZ )
|
||||
+__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IEAAX_J_K@Z )
|
||||
+__TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IEBAXXZ )
|
||||
+__TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IEAAXAEBV123@@Z )
|
||||
+__TBB_SYMBOL( ?move_content@concurrent_queue_base_v8@internal@tbb@@IEAAXAEAV123@@Z )
|
||||
+
|
||||
+#if !TBB_NO_LEGACY
|
||||
+// concurrent_vector.cpp v2
|
||||
+__TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z )
|
||||
+__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IEBA_KXZ )
|
||||
+__TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IEAAXP6AXPEAX_K@Z_N@Z )
|
||||
+__TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IEAA_K_K0P6AXPEAX0@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IEAAX_K0P6AXPEAX0@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IEAAPEAX_KAEA_K@Z )
|
||||
+__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IEAAX_K00@Z )
|
||||
+#endif
|
||||
+
|
||||
+// concurrent_vector v3
|
||||
+__TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IEAA@XZ )
|
||||
+__TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z )
|
||||
+__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IEBA_KXZ )
|
||||
+__TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IEAA_KP6AXPEAX_K@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z )
|
||||
+__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IEAAX_K0P6AXPEAXPEBX0@Z2@Z )
|
||||
+__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KAEA_K@Z )
|
||||
+__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00@Z )
|
||||
+__TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KPEAXP6AX10@ZP6AX1PEBX0@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IEAAXAEAV123@@Z )
|
||||
+__TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IEBAX_K@Z )
|
||||
+__TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00PEBXP6AXPEAX0@ZP6AX210@Z@Z )
|
||||
+__TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z )
|
||||
+
|
||||
+// tbb_thread
|
||||
+__TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AEAAXP6AIPEAX@Z0@Z )
|
||||
+__TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPEAX_K@Z )
|
||||
+__TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPEAX@Z )
|
||||
+__TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ )
|
||||
+__TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ )
|
||||
+__TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXAEBVinterval_t@tick_count@2@@Z )
|
||||
+__TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAEAVtbb_thread_v3@12@0@Z )
|
||||
+__TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ )
|
||||
+
|
||||
+// condition_variable
|
||||
+__TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
|
||||
+__TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAEATcondvar_impl_t@123@PEAVmutex@3@PEBVinterval_t@tick_count@3@@Z )
|
||||
+__TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
|
||||
+__TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
|
||||
+__TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z )
|
||||
+
|
||||
+
|
||||
+// global parameter
|
||||
+__TBB_SYMBOL( ?active_value@global_control@interface9@tbb@@CA_KH@Z )
|
||||
+__TBB_SYMBOL( ?internal_create@global_control@interface9@tbb@@AEAAXXZ )
|
||||
+__TBB_SYMBOL( ?internal_destroy@global_control@interface9@tbb@@AEAAXXZ )
|
||||
+
|
||||
+#undef __TBB_SYMBOL
|
||||
diff --git a/src/tbbmalloc/TypeDefinitions.h b/src/tbbmalloc/TypeDefinitions.h
|
||||
index aa6763b0..fffef73d 100644
|
||||
--- a/src/tbbmalloc/TypeDefinitions.h
|
||||
+++ b/src/tbbmalloc/TypeDefinitions.h
|
||||
@@ -25,7 +25,7 @@
|
||||
# define __ARCH_ipf 1
|
||||
# elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support
|
||||
# define __ARCH_x86_32 1
|
||||
-# elif defined(_M_ARM)
|
||||
+# elif defined(_M_ARM)||defined(_M_ARM64)
|
||||
# define __ARCH_other 1
|
||||
# else
|
||||
# error Unknown processor architecture for Windows
|
||||
diff --git a/src/tbbmalloc/winarm64-tbbmalloc-export.def b/src/tbbmalloc/winarm64-tbbmalloc-export.def
|
||||
new file mode 100644
|
||||
index 00000000..ec64b015
|
||||
--- /dev/null
|
||||
+++ b/src/tbbmalloc/winarm64-tbbmalloc-export.def
|
||||
@@ -0,0 +1,46 @@
|
||||
+; Copyright (c) 2005-2020 Intel Corporation
|
||||
+; Copyright (c) 2022 Linaro Ltd
|
||||
+;
|
||||
+; Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+; you may not use this file except in compliance with the License.
|
||||
+; You may obtain a copy of the License at
|
||||
+;
|
||||
+; http://www.apache.org/licenses/LICENSE-2.0
|
||||
+;
|
||||
+; Unless required by applicable law or agreed to in writing, software
|
||||
+; distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+; See the License for the specific language governing permissions and
|
||||
+; limitations under the License.
|
||||
+
|
||||
+EXPORTS
|
||||
+
|
||||
+; frontend.cpp
|
||||
+scalable_calloc
|
||||
+scalable_free
|
||||
+scalable_malloc
|
||||
+scalable_realloc
|
||||
+scalable_posix_memalign
|
||||
+scalable_aligned_malloc
|
||||
+scalable_aligned_realloc
|
||||
+scalable_aligned_free
|
||||
+scalable_msize
|
||||
+scalable_allocation_mode
|
||||
+scalable_allocation_command
|
||||
+__TBB_malloc_safer_free
|
||||
+__TBB_malloc_safer_realloc
|
||||
+__TBB_malloc_safer_msize
|
||||
+__TBB_malloc_safer_aligned_msize
|
||||
+__TBB_malloc_safer_aligned_realloc
|
||||
+?pool_create@rml@@YAPEAVMemoryPool@1@_JPEBUMemPoolPolicy@1@@Z
|
||||
+?pool_create_v1@rml@@YA?AW4MemPoolError@1@_JPEBUMemPoolPolicy@1@PEAPEAVMemoryPool@1@@Z
|
||||
+?pool_destroy@rml@@YA_NPEAVMemoryPool@1@@Z
|
||||
+?pool_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K@Z
|
||||
+?pool_free@rml@@YA_NPEAVMemoryPool@1@PEAX@Z
|
||||
+?pool_reset@rml@@YA_NPEAVMemoryPool@1@@Z
|
||||
+?pool_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K@Z
|
||||
+?pool_aligned_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K2@Z
|
||||
+?pool_aligned_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K1@Z
|
||||
+?pool_identify@rml@@YAPEAVMemoryPool@1@PEAX@Z
|
||||
+?pool_msize@rml@@YA_KPEAVMemoryPool@1@PEAX@Z
|
||||
+
|
||||
diff --git a/src/test/harness_fp.h b/src/test/harness_fp.h
|
||||
index b007e2b8..f6d0066e 100644
|
||||
--- a/src/test/harness_fp.h
|
||||
+++ b/src/test/harness_fp.h
|
||||
@@ -84,7 +84,7 @@ inline void SetSseMode ( int mode ) {
|
||||
ctl.set_env();
|
||||
}
|
||||
|
||||
-#elif defined(_M_ARM) || defined(__TBB_WIN32_USE_CL_BUILTINS)
|
||||
+#elif defined(_M_ARM) || defined(_M_ARM64) || defined(__TBB_WIN32_USE_CL_BUILTINS)
|
||||
const int NumSseModes = 1;
|
||||
const int SseModes[NumSseModes] = { 0 };
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
diff -Naur orig/cmake/defaults/Packages.cmake external_usd/cmake/defaults/Packages.cmake
|
||||
--- orig/cmake/defaults/Packages.cmake 2022-10-27 12:56:33 -0600
|
||||
+++ external_usd/cmake/defaults/Packages.cmake 2022-10-27 13:05:08 -0600
|
||||
@@ -129,7 +129,7 @@
|
||||
endif()
|
||||
diff --git a/cmake/defaults/Packages.cmake b/cmake/defaults/Packages.cmake
|
||||
index 2bb1f30d0..adcc7422e 100644
|
||||
--- a/cmake/defaults/Packages.cmake
|
||||
+++ b/cmake/defaults/Packages.cmake
|
||||
@@ -152,7 +152,7 @@ endif()
|
||||
|
||||
|
||||
# --TBB
|
||||
-find_package(TBB REQUIRED COMPONENTS tbb)
|
||||
|
@ -10,10 +11,11 @@ diff -Naur orig/cmake/defaults/Packages.cmake external_usd/cmake/defaults/Packag
|
|||
add_definitions(${TBB_DEFINITIONS})
|
||||
|
||||
# --math
|
||||
diff -Naur orig/cmake/defaults/msvcdefaults.cmake external_usd/cmake/defaults/msvcdefaults.cmake
|
||||
--- orig/cmake/defaults/msvcdefaults.cmake 2022-10-27 12:56:33 -0600
|
||||
+++ external_usd/cmake/defaults/msvcdefaults.cmake 2022-10-27 13:05:08 -0600
|
||||
@@ -120,9 +120,6 @@
|
||||
diff --git a/cmake/defaults/msvcdefaults.cmake b/cmake/defaults/msvcdefaults.cmake
|
||||
index 0f7fb7ef6..a467341ed 100644
|
||||
--- a/cmake/defaults/msvcdefaults.cmake
|
||||
+++ b/cmake/defaults/msvcdefaults.cmake
|
||||
@@ -140,9 +140,6 @@ _add_define("WIN32_LEAN_AND_MEAN")
|
||||
# for all translation units.
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /bigobj")
|
||||
|
||||
|
@ -23,10 +25,49 @@ diff -Naur orig/cmake/defaults/msvcdefaults.cmake external_usd/cmake/defaults/ms
|
|||
# Enable multiprocessor builds.
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /MP")
|
||||
set(_PXR_CXX_FLAGS "${_PXR_CXX_FLAGS} /Gm-")
|
||||
diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
||||
--- orig/pxr/base/arch/timing.h 2022-10-27 12:56:34 -0600
|
||||
+++ external_usd/pxr/base/arch/timing.h 2022-10-27 13:05:08 -0600
|
||||
@@ -84,6 +84,10 @@
|
||||
diff --git a/pxr/base/arch/defines.h b/pxr/base/arch/defines.h
|
||||
index cb6ad44c5..c6c1a604b 100644
|
||||
--- a/pxr/base/arch/defines.h
|
||||
+++ b/pxr/base/arch/defines.h
|
||||
@@ -49,7 +49,8 @@
|
||||
#if defined(i386) || defined(__i386__) || defined(__x86_64__) || \
|
||||
defined(_M_IX86) || defined(_M_X64)
|
||||
#define ARCH_CPU_INTEL
|
||||
-#elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM)
|
||||
+#elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || \
|
||||
+ defined(_M_ARM64)
|
||||
#define ARCH_CPU_ARM
|
||||
#endif
|
||||
|
||||
@@ -57,7 +58,8 @@
|
||||
// Bits
|
||||
//
|
||||
|
||||
-#if defined(__x86_64__) || defined(__aarch64__) || defined(_M_X64)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(_M_X64) || \
|
||||
+ defined(_M_ARM64)
|
||||
#define ARCH_BITS_64
|
||||
#else
|
||||
#error "Unsupported architecture. x86_64 or ARM64 required."
|
||||
diff --git a/pxr/base/arch/timing.h b/pxr/base/arch/timing.h
|
||||
index d78598a84..2f44a5f89 100644
|
||||
--- a/pxr/base/arch/timing.h
|
||||
+++ b/pxr/base/arch/timing.h
|
||||
@@ -69,7 +69,13 @@ ArchGetTickTime()
|
||||
return __rdtsc();
|
||||
#elif defined (ARCH_CPU_ARM)
|
||||
uint64_t result;
|
||||
+ #if defined(ARCH_COMPILER_MSVC)
|
||||
+ // MSVC does not support inline assembly on ARM64 platforms
|
||||
+ // 0x5F02 == ARM64_CNTVCT - manually calculated value avoids <windows.h>
|
||||
+ result = _ReadStatusReg(0x5F02);
|
||||
+ #else
|
||||
__asm __volatile("mrs %0, CNTVCT_EL0" : "=&r" (result));
|
||||
+ #endif
|
||||
return result;
|
||||
#else
|
||||
#error Unknown architecture.
|
||||
@@ -84,6 +90,10 @@ ArchGetTickTime()
|
||||
inline uint64_t
|
||||
ArchGetStartTickTime()
|
||||
{
|
||||
|
@ -37,7 +78,7 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
|||
uint64_t t;
|
||||
#if defined (ARCH_OS_DARWIN)
|
||||
return ArchGetTickTime();
|
||||
@@ -116,6 +120,7 @@
|
||||
@@ -116,6 +126,7 @@ ArchGetStartTickTime()
|
||||
#error "Unsupported architecture."
|
||||
#endif
|
||||
return t;
|
||||
|
@ -45,7 +86,7 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
|||
}
|
||||
|
||||
/// Get a "stop" tick time for measuring an interval of time. See
|
||||
@@ -125,6 +130,10 @@
|
||||
@@ -125,6 +136,10 @@ ArchGetStartTickTime()
|
||||
inline uint64_t
|
||||
ArchGetStopTickTime()
|
||||
{
|
||||
|
@ -56,7 +97,7 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
|||
uint64_t t;
|
||||
#if defined (ARCH_OS_DARWIN)
|
||||
return ArchGetTickTime();
|
||||
@@ -155,11 +164,11 @@
|
||||
@@ -155,11 +170,11 @@ ArchGetStopTickTime()
|
||||
#error "Unsupported architecture."
|
||||
#endif
|
||||
return t;
|
||||
|
@ -71,10 +112,37 @@ diff -Naur orig/pxr/base/arch/timing.h external_usd/pxr/base/arch/timing.h
|
|||
|
||||
/// A simple timer class for measuring an interval of time using the
|
||||
/// ArchTickTimer facilities.
|
||||
diff -Naur orig/pxr/imaging/hioOpenVDB/CMakeLists.txt external_usd/pxr/imaging/hioOpenVDB/CMakeLists.txt
|
||||
--- orig/pxr/imaging/hioOpenVDB/CMakeLists.txt 2022-10-27 12:56:35 -0600
|
||||
+++ external_usd/pxr/imaging/hioOpenVDB/CMakeLists.txt 2022-10-27 13:05:08 -0600
|
||||
@@ -20,6 +20,12 @@
|
||||
diff --git a/pxr/base/tf/pxrDoubleConversion/utils.h b/pxr/base/tf/pxrDoubleConversion/utils.h
|
||||
index 547ac1110..10fd96cf9 100644
|
||||
--- a/pxr/base/tf/pxrDoubleConversion/utils.h
|
||||
+++ b/pxr/base/tf/pxrDoubleConversion/utils.h
|
||||
@@ -78,7 +78,7 @@ inline void abort_noreturn() { abort(); }
|
||||
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
|
||||
defined(__SH4__) || defined(__alpha__) || \
|
||||
defined(_MIPS_ARCH_MIPS32R2) || \
|
||||
- defined(__AARCH64EL__) || defined(__aarch64__) || \
|
||||
+ defined(__AARCH64EL__) || defined(__aarch64__) || defined (_M_ARM64) || \
|
||||
defined(__riscv)
|
||||
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
||||
#elif defined(__mc68000__)
|
||||
diff --git a/pxr/imaging/hio/OpenEXR/OpenEXRCore/internal_dwa_simd.h b/pxr/imaging/hio/OpenEXR/OpenEXRCore/internal_dwa_simd.h
|
||||
index 459fb3084..c1f98f160 100644
|
||||
--- a/pxr/imaging/hio/OpenEXR/OpenEXRCore/internal_dwa_simd.h
|
||||
+++ b/pxr/imaging/hio/OpenEXR/OpenEXRCore/internal_dwa_simd.h
|
||||
@@ -18,7 +18,7 @@
|
||||
// aligned. Unaligned pointers may risk seg-faulting.
|
||||
//
|
||||
|
||||
-#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE)
|
||||
+#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE && !defined(_M_ARM64))
|
||||
# define IMF_HAVE_SSE2 1
|
||||
# include <emmintrin.h>
|
||||
# include <mmintrin.h>
|
||||
diff --git a/pxr/imaging/hioOpenVDB/CMakeLists.txt b/pxr/imaging/hioOpenVDB/CMakeLists.txt
|
||||
index e32762cea..d2c08d3da 100644
|
||||
--- a/pxr/imaging/hioOpenVDB/CMakeLists.txt
|
||||
+++ b/pxr/imaging/hioOpenVDB/CMakeLists.txt
|
||||
@@ -20,6 +20,12 @@ else()
|
||||
LIST(APPEND __VDB_IMATH_LIBS ${OPENEXR_Half_LIBRARY})
|
||||
endif()
|
||||
|
||||
|
@ -87,10 +155,11 @@ diff -Naur orig/pxr/imaging/hioOpenVDB/CMakeLists.txt external_usd/pxr/imaging/h
|
|||
pxr_library(hioOpenVDB
|
||||
LIBRARIES
|
||||
ar
|
||||
diff -Naur orig/pxr/usdImaging/CMakeLists.txt external_usd/pxr/usdImaging/CMakeLists.txt
|
||||
--- orig/pxr/usdImaging/CMakeLists.txt 2022-10-27 12:56:37 -0600
|
||||
+++ external_usd/pxr/usdImaging/CMakeLists.txt 2022-10-27 13:05:08 -0600
|
||||
@@ -7,7 +7,7 @@
|
||||
diff --git a/pxr/usdImaging/CMakeLists.txt b/pxr/usdImaging/CMakeLists.txt
|
||||
index 53c026689..e99a5ac17 100644
|
||||
--- a/pxr/usdImaging/CMakeLists.txt
|
||||
+++ b/pxr/usdImaging/CMakeLists.txt
|
||||
@@ -7,7 +7,7 @@ set(DIRS
|
||||
usdVolImaging
|
||||
usdAppUtils
|
||||
usdviewq
|
||||
|
|
|
@ -13,12 +13,19 @@ if NOT "%1" == "" (
|
|||
set VSVER_SHORT=15
|
||||
set BuildDir=VS15
|
||||
goto par2
|
||||
)
|
||||
if "%1" == "2022" (
|
||||
echo "Building for VS2022"
|
||||
set VSVER=15.0
|
||||
set VSVER_SHORT=15
|
||||
set BuildDir=VS15
|
||||
goto par2
|
||||
)
|
||||
|
||||
)
|
||||
:usage
|
||||
|
||||
Echo Usage build_deps 2017/2019 x64
|
||||
Echo Usage build_deps 2017/2019/2022 x64/arm64
|
||||
goto exit
|
||||
:par2
|
||||
if NOT "%2" == "" (
|
||||
|
@ -28,11 +35,24 @@ if NOT "%2" == "" (
|
|||
set ARCH=64
|
||||
if "%1" == "2019" (
|
||||
set CMAKE_BUILDER=Visual Studio 16 2019
|
||||
set CMAKE_BUILD_ARCH=-A x64
|
||||
set CMAKE_BUILD_ARCH=-A x64 -Thost=x64
|
||||
)
|
||||
if "%1" == "2017" (
|
||||
set CMAKE_BUILDER=Visual Studio 15 2017 Win64
|
||||
set CMAKE_BUILD_ARCH=
|
||||
set CMAKE_BUILD_ARCH=-Thost=x64
|
||||
)
|
||||
goto start
|
||||
)
|
||||
if "%2" == "arm64" (
|
||||
echo "Building for arm64"
|
||||
set HARVESTROOT=WinArm64_vc
|
||||
set ARCH=64
|
||||
if "%1" == "2022" (
|
||||
set CMAKE_BUILDER=Visual Studio 17 2022
|
||||
set CMAKE_BUILD_ARCH=-A arm64
|
||||
) else (
|
||||
echo ARM64 can only be used in combination with VS2022
|
||||
goto exit
|
||||
)
|
||||
goto start
|
||||
)
|
||||
|
@ -113,7 +133,7 @@ set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads
|
|||
mkdir %STAGING%\%BuildDir%%ARCH%R
|
||||
cd %Staging%\%BuildDir%%ARCH%R
|
||||
echo %DATE% %TIME% : Start > %StatusFile%
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% -Thost=x64 %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DBUILD_MODE=Release -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/
|
||||
echo %DATE% %TIME% : Release Configuration done >> %StatusFile%
|
||||
if "%dobuild%" == "1" (
|
||||
msbuild -maxcpucount:1 "BlenderDependencies.sln" /p:Configuration=Release /fl /flp:logfile=BlenderDeps.log;Verbosity=minimal /verbosity:minimal
|
||||
|
@ -131,7 +151,7 @@ set openexr_paths=%Staging%\%BuildDir%%ARCH%D\Debug\openexr\bin
|
|||
set imath_paths=%Staging%\%BuildDir%%ARCH%D\Debug\imath\bin
|
||||
set tbb_paths=%Staging%\%BuildDir%%ARCH%D\Debug\tbb\bin
|
||||
set path=%BUILD_DIR%\downloads\mingw\mingw64\msys\1.0\bin\;%BUILD_DIR%\downloads\nasm-2.12.01\;%original_path%;%boost_paths%;%oiio_paths%;%openexr_paths%;%imath_paths%;%tbb_paths%
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% -Thost=x64 %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
|
||||
cmake -G "%CMAKE_BUILDER%" %CMAKE_BUILD_ARCH% %SOURCE_DIR% -DPACKAGE_DIR=%BUILD_DIR%/packages -DDOWNLOAD_DIR=%BUILD_DIR%/downloads -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODE=Debug -DHARVEST_TARGET=%HARVEST_DIR%/%HARVESTROOT%%VSVER_SHORT%/ %CMAKE_DEBUG_OPTIONS%
|
||||
echo %DATE% %TIME% : Debug Configuration done >> %StatusFile%
|
||||
if "%dobuild%" == "1" (
|
||||
msbuild -maxcpucount:1 "BlenderDependencies.sln" /p:Configuration=Debug /verbosity:n /fl /flp:logfile=BlenderDeps.log;;Verbosity=normal
|
||||
|
|
|
@ -111,3 +111,5 @@ mark_as_advanced(
|
|||
AUDASPACE_PY_INCLUDE_DIR
|
||||
AUDASPACE_PY_INCLUDE_DIRS
|
||||
)
|
||||
|
||||
unset(_audaspace_SEARCH_DIRS)
|
||||
|
|
|
@ -64,3 +64,5 @@ mark_as_advanced(
|
|||
BLOSC_INCLUDE_DIR
|
||||
BLOSC_LIBRARY
|
||||
)
|
||||
|
||||
unset(_blosc_SEARCH_DIRS)
|
||||
|
|
|
@ -21,7 +21,7 @@ else()
|
|||
set(BROTLI_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_BROTLI_SEARCH_DIRS
|
||||
set(_brotli_SEARCH_DIRS
|
||||
${BROTLI_ROOT_DIR}
|
||||
)
|
||||
|
||||
|
@ -29,7 +29,7 @@ find_path(BROTLI_INCLUDE_DIR
|
|||
NAMES
|
||||
brotli/decode.h
|
||||
HINTS
|
||||
${_BROTLI_SEARCH_DIRS}
|
||||
${_brotli_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
DOC "Brotli header files"
|
||||
|
@ -41,7 +41,7 @@ find_library(BROTLI_LIBRARY_COMMON
|
|||
brotlicommon-static
|
||||
brotlicommon
|
||||
HINTS
|
||||
${_BROTLI_SEARCH_DIRS}
|
||||
${_brotli_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib lib/static
|
||||
DOC "Brotli static common library"
|
||||
|
@ -52,7 +52,7 @@ find_library(BROTLI_LIBRARY_DEC
|
|||
brotlidec-static
|
||||
brotlidec
|
||||
HINTS
|
||||
${_BROTLI_SEARCH_DIRS}
|
||||
${_brotli_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib lib/static
|
||||
DOC "Brotli static decode library"
|
||||
|
@ -81,4 +81,4 @@ mark_as_advanced(
|
|||
BROTLI_LIBRARY_DIR
|
||||
)
|
||||
|
||||
unset(_BROTLI_SEARCH_DIRS)
|
||||
unset(_brotli_SEARCH_DIRS)
|
||||
|
|
|
@ -36,7 +36,7 @@ if(NOT LLVM_ROOT_DIR)
|
|||
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
|
||||
endif()
|
||||
|
||||
set(_CLANG_SEARCH_DIRS
|
||||
set(_clang_SEARCH_DIRS
|
||||
${CLANG_ROOT_DIR}
|
||||
${LLVM_ROOT_DIR}
|
||||
/opt/lib/clang
|
||||
|
@ -46,14 +46,14 @@ find_path(CLANG_INCLUDE_DIR
|
|||
NAMES
|
||||
AST/AST.h
|
||||
HINTS
|
||||
${_CLANG_SEARCH_DIRS}
|
||||
${_clang_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include/clang
|
||||
)
|
||||
|
||||
|
||||
set(_CLANG_FIND_COMPONENTS
|
||||
set(_clang_FIND_COMPONENTS
|
||||
clangDependencyScanning
|
||||
clangDynamicASTMatchers
|
||||
clangFrontendTool
|
||||
|
@ -87,20 +87,20 @@ set(_CLANG_FIND_COMPONENTS
|
|||
clangBasic
|
||||
)
|
||||
|
||||
set(_CLANG_LIBRARIES)
|
||||
foreach(COMPONENT ${_CLANG_FIND_COMPONENTS})
|
||||
set(_clang_LIBRARIES)
|
||||
foreach(COMPONENT ${_clang_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
find_library(CLANG_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_CLANG_SEARCH_DIRS}
|
||||
${_clang_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
if(CLANG_${UPPERCOMPONENT}_LIBRARY)
|
||||
list(APPEND _CLANG_LIBRARIES "${CLANG_${UPPERCOMPONENT}_LIBRARY}")
|
||||
list(APPEND _clang_LIBRARIES "${CLANG_${UPPERCOMPONENT}_LIBRARY}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@ -109,10 +109,10 @@ endforeach()
|
|||
# all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Clang DEFAULT_MSG
|
||||
_CLANG_LIBRARIES CLANG_INCLUDE_DIR)
|
||||
_clang_LIBRARIES CLANG_INCLUDE_DIR)
|
||||
|
||||
if(CLANG_FOUND)
|
||||
set(CLANG_LIBRARIES ${_CLANG_LIBRARIES})
|
||||
set(CLANG_LIBRARIES ${_clang_LIBRARIES})
|
||||
set(CLANG_INCLUDE_DIRS ${CLANG_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
|
@ -120,11 +120,11 @@ mark_as_advanced(
|
|||
CLANG_INCLUDE_DIR
|
||||
)
|
||||
|
||||
foreach(COMPONENT ${_CLANG_FIND_COMPONENTS})
|
||||
foreach(COMPONENT ${_clang_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
mark_as_advanced(CLANG_${UPPERCOMPONENT}_LIBRARY)
|
||||
endforeach()
|
||||
|
||||
unset(_CLANG_SEARCH_DIRS)
|
||||
unset(_CLANG_FIND_COMPONENTS)
|
||||
unset(_CLANG_LIBRARIES)
|
||||
unset(_clang_SEARCH_DIRS)
|
||||
unset(_clang_FIND_COMPONENTS)
|
||||
unset(_clang_LIBRARIES)
|
||||
|
|
|
@ -104,3 +104,5 @@ ${CLANG_TIDY_VERSION_PATCH}")
|
|||
else()
|
||||
set(CLANG_TIDY_FOUND FALSE)
|
||||
endif()
|
||||
|
||||
unset(_clang_tidy_SEARCH_DIRS)
|
||||
|
|
|
@ -47,3 +47,5 @@ endif()
|
|||
mark_as_advanced(
|
||||
EIGEN3_INCLUDE_DIR
|
||||
)
|
||||
|
||||
unset(_eigen3_SEARCH_DIRS)
|
||||
|
|
|
@ -66,6 +66,8 @@ foreach(_component ${FFMPEG_FIND_COMPONENTS})
|
|||
list(APPEND _ffmpeg_LIBRARIES ${FFMPEG_${_upper_COMPONENT}_LIBRARY})
|
||||
mark_as_advanced(FFMPEG_${_upper_COMPONENT}_LIBRARY)
|
||||
endforeach()
|
||||
unset(_component)
|
||||
unset(_upper_COMPONENT)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
|
|
|
@ -72,10 +72,12 @@ if(FFTW3_FOUND)
|
|||
set(FFTW3_INCLUDE_DIRS ${FFTW3_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
unset(_FFTW3_LIBRARIES)
|
||||
|
||||
mark_as_advanced(
|
||||
FFTW3_INCLUDE_DIR
|
||||
FFTW3_LIBRARY_F
|
||||
FFTW3_LIBRARY_D
|
||||
)
|
||||
|
||||
unset(_FFTW3_LIBRARIES)
|
||||
unset(_fftw3_SEARCH_DIRS)
|
||||
|
|
|
@ -55,3 +55,5 @@ MARK_AS_ADVANCED(
|
|||
LIBFRIBIDI_INCLUDE_DIR
|
||||
LIBFRIBIDI_LIBRARY
|
||||
)
|
||||
|
||||
unset(_fribidi_SEARCH_DIRS)
|
||||
|
|
|
@ -91,3 +91,5 @@ mark_as_advanced(
|
|||
GMPXX_INCLUDE_DIR
|
||||
GMPXX_LIBRARY
|
||||
)
|
||||
|
||||
unset(_gmp_SEARCH_DIRS)
|
||||
|
|
|
@ -7,16 +7,18 @@
|
|||
# HIP_VERSION, the HIP compiler version
|
||||
# HIP_FOUND, if the HIP toolkit is found.
|
||||
|
||||
if(NOT (DEFINED HIP_ROOT_DIR))
|
||||
set(HIP_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
# If `HIP_ROOT_DIR` was defined in the environment, use it.
|
||||
if(DEFINED HIP_ROOT_DIR AND HIP_ROOT_DIR)
|
||||
if(HIP_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{HIP_ROOT_DIR})
|
||||
set(HIP_ROOT_DIR $ENV{HIP_ROOT_DIR})
|
||||
elseif(DEFINED ENV{HIP_PATH})
|
||||
# Built-in environment variable from SDK.
|
||||
set(HIP_ROOT_DIR $ENV{HIP_PATH})
|
||||
else()
|
||||
set(HIP_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_hip_SEARCH_DIRS
|
||||
|
@ -99,3 +101,5 @@ include(FindPackageHandleStandardArgs)
|
|||
find_package_handle_standard_args(HIP
|
||||
REQUIRED_VARS HIP_HIPCC_EXECUTABLE
|
||||
VERSION_VAR HIP_VERSION)
|
||||
|
||||
unset(_hip_SEARCH_DIRS)
|
||||
|
|
|
@ -7,16 +7,18 @@
|
|||
# HIPRT_BITCODE, bitcode file with ray-tracing functionality
|
||||
# HIPRT_FOUND, if SDK found
|
||||
|
||||
if(NOT (DEFINED HIPRT_ROOT_DIR))
|
||||
set(HIPRT_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
# If `HIPRT_ROOT_DIR` was defined in the environment, use it.
|
||||
if(DEFINED HIPRT_ROOT_DIR AND HIPRT_ROOT_DIR)
|
||||
if(HIPRT_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{HIPRT_ROOT_DIR})
|
||||
set(HIPRT_ROOT_DIR $ENV{HIPRT_ROOT_DIR})
|
||||
elseif(DEFINED ENV{HIP_PATH})
|
||||
# Built-in environment variable from SDK.
|
||||
set(HIPRT_ROOT_DIR $ENV{HIP_PATH})
|
||||
else()
|
||||
set(HIPRT_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_hiprt_SEARCH_DIRS
|
||||
|
@ -55,3 +57,5 @@ find_package_handle_standard_args(HIPRT DEFAULT_MSG
|
|||
mark_as_advanced(
|
||||
HIPRT_INCLUDE_DIR
|
||||
)
|
||||
|
||||
unset(_hiprt_SEARCH_DIRS)
|
||||
|
|
|
@ -55,3 +55,5 @@ MARK_AS_ADVANCED(
|
|||
LIBHARFBUZZ_INCLUDE_DIR
|
||||
LIBHARFBUZZ_LIBRARY
|
||||
)
|
||||
|
||||
unset(_harfbuzz_SEARCH_DIRS)
|
||||
|
|
|
@ -137,3 +137,5 @@ mark_as_advanced(
|
|||
ICU_LIBRARY_TU
|
||||
ICU_LIBRARY_UC
|
||||
)
|
||||
|
||||
unset(_icu_SEARCH_DIRS)
|
||||
|
|
|
@ -61,3 +61,5 @@ mark_as_advanced(
|
|||
JACK_INCLUDE_DIR
|
||||
JACK_LIBRARY
|
||||
)
|
||||
|
||||
unset(_jack_SEARCH_DIRS)
|
||||
|
|
|
@ -71,3 +71,5 @@ mark_as_advanced(
|
|||
JEMALLOC_INCLUDE_DIR
|
||||
JEMALLOC_LIBRARY
|
||||
)
|
||||
|
||||
unset(_jemalloc_SEARCH_DIRS)
|
||||
|
|
|
@ -59,3 +59,5 @@ mark_as_advanced(
|
|||
LZO_INCLUDE_DIR
|
||||
LZO_LIBRARY
|
||||
)
|
||||
|
||||
unset(_lzo_SEARCH_DIRS)
|
||||
|
|
|
@ -20,7 +20,7 @@ else()
|
|||
set(LEVEL_ZERO_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_level_zero_search_dirs
|
||||
set(_level_zero_SEARCH_DIRS
|
||||
${LEVEL_ZERO_ROOT_DIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
|
@ -30,7 +30,7 @@ find_library(LEVEL_ZERO_LIBRARY
|
|||
NAMES
|
||||
ze_loader
|
||||
HINTS
|
||||
${_level_zero_search_dirs}
|
||||
${_level_zero_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
@ -39,7 +39,7 @@ find_path(LEVEL_ZERO_INCLUDE_DIR
|
|||
NAMES
|
||||
level_zero/ze_api.h
|
||||
HINTS
|
||||
${_level_zero_search_dirs}
|
||||
${_level_zero_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
@ -60,3 +60,5 @@ mark_as_advanced(
|
|||
LEVEL_ZERO_LIBRARY
|
||||
LEVEL_ZERO_INCLUDE_DIR
|
||||
)
|
||||
|
||||
unset(_level_zero_SEARCH_DIRS)
|
||||
|
|
|
@ -125,7 +125,15 @@ mark_as_advanced(
|
|||
OSL_INCLUDE_DIR
|
||||
OSL_SHADER_DIR
|
||||
)
|
||||
|
||||
foreach(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
mark_as_advanced(OSL_${UPPERCOMPONENT}_LIBRARY)
|
||||
endforeach()
|
||||
|
||||
unset(COMPONENT)
|
||||
unset(UPPERCOMPONENT)
|
||||
|
||||
unset(_osl_FIND_COMPONENTS)
|
||||
unset(_osl_LIBRARIES)
|
||||
unset(_osl_SEARCH_DIRS)
|
||||
|
|
|
@ -134,5 +134,9 @@ endif()
|
|||
|
||||
unset(COMPONENT)
|
||||
unset(UPPERCOMPONENT)
|
||||
unset(_opencollada_LIBRARIES)
|
||||
unset(_opencollada_FIND_COMPONENTS)
|
||||
unset(_opencollada_FIND_INCLUDES)
|
||||
unset(_opencollada_FIND_STATIC_COMPONENTS)
|
||||
unset(_opencollada_INCLUDES)
|
||||
unset(_opencollada_LIBRARIES)
|
||||
unset(_opencollada_SEARCH_DIRS)
|
||||
|
|
|
@ -72,6 +72,7 @@ if(EXISTS "${OPENCOLORIO_INCLUDE_DIR}/OpenColorIO/OpenColorABI.h")
|
|||
REGEX "^#define OCIO_VERSION[ \t].*$")
|
||||
endif()
|
||||
string(REGEX MATCHALL "[0-9]+[.0-9]+" OPENCOLORIO_VERSION ${_opencolorio_version})
|
||||
unset(_opencolorio_version)
|
||||
endif()
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
|
||||
|
|
|
@ -119,6 +119,10 @@ foreach(COMPONENT ${_openimagedenoise_FIND_COMPONENTS})
|
|||
mark_as_advanced(OPENIMAGEDENOISE_${UPPERCOMPONENT}_LIBRARY)
|
||||
endforeach()
|
||||
|
||||
unset(_openimagedenoise_SEARCH_DIRS)
|
||||
unset(COMPONENT)
|
||||
unset(UPPERCOMPONENT)
|
||||
|
||||
unset(_openimagedenoise_FIND_COMPONENTS)
|
||||
unset(_openimagedenoise_FIND_STATIC_COMPONENTS)
|
||||
unset(_openimagedenoise_LIBRARIES)
|
||||
unset(_openimagedenoise_SEARCH_DIRS)
|
||||
|
|
|
@ -85,3 +85,10 @@ foreach(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
|
|||
string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
mark_as_advanced(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY)
|
||||
endforeach()
|
||||
|
||||
unset(COMPONENT)
|
||||
unset(UPPERCOMPONENT)
|
||||
|
||||
unset(_opensubdiv_FIND_COMPONENTS)
|
||||
unset(_opensubdiv_SEARCH_DIRS)
|
||||
unset(_opensubdiv_LIBRARIES)
|
||||
|
|
|
@ -11,13 +11,15 @@
|
|||
# This can also be an environment variable.
|
||||
# OPTIX_FOUND, If false, do not try to use OptiX.
|
||||
|
||||
if(NOT (DEFINED OPTIX_ROOT_DIR))
|
||||
set(OPTIX_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
# If `OPTIX_ROOT_DIR` was defined in the environment, use it.
|
||||
if(DEFINED OPTIX_ROOT_DIR AND OPTIX_ROOT_DIR)
|
||||
if(OPTIX_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{OPTIX_ROOT_DIR})
|
||||
set(OPTIX_ROOT_DIR $ENV{OPTIX_ROOT_DIR})
|
||||
else()
|
||||
set(OPTIX_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_optix_SEARCH_DIRS
|
||||
|
|
|
@ -64,3 +64,5 @@ mark_as_advanced(
|
|||
PCRE_INCLUDE_DIR
|
||||
PCRE_LIBRARY
|
||||
)
|
||||
|
||||
unset(_pcre_SEARCH_DIRS)
|
||||
|
|
|
@ -64,3 +64,5 @@ mark_as_advanced(
|
|||
POTRACE_INCLUDE_DIR
|
||||
POTRACE_LIBRARY
|
||||
)
|
||||
|
||||
unset(_potrace_SEARCH_DIRS)
|
||||
|
|
|
@ -64,3 +64,5 @@ mark_as_advanced(
|
|||
PUGIXML_INCLUDE_DIR
|
||||
PUGIXML_LIBRARY
|
||||
)
|
||||
|
||||
unset(_pugixml_SEARCH_DIRS)
|
||||
|
|
|
@ -59,3 +59,5 @@ mark_as_advanced(
|
|||
LIBPULSE_INCLUDE_DIR
|
||||
LIBPULSE_LIBRARY
|
||||
)
|
||||
|
||||
unset(_pulse_SEARCH_DIRS)
|
||||
|
|
|
@ -256,10 +256,6 @@ if(PYTHONLIBSUNIX_FOUND)
|
|||
)
|
||||
endif()
|
||||
|
||||
unset(_PYTHON_ABI_FLAGS)
|
||||
unset(_PYTHON_VERSION_SUPPORTED)
|
||||
unset(_python_SEARCH_DIRS)
|
||||
|
||||
mark_as_advanced(
|
||||
PYTHON_INCLUDE_DIR
|
||||
PYTHON_INCLUDE_CONFIG_DIR
|
||||
|
@ -268,3 +264,7 @@ mark_as_advanced(
|
|||
PYTHON_SITE_PACKAGES
|
||||
PYTHON_EXECUTABLE
|
||||
)
|
||||
|
||||
unset(_PYTHON_ABI_FLAGS)
|
||||
unset(_PYTHON_VERSION_SUPPORTED)
|
||||
unset(_python_SEARCH_DIRS)
|
||||
|
|
|
@ -60,3 +60,5 @@ mark_as_advanced(
|
|||
SDL2_INCLUDE_DIR
|
||||
SDL2_LIBRARY
|
||||
)
|
||||
|
||||
unset(_sdl2_SEARCH_DIRS)
|
||||
|
|
|
@ -12,15 +12,17 @@
|
|||
# This can also be an environment variable.
|
||||
# SYCL_FOUND, If false, then don't try to use SYCL.
|
||||
|
||||
if(DEFINED SYCL_ROOT_DIR AND SYCL_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{SYCL_ROOT_DIR} AND NOT $ENV{SYCL_ROOT_DIR} STREQUAL "")
|
||||
set(SYCL_ROOT_DIR $ENV{SYCL_ROOT_DIR})
|
||||
else()
|
||||
if(NOT (DEFINED SYCL_ROOT_DIR))
|
||||
set(SYCL_ROOT_DIR "")
|
||||
endif()
|
||||
|
||||
set(_sycl_search_dirs
|
||||
if(SYCL_ROOT_DIR)
|
||||
# Pass.
|
||||
elseif(DEFINED ENV{SYCL_ROOT_DIR} AND NOT $ENV{SYCL_ROOT_DIR} STREQUAL "")
|
||||
set(SYCL_ROOT_DIR $ENV{SYCL_ROOT_DIR})
|
||||
endif()
|
||||
|
||||
set(_sycl_SEARCH_DIRS
|
||||
${SYCL_ROOT_DIR}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
|
@ -39,7 +41,7 @@ find_program(SYCL_COMPILER
|
|||
dpcpp
|
||||
clang++
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
${_sycl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
|
@ -54,7 +56,7 @@ if(NOT SYCL_COMPILER)
|
|||
icpx
|
||||
dpcpp
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
${_sycl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
)
|
||||
|
@ -66,7 +68,7 @@ find_library(SYCL_LIBRARY
|
|||
sycl6
|
||||
sycl
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
${_sycl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
@ -78,7 +80,7 @@ if(WIN32)
|
|||
sycl6d
|
||||
sycld
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
${_sycl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
@ -88,7 +90,7 @@ find_path(SYCL_INCLUDE_DIR
|
|||
NAMES
|
||||
sycl/sycl.hpp
|
||||
HINTS
|
||||
${_sycl_search_dirs}
|
||||
${_sycl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
@ -127,3 +129,5 @@ mark_as_advanced(
|
|||
SYCL_INCLUDE_DIR
|
||||
SYCL_LIBRARY
|
||||
)
|
||||
|
||||
unset(_sycl_SEARCH_DIRS)
|
||||
|
|
|
@ -59,3 +59,5 @@ mark_as_advanced(
|
|||
LIBSNDFILE_INCLUDE_DIR
|
||||
LIBSNDFILE_LIBRARY
|
||||
)
|
||||
|
||||
unset(_sndfile_SEARCH_DIRS)
|
||||
|
|
|
@ -61,3 +61,5 @@ mark_as_advanced(
|
|||
SPACENAV_INCLUDE_DIR
|
||||
SPACENAV_LIBRARY
|
||||
)
|
||||
|
||||
unset(_spacenav_SEARCH_DIRS)
|
||||
|
|
|
@ -64,3 +64,5 @@ mark_as_advanced(
|
|||
TBB_INCLUDE_DIR
|
||||
TBB_LIBRARY
|
||||
)
|
||||
|
||||
unset(_tbb_SEARCH_DIRS)
|
||||
|
|
|
@ -89,3 +89,7 @@ mark_as_advanced(
|
|||
WEBP_WEBP_LIBRARY
|
||||
WEBP_SHARPYUV_LIBRARY
|
||||
)
|
||||
|
||||
unset(_webp_FIND_COMPONENTS)
|
||||
unset(_webp_LIBRARIES)
|
||||
unset(_webp_SEARCH_DIRS)
|
||||
|
|
|
@ -59,3 +59,5 @@ mark_as_advanced(
|
|||
XML2_INCLUDE_DIR
|
||||
XML2_LIBRARY
|
||||
)
|
||||
|
||||
unset(_xml2_SEARCH_DIRS)
|
||||
|
|
|
@ -70,3 +70,5 @@ mark_as_advanced(
|
|||
XR_OPENXR_SDK_INCLUDE_DIR
|
||||
XR_OPENXR_SDK_LOADER_LIBRARY
|
||||
)
|
||||
|
||||
unset(_xr_openxr_sdk_SEARCH_DIRS)
|
||||
|
|
|
@ -61,3 +61,5 @@ mark_as_advanced(
|
|||
ZSTD_INCLUDE_DIR
|
||||
ZSTD_LIBRARY
|
||||
)
|
||||
|
||||
unset(_zstd_SEARCH_DIRS)
|
||||
|
|
|
@ -87,12 +87,17 @@ endif()
|
|||
if(NOT APPLE)
|
||||
set(WITH_XR_OPENXR ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_HIP_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_DEVICE_ONEAPI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_ONEAPI_BINARIES ON CACHE BOOL "" FORCE)
|
||||
# Can't use CMAKE_SYSTEM_PROCESSOR here as it's not set yet,
|
||||
# so fall back to checking the env for vcvarsall's VSCMD_ARG_TGT_ARCH
|
||||
if(NOT (WIN32 AND "$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "arm64"))
|
||||
set(WITH_CYCLES_DEVICE_OPTIX ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_CUDA_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_HIP_BINARIES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_DEVICE_ONEAPI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_ONEAPI_BINARIES ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
if(WIN32)
|
||||
set(WITH_CYCLES_DEVICE_HIPRT ON CACHE BOOL "" FORCE)
|
||||
|
||||
if(WIN32 AND NOT (WIN32 AND "$ENV{VSCMD_ARG_TGT_ARCH}" STREQUAL "arm64"))
|
||||
set(WITH_CYCLES_DEVICE_HIPRT ON CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
|
|
@ -554,7 +554,7 @@ macro(TEST_SSE_SUPPORT
|
|||
set(${_sse_flags} "/arch:SSE")
|
||||
set(${_sse2_flags} "/arch:SSE2")
|
||||
endif()
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||
set(${_sse_flags} "") # icc defaults to -msse
|
||||
set(${_sse2_flags} "") # icc defaults to -msse2
|
||||
else()
|
||||
|
@ -766,7 +766,7 @@ endmacro()
|
|||
macro(remove_cc_flag_unsigned_char)
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR
|
||||
(CMAKE_C_COMPILER_ID MATCHES "Clang") OR
|
||||
(CMAKE_C_COMPILER_ID MATCHES "Intel"))
|
||||
(CMAKE_C_COMPILER_ID STREQUAL "Intel"))
|
||||
remove_cc_flag("-funsigned-char")
|
||||
elseif(MSVC)
|
||||
remove_cc_flag("/J")
|
||||
|
|
|
@ -62,7 +62,7 @@ else()
|
|||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME_LOWER}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${PACKAGE_ARCH})
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# RPM packages
|
||||
include(build_files/cmake/RpmBuild.cmake)
|
||||
if(RPMBUILD_FOUND)
|
||||
|
|
|
@ -37,15 +37,34 @@ else()
|
|||
unset(LIBDIR_GLIBC228_ABI)
|
||||
endif()
|
||||
|
||||
if(NOT (EXISTS ${LIBDIR}))
|
||||
message(STATUS
|
||||
"Unable to find LIBDIR: ${LIBDIR}, system libraries may be used "
|
||||
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
||||
)
|
||||
if(NOT DEFINED LIBDIR)
|
||||
set(LIBDIR "") # Suppress undefined warnings, allow printing even if empty.
|
||||
endif()
|
||||
if((LIBDIR STREQUAL "") OR (NOT (EXISTS "${LIBDIR}")))
|
||||
if(WITH_STRICT_BUILD_OPTIONS)
|
||||
message(SEND_ERROR
|
||||
"Unable to find LIBDIR: \"${LIBDIR}\". "
|
||||
"WITH_LIBS_PRECOMPILED needs to be able to find the LIBDIR for the precompiled libraries."
|
||||
)
|
||||
else()
|
||||
message(STATUS
|
||||
"Unable to find LIBDIR: \"${LIBDIR}\". system libraries may be used "
|
||||
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
||||
)
|
||||
endif()
|
||||
unset(LIBDIR)
|
||||
set(WITH_LIBS_PRECOMPILED OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Disable the CPU check if not portable or if we are not using the pre-compiled libs.
|
||||
# This is because:
|
||||
# 1. We don't install the CPU check library on a non portable build.
|
||||
# 2. We assume that people know what systems they are targeting when they build a non
|
||||
# portable build or when not using our precompiled libs.
|
||||
set_and_warn_dependency(WITH_INSTALL_PORTABLE WITH_CPU_CHECK OFF)
|
||||
set_and_warn_dependency(WITH_LIBS_PRECOMPILED WITH_CPU_CHECK OFF)
|
||||
|
||||
# Support restoring this value once pre-compiled libraries have been handled.
|
||||
set(WITH_STATIC_LIBS_INIT ${WITH_STATIC_LIBS})
|
||||
|
||||
|
@ -120,7 +139,11 @@ if(DEFINED tiff_DIR)
|
|||
endif()
|
||||
|
||||
if(WITH_VULKAN_BACKEND)
|
||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/vulkan") AND (EXISTS "${LIBDIR}/shaderc"))
|
||||
if(DEFINED LIBDIR)
|
||||
# If these are missing, something went wrong (outdated LIBDIR?).
|
||||
if(NOT ((EXISTS "${LIBDIR}/vulkan") AND (EXISTS "${LIBDIR}/shaderc")))
|
||||
message(FATAL_ERROR "${LIBDIR}/vulkan & ${LIBDIR}/shaderc are missing!")
|
||||
endif()
|
||||
if(NOT DEFINED VULKAN_ROOT_DIR)
|
||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan)
|
||||
endif()
|
||||
|
@ -345,9 +368,11 @@ if(WITH_INPUT_NDOF)
|
|||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
if(DEFINED LIBDIR)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
if(EXISTS ${CYCLES_OSL} AND NOT OSL_ROOT)
|
||||
set(OSL_ROOT ${CYCLES_OSL})
|
||||
endif()
|
||||
endif()
|
||||
find_package_wrapper(OSL)
|
||||
set_and_warn_library_found("OSL" OSL_FOUND WITH_CYCLES_OSL)
|
||||
|
@ -366,7 +391,7 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
|||
endif()
|
||||
add_bundled_libraries(osl/lib)
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
||||
if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI AND DEFINED LIBDIR)
|
||||
set(CYCLES_LEVEL_ZERO ${LIBDIR}/level-zero CACHE PATH "Path to Level Zero installation")
|
||||
mark_as_advanced(CYCLES_LEVEL_ZERO)
|
||||
if(EXISTS ${CYCLES_LEVEL_ZERO} AND NOT LEVEL_ZERO_ROOT_DIR)
|
||||
|
@ -493,7 +518,9 @@ if(WITH_PUGIXML)
|
|||
endif()
|
||||
|
||||
if(WITH_IMAGE_WEBP)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
if(DEFINED LIBDIR)
|
||||
set(WEBP_ROOT_DIR ${LIBDIR}/webp)
|
||||
endif()
|
||||
find_package_wrapper(WebP)
|
||||
set_and_warn_library_found("WebP" WEBP_FOUND WITH_IMAGE_WEBP)
|
||||
endif()
|
||||
|
@ -622,7 +649,7 @@ if(CMAKE_DL_LIBS)
|
|||
list(APPEND PLATFORM_LINKLIBS ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(NOT WITH_PYTHON_MODULE)
|
||||
# binreloc is linux only
|
||||
set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
|
||||
|
@ -696,10 +723,11 @@ if(WITH_GHOST_WAYLAND)
|
|||
# When dynamically linked WAYLAND is used and `${LIBDIR}/wayland` is present,
|
||||
# there is no need to search for the libraries as they are not needed for building.
|
||||
# Only the headers are needed which can reference the known paths.
|
||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD))
|
||||
set(_use_system_wayland OFF)
|
||||
else()
|
||||
set(_use_system_wayland ON)
|
||||
set(_use_system_wayland ON)
|
||||
if(DEFINED LIBDIR)
|
||||
if(EXISTS "${LIBDIR}/wayland" AND WITH_GHOST_WAYLAND_DYNLOAD)
|
||||
set(_use_system_wayland OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(_use_system_wayland)
|
||||
|
@ -768,8 +796,11 @@ if(WITH_GHOST_WAYLAND)
|
|||
add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR)
|
||||
endif()
|
||||
|
||||
if((DEFINED LIBDIR) AND (EXISTS "${LIBDIR}/wayland/bin/wayland-scanner"))
|
||||
if(DEFINED LIBDIR)
|
||||
set(WAYLAND_SCANNER "${LIBDIR}/wayland/bin/wayland-scanner")
|
||||
if(NOT (EXISTS "${WAYLAND_SCANNER}"))
|
||||
message(FATAL_ERROR "${WAYLAND_SCANNER} is missing!")
|
||||
endif()
|
||||
else()
|
||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||
endif()
|
||||
|
@ -898,7 +929,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
message(STATUS "The \"mold\" binary could not be found, using system linker.")
|
||||
set(WITH_LINKER_MOLD OFF)
|
||||
elseif(CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
|
||||
message(STATUS "GCC 12.1 or newer is required for th MOLD linker.")
|
||||
message(STATUS "GCC 12.1 or newer is required for the MOLD linker.")
|
||||
set(WITH_LINKER_MOLD OFF)
|
||||
else()
|
||||
get_filename_component(MOLD_BIN_DIR "${MOLD_BIN}" DIRECTORY)
|
||||
|
@ -1012,7 +1043,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||
endif()
|
||||
|
||||
# Intel C++ Compiler
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
||||
# think these next two are broken
|
||||
find_program(XIAR xiar)
|
||||
if(XIAR)
|
||||
|
@ -1105,7 +1136,15 @@ if(PLATFORM_BUNDLED_LIBRARIES)
|
|||
|
||||
# Environment variables to run precompiled executables that needed libraries.
|
||||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ":" _library_paths)
|
||||
set(PLATFORM_ENV_BUILD "LD_LIBRARY_PATH=\"${_library_paths}:$LD_LIBRARY_PATH\"")
|
||||
set(PLATFORM_ENV_INSTALL "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH")
|
||||
set(PLATFORM_ENV_BUILD
|
||||
"LD_LIBRARY_PATH=\"${_library_paths}:$LD_LIBRARY_PATH\""
|
||||
)
|
||||
set(PLATFORM_ENV_INSTALL
|
||||
"LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/lib/;$LD_LIBRARY_PATH"
|
||||
)
|
||||
unset(_library_paths)
|
||||
else()
|
||||
# Quiet unused variable warnings, unfortunately this can't be empty.
|
||||
set(PLATFORM_ENV_BUILD "_DUMMY_ENV_VAR_=1")
|
||||
set(PLATFORM_ENV_INSTALL "_DUMMY_ENV_VAR_=1")
|
||||
endif()
|
||||
|
|
|
@ -119,7 +119,11 @@ remove_cc_flag("/GR")
|
|||
add_definitions(-D_WIN32_WINNT=0x603)
|
||||
|
||||
# First generate the manifest for tests since it will not need the dependency on the CRT.
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest @ONLY)
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/tests.exe.manifest
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Always detect CRT paths, but only manually install with WITH_WINDOWS_BUNDLE_CRT.
|
||||
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
|
@ -152,7 +156,11 @@ endif()
|
|||
if(NOT WITH_PYTHON_MODULE)
|
||||
set(BUNDLECRT "${BUNDLECRT}<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.shared\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||
endif()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/blender.exe.manifest @ONLY)
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/release/windows/manifest/blender.exe.manifest.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/blender.exe.manifest
|
||||
@ONLY
|
||||
)
|
||||
|
||||
remove_cc_flag(
|
||||
"/MDd"
|
||||
|
@ -162,10 +170,10 @@ remove_cc_flag(
|
|||
|
||||
if(MSVC_CLANG) # Clangs version of cl doesn't support all flags
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${CXX_WARN_FLAGS} /nologo /J /Gd /EHsc -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference ")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
|
||||
string(APPEND CMAKE_C_FLAGS " /nologo /J /Gd -Wno-unused-command-line-argument -Wno-microsoft-enum-forward-reference")
|
||||
else()
|
||||
string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj /Zc:inline")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj /Zc:inline")
|
||||
string(APPEND CMAKE_CXX_FLAGS " /nologo /J /Gd /MP /EHsc /bigobj")
|
||||
string(APPEND CMAKE_C_FLAGS " /nologo /J /Gd /MP /bigobj")
|
||||
endif()
|
||||
|
||||
# X64 ASAN is available and usable on MSVC 16.9 preview 4 and up)
|
||||
|
@ -183,9 +191,25 @@ if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG)
|
|||
endif()
|
||||
|
||||
|
||||
# C++ standards conformace (/permissive-) is available on msvc 15.5 (1912) and up
|
||||
# C++ standards conformace
|
||||
# /permissive- : Available from MSVC 15.5 (1912) and up. Enables standards-confirming compiler
|
||||
# behavior. Required until the project is marked as c++20.
|
||||
# /Zc:__cplusplus : Available from MSVC 15.7 (1914) and up. Ensures correct value of the __cplusplus
|
||||
# preprocessor macro.
|
||||
# /Zc:inline : Enforces C++11 requirement that all functions declared 'inline' must have a
|
||||
# definition available in the same translation unit if they're used.
|
||||
# /Zc:preprocessor: Available from MSVC 16.5 (1925) and up. Enables standards-conforming
|
||||
# preprocessor.
|
||||
if(NOT MSVC_CLANG)
|
||||
string(APPEND CMAKE_CXX_FLAGS " /permissive-")
|
||||
string(APPEND CMAKE_CXX_FLAGS " /permissive- /Zc:__cplusplus /Zc:inline")
|
||||
string(APPEND CMAKE_C_FLAGS " /Zc:inline")
|
||||
|
||||
# For ARM64 devices, we need to tell MSVC to use the new preprocessor
|
||||
# This is because sse2neon requires it.
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
string(APPEND CMAKE_CXX_FLAGS " /Zc:preprocessor")
|
||||
string(APPEND CMAKE_C_FLAGS " /Zc:preprocessor")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_WINDOWS_SCCACHE AND CMAKE_VS_MSBUILD_COMMAND)
|
||||
|
@ -257,7 +281,11 @@ set(PLATFORM_LINKFLAGS_RELEASE "${PLATFORM_LINKFLAGS} ${PDB_INFO_OVERRIDE_LINKER
|
|||
string(APPEND CMAKE_STATIC_LINKER_FLAGS " /ignore:4221")
|
||||
|
||||
if(CMAKE_CL_64)
|
||||
string(PREPEND PLATFORM_LINKFLAGS "/MACHINE:X64 ")
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
string(PREPEND PLATFORM_LINKFLAGS "/MACHINE:ARM64 ")
|
||||
else()
|
||||
string(PREPEND PLATFORM_LINKFLAGS "/MACHINE:X64 ")
|
||||
endif()
|
||||
else()
|
||||
string(PREPEND PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ")
|
||||
endif()
|
||||
|
@ -266,7 +294,11 @@ if(NOT DEFINED LIBDIR)
|
|||
# Setup 64bit and 64bit windows systems
|
||||
if(CMAKE_CL_64)
|
||||
message(STATUS "64 bit compiler detected.")
|
||||
set(LIBDIR_BASE "windows_x64")
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
set(LIBDIR_BASE "windows_arm64")
|
||||
else()
|
||||
set(LIBDIR_BASE "windows_x64")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "32 bit compiler detected, blender no longer provides pre-build libraries for 32 bit windows, please set the LIBDIR cmake variable to your own library folder")
|
||||
endif()
|
||||
|
@ -320,7 +352,10 @@ foreach(child ${children})
|
|||
endforeach()
|
||||
|
||||
if(WITH_PUGIXML)
|
||||
set(PUGIXML_LIBRARIES optimized ${LIBDIR}/pugixml/lib/pugixml.lib debug ${LIBDIR}/pugixml/lib/pugixml_d.lib)
|
||||
set(PUGIXML_LIBRARIES
|
||||
optimized ${LIBDIR}/pugixml/lib/pugixml.lib
|
||||
debug ${LIBDIR}/pugixml/lib/pugixml_d.lib
|
||||
)
|
||||
set(PUGIXML_INCLUDE_DIR ${LIBDIR}/pugixml/include)
|
||||
endif()
|
||||
|
||||
|
@ -378,7 +413,10 @@ if(WITH_HARFBUZZ)
|
|||
windows_find_package(Harfbuzz)
|
||||
if(NOT Harfbuzz_FOUND)
|
||||
set(LIBHARFBUZZ_INCLUDE_DIRS ${LIBDIR}/harfbuzz/include)
|
||||
set(LIBHARFBUZZ_LIBRARIES optimized ${LIBDIR}/harfbuzz/lib/libharfbuzz.lib debug ${LIBDIR}/harfbuzz/lib/libharfbuzz_d.lib)
|
||||
set(LIBHARFBUZZ_LIBRARIES
|
||||
optimized ${LIBDIR}/harfbuzz/lib/libharfbuzz.lib
|
||||
debug ${LIBDIR}/harfbuzz/lib/libharfbuzz_d.lib
|
||||
)
|
||||
set(Harfbuzz_FOUND ON)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -514,7 +552,11 @@ if(WITH_IMAGE_OPENEXR)
|
|||
warn_hardcoded_paths(OpenEXR)
|
||||
set(OPENEXR ${LIBDIR}/openexr)
|
||||
set(OPENEXR_INCLUDE_DIR ${OPENEXR}/include)
|
||||
set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${IMATH_INCLUDE_DIRS} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
set(OPENEXR_INCLUDE_DIRS
|
||||
${OPENEXR_INCLUDE_DIR}
|
||||
${IMATH_INCLUDE_DIRS}
|
||||
${OPENEXR_INCLUDE_DIR}/OpenEXR
|
||||
)
|
||||
set(OPENEXR_LIBPATH ${OPENEXR}/lib)
|
||||
# Check if the blender 3.3 lib static library eixts
|
||||
# if not assume this is a 3.4+ dynamic version.
|
||||
|
@ -550,7 +592,10 @@ if(WITH_JACK)
|
|||
${LIBDIR}/jack/include/jack
|
||||
${LIBDIR}/jack/include
|
||||
)
|
||||
set(JACK_LIBRARIES optimized ${LIBDIR}/jack/lib/libjack.lib debug ${LIBDIR}/jack/lib/libjack_d.lib)
|
||||
set(JACK_LIBRARIES
|
||||
optimized ${LIBDIR}/jack/lib/libjack.lib
|
||||
debug ${LIBDIR}/jack/lib/libjack_d.lib
|
||||
)
|
||||
endif()
|
||||
|
||||
set(_PYTHON_VERSION "3.11")
|
||||
|
@ -584,7 +629,10 @@ if(WITH_PYTHON)
|
|||
set(NUMPY_FOUND ON)
|
||||
# uncached vars
|
||||
set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
|
||||
set(PYTHON_LIBRARIES debug "${PYTHON_LIBRARY_DEBUG}" optimized "${PYTHON_LIBRARY}" )
|
||||
set(PYTHON_LIBRARIES
|
||||
debug "${PYTHON_LIBRARY_DEBUG}"
|
||||
optimized "${PYTHON_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT WITH_WINDOWS_FIND_MODULES)
|
||||
|
@ -604,9 +652,15 @@ if(NOT WITH_WINDOWS_FIND_MODULES)
|
|||
if(NOT BOOST_VERSION)
|
||||
message(FATAL_ERROR "Unable to determine Boost version")
|
||||
endif()
|
||||
set(BOOST_POSTFIX "vc142-mt-x64-${BOOST_VERSION}")
|
||||
set(BOOST_DEBUG_POSTFIX "vc142-mt-gyd-x64-${BOOST_VERSION}")
|
||||
set(BOOST_PREFIX "")
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
set(BOOST_POSTFIX "vc143-mt-a64-${BOOST_VERSION}")
|
||||
set(BOOST_DEBUG_POSTFIX "vc143-mt-gyd-a64-${BOOST_VERSION}")
|
||||
set(BOOST_PREFIX "")
|
||||
else()
|
||||
set(BOOST_POSTFIX "vc142-mt-x64-${BOOST_VERSION}")
|
||||
set(BOOST_DEBUG_POSTFIX "vc142-mt-gyd-x64-${BOOST_VERSION}")
|
||||
set(BOOST_PREFIX "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_BOOST)
|
||||
|
@ -625,8 +679,9 @@ if(WITH_BOOST)
|
|||
if(NOT Boost_FOUND)
|
||||
warn_hardcoded_paths(BOOST)
|
||||
# This is file new in 3.4 if it does not exist, assume we are building against 3.3 libs
|
||||
# Note, as ARM64 was introduced in 4.x, this check is not needed
|
||||
set(BOOST_34_TRIGGER_FILE ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python${_PYTHON_VERSION_NO_DOTS}-${BOOST_DEBUG_POSTFIX}.lib)
|
||||
if(NOT EXISTS ${BOOST_34_TRIGGER_FILE})
|
||||
if (NOT EXISTS ${BOOST_34_TRIGGER_FILE})
|
||||
set(BOOST_DEBUG_POSTFIX "vc142-mt-gd-x64-${BOOST_VERSION}")
|
||||
set(BOOST_PREFIX "lib")
|
||||
endif()
|
||||
|
@ -681,8 +736,14 @@ if(NOT OpenImageIO_FOUND)
|
|||
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
|
||||
set(OPENIMAGEIO_INCLUDE_DIR ${OPENIMAGEIO}/include)
|
||||
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
set(OIIO_OPTIMIZED optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib)
|
||||
set(OIIO_DEBUG debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_d.lib debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util_d.lib)
|
||||
set(OIIO_OPTIMIZED
|
||||
optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO.lib
|
||||
optimized ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util.lib
|
||||
)
|
||||
set(OIIO_DEBUG
|
||||
debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_d.lib
|
||||
debug ${OPENIMAGEIO_LIBPATH}/OpenImageIO_Util_d.lib
|
||||
)
|
||||
set(OPENIMAGEIO_LIBRARIES ${OIIO_OPTIMIZED} ${OIIO_DEBUG})
|
||||
set(OPENIMAGEIO_TOOL "${OPENIMAGEIO}/bin/oiiotool.exe")
|
||||
endif()
|
||||
|
@ -746,7 +807,10 @@ if(WITH_OPENVDB)
|
|||
set(OPENVDB ${LIBDIR}/openVDB)
|
||||
set(OPENVDB_LIBPATH ${OPENVDB}/lib)
|
||||
set(OPENVDB_INCLUDE_DIRS ${OPENVDB}/include)
|
||||
set(OPENVDB_LIBRARIES optimized ${OPENVDB_LIBPATH}/openvdb.lib debug ${OPENVDB_LIBPATH}/openvdb_d.lib )
|
||||
set(OPENVDB_LIBRARIES
|
||||
optimized ${OPENVDB_LIBPATH}/openvdb.lib
|
||||
debug ${OPENVDB_LIBPATH}/openvdb_d.lib
|
||||
)
|
||||
endif()
|
||||
set(OPENVDB_DEFINITIONS -DNOMINMAX -D_USE_MATH_DEFINES)
|
||||
endif()
|
||||
|
@ -770,7 +834,10 @@ if(WITH_OPENIMAGEDENOISE)
|
|||
get_target_property(OPENIMAGEDENOISE_LIBRARIES_RELEASE OpenImageDenoise IMPORTED_IMPLIB_RELEASE)
|
||||
get_target_property(OPENIMAGEDENOISE_LIBRARIES_DEBUG OpenImageDenoise IMPORTED_IMPLIB_DEBUG)
|
||||
if(EXISTS ${OPENIMAGEDENOISE_LIBRARIES_DEBUG})
|
||||
set(OPENIMAGEDENOISE_LIBRARIES optimized ${OPENIMAGEDENOISE_LIBRARIES_RELEASE} debug ${OPENIMAGEDENOISE_LIBRARIES_DEBUG})
|
||||
set(OPENIMAGEDENOISE_LIBRARIES
|
||||
optimized ${OPENIMAGEDENOISE_LIBRARIES_RELEASE}
|
||||
debug ${OPENIMAGEDENOISE_LIBRARIES_DEBUG}
|
||||
)
|
||||
else()
|
||||
if(EXISTS ${OPENIMAGEDENOISE_LIBRARIES_RELEASE})
|
||||
set(OPENIMAGEDENOISE_LIBRARIES ${OPENIMAGEDENOISE_LIBRARIES_RELEASE})
|
||||
|
@ -805,7 +872,10 @@ if(WITH_ALEMBIC)
|
|||
set(ALEMBIC_INCLUDE_DIR ${ALEMBIC}/include)
|
||||
set(ALEMBIC_INCLUDE_DIRS ${ALEMBIC_INCLUDE_DIR})
|
||||
set(ALEMBIC_LIBPATH ${ALEMBIC}/lib)
|
||||
set(ALEMBIC_LIBRARIES optimized ${ALEMBIC}/lib/Alembic.lib debug ${ALEMBIC}/lib/Alembic_d.lib)
|
||||
set(ALEMBIC_LIBRARIES
|
||||
optimized ${ALEMBIC}/lib/Alembic.lib
|
||||
debug ${ALEMBIC}/lib/Alembic_d.lib
|
||||
)
|
||||
set(ALEMBIC_FOUND 1)
|
||||
endif()
|
||||
|
||||
|
@ -855,11 +925,17 @@ endif()
|
|||
if(WITH_TBB)
|
||||
windows_find_package(TBB)
|
||||
if(NOT TBB_FOUND)
|
||||
set(TBB_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbb.lib debug ${LIBDIR}/tbb/lib/tbb_debug.lib)
|
||||
set(TBB_LIBRARIES
|
||||
optimized ${LIBDIR}/tbb/lib/tbb.lib
|
||||
debug ${LIBDIR}/tbb/lib/tbb_debug.lib
|
||||
)
|
||||
set(TBB_INCLUDE_DIR ${LIBDIR}/tbb/include)
|
||||
set(TBB_INCLUDE_DIRS ${TBB_INCLUDE_DIR})
|
||||
if(WITH_TBB_MALLOC_PROXY)
|
||||
set(TBB_MALLOC_LIBRARIES optimized ${LIBDIR}/tbb/lib/tbbmalloc.lib debug ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib)
|
||||
set(TBB_MALLOC_LIBRARIES
|
||||
optimized ${LIBDIR}/tbb/lib/tbbmalloc.lib
|
||||
debug ${LIBDIR}/tbb/lib/tbbmalloc_debug.lib
|
||||
)
|
||||
add_definitions(-DWITH_TBB_MALLOC)
|
||||
endif()
|
||||
endif()
|
||||
|
@ -893,6 +969,15 @@ if(WITH_CODEC_SNDFILE)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CPU_SIMD AND SUPPORT_NEON_BUILD)
|
||||
windows_find_package(sse2neon)
|
||||
if(NOT SSE2NEON_FOUND)
|
||||
set(SSE2NEON_ROOT_DIR ${LIBDIR}/sse2neon)
|
||||
set(SSE2NEON_INCLUDE_DIRS ${LIBDIR}/sse2neon)
|
||||
set(SSE2NEON_FOUND True)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES AND WITH_CYCLES_OSL)
|
||||
set(CYCLES_OSL ${LIBDIR}/osl CACHE PATH "Path to OpenShadingLanguage installation")
|
||||
set(OSL_SHADER_DIR ${CYCLES_OSL}/shaders)
|
||||
|
@ -1102,9 +1187,15 @@ if(WITH_XR_OPENXR)
|
|||
# support the transition between the old and new lib versions
|
||||
# this can be removed after the next lib update.
|
||||
if(EXISTS ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
|
||||
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
|
||||
set(XR_OPENXR_SDK_LIBRARIES
|
||||
optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib
|
||||
debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib
|
||||
)
|
||||
else()
|
||||
set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loaderd.lib)
|
||||
set(XR_OPENXR_SDK_LIBRARIES
|
||||
optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib
|
||||
debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loaderd.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -1115,7 +1206,10 @@ if(WITH_GMP)
|
|||
else()
|
||||
set(GMP_DLL_LIB_NAME libgmp-10.lib)
|
||||
endif()
|
||||
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/${GMP_DLL_LIB_NAME} optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib)
|
||||
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/${GMP_DLL_LIB_NAME}
|
||||
optimized ${LIBDIR}/gmp/lib/libgmpxx.lib
|
||||
debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib
|
||||
)
|
||||
set(GMP_ROOT_DIR ${LIBDIR}/gmp)
|
||||
set(GMP_FOUND ON)
|
||||
endif()
|
||||
|
@ -1169,7 +1263,10 @@ if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)
|
|||
if(openpgl_FOUND)
|
||||
get_target_property(OPENPGL_LIBRARIES_RELEASE openpgl::openpgl LOCATION_RELEASE)
|
||||
get_target_property(OPENPGL_LIBRARIES_DEBUG openpgl::openpgl LOCATION_DEBUG)
|
||||
set(OPENPGL_LIBRARIES optimized ${OPENPGL_LIBRARIES_RELEASE} debug ${OPENPGL_LIBRARIES_DEBUG})
|
||||
set(OPENPGL_LIBRARIES
|
||||
optimized ${OPENPGL_LIBRARIES_RELEASE}
|
||||
debug ${OPENPGL_LIBRARIES_DEBUG}
|
||||
)
|
||||
get_target_property(OPENPGL_INCLUDE_DIR openpgl::openpgl INTERFACE_INCLUDE_DIRECTORIES)
|
||||
else()
|
||||
set(WITH_CYCLES_PATH_GUIDING OFF)
|
||||
|
@ -1208,7 +1305,10 @@ if(WITH_CYCLES AND (WITH_CYCLES_DEVICE_ONEAPI OR (WITH_CYCLES_EMBREE AND EMBREE_
|
|||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
|
||||
unset(_sycl_runtime_libraries)
|
||||
|
||||
set(SYCL_LIBRARIES optimized ${SYCL_LIBRARY} debug ${SYCL_LIBRARY_DEBUG})
|
||||
set(SYCL_LIBRARIES
|
||||
optimized ${SYCL_LIBRARY}
|
||||
debug ${SYCL_LIBRARY_DEBUG}
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -1216,6 +1316,7 @@ endif()
|
|||
list(JOIN PLATFORM_BUNDLED_LIBRARY_DIRS ";" _library_paths)
|
||||
set(PLATFORM_ENV_BUILD_DIRS "${LIBDIR}/epoxy/bin\;${LIBDIR}/tbb/bin\;${LIBDIR}/OpenImageIO/bin\;${LIBDIR}/boost/lib\;${LIBDIR}/openexr/bin\;${LIBDIR}/imath/bin\;${LIBDIR}/shaderc/bin\;${PATH}")
|
||||
set(PLATFORM_ENV_BUILD "PATH=${PLATFORM_ENV_BUILD_DIRS}")
|
||||
# Install needs the additional folders from PLATFORM_ENV_BUILD_DIRS as well, as tools like idiff and abcls use the release mode dlls
|
||||
# Install needs the additional folders from PLATFORM_ENV_BUILD_DIRS as well, as tools like:
|
||||
# `idiff` and `abcls` use the release mode dlls.
|
||||
set(PLATFORM_ENV_INSTALL "PATH=${CMAKE_INSTALL_PREFIX_WITH_CONFIG}/blender.shared/\;${PLATFORM_ENV_BUILD_DIRS}\;$ENV{PATH}")
|
||||
unset(_library_paths)
|
||||
|
|
|
@ -27,8 +27,8 @@ function(blender_test_set_envvars testname envvars_list)
|
|||
if(NOT CMAKE_BUILD_TYPE MATCHES "Release")
|
||||
if(WITH_COMPILER_ASAN)
|
||||
set(_lsan_options "LSAN_OPTIONS=print_suppressions=false:suppressions=${CMAKE_SOURCE_DIR}/tools/config/analysis/lsan.supp")
|
||||
# FIXME That `allocator_may_return_null=true` ASAN option is only needed for the `guardedalloc` test,
|
||||
# would be nice to allow tests definition to pass extra envvars better.
|
||||
# FIXME: That `allocator_may_return_null=true` ASAN option is only needed for the
|
||||
# `guardedalloc` test, would be nice to allow tests definition to pass extra envvars better.
|
||||
set(_asan_options "ASAN_OPTIONS=allocator_may_return_null=true")
|
||||
if(DEFINED ENV{LSAN_OPTIONS})
|
||||
set(_lsan_options "${_lsan_options}:$ENV{LSAN_OPTIONS}")
|
||||
|
|
|
@ -54,7 +54,7 @@ if not (lib_tests_dirpath / ".git").exists():
|
|||
sys.exit(1)
|
||||
|
||||
# Ensure the test data files sub-module is configured and present.
|
||||
make_utils.git_enable_submodule(git_command, "tests/data")
|
||||
make_utils.git_enable_submodule(git_command, Path("tests") / "data")
|
||||
make_utils.git_update_submodule(args.git_command, lib_tests_dirpath)
|
||||
|
||||
# Run cmake again to detect tests files.
|
||||
|
|
|
@ -22,7 +22,10 @@ from pathlib import Path
|
|||
from make_utils import call, check_output
|
||||
from urllib.parse import urljoin, urlsplit
|
||||
|
||||
from typing import Optional
|
||||
from typing import (
|
||||
Optional,
|
||||
Tuple,
|
||||
)
|
||||
|
||||
|
||||
def print_stage(text: str) -> None:
|
||||
|
@ -91,7 +94,7 @@ def get_effective_architecture(args: argparse.Namespace) -> str:
|
|||
NOTE: When cross-compiling the architecture is coming from the command line
|
||||
argument.
|
||||
"""
|
||||
architecture = args.architecture
|
||||
architecture: Optional[str] = args.architecture
|
||||
if architecture:
|
||||
assert isinstance(architecture, str)
|
||||
elif "ARM64" in platform.version():
|
||||
|
@ -101,15 +104,16 @@ def get_effective_architecture(args: argparse.Namespace) -> str:
|
|||
architecture = platform.machine().lower()
|
||||
|
||||
# Normalize the architecture name.
|
||||
if architecture in ("x86_64", "amd64"):
|
||||
if architecture in {"x86_64", "amd64"}:
|
||||
architecture = "x64"
|
||||
|
||||
assert (architecture in ("x64", "arm64"))
|
||||
assert (architecture in {"x64", "arm64"})
|
||||
|
||||
assert isinstance(architecture, str)
|
||||
return architecture
|
||||
|
||||
|
||||
def get_submodule_directories(args: argparse.Namespace):
|
||||
def get_submodule_directories(args: argparse.Namespace) -> Tuple[Path, ...]:
|
||||
"""
|
||||
Get list of all configured submodule directories.
|
||||
"""
|
||||
|
@ -121,8 +125,8 @@ def get_submodule_directories(args: argparse.Namespace):
|
|||
return ()
|
||||
|
||||
submodule_directories_output = check_output(
|
||||
[args.git_command, "config", "--file", dot_modules, "--get-regexp", "path"])
|
||||
return (Path(line.split(' ', 1)[1]) for line in submodule_directories_output.strip().splitlines())
|
||||
[args.git_command, "config", "--file", str(dot_modules), "--get-regexp", "path"])
|
||||
return tuple([Path(line.split(' ', 1)[1]) for line in submodule_directories_output.strip().splitlines()])
|
||||
|
||||
|
||||
def ensure_git_lfs(args: argparse.Namespace) -> None:
|
||||
|
@ -131,9 +135,9 @@ def ensure_git_lfs(args: argparse.Namespace) -> None:
|
|||
call((args.git_command, "lfs", "install", "--skip-repo"), exit_on_error=True)
|
||||
|
||||
|
||||
def update_precompiled_libraries(args: argparse.Namespace) -> str:
|
||||
def initialize_precompiled_libraries(args: argparse.Namespace) -> str:
|
||||
"""
|
||||
Configure and update submodule for precompiled libraries
|
||||
Configure submodule for precompiled libraries
|
||||
|
||||
This function detects the current host architecture and enables
|
||||
corresponding submodule, and updates the submodule.
|
||||
|
@ -162,27 +166,23 @@ def update_precompiled_libraries(args: argparse.Namespace) -> str:
|
|||
if Path(submodule_dir) not in submodule_directories:
|
||||
return "Skipping libraries update: no configured submodule\n"
|
||||
|
||||
make_utils.git_enable_submodule(args.git_command, submodule_dir)
|
||||
|
||||
if not make_utils.git_update_submodule(args.git_command, submodule_dir):
|
||||
return "Error updating precompiled libraries\n"
|
||||
print(f"* Enabling precompiled libraries at {submodule_dir}")
|
||||
make_utils.git_enable_submodule(args.git_command, Path(submodule_dir))
|
||||
|
||||
return ""
|
||||
|
||||
|
||||
def update_tests_data_files(args: argparse.Namespace) -> str:
|
||||
def initialize_tests_data_files(args: argparse.Namespace) -> str:
|
||||
"""
|
||||
Configure and update submodule with files used by regression tests
|
||||
Configure submodule with files used by regression tests
|
||||
"""
|
||||
|
||||
print_stage("Configuring Tests Data Files")
|
||||
|
||||
submodule_dir = "tests/data"
|
||||
|
||||
make_utils.git_enable_submodule(args.git_command, submodule_dir)
|
||||
|
||||
if not make_utils.git_update_submodule(args.git_command, submodule_dir):
|
||||
return "Error updating test data\n"
|
||||
print(f"* Enabling tests data at {submodule_dir}")
|
||||
make_utils.git_enable_submodule(args.git_command, Path(submodule_dir))
|
||||
|
||||
return ""
|
||||
|
||||
|
@ -285,7 +285,8 @@ def resolve_external_url(blender_url: str, repo_name: str) -> str:
|
|||
def external_script_copy_old_submodule_over(
|
||||
args: argparse.Namespace,
|
||||
directory: Path,
|
||||
old_submodules_dir: Path) -> None:
|
||||
old_submodules_dir: Path,
|
||||
) -> None:
|
||||
blender_git_root = get_blender_git_root()
|
||||
external_dir = blender_git_root / directory
|
||||
|
||||
|
@ -305,10 +306,12 @@ def external_script_copy_old_submodule_over(
|
|||
call((args.git_command, "config", "--file", str(git_config), "--unset", "core.worktree"))
|
||||
|
||||
|
||||
def floating_checkout_initialize_if_needed(args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory: Path,
|
||||
old_submodules_dir: Path = None) -> None:
|
||||
def floating_checkout_initialize_if_needed(
|
||||
args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory: Path,
|
||||
old_submodules_dir: Optional[Path] = None,
|
||||
) -> None:
|
||||
"""Initialize checkout of an external repository"""
|
||||
|
||||
blender_git_root = get_blender_git_root()
|
||||
|
@ -338,9 +341,11 @@ def floating_checkout_initialize_if_needed(args: argparse.Namespace,
|
|||
call((args.git_command, "clone", "--origin", origin_name, external_url, str(external_dir)))
|
||||
|
||||
|
||||
def floating_checkout_add_origin_if_needed(args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory: Path) -> None:
|
||||
def floating_checkout_add_origin_if_needed(
|
||||
args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory: Path,
|
||||
) -> None:
|
||||
"""
|
||||
Add remote called 'origin' if there is a fork of the external repository available
|
||||
|
||||
|
@ -397,12 +402,14 @@ def floating_checkout_add_origin_if_needed(args: argparse.Namespace,
|
|||
return
|
||||
|
||||
|
||||
def floating_checkout_update(args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory: Path,
|
||||
branch: Optional[str],
|
||||
old_submodules_dir: Path = None,
|
||||
only_update=False) -> str:
|
||||
def floating_checkout_update(
|
||||
args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory: Path,
|
||||
branch: Optional[str],
|
||||
old_submodules_dir: Optional[Path] = None,
|
||||
only_update: bool = False,
|
||||
) -> str:
|
||||
"""Update a single external checkout with the given name in the scripts folder"""
|
||||
|
||||
blender_git_root = get_blender_git_root()
|
||||
|
@ -479,41 +486,37 @@ def floating_checkout_update(args: argparse.Namespace,
|
|||
return skip_msg
|
||||
|
||||
|
||||
def external_scripts_update(args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory_name: str,
|
||||
branch: Optional[str]) -> str:
|
||||
return floating_checkout_update(args,
|
||||
repo_name,
|
||||
Path("scripts") / directory_name,
|
||||
branch,
|
||||
old_submodules_dir=Path("release") / "scripts" / directory_name)
|
||||
|
||||
|
||||
def scripts_submodules_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
||||
"""Update working trees of addons and addons_contrib within the scripts/ directory"""
|
||||
msg = ""
|
||||
|
||||
msg += external_scripts_update(args, "blender-addons", "addons", branch)
|
||||
msg += external_scripts_update(args, "blender-addons-contrib", "addons_contrib", branch)
|
||||
|
||||
return msg
|
||||
def external_scripts_update(
|
||||
args: argparse.Namespace,
|
||||
repo_name: str,
|
||||
directory_name: str,
|
||||
branch: Optional[str],
|
||||
) -> str:
|
||||
return floating_checkout_update(
|
||||
args,
|
||||
repo_name,
|
||||
Path("scripts") / directory_name,
|
||||
branch,
|
||||
old_submodules_dir=Path("release") / "scripts" / directory_name,
|
||||
)
|
||||
|
||||
|
||||
def floating_libraries_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
||||
"""Update libraries checkouts which are floating (not attached as Git submodules)"""
|
||||
msg = ""
|
||||
|
||||
msg += floating_checkout_update(args,
|
||||
"benchmarks",
|
||||
Path("tests") / "benchmarks",
|
||||
branch,
|
||||
only_update=True)
|
||||
msg += floating_checkout_update(
|
||||
args,
|
||||
"benchmarks",
|
||||
Path("tests") / "benchmarks",
|
||||
branch,
|
||||
only_update=True,
|
||||
)
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
def add_submodule_push_url(args: argparse.Namespace):
|
||||
def add_submodule_push_url(args: argparse.Namespace) -> None:
|
||||
"""
|
||||
Add pushURL configuration for all locally activated submodules, pointing to SSH protocol.
|
||||
"""
|
||||
|
@ -551,7 +554,39 @@ def add_submodule_push_url(args: argparse.Namespace):
|
|||
make_utils.git_set_config(args.git_command, "remote.origin.pushURL", push_url, str(config))
|
||||
|
||||
|
||||
def submodules_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
||||
def submodules_lib_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
||||
print_stage("Updating Libraries")
|
||||
|
||||
msg = ""
|
||||
msg += floating_libraries_update(args, branch)
|
||||
|
||||
submodule_directories = get_submodule_directories(args)
|
||||
for submodule_path in submodule_directories:
|
||||
if not make_utils.is_git_submodule_enabled(args.git_command, submodule_path):
|
||||
print(f"* Skipping {submodule_path}")
|
||||
continue
|
||||
|
||||
print(f"* Updating {submodule_path} ...")
|
||||
|
||||
if not make_utils.git_update_submodule(args.git_command, submodule_path):
|
||||
msg += f"Error updating Git submodule {submodule_path}\n"
|
||||
|
||||
add_submodule_push_url(args)
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
def scripts_submodules_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
||||
"""Update working trees of addons and addons_contrib within the scripts/ directory"""
|
||||
msg = ""
|
||||
|
||||
msg += external_scripts_update(args, "blender-addons", "addons", branch)
|
||||
msg += external_scripts_update(args, "blender-addons-contrib", "addons_contrib", branch)
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
def submodules_code_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
||||
"""Update submodules or other externally tracked source trees"""
|
||||
print_stage("Updating Submodules")
|
||||
|
||||
|
@ -559,25 +594,6 @@ def submodules_update(args: argparse.Namespace, branch: Optional[str]) -> str:
|
|||
|
||||
msg += scripts_submodules_update(args, branch)
|
||||
|
||||
msg += floating_libraries_update(args, branch)
|
||||
|
||||
print("* Updating Git submodules")
|
||||
|
||||
submodule_directories = get_submodule_directories(args)
|
||||
for submodule_path in submodule_directories:
|
||||
if submodule_path.parts[0] == "lib" and args.no_libraries:
|
||||
print(f"Skipping library submodule {submodule_path}")
|
||||
continue
|
||||
|
||||
if submodule_path.parts[0] == "tests" and not args.use_tests:
|
||||
print(f"Skipping tests submodule {submodule_path}")
|
||||
continue
|
||||
|
||||
if not make_utils.git_update_submodule(args.git_command, submodule_path):
|
||||
msg += f"Error updating Git submodule {submodule_path}\n"
|
||||
|
||||
add_submodule_push_url(args)
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
|
@ -606,12 +622,13 @@ if __name__ == "__main__":
|
|||
blender_skip_msg = "Blender repository skipped: " + blender_skip_msg + "\n"
|
||||
|
||||
if not args.no_libraries:
|
||||
libraries_skip_msg += update_precompiled_libraries(args)
|
||||
libraries_skip_msg += initialize_precompiled_libraries(args)
|
||||
if args.use_tests:
|
||||
libraries_skip_msg += update_tests_data_files(args)
|
||||
libraries_skip_msg += initialize_tests_data_files(args)
|
||||
libraries_skip_msg += submodules_lib_update(args, branch)
|
||||
|
||||
if not args.no_submodules:
|
||||
submodules_skip_msg = submodules_update(args, branch)
|
||||
submodules_skip_msg += submodules_code_update(args, branch)
|
||||
|
||||
# Report any skipped repositories at the end, so it's not as easy to miss.
|
||||
skip_msg = blender_skip_msg + libraries_skip_msg + submodules_skip_msg
|
||||
|
|
|
@ -15,12 +15,18 @@ import sys
|
|||
from pathlib import Path
|
||||
|
||||
from typing import (
|
||||
Dict,
|
||||
Sequence,
|
||||
Optional,
|
||||
)
|
||||
|
||||
|
||||
def call(cmd: Sequence[str], exit_on_error: bool = True, silent: bool = False, env=None) -> int:
|
||||
def call(
|
||||
cmd: Sequence[str],
|
||||
exit_on_error: bool = True,
|
||||
silent: bool = False,
|
||||
env: Optional[Dict[str, str]] = None,
|
||||
) -> int:
|
||||
if not silent:
|
||||
cmd_str = ""
|
||||
if env:
|
||||
|
@ -130,17 +136,46 @@ def git_set_config(git_command: str, key: str, value: str, file: Optional[str] =
|
|||
return check_output([git_command, "config", key, value])
|
||||
|
||||
|
||||
def git_enable_submodule(git_command: str, submodule_dir: str):
|
||||
def _git_submodule_config_key(submodule_dir: Path, key: str) -> str:
|
||||
submodule_dir_str = submodule_dir.as_posix()
|
||||
return f"submodule.{submodule_dir_str}.{key}"
|
||||
|
||||
|
||||
def is_git_submodule_enabled(git_command: str, submodule_dir: Path) -> bool:
|
||||
"""Check whether submodule denoted by its directory within the repository is enabled"""
|
||||
|
||||
git_root = Path(check_output([git_command, "rev-parse", "--show-toplevel"]))
|
||||
gitmodules = git_root / ".gitmodules"
|
||||
|
||||
# Check whether the submodule actually exists.
|
||||
# Request path of an unknown submodule will cause non-zero exit code.
|
||||
path = git_get_config(
|
||||
git_command, _git_submodule_config_key(submodule_dir, "path"), str(gitmodules))
|
||||
if not path:
|
||||
return False
|
||||
|
||||
# When the "update" strategy is not provided explicitly in the the local configuration
|
||||
# `git config` returns a non-zero exit code. For those assume the default "checkout"
|
||||
# strategy.
|
||||
update = check_output(
|
||||
(git_command, "config", "--local", _git_submodule_config_key(submodule_dir, "update")),
|
||||
exit_on_error=False)
|
||||
|
||||
return update.lower() != "none"
|
||||
|
||||
|
||||
def git_enable_submodule(git_command: str, submodule_dir: Path) -> None:
|
||||
"""Enable submodule denoted by its directory within the repository"""
|
||||
|
||||
command = (git_command,
|
||||
"config",
|
||||
"--local",
|
||||
f"submodule.{submodule_dir}.update", "checkout")
|
||||
call(command, exit_on_error=True, silent=False)
|
||||
_git_submodule_config_key(submodule_dir, "update"),
|
||||
"checkout")
|
||||
call(command, exit_on_error=True, silent=True)
|
||||
|
||||
|
||||
def git_update_submodule(git_command: str, submodule_dir: str) -> bool:
|
||||
def git_update_submodule(git_command: str, submodule_dir: Path) -> bool:
|
||||
"""
|
||||
Update the given submodule.
|
||||
|
||||
|
@ -171,11 +206,11 @@ def git_update_submodule(git_command: str, submodule_dir: str) -> bool:
|
|||
|
||||
env = {"GIT_LFS_SKIP_SMUDGE": "1"}
|
||||
|
||||
if call((git_command, "submodule", "update", "--init", "--progress", submodule_dir),
|
||||
if call((git_command, "submodule", "update", "--init", "--progress", str(submodule_dir)),
|
||||
exit_on_error=False, env=env) != 0:
|
||||
return False
|
||||
|
||||
return call((git_command, "-C", submodule_dir, "lfs", "pull"),
|
||||
return call((git_command, "-C", str(submodule_dir), "lfs", "pull"),
|
||||
exit_on_error=False) == 0
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
set BUILD_VS_LIBDIR=lib/windows_x64
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
set BUILD_VS_LIBDIR=lib/windows_arm64
|
||||
) else (
|
||||
set BUILD_VS_LIBDIR=lib/windows_x64
|
||||
)
|
||||
|
||||
if NOT "%verbose%" == "" (
|
||||
echo Library Directory = "%BUILD_VS_LIBDIR%"
|
||||
|
@ -26,7 +30,10 @@ if NOT EXIST "%BUILD_VS_LIBDIR%\.git" (
|
|||
echo *********************************************************
|
||||
:RETRY
|
||||
"%GIT%" -C "%BLENDER_DIR%\" config --local "submodule.%BUILD_VS_LIBDIR%.update" "checkout"
|
||||
set GIT_LFS_SKIP_SMUDGE=1
|
||||
"%GIT%" -C "%BLENDER_DIR%\" submodule update --progress --init "%BUILD_VS_LIBDIR%"
|
||||
set GIT_LFS_SKIP_SMUDGE=
|
||||
"%GIT%" -C "./%BUILD_VS_LIBDIR%" lfs pull
|
||||
if errorlevel 1 (
|
||||
set /p LibRetry= "Error during download, retry? y/n"
|
||||
if /I "!LibRetry!"=="Y" (
|
||||
|
|
|
@ -19,6 +19,11 @@ if "%WITH_PYDEBUG%"=="1" (
|
|||
set PYDEBUG_CMAKE_ARGS=-DWINDOWS_PYTHON_DEBUG=On
|
||||
)
|
||||
|
||||
if "%BUILD_ARCH%"=="arm64" (
|
||||
set MSBUILD_PLATFORM=arm64
|
||||
set BUILD_PLATFORM_SELECT=-A ARM64
|
||||
)
|
||||
|
||||
set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%BUILD_GENERATOR_POST%" %BUILD_PLATFORM_SELECT% %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS% %PYDEBUG_CMAKE_ARGS%
|
||||
|
||||
if NOT EXIST %BUILD_DIR%\nul (
|
||||
|
|
|
@ -5,12 +5,18 @@ if "%BUILD_ARCH%"=="" (
|
|||
) else if "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
set BUILD_ARCH=x64
|
||||
) else if "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
|
||||
set WINDOWS_ARCH= arm64
|
||||
set BUILD_ARCH=arm64
|
||||
) else (
|
||||
echo Error: 32 bit builds of blender are no longer supported.
|
||||
goto ERR
|
||||
)
|
||||
) else if "%BUILD_ARCH%"=="x64" (
|
||||
set WINDOWS_ARCH= Win64
|
||||
) else if "%BUILD_ARCH%"=="arm64" (
|
||||
set WINDOWS_ARCH= arm64
|
||||
set BUILD_ARCH=arm64
|
||||
)
|
||||
:EOF
|
||||
exit /b 0
|
||||
|
|
|
@ -23,8 +23,26 @@ if EXIST %PYTHON% (
|
|||
goto detect_python_done
|
||||
)
|
||||
|
||||
rem Additionally check for the ARM64 version
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_arm64\python\310\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_arm64\python\311\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_arm64\python\312\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
set PYTHON=%BLENDER_DIR%\lib\windows_arm64\python\39\bin\python.exe
|
||||
if EXIST %PYTHON% (
|
||||
goto detect_python_done
|
||||
)
|
||||
|
||||
if NOT EXIST %PYTHON% (
|
||||
if EXIST %BLENDER_DIR%\lib\windows_x64\ (
|
||||
if EXIST %BLENDER_DIR%\lib\windows_x64\.git (
|
||||
echo Warning: Python not found, there is likely an issue with the library folder
|
||||
)
|
||||
set PYTHON=""
|
||||
|
|
|
@ -3,6 +3,11 @@ if EXIST %BLENDER_DIR%\lib\windows_x64\llvm\bin\clang-format.exe (
|
|||
goto detect_done
|
||||
)
|
||||
|
||||
if EXIST %BLENDER_DIR%\lib\windows_arm64\llvm\bin\clang-format.exe (
|
||||
set CF_PATH=lib\windows_arm64\llvm\bin
|
||||
goto detect_done
|
||||
)
|
||||
|
||||
echo clang-format not found
|
||||
exit /b 1
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ if NOT "%1" == "" (
|
|||
goto ERR
|
||||
) else if "%1" == "x64" (
|
||||
set BUILD_ARCH=x64
|
||||
) else if "%1" == "arm64" (
|
||||
set BUILD_ARCH=arm64
|
||||
) else if "%1" == "2019" (
|
||||
set BUILD_VS_YEAR=2019
|
||||
) else if "%1" == "2019pre" (
|
||||
|
|
|
@ -9,7 +9,11 @@ cd "%BLENDER_DIR%/scripts/addons"
|
|||
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Addons_Branch_name=%%i
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Addons_Branch_hash=%%i
|
||||
|
||||
cd "%BLENDER_DIR%/lib/windows_x64"
|
||||
if "%BUILD_ARCH%" == "arm64" (
|
||||
cd "%BLENDER_DIR%/lib/windows_arm64"
|
||||
) else (
|
||||
cd "%BLENDER_DIR%/lib/windows_x64"
|
||||
)
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse --abbrev-ref HEAD') do echo Libs_Branch_name=%%i
|
||||
for /f "delims=" %%i in ('"%GIT%" rev-parse HEAD') do echo Libs_Branch_hash=%%i
|
||||
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
"""
|
||||
Using Python Argument Parsing
|
||||
-----------------------------
|
||||
|
||||
This example shows how the Python ``argparse`` module can be used with a custom command.
|
||||
|
||||
Using ``argparse`` is generally recommended as it has many useful utilities and
|
||||
generates a ``--help`` message for your command.
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import bpy
|
||||
|
||||
|
||||
def argparse_create():
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
prog=os.path.basename(sys.argv[0]) + " --command keyconfig_export",
|
||||
description="Write key-configuration to a file.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-o", "--output",
|
||||
dest="output",
|
||||
metavar='OUTPUT',
|
||||
type=str,
|
||||
help="The path to write the keymap to.",
|
||||
required=True,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-a", "--all",
|
||||
dest="all",
|
||||
action="store_true",
|
||||
help="Write all key-maps (not only customized key-maps).",
|
||||
required=False,
|
||||
)
|
||||
|
||||
return parser
|
||||
|
||||
|
||||
def keyconfig_export(argv):
|
||||
parser = argparse_create()
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
# Ensure the key configuration is loaded in background mode.
|
||||
bpy.utils.keyconfig_init()
|
||||
|
||||
bpy.ops.preferences.keyconfig_export(
|
||||
filepath=args.output,
|
||||
all=args.all,
|
||||
)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
cli_commands = []
|
||||
|
||||
|
||||
def register():
|
||||
cli_commands.append(bpy.utils.register_cli_command("keyconfig_export", keyconfig_export))
|
||||
|
||||
|
||||
def unregister():
|
||||
for cmd in cli_commands:
|
||||
bpy.utils.unregister_cli_command(cmd)
|
||||
cli_commands.clear()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
|
@ -0,0 +1,43 @@
|
|||
"""
|
||||
Custom Commands
|
||||
---------------
|
||||
|
||||
Registering commands makes it possible to conveniently expose command line
|
||||
functionality via commands passed to (``-c`` / ``--command``).
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
|
||||
def sysinfo_command(argv):
|
||||
import tempfile
|
||||
import sys_info
|
||||
|
||||
if argv and argv[0] == "--help":
|
||||
print("Print system information & exit!")
|
||||
return 0
|
||||
|
||||
with tempfile.TemporaryDirectory() as tempdir:
|
||||
filepath = os.path.join(tempdir, "system_info.txt")
|
||||
sys_info.write_sysinfo(filepath)
|
||||
with open(filepath, "r", encoding="utf-8") as fh:
|
||||
sys.stdout.write(fh.read())
|
||||
return 0
|
||||
|
||||
|
||||
cli_commands = []
|
||||
|
||||
|
||||
def register():
|
||||
cli_commands.append(bpy.utils.register_cli_command("sysinfo", sysinfo_command))
|
||||
|
||||
|
||||
def unregister():
|
||||
for cmd in cli_commands:
|
||||
bpy.utils.unregister_cli_command(cmd)
|
||||
cli_commands.clear()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
|
@ -55,8 +55,7 @@ if(WITH_LZMA)
|
|||
add_subdirectory(lzma)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES OR WITH_COMPOSITOR_CPU OR WITH_OPENSUBDIV)
|
||||
add_subdirectory(clew)
|
||||
if(WITH_CYCLES OR WITH_OPENSUBDIV)
|
||||
if((WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX) AND WITH_CUDA_DYNLOAD)
|
||||
add_subdirectory(cuew)
|
||||
endif()
|
||||
|
|
|
@ -40,6 +40,7 @@ set(SRC
|
|||
src/devices/DefaultSynchronizer.cpp
|
||||
src/devices/DeviceManager.cpp
|
||||
src/devices/NULLDevice.cpp
|
||||
src/devices/OpenCloseDevice.cpp
|
||||
src/devices/ReadDevice.cpp
|
||||
src/devices/SoftwareDevice.cpp
|
||||
src/devices/ThreadedDevice.cpp
|
||||
|
@ -150,6 +151,7 @@ set(PUBLIC_HDR
|
|||
include/devices/IHandle.h
|
||||
include/devices/ISynchronizer.h
|
||||
include/devices/NULLDevice.h
|
||||
include/devices/OpenCloseDevice.h
|
||||
include/devices/ReadDevice.h
|
||||
include/devices/SoftwareDevice.h
|
||||
include/devices/ThreadedDevice.h
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue