Compare commits
619 Commits
arcpatch-D
...
refactor-m
Author | SHA1 | Date | |
---|---|---|---|
01f509232b | |||
aaaa75f906 | |||
![]() |
6c774feba2 | ||
6ef8db35e7 | |||
485ab42075 | |||
d48f95d31c | |||
fdcbad37be | |||
1af62cb3bf | |||
05ddc7daa2 | |||
13450c2d22 | |||
92449e634f | |||
63b9a57f8b | |||
39c30f6983 | |||
c41601becd | |||
317a5f61f0 | |||
7bf75231e8 | |||
71ca339fe0 | |||
5609f61bb3 | |||
b314d92e7d | |||
3b476d020a | |||
ec2046c38d | |||
![]() |
891fe70d7f | ||
08b2d04021 | |||
8d2f4ddb2f | |||
385bd0c4e9 | |||
f5179830a7 | |||
ca45c2dc59 | |||
29a41ed6c2 | |||
589cbbf0e3 | |||
b3f664f8fb | |||
b5390a4aee | |||
f3df7b4fbd | |||
4887401789 | |||
63c985e0f7 | |||
59ce3b8f6b | |||
02226e9069 | |||
0e0139b304 | |||
4546e35c92 | |||
d8e01150d6 | |||
95696d09bc | |||
e7a554e551 | |||
d11f3267cd | |||
73a2c79c07 | |||
891b973029 | |||
![]() |
d3f626b535 | ||
![]() |
ed8f3dc9c7 | ||
![]() |
b1d2ea3e1b | ||
710f8164b4 | |||
d8750aa1da | |||
5f9a48ed59 | |||
![]() |
d4c085c17d | ||
ef78811ac7 | |||
e22247a965 | |||
2895c67086 | |||
c4d4db39dc | |||
a2ea32a600 | |||
eedcf1876a | |||
a5b27f9858 | |||
577442a26f | |||
b3146200a8 | |||
380db3edb3 | |||
1bbf1ed03c | |||
1942d55c07 | |||
1a8675b48d | |||
ed1df2ce2b | |||
125b283589 | |||
f7e9bc65ab | |||
e756b0fea0 | |||
01efcb3de2 | |||
5fa694ffe1 | |||
ba9f0d5a15 | |||
73594f4c9c | |||
8f44c37f5c | |||
da2dccca61 | |||
56216e2a62 | |||
11ecde6a5a | |||
940fd87e77 | |||
67e1b52568 | |||
302cb349c7 | |||
34b24fb602 | |||
ddb30c4a02 | |||
e9cb96d16e | |||
8a16523bf1 | |||
e1df731c91 | |||
a3ac91da27 | |||
5cc793912e | |||
![]() |
3b37538975 | ||
2752a88478 | |||
87fd798ae3 | |||
![]() |
a3a60e9647 | ||
e0d70e6a9d | |||
d05909a70c | |||
0bf8b98437 | |||
cc78fd4e93 | |||
![]() |
5eab813fc0 | ||
![]() |
825f01b7b5 | ||
ae7163007d | |||
d49b850399 | |||
006e905957 | |||
3337838b49 | |||
bd36c712b9 | |||
8556741183 | |||
1229b96652 | |||
42b88c0088 | |||
![]() |
fc9c39e320 | ||
5c4d11d709 | |||
b6c74b4c6f | |||
280502e630 | |||
8d0c98740a | |||
14fc02f91d | |||
706b13959e | |||
cb7f97891d | |||
00a20aec07 | |||
bc5337a05a | |||
4fb0eb3a6e | |||
0796210c8d | |||
87f7b630b5 | |||
084b52bcd8 | |||
7d712dcd0b | |||
0fb12a9c2e | |||
![]() |
59ce7bf5a9 | ||
8a65e33d41 | |||
b099e9924e | |||
74c4977aea | |||
d1810d11f4 | |||
2a5104e368 | |||
![]() |
a5d4c63e86 | ||
3819a9b15a | |||
25e28f518c | |||
862d08bb97 | |||
a318f3b8d6 | |||
2ffd08e952 | |||
4813c37ae2 | |||
fdc918c32c | |||
58b6c91d36 | |||
963600ddc0 | |||
![]() |
200a114e15 | ||
![]() |
76a68649c1 | ||
![]() |
34fa369b48 | ||
d7598c8081 | |||
bfb0b1decc | |||
77c3e0895d | |||
7690872ce4 | |||
a357adf6cd | |||
93fc352cfa | |||
b18fd83883 | |||
4c2c114324 | |||
e31f5fde34 | |||
cbbab81b9e | |||
5fce94f825 | |||
2e87364e3c | |||
8fa7bcb59a | |||
168091a1d6 | |||
d9f71d3133 | |||
892fbf5ab6 | |||
![]() |
a7cc6e015c | ||
496d736adc | |||
![]() |
433d436b84 | ||
224d26fd33 | |||
83f519b7c1 | |||
58f1e62871 | |||
2540a52f91 | |||
![]() |
77c3e67d3d | ||
![]() |
fbc2c4c331 | ||
20b2d6fc71 | |||
![]() |
22fec7b1a4 | ||
79837c5ed4 | |||
78f28b55d3 | |||
14d7cd46ba | |||
![]() |
1c7c1480d1 | ||
1beaec46b8 | |||
86a471efe7 | |||
c9ab76db5c | |||
f9ddfffd6f | |||
d28588f31e | |||
32b861b14a | |||
eb7ac996cc | |||
65d8da97b8 | |||
bd2d7a4a81 | |||
![]() |
77e8e73ed9 | ||
cdd07ddb93 | |||
cbd12e730a | |||
50dbedf0d8 | |||
c26616b2c1 | |||
c998d56b1e | |||
0178d3e4bb | |||
8e81e3b229 | |||
155ec559fb | |||
80639a93a8 | |||
f4292febb4 | |||
c5331f134d | |||
03abc38624 | |||
1d636f5e05 | |||
8b1edff6b5 | |||
4e3b1ef861 | |||
858fffc2df | |||
7355d64f2b | |||
e091291b5b | |||
a6355a4542 | |||
ecd4533615 | |||
760f2636c0 | |||
380132300e | |||
0c0cdb8010 | |||
c82311bb8e | |||
88748e5cbc | |||
8dbfbac928 | |||
1a9cf9c745 | |||
30753f7692 | |||
0f8487f640 | |||
101d04f41f | |||
e438e8e04e | |||
2e0cf17f94 | |||
896ad9d5d0 | |||
aad8f1a41b | |||
0f2b1f9ec9 | |||
fd068e92f1 | |||
e39ca9d1e3 | |||
75cd1fdc0a | |||
9a18a9bfce | |||
0e5dab0831 | |||
bc2220733a | |||
0c30873d82 | |||
e550d8c8fd | |||
13ad68d100 | |||
0bc0e3f9f7 | |||
9144b110ee | |||
b386932dbb | |||
6eb1c98b15 | |||
c74acb62b9 | |||
90f194616b | |||
ebec9eb75e | |||
0efb79fb74 | |||
adb4dd911b | |||
4ae8c52a95 | |||
94155fb6ff | |||
da4e2fe7fe | |||
eaef8d50bc | |||
46c1cddabd | |||
9d2ab1f8d3 | |||
153e1dc31a | |||
68906c605f | |||
a4e843c250 | |||
7e5a7928ca | |||
4924f8cffd | |||
3277879085 | |||
8007f7e74f | |||
![]() |
614704f90c | ||
![]() |
17d66fe79e | ||
f891ddd98d | |||
3340cc8102 | |||
9cef74f58b | |||
c8741a3c03 | |||
81935098f1 | |||
83b103fd2f | |||
dba2d82846 | |||
c744d5453f | |||
a09accb496 | |||
5dcce58510 | |||
4d39b6b3f4 | |||
363e5e28ee | |||
2652029f3b | |||
31f2242691 | |||
b6ca942e47 | |||
47b9ed2409 | |||
887105c4c9 | |||
2bd8c67d10 | |||
![]() |
f53bb93af9 | ||
7e4f988072 | |||
cc48610d2c | |||
72b4f91914 | |||
8c194e1ba6 | |||
4e027fdde6 | |||
9e332b113b | |||
6347562fb0 | |||
c9b06505d8 | |||
3176b113e4 | |||
8c6fe60844 | |||
d7dad425c0 | |||
6aad3c7297 | |||
87594726ab | |||
b6a11ae7d5 | |||
a2cf9a8647 | |||
3adbe82e07 | |||
dce7917717 | |||
a9cb66b856 | |||
204de8c6db | |||
![]() |
997eb77fd4 | ||
![]() |
5206d72dca | ||
![]() |
a7cec5a4db | ||
7911954b40 | |||
6b9825e6f7 | |||
7be5ca63ae | |||
cb93433a56 | |||
87cf495860 | |||
9e0feec0d3 | |||
32b1947be2 | |||
09ba00974f | |||
00b3f863b8 | |||
8fab53c023 | |||
e1180bfdb2 | |||
14667de65b | |||
4701421dbe | |||
014d0a8ede | |||
fea60eccbf | |||
![]() |
a44c128482 | ||
b024577452 | |||
2838d9324d | |||
![]() |
a521960fdd | ||
a8aae66f0e | |||
834ca5d682 | |||
fb8778a28c | |||
f803a0a95b | |||
![]() |
15c433d7d5 | ||
![]() |
d9510f02c8 | ||
![]() |
a7ad2dea62 | ||
7d2dbe7849 | |||
dc30c9971d | |||
4d22a517c9 | |||
e4e17cf1df | |||
b617ddc004 | |||
0bcfe2788d | |||
cef5841e12 | |||
b621483659 | |||
f4b03031e8 | |||
b492dc3579 | |||
fa3ca9afdb | |||
908c539219 | |||
8fe1499796 | |||
688086e01f | |||
8bbf823716 | |||
d0348bcb8a | |||
51e2ce7df5 | |||
![]() |
3535670ff1 | ||
![]() |
7ff47f7a94 | ||
b015fc4247 | |||
fd9a1d62f5 | |||
![]() |
fcddb7cda7 | ||
4c295276f0 | |||
40e5954e39 | |||
fb7f12dc40 | |||
6383ed9956 | |||
![]() |
cc13934442 | ||
99fcfdd9fb | |||
7907803694 | |||
adc92cc23e | |||
ddd24186d9 | |||
![]() |
dedca2c994 | ||
3efb31ee31 | |||
![]() |
b3464fe152 | ||
![]() |
df1fe18ed7 | ||
![]() |
2712265598 | ||
844b6e3982 | |||
105c0aa5b6 | |||
edb5dcaa31 | |||
![]() |
b93025db59 | ||
9837a32822 | |||
194cc8410b | |||
c2a8d8b18d | |||
4ae0da1bbc | |||
5fe297df48 | |||
9f575ece39 | |||
![]() |
81f425a36f | ||
1a986f7eba | |||
4cb2204d3a | |||
288d4c9545 | |||
923f394485 | |||
c3cc8d2f6a | |||
67318b1977 | |||
1eb90ee519 | |||
7d7e90ca68 | |||
d59f6ffdcb | |||
f0ac5e8aec | |||
50c7eb14f4 | |||
8666791b2e | |||
17e266cd55 | |||
0beb358a69 | |||
5a761a47e1 | |||
8709a51fa9 | |||
28511ac6cf | |||
c18055ba5c | |||
e07c5a14c9 | |||
0cc573c8c4 | |||
a0a7db9f70 | |||
02c8ce449e | |||
68ba311c5c | |||
dc8355cfe2 | |||
025570c44e | |||
2ac6e26c25 | |||
6797de4e10 | |||
067fe443d8 | |||
6d3cc9c38a | |||
347c82be6d | |||
7c85f11c42 | |||
4254810e50 | |||
4352ac0558 | |||
c9288ab41f | |||
a43e498878 | |||
5ffcd8779e | |||
3aca0bc66a | |||
6ced6c9545 | |||
ea731f42db | |||
d77a6849e6 | |||
![]() |
9e94135f17 | ||
bea5fe6505 | |||
a8530d31c2 | |||
c9eb583460 | |||
599c0db3ff | |||
9a25c48f08 | |||
3334ff0e32 | |||
c37e07bc01 | |||
ba89f640fe | |||
79a34758f5 | |||
f2945f3895 | |||
8b2afe93b4 | |||
ba7afbe3a1 | |||
0079460dc7 | |||
a6c30e1a0c | |||
75c2e81103 | |||
841020dba2 | |||
![]() |
edfef62371 | ||
e58f5422c3 | |||
2c22795dfd | |||
3d29bbcc38 | |||
6514bb05ea | |||
b1494bcea7 | |||
ae886596a0 | |||
![]() |
7608ebe44a | ||
ef35247ee1 | |||
62f8d0d8c8 | |||
c6ff8eb837 | |||
6546113f1e | |||
970f4c2f9f | |||
bd04e80c09 | |||
d2aebf10fa | |||
51759e6595 | |||
9fe1db1d2b | |||
0e1440eefd | |||
e0ef5f3602 | |||
ba347d7c9e | |||
69d1ddd4c6 | |||
e5f139e99d | |||
9e47db4f43 | |||
7571222a69 | |||
657a5f205a | |||
18cc1b1108 | |||
d715573aea | |||
b147af2b7e | |||
5da11e22de | |||
0240b89599 | |||
c969a533f9 | |||
230744d6fd | |||
b13a92a238 | |||
530b232309 | |||
7766a20b8f | |||
36ca1312c4 | |||
e0fbeb6e7b | |||
2dd27d5f06 | |||
e476afff41 | |||
d173a52f56 | |||
2d21fc3f5d | |||
f167e366da | |||
918df11a1a | |||
c725a53e89 | |||
a3a9459050 | |||
56237f33a1 | |||
![]() |
4121e32edd | ||
![]() |
a501a2dbff | ||
8c14992db2 | |||
![]() |
7efba6c59a | ||
d33758755b | |||
77a4ab3ccf | |||
![]() |
c5f5046efd | ||
9fd834fbb3 | |||
eae1be548d | |||
f879c20f72 | |||
![]() |
d9192aaa6d | ||
![]() |
b0cc8e8dde | ||
ecfcf1b97b | |||
2221cfc044 | |||
d88ebd31d6 | |||
f0dc4d67e5 | |||
45dbd69296 | |||
8daaf71688 | |||
fe3110a285 | |||
f4912e7f5b | |||
a243a9dc79 | |||
c30fdb9cf5 | |||
dba7837d44 | |||
8930395912 | |||
4263919270 | |||
fd36221930 | |||
![]() |
b848de7546 | ||
ad39c0f312 | |||
396816faac | |||
491fc5cace | |||
1324db0ad1 | |||
5025a3833a | |||
![]() |
4710582f8f | ||
93a629f147 | |||
76aba51a21 | |||
b1b5b48d53 | |||
75ad8da1ea | |||
ae7ef8bcc6 | |||
f613614fce | |||
a55163c880 | |||
23b776e5b3 | |||
9f1d7d930d | |||
939b63bcd6 | |||
6f9cfb037a | |||
8ee020d11f | |||
29f342774c | |||
bdd34f4fa2 | |||
2c5a525d64 | |||
31ba4dd82e | |||
b50c475cd2 | |||
0a5e8a6342 | |||
246df68095 | |||
ea7570989d | |||
0cd56b7a36 | |||
9579e3eef2 | |||
85a743e08b | |||
e8c7866608 | |||
a14a152024 | |||
8f5df25f33 | |||
e6e57cebec | |||
adb49ffa24 | |||
cfcc728de6 | |||
b751c28f78 | |||
9f11129d28 | |||
2761f7c4a5 | |||
6ce95c34ae | |||
dd6f7c1318 | |||
982fb66fb1 | |||
17a20ed7fe | |||
485c5abedc | |||
ab1c36ad3f | |||
57090a4b72 | |||
e41abf9e26 | |||
4ee2504eff | |||
9437abdbce | |||
b08301c865 | |||
f56488c20f | |||
e378bd70ed | |||
42def76831 | |||
e4f9c50928 | |||
95a792a633 | |||
f53bd17836 | |||
312e42708f | |||
18abc2feaa | |||
![]() |
f95de78ca2 | ||
54aec4629e | |||
d72c7eefd1 | |||
014ffc4615 | |||
85d92afbd4 | |||
dbd3822329 | |||
db68e2d4d3 | |||
d17858cb37 | |||
baf8b3bb88 | |||
![]() |
3e1152428d | ||
![]() |
9c0d822737 | ||
719513dd9f | |||
40bc5aa7e5 | |||
8c11c04448 | |||
2bb47e03f7 | |||
9e9ebcdd72 | |||
f06d7c98db | |||
0485baaf98 | |||
9338ab1d62 | |||
178eb5bac5 | |||
05bf5c4e0e | |||
19491e5fc0 | |||
b2bee8416b | |||
c2ca30ea24 | |||
f6b67f92a1 | |||
fe30856d83 | |||
eac8e820f2 | |||
![]() |
19d90c7a33 | ||
![]() |
a9cc10b5bb | ||
![]() |
a3251e66a7 | ||
![]() |
538d4cc998 | ||
![]() |
fc5f7a1e2d | ||
![]() |
ad05b78d09 | ||
07b67894e8 | |||
3552f5d83c | |||
019b930d6b | |||
d5bcc1ef16 | |||
d17db1d11a | |||
46993958fd | |||
b000fc308b | |||
bcbd13201a | |||
874319a344 | |||
c85ca5e365 | |||
0a56198139 | |||
9a7fa1b3e9 | |||
34722fa8a0 | |||
c20e456ee0 | |||
bdd196661e | |||
595b302231 | |||
255c7f26af | |||
83b78b1976 | |||
50ef008c61 | |||
5ee116d448 | |||
0d21b9e2da | |||
fa27a5d066 | |||
a45284b855 | |||
7c5b7713f1 | |||
a55c356a1c | |||
bf1791ba92 | |||
122d6d67e6 | |||
f06a1368bb | |||
6fb4ca1eec | |||
9785f84dd2 | |||
9b57a2ac6a | |||
f898190362 | |||
c50e25c5f0 | |||
237fd48d01 | |||
![]() |
2e61c446ac | ||
![]() |
359d98423e | ||
![]() |
9ec20f2ede |
@@ -61,17 +61,17 @@ ContinuationIndentWidth: 4
|
|||||||
# This tries to match Blender's style as much as possible. One
|
# This tries to match Blender's style as much as possible. One
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BraceWrapping: {
|
BraceWrapping: {
|
||||||
AfterClass: 'false'
|
AfterClass: 'false',
|
||||||
AfterControlStatement: 'false'
|
AfterControlStatement: 'false',
|
||||||
AfterEnum : 'false'
|
AfterEnum : 'false',
|
||||||
AfterFunction : 'true'
|
AfterFunction : 'true',
|
||||||
AfterNamespace : 'false'
|
AfterNamespace : 'false',
|
||||||
AfterStruct : 'false'
|
AfterStruct : 'false',
|
||||||
AfterUnion : 'false'
|
AfterUnion : 'false',
|
||||||
BeforeCatch : 'true'
|
BeforeCatch : 'true',
|
||||||
BeforeElse : 'true'
|
BeforeElse : 'true',
|
||||||
IndentBraces : 'false'
|
IndentBraces : 'false',
|
||||||
AfterObjCDeclaration: 'true'
|
AfterObjCDeclaration: 'true',
|
||||||
}
|
}
|
||||||
|
|
||||||
# For switch statements, indent the cases.
|
# For switch statements, indent the cases.
|
||||||
|
@@ -117,15 +117,19 @@ enable_testing()
|
|||||||
# Keep in sync with: https://wiki.blender.org/wiki/Building_Blender
|
# Keep in sync with: https://wiki.blender.org/wiki/Building_Blender
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCC)
|
if(CMAKE_COMPILER_IS_GNUCC)
|
||||||
if("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "9.3.1")
|
if("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "11.0.0")
|
||||||
message(FATAL_ERROR "The minimum supported version of GCC is 9.3.1")
|
message(FATAL_ERROR "The minimum supported version of GCC is 11.0.0, found ${CMAKE_C_COMPILER_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND ("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "8.0"))
|
if(CMAKE_COMPILER_IS_GNUCC AND ("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "8.0"))
|
||||||
message(FATAL_ERROR "The minimum supported version of CLANG is 8.0")
|
message(FATAL_ERROR "The minimum supported version of CLANG is 8.0, found ${CMAKE_C_COMPILER_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
|
||||||
if(MSVC_VERSION VERSION_LESS "1928")
|
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
|
||||||
|
# not show the found number. When using our make.bat the actual VS version
|
||||||
|
# will be displayed on the console before starting the build, anyway.
|
||||||
message(FATAL_ERROR "The minimum supported version of MSVC is 2019 (16.9.16)")
|
message(FATAL_ERROR "The minimum supported version of MSVC is 2019 (16.9.16)")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -501,12 +505,14 @@ endif()
|
|||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
option(WITH_CYCLES_DEVICE_ONEAPI "Enable Cycles oneAPI compute support" OFF)
|
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" OFF)
|
option(WITH_CYCLES_ONEAPI_BINARIES "Enable Ahead-Of-Time compilation for Cycles oneAPI device" OFF)
|
||||||
|
option(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION "Switch target of oneAPI implementation from SYCL devices to Host Task (single thread on CPU). This option is only for debugging purposes." OFF)
|
||||||
|
|
||||||
# https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html
|
# https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compilation/ahead-of-time-compilation.html
|
||||||
# acm-g10 is the target for the first Intel Arc Alchemist GPUs.
|
# acm-g10 is the target for the first Intel Arc Alchemist GPUs.
|
||||||
set(CYCLES_ONEAPI_SPIR64_GEN_DEVICES "acm-g10" CACHE STRING "oneAPI Intel GPU architectures to build binaries for")
|
set(CYCLES_ONEAPI_SPIR64_GEN_DEVICES "acm-g10" CACHE STRING "oneAPI Intel GPU architectures to build binaries for")
|
||||||
set(CYCLES_ONEAPI_SYCL_TARGETS spir64 spir64_gen CACHE STRING "oneAPI targets to build AOT binaries for")
|
set(CYCLES_ONEAPI_SYCL_TARGETS spir64 spir64_gen CACHE STRING "oneAPI targets to build AOT binaries for")
|
||||||
|
|
||||||
|
mark_as_advanced(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION)
|
||||||
mark_as_advanced(CYCLES_ONEAPI_SPIR64_GEN_DEVICES)
|
mark_as_advanced(CYCLES_ONEAPI_SPIR64_GEN_DEVICES)
|
||||||
mark_as_advanced(CYCLES_ONEAPI_SYCL_TARGETS)
|
mark_as_advanced(CYCLES_ONEAPI_SYCL_TARGETS)
|
||||||
endif()
|
endif()
|
||||||
@@ -576,8 +582,8 @@ endif()
|
|||||||
|
|
||||||
# OpenGL
|
# OpenGL
|
||||||
|
|
||||||
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
|
option(WITH_OPENGL "When off limits visibility of the opengl headers to just bf_gpu and gawain (temporary option for development purposes)" ON)
|
||||||
option(WITH_GPU_BUILDTIME_SHADER_BUILDER "Shader builder is a developer option enabling linting on GLSL during compilation" OFF)
|
option(WITH_GPU_BUILDTIME_SHADER_BUILDER "Shader builder is a developer option enabling linting on GLSL during compilation" OFF)
|
||||||
|
|
||||||
mark_as_advanced(
|
mark_as_advanced(
|
||||||
WITH_OPENGL
|
WITH_OPENGL
|
||||||
@@ -593,7 +599,7 @@ mark_as_advanced(
|
|||||||
# Metal
|
# Metal
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
option(WITH_METAL_BACKEND "Use Metal for graphics instead of (or as well as) OpenGL on macOS." OFF)
|
option(WITH_METAL_BACKEND "Use Metal for graphics instead of (or as well as) OpenGL on macOS." ON)
|
||||||
mark_as_advanced(WITH_METAL_BACKEND)
|
mark_as_advanced(WITH_METAL_BACKEND)
|
||||||
else()
|
else()
|
||||||
set(WITH_METAL_BACKEND OFF)
|
set(WITH_METAL_BACKEND OFF)
|
||||||
@@ -749,11 +755,6 @@ if("${CMAKE_GENERATOR}" MATCHES "Ninja")
|
|||||||
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
mark_as_advanced(WITH_NINJA_POOL_JOBS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
|
||||||
option(WITH_CXX11_ABI "Use native C++11 ABI of compiler" ON)
|
|
||||||
mark_as_advanced(WITH_CXX11_ABI)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Installation process.
|
# Installation process.
|
||||||
set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
|
set(POSTINSTALL_SCRIPT "" CACHE FILEPATH "Run given CMake script after installation process")
|
||||||
mark_as_advanced(POSTINSTALL_SCRIPT)
|
mark_as_advanced(POSTINSTALL_SCRIPT)
|
||||||
@@ -835,27 +836,17 @@ endif()
|
|||||||
# enable boost for cycles, audaspace or i18n
|
# enable boost for cycles, audaspace or i18n
|
||||||
# otherwise if the user disabled
|
# otherwise if the user disabled
|
||||||
|
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_CYCLES OFF)
|
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_INTERNATIONAL OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_INTERNATIONAL OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_OPENVDB OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
|
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
|
||||||
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
|
|
||||||
if(WITH_CYCLES)
|
if(WITH_CYCLES)
|
||||||
|
set_and_warn_dependency(WITH_BOOST WITH_CYCLES_OSL OFF)
|
||||||
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
|
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
|
||||||
endif()
|
endif()
|
||||||
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
|
|
||||||
|
|
||||||
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
|
|
||||||
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))
|
|
||||||
message(STATUS "No dependencies need 'WITH_BOOST' forcing WITH_BOOST=OFF")
|
|
||||||
set(WITH_BOOST OFF)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_and_warn_dependency(WITH_TBB WITH_CYCLES OFF)
|
set_and_warn_dependency(WITH_TBB WITH_CYCLES OFF)
|
||||||
set_and_warn_dependency(WITH_TBB WITH_USD OFF)
|
set_and_warn_dependency(WITH_TBB WITH_USD OFF)
|
||||||
set_and_warn_dependency(WITH_TBB WITH_OPENIMAGEDENOISE OFF)
|
|
||||||
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
|
set_and_warn_dependency(WITH_TBB WITH_OPENVDB OFF)
|
||||||
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
|
set_and_warn_dependency(WITH_TBB WITH_MOD_FLUID OFF)
|
||||||
|
|
||||||
@@ -864,14 +855,10 @@ set_and_warn_dependency(WITH_OPENVDB WITH_NANOVDB OFF)
|
|||||||
|
|
||||||
# OpenVDB and OpenColorIO uses 'half' type from OpenEXR
|
# OpenVDB and OpenColorIO uses 'half' type from OpenEXR
|
||||||
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
|
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENVDB OFF)
|
||||||
set_and_warn_dependency(WITH_IMAGE_OPENEXR WITH_OPENCOLORIO OFF)
|
|
||||||
|
|
||||||
# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
|
# Haru needs `TIFFFaxBlackCodes` & `TIFFFaxWhiteCodes` symbols from TIFF.
|
||||||
set_and_warn_dependency(WITH_IMAGE_TIFF WITH_HARU OFF)
|
set_and_warn_dependency(WITH_IMAGE_TIFF WITH_HARU OFF)
|
||||||
|
|
||||||
# USD needs OpenSubDiv, since that is used by the Cycles Hydra render delegate.
|
|
||||||
set_and_warn_dependency(WITH_OPENSUBDIV WITH_USD OFF)
|
|
||||||
|
|
||||||
# auto enable openimageio for cycles
|
# auto enable openimageio for cycles
|
||||||
if(WITH_CYCLES)
|
if(WITH_CYCLES)
|
||||||
set(WITH_OPENIMAGEIO ON)
|
set(WITH_OPENIMAGEIO ON)
|
||||||
@@ -885,17 +872,6 @@ else()
|
|||||||
set(WITH_CYCLES_OSL OFF)
|
set(WITH_CYCLES_OSL OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# auto enable openimageio linking dependencies
|
|
||||||
if(WITH_OPENIMAGEIO)
|
|
||||||
set(WITH_IMAGE_OPENEXR ON)
|
|
||||||
set(WITH_IMAGE_TIFF ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# auto enable alembic linking dependencies
|
|
||||||
if(WITH_ALEMBIC)
|
|
||||||
set(WITH_IMAGE_OPENEXR ON)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# don't store paths to libs for portable distribution
|
# don't store paths to libs for portable distribution
|
||||||
if(WITH_INSTALL_PORTABLE)
|
if(WITH_INSTALL_PORTABLE)
|
||||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||||
@@ -1098,14 +1074,6 @@ if(WITH_CYCLES)
|
|||||||
"Configure OIIO or disable WITH_CYCLES"
|
"Configure OIIO or disable WITH_CYCLES"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(NOT WITH_BOOST)
|
|
||||||
message(
|
|
||||||
FATAL_ERROR
|
|
||||||
"Cycles requires WITH_BOOST, the library may not have been found. "
|
|
||||||
"Configure BOOST or disable WITH_CYCLES"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_CYCLES_OSL)
|
if(WITH_CYCLES_OSL)
|
||||||
if(NOT WITH_LLVM)
|
if(NOT WITH_LLVM)
|
||||||
message(
|
message(
|
||||||
@@ -1721,12 +1689,6 @@ if(
|
|||||||
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
string(APPEND CMAKE_C_FLAGS " -std=gnu11")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
|
||||||
if(NOT WITH_CXX11_ABI)
|
|
||||||
string(APPEND PLATFORM_CFLAGS " -D_GLIBCXX_USE_CXX11_ABI=0")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
if(WITH_COMPILER_SHORT_FILE_MACRO)
|
||||||
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
|
# Use '-fmacro-prefix-map' for Clang and GCC (MSVC doesn't support this).
|
||||||
add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
add_check_c_compiler_flag(C_PREFIX_MAP_FLAGS C_MACRO_PREFIX_MAP -fmacro-prefix-map=foo=bar)
|
||||||
|
@@ -211,7 +211,7 @@ endif
|
|||||||
# Set the LIBDIR, an empty string when not found.
|
# Set the LIBDIR, an empty string when not found.
|
||||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU})
|
||||||
ifeq (, $(LIBDIR))
|
ifeq (, $(LIBDIR))
|
||||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_centos7_${CPU})
|
LIBDIR:=$(wildcard ../lib/${OS_NCASE}_${CPU}_glibc_228)
|
||||||
endif
|
endif
|
||||||
ifeq (, $(LIBDIR))
|
ifeq (, $(LIBDIR))
|
||||||
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
LIBDIR:=$(wildcard ../lib/${OS_NCASE})
|
||||||
|
@@ -23,13 +23,11 @@ elseif(APPLE)
|
|||||||
set(BOOST_BUILD_COMMAND ./b2)
|
set(BOOST_BUILD_COMMAND ./b2)
|
||||||
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
|
set(BOOST_BUILD_OPTIONS toolset=clang-darwin cxxflags=${PLATFORM_CXXFLAGS} linkflags=${PLATFORM_LDFLAGS} visibility=global --disable-icu boost.locale.icu=off)
|
||||||
set(BOOST_HARVEST_CMD echo .)
|
set(BOOST_HARVEST_CMD echo .)
|
||||||
set(BOOST_PATCH_COMMAND echo .)
|
|
||||||
else()
|
else()
|
||||||
set(BOOST_HARVEST_CMD echo .)
|
set(BOOST_HARVEST_CMD echo .)
|
||||||
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
set(BOOST_CONFIGURE_COMMAND ./bootstrap.sh)
|
||||||
set(BOOST_BUILD_COMMAND ./b2)
|
set(BOOST_BUILD_COMMAND ./b2)
|
||||||
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
|
set(BOOST_BUILD_OPTIONS cxxflags=${PLATFORM_CXXFLAGS} --disable-icu boost.locale.icu=off)
|
||||||
set(BOOST_PATCH_COMMAND echo .)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
|
set(JAM_FILE ${BUILD_DIR}/boost.user-config.jam)
|
||||||
@@ -72,7 +70,7 @@ ExternalProject_Add(external_boost
|
|||||||
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
|
URL_HASH ${BOOST_HASH_TYPE}=${BOOST_HASH}
|
||||||
PREFIX ${BUILD_DIR}/boost
|
PREFIX ${BUILD_DIR}/boost
|
||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
PATCH_COMMAND ${BOOST_PATCH_COMMAND}
|
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/boost/src/external_boost < ${PATCH_DIR}/boost.diff
|
||||||
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
|
CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
|
||||||
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=shared threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
BUILD_COMMAND ${BOOST_BUILD_COMMAND} ${BOOST_BUILD_OPTIONS} -j${MAKE_THREADS} architecture=${BOOST_ARCHITECTURE} address-model=${BOOST_ADDRESS_MODEL} link=shared threading=multi ${BOOST_OPTIONS} --prefix=${LIBDIR}/boost install
|
||||||
BUILD_IN_SOURCE 1
|
BUILD_IN_SOURCE 1
|
||||||
|
@@ -12,7 +12,6 @@ if(UNIX)
|
|||||||
automake
|
automake
|
||||||
bison
|
bison
|
||||||
${_libtoolize_name}
|
${_libtoolize_name}
|
||||||
meson
|
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
tclsh
|
tclsh
|
||||||
|
@@ -24,15 +24,15 @@
|
|||||||
|
|
||||||
set(SBOMCONTENTS)
|
set(SBOMCONTENTS)
|
||||||
get_cmake_property(_variableNames VARIABLES)
|
get_cmake_property(_variableNames VARIABLES)
|
||||||
foreach (_variableName ${_variableNames})
|
foreach(_variableName ${_variableNames})
|
||||||
if(_variableName MATCHES "CPE$")
|
if(_variableName MATCHES "CPE$")
|
||||||
string(REPLACE ":" ";" CPE_LIST ${${_variableName}})
|
string(REPLACE ":" ";" CPE_LIST ${${_variableName}})
|
||||||
string(REPLACE "_CPE" "_ID" CPE_DEPNAME ${_variableName})
|
string(REPLACE "_CPE" "_ID" CPE_DEPNAME ${_variableName})
|
||||||
list(GET CPE_LIST 3 CPE_VENDOR)
|
list(GET CPE_LIST 3 CPE_VENDOR)
|
||||||
list(GET CPE_LIST 4 CPE_NAME)
|
list(GET CPE_LIST 4 CPE_NAME)
|
||||||
list(GET CPE_LIST 5 CPE_VERSION)
|
list(GET CPE_LIST 5 CPE_VERSION)
|
||||||
set(${CPE_DEPNAME} "${CPE_VENDOR},${CPE_NAME},${CPE_VERSION}")
|
set(${CPE_DEPNAME} "${CPE_VENDOR},${CPE_NAME},${CPE_VERSION}")
|
||||||
set(SBOMCONTENTS "${SBOMCONTENTS}${CPE_VENDOR},${CPE_NAME},${CPE_VERSION},,,\n")
|
set(SBOMCONTENTS "${SBOMCONTENTS}${CPE_VENDOR},${CPE_NAME},${CPE_VERSION},,,\n")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/cve_check.csv.in ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv @ONLY)
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/cve_check.csv.in ${CMAKE_CURRENT_BINARY_DIR}/cve_check.csv @ONLY)
|
||||||
|
@@ -10,43 +10,44 @@ function(download_source dep)
|
|||||||
if(PACKAGE_USE_UPSTREAM_SOURCES)
|
if(PACKAGE_USE_UPSTREAM_SOURCES)
|
||||||
set(TARGET_URI ${${dep}_URI})
|
set(TARGET_URI ${${dep}_URI})
|
||||||
elseif(BLENDER_VERSION)
|
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://svn.blender.org/svnroot/bf-blender/tags/blender-${BLENDER_VERSION}-release/lib/packages/${TARGET_FILE})
|
||||||
else()
|
else()
|
||||||
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
|
set(TARGET_URI https://svn.blender.org/svnroot/bf-blender/trunk/lib/packages/${TARGET_FILE})
|
||||||
endif()
|
endif()
|
||||||
# Validate all required variables are set and give an explicit error message
|
# Validate all required variables are set and give an explicit error message
|
||||||
# rather than CMake erroring out later on with a more ambigious error.
|
# rather than CMake erroring out later on with a more ambigious error.
|
||||||
if (NOT DEFINED TARGET_FILE)
|
if(NOT DEFINED TARGET_FILE)
|
||||||
message(FATAL_ERROR "${dep}_FILE variable not set")
|
message(FATAL_ERROR "${dep}_FILE variable not set")
|
||||||
endif()
|
endif()
|
||||||
if (NOT DEFINED TARGET_HASH)
|
if(NOT DEFINED TARGET_HASH)
|
||||||
message(FATAL_ERROR "${dep}_HASH variable not set")
|
message(FATAL_ERROR "${dep}_HASH variable not set")
|
||||||
endif()
|
endif()
|
||||||
if (NOT DEFINED TARGET_HASH_TYPE)
|
if(NOT DEFINED TARGET_HASH_TYPE)
|
||||||
message(FATAL_ERROR "${dep}_HASH_TYPE variable not set")
|
message(FATAL_ERROR "${dep}_HASH_TYPE variable not set")
|
||||||
endif()
|
endif()
|
||||||
if (NOT DEFINED TARGET_URI)
|
if(NOT DEFINED TARGET_URI)
|
||||||
message(FATAL_ERROR "${dep}_URI variable not set")
|
message(FATAL_ERROR "${dep}_URI variable not set")
|
||||||
endif()
|
endif()
|
||||||
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
|
set(TARGET_FILE ${PACKAGE_DIR}/${TARGET_FILE})
|
||||||
message("Checking source : ${dep} (${TARGET_FILE})")
|
message("Checking source : ${dep} (${TARGET_FILE})")
|
||||||
if(NOT EXISTS ${TARGET_FILE})
|
if(NOT EXISTS ${TARGET_FILE})
|
||||||
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
|
message("Checking source : ${dep} - source not found downloading from ${TARGET_URI}")
|
||||||
file(DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
file(
|
||||||
TIMEOUT 1800 # seconds
|
DOWNLOAD ${TARGET_URI} ${TARGET_FILE}
|
||||||
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
|
TIMEOUT 1800 # seconds
|
||||||
TLS_VERIFY ON
|
EXPECTED_HASH ${TARGET_HASH_TYPE}=${TARGET_HASH}
|
||||||
SHOW_PROGRESS
|
TLS_VERIFY ON
|
||||||
)
|
SHOW_PROGRESS
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
if(EXISTS ${TARGET_FILE})
|
if(EXISTS ${TARGET_FILE})
|
||||||
# Sometimes the download fails, but that is not a
|
# Sometimes the download fails, but that is not a
|
||||||
# fail condition for "file(DOWNLOAD" it will warn about
|
# fail condition for "file(DOWNLOAD" it will warn about
|
||||||
# a crc mismatch and just carry on, we need to explicitly
|
# a CRC mismatch and just carry on, we need to explicitly
|
||||||
# catch this and remove the bogus 0 byte file so we can
|
# catch this and remove the bogus 0 byte file so we can
|
||||||
# retry without having to go find the file and manually
|
# retry without having to go find the file and manually
|
||||||
# delete it.
|
# delete it.
|
||||||
file (SIZE ${TARGET_FILE} TARGET_SIZE)
|
file(SIZE ${TARGET_FILE} TARGET_SIZE)
|
||||||
if(${TARGET_SIZE} EQUAL 0)
|
if(${TARGET_SIZE} EQUAL 0)
|
||||||
file(REMOVE ${TARGET_FILE})
|
file(REMOVE ${TARGET_FILE})
|
||||||
message(FATAL_ERROR "for ${TARGET_FILE} file size 0, download likely failed, deleted...")
|
message(FATAL_ERROR "for ${TARGET_FILE} file size 0, download likely failed, deleted...")
|
||||||
|
@@ -15,10 +15,11 @@ set(EMBREE_EXTRA_ARGS
|
|||||||
-DTBB_ROOT=${LIBDIR}/tbb
|
-DTBB_ROOT=${LIBDIR}/tbb
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT BLENDER_PLATFORM_ARM)
|
if(NOT BLENDER_PLATFORM_ARM)
|
||||||
set(EMBREE_EXTRA_ARGS
|
set(EMBREE_EXTRA_ARGS
|
||||||
${EMBREE_EXTRA_ARGS}
|
${EMBREE_EXTRA_ARGS}
|
||||||
-DEMBREE_MAX_ISA=AVX2)
|
-DEMBREE_MAX_ISA=AVX2
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TBB_STATIC_LIBRARY)
|
if(TBB_STATIC_LIBRARY)
|
||||||
@@ -52,17 +53,17 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
ExternalProject_Add_Step(external_embree after_install
|
ExternalProject_Add_Step(external_embree after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree3.lib ${HARVEST_TARGET}/embree/lib/embree3_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx.lib ${HARVEST_TARGET}/embree/lib/embree_avx_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_avx2.lib ${HARVEST_TARGET}/embree/lib/embree_avx2_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/embree_sse42.lib ${HARVEST_TARGET}/embree/lib/embree_sse42_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/lexers.lib ${HARVEST_TARGET}/embree/lib/lexers_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/math.lib ${HARVEST_TARGET}/embree/lib/math_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/simd.lib ${HARVEST_TARGET}/embree/lib/simd_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/sys.lib ${HARVEST_TARGET}/embree/lib/sys_d.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/embree/lib/tasking.lib ${HARVEST_TARGET}/embree/lib/tasking_d.lib
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
@@ -26,5 +26,6 @@ endif()
|
|||||||
|
|
||||||
add_dependencies(
|
add_dependencies(
|
||||||
external_epoxy
|
external_epoxy
|
||||||
|
# Needed for `MESON`.
|
||||||
external_python_site_packages
|
external_python_site_packages
|
||||||
)
|
)
|
||||||
|
@@ -1,9 +1,55 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
set(FFMPEG_CFLAGS "-I${mingw_LIBDIR}/lame/include -I${mingw_LIBDIR}/openjpeg/include/ -I${mingw_LIBDIR}/ogg/include -I${mingw_LIBDIR}/vorbis/include -I${mingw_LIBDIR}/theora/include -I${mingw_LIBDIR}/opus/include -I${mingw_LIBDIR}/vpx/include -I${mingw_LIBDIR}/x264/include -I${mingw_LIBDIR}/xvidcore/include -I${mingw_LIBDIR}/zlib/include -I${mingw_LIBDIR}/aom/include")
|
if(WIN32)
|
||||||
set(FFMPEG_LDFLAGS "-L${mingw_LIBDIR}/lame/lib -L${mingw_LIBDIR}/openjpeg/lib -L${mingw_LIBDIR}/ogg/lib -L${mingw_LIBDIR}/vorbis/lib -L${mingw_LIBDIR}/theora/lib -L${mingw_LIBDIR}/opus/lib -L${mingw_LIBDIR}/vpx/lib -L${mingw_LIBDIR}/x264/lib -L${mingw_LIBDIR}/xvidcore/lib -L${mingw_LIBDIR}/zlib/lib -L${mingw_LIBDIR}/aom/lib")
|
set(temp_LIBDIR ${mingw_LIBDIR})
|
||||||
set(FFMPEG_EXTRA_FLAGS --pkg-config-flags=--static --extra-cflags=${FFMPEG_CFLAGS} --extra-ldflags=${FFMPEG_LDFLAGS})
|
else()
|
||||||
set(FFMPEG_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/x264/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}:${mingw_LIBDIR}/vpx/lib/pkgconfig:${mingw_LIBDIR}/theora/lib/pkgconfig:${mingw_LIBDIR}/openjpeg/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:${mingw_LIBDIR}/aom/lib/pkgconfig:)
|
set(temp_LIBDIR ${LIBDIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(FFMPEG_CFLAGS "\
|
||||||
|
-I${temp_LIBDIR}/lame/include \
|
||||||
|
-I${temp_LIBDIR}/openjpeg/include/ \
|
||||||
|
-I${temp_LIBDIR}/ogg/include \
|
||||||
|
-I${temp_LIBDIR}/vorbis/include \
|
||||||
|
-I${temp_LIBDIR}/theora/include \
|
||||||
|
-I${temp_LIBDIR}/opus/include \
|
||||||
|
-I${temp_LIBDIR}/vpx/include \
|
||||||
|
-I${temp_LIBDIR}/x264/include \
|
||||||
|
-I${temp_LIBDIR}/xvidcore/include \
|
||||||
|
-I${temp_LIBDIR}/zlib/include \
|
||||||
|
-I${temp_LIBDIR}/aom/include"
|
||||||
|
)
|
||||||
|
set(FFMPEG_LDFLAGS "\
|
||||||
|
-L${temp_LIBDIR}/lame/lib \
|
||||||
|
-L${temp_LIBDIR}/openjpeg/lib \
|
||||||
|
-L${temp_LIBDIR}/ogg/lib \
|
||||||
|
-L${temp_LIBDIR}/vorbis/lib \
|
||||||
|
-L${temp_LIBDIR}/theora/lib \
|
||||||
|
-L${temp_LIBDIR}/opus/lib \
|
||||||
|
-L${temp_LIBDIR}/vpx/lib \
|
||||||
|
-L${temp_LIBDIR}/x264/lib \
|
||||||
|
-L${temp_LIBDIR}/xvidcore/lib \
|
||||||
|
-L${temp_LIBDIR}/zlib/lib \
|
||||||
|
-L${temp_LIBDIR}/aom/lib"
|
||||||
|
)
|
||||||
|
set(FFMPEG_EXTRA_FLAGS
|
||||||
|
--pkg-config-flags=--static
|
||||||
|
--extra-cflags=${FFMPEG_CFLAGS}
|
||||||
|
--extra-ldflags=${FFMPEG_LDFLAGS}
|
||||||
|
)
|
||||||
|
set(FFMPEG_ENV "PKG_CONFIG_PATH=\
|
||||||
|
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/x264/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/ogg/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/vpx/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/theora/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/opus/lib/pkgconfig:\
|
||||||
|
${temp_LIBDIR}/aom/lib/pkgconfig"
|
||||||
|
)
|
||||||
|
|
||||||
|
unset(temp_LIBDIR)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||||
|
@@ -32,9 +32,10 @@ add_dependencies(
|
|||||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||||
ExternalProject_Add_Step(external_freetype after_install
|
ExternalProject_Add_Step(external_freetype after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freetype ${HARVEST_TARGET}/freetype
|
||||||
# harfbuzz *NEEDS* to find freetype.lib and will not be conviced to take alternative names so just give it
|
# harfbuzz *NEEDS* to find freetype.lib and will not be conviced to take alternative names so just give it
|
||||||
# what it wants.
|
# what it wants.
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/freetype/lib/freetype2st.lib ${LIBDIR}/freetype/lib/freetype.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/freetype/lib/freetype2st.lib ${LIBDIR}/freetype/lib/freetype.lib
|
||||||
|
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -18,6 +18,7 @@ ExternalProject_Add(external_fribidi
|
|||||||
add_dependencies(
|
add_dependencies(
|
||||||
external_fribidi
|
external_fribidi
|
||||||
external_python
|
external_python
|
||||||
|
# Needed for `MESON`.
|
||||||
external_python_site_packages
|
external_python_site_packages
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -22,6 +22,14 @@ elseif(UNIX AND NOT APPLE)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Boolean crashes with Arm assembly, see T103423.
|
||||||
|
if(BLENDER_PLATFORM_ARM)
|
||||||
|
set(GMP_OPTIONS
|
||||||
|
${GMP_OPTIONS}
|
||||||
|
--disable-assembly
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(external_gmp
|
ExternalProject_Add(external_gmp
|
||||||
URL file://${PACKAGE_DIR}/${GMP_FILE}
|
URL file://${PACKAGE_DIR}/${GMP_FILE}
|
||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
@@ -40,19 +48,21 @@ endif()
|
|||||||
|
|
||||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||||
ExternalProject_Add_Step(external_gmp after_install
|
ExternalProject_Add_Step(external_gmp after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
|
||||||
|
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_MODE STREQUAL Debug AND WIN32)
|
if(BUILD_MODE STREQUAL Debug AND WIN32)
|
||||||
ExternalProject_Add_Step(external_gmp after_install
|
ExternalProject_Add_Step(external_gmp after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||||
|
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -5,7 +5,12 @@ if(WIN32)
|
|||||||
set(HARFBUZZ_PKG_ENV FREETYPE_DIR=${LIBDIR}/freetype)
|
set(HARFBUZZ_PKG_ENV FREETYPE_DIR=${LIBDIR}/freetype)
|
||||||
else()
|
else()
|
||||||
set(HARFBUZZ_CONFIGURE_ENV ${CONFIGURE_ENV})
|
set(HARFBUZZ_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||||
set(HARFBUZZ_PKG_ENV PKG_CONFIG_PATH=${LIBDIR}/freetype/lib/pkgconfig:${LIBDIR}/brotli/lib/pkgconfig:$PKG_CONFIG_PATH)
|
set(HARFBUZZ_PKG_ENV "PKG_CONFIG_PATH=\
|
||||||
|
${LIBDIR}/freetype/lib/pkgconfig:\
|
||||||
|
${LIBDIR}/brotli/lib/pkgconfig:\
|
||||||
|
${LIBDIR}/lib/python3.10/pkgconfig:\
|
||||||
|
$PKG_CONFIG_PATH"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(HARFBUZZ_EXTRA_OPTIONS
|
set(HARFBUZZ_EXTRA_OPTIONS
|
||||||
@@ -13,6 +18,9 @@ set(HARFBUZZ_EXTRA_OPTIONS
|
|||||||
-Dfreetype=enabled
|
-Dfreetype=enabled
|
||||||
-Dglib=disabled
|
-Dglib=disabled
|
||||||
-Dgobject=disabled
|
-Dgobject=disabled
|
||||||
|
# Only used for command line utilities,
|
||||||
|
# disable as this would add an addition & unnecessary build-dependency.
|
||||||
|
-Dcairo=disabled
|
||||||
)
|
)
|
||||||
|
|
||||||
ExternalProject_Add(external_harfbuzz
|
ExternalProject_Add(external_harfbuzz
|
||||||
@@ -20,8 +28,16 @@ ExternalProject_Add(external_harfbuzz
|
|||||||
URL_HASH ${HARFBUZZ_HASH_TYPE}=${HARFBUZZ_HASH}
|
URL_HASH ${HARFBUZZ_HASH_TYPE}=${HARFBUZZ_HASH}
|
||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
PREFIX ${BUILD_DIR}/harfbuzz
|
PREFIX ${BUILD_DIR}/harfbuzz
|
||||||
|
|
||||||
CONFIGURE_COMMAND ${HARFBUZZ_CONFIGURE_ENV} &&
|
CONFIGURE_COMMAND ${HARFBUZZ_CONFIGURE_ENV} &&
|
||||||
${CMAKE_COMMAND} -E env ${HARFBUZZ_PKG_ENV} ${MESON} setup --prefix ${LIBDIR}/harfbuzz ${HARFBUZZ_EXTRA_OPTIONS} --default-library static --libdir lib ${BUILD_DIR}/harfbuzz/src/external_harfbuzz-build ${BUILD_DIR}/harfbuzz/src/external_harfbuzz
|
${CMAKE_COMMAND} -E env ${HARFBUZZ_PKG_ENV}
|
||||||
|
${MESON} setup
|
||||||
|
--prefix ${LIBDIR}/harfbuzz ${HARFBUZZ_EXTRA_OPTIONS}
|
||||||
|
--default-library static
|
||||||
|
--libdir lib
|
||||||
|
${BUILD_DIR}/harfbuzz/src/external_harfbuzz-build
|
||||||
|
${BUILD_DIR}/harfbuzz/src/external_harfbuzz
|
||||||
|
|
||||||
BUILD_COMMAND ninja
|
BUILD_COMMAND ninja
|
||||||
INSTALL_COMMAND ninja install
|
INSTALL_COMMAND ninja install
|
||||||
INSTALL_DIR ${LIBDIR}/harfbuzz
|
INSTALL_DIR ${LIBDIR}/harfbuzz
|
||||||
@@ -30,6 +46,8 @@ ExternalProject_Add(external_harfbuzz
|
|||||||
add_dependencies(
|
add_dependencies(
|
||||||
external_harfbuzz
|
external_harfbuzz
|
||||||
external_python
|
external_python
|
||||||
|
external_freetype
|
||||||
|
# Needed for `MESON`.
|
||||||
external_python_site_packages
|
external_python_site_packages
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,4 +59,3 @@ if(BUILD_MODE STREQUAL Release AND WIN32)
|
|||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -11,259 +11,301 @@ message("HARVEST_TARGET = ${HARVEST_TARGET}")
|
|||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
||||||
if(BUILD_MODE STREQUAL Release)
|
if(BUILD_MODE STREQUAL Release)
|
||||||
add_custom_target(Harvest_Release_Results
|
add_custom_target(Harvest_Release_Results
|
||||||
COMMAND # jpeg rename libfile + copy include
|
COMMAND # JPEG rename lib-file + copy include.
|
||||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpeg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
|
${CMAKE_COMMAND} -E copy ${LIBDIR}/jpeg/lib/jpeg-static.lib ${HARVEST_TARGET}/jpeg/lib/libjpeg.lib &&
|
||||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpeg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
|
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/jpeg/include/ ${HARVEST_TARGET}/jpeg/include/ &&
|
||||||
# png
|
# PNG.
|
||||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
|
${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_static.lib ${HARVEST_TARGET}/png/lib/libpng.lib &&
|
||||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
|
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/png/include/ ${HARVEST_TARGET}/png/include/ &&
|
||||||
# freeglut-> opengl
|
# FREEGLUT -> OPENGL.
|
||||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib &&
|
||||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ &&
|
||||||
DEPENDS
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
else(WIN32)
|
DEPENDS
|
||||||
|
|
||||||
function(harvest from to)
|
|
||||||
set(pattern "")
|
|
||||||
foreach(f ${ARGN})
|
|
||||||
set(pattern ${f})
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(pattern STREQUAL "")
|
|
||||||
get_filename_component(dirpath ${to} DIRECTORY)
|
|
||||||
get_filename_component(filename ${to} NAME)
|
|
||||||
install(
|
|
||||||
FILES ${LIBDIR}/${from}
|
|
||||||
DESTINATION ${HARVEST_TARGET}/${dirpath}
|
|
||||||
RENAME ${filename}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
install(
|
|
||||||
DIRECTORY ${LIBDIR}/${from}/
|
|
||||||
DESTINATION ${HARVEST_TARGET}/${to}
|
|
||||||
USE_SOURCE_PERMISSIONS
|
|
||||||
FILES_MATCHING PATTERN ${pattern}
|
|
||||||
PATTERN "pkgconfig" EXCLUDE
|
|
||||||
PATTERN "cmake" EXCLUDE
|
|
||||||
PATTERN "__pycache__" EXCLUDE
|
|
||||||
PATTERN "tests" EXCLUDE
|
|
||||||
PATTERN "meson*" EXCLUDE
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# Set rpath on shared libraries to $ORIGIN since all will be installed in the same
|
|
||||||
# lib folder, and remove any absolute paths.
|
|
||||||
#
|
|
||||||
# Ideally this would be done as part of the Blender build since it makes assumptions
|
|
||||||
# about where the files will be installed. However it would add patchelf as a new
|
|
||||||
# dependency for building.
|
|
||||||
if(APPLE)
|
|
||||||
set(set_rpath_cmd python3 ${CMAKE_CURRENT_SOURCE_DIR}/darwin/set_rpath.py @loader_path)
|
|
||||||
else()
|
else()
|
||||||
set(set_rpath_cmd patchelf --set-rpath $ORIGIN)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
function(harvest_rpath_lib from to pattern)
|
function(harvest from to)
|
||||||
harvest(${from} ${to} ${pattern})
|
set(pattern "")
|
||||||
|
foreach(f ${ARGN})
|
||||||
|
set(pattern ${f})
|
||||||
|
endforeach()
|
||||||
|
|
||||||
install(CODE "\
|
if(pattern STREQUAL "")
|
||||||
cmake_policy(SET CMP0009 NEW)\n
|
get_filename_component(dirpath ${to} DIRECTORY)
|
||||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
get_filename_component(filename ${to} NAME)
|
||||||
foreach(f \${shared_libs}) \n
|
install(
|
||||||
if(NOT IS_SYMLINK \${f})\n
|
FILES ${LIBDIR}/${from}
|
||||||
execute_process(COMMAND ${set_rpath_cmd} \${f}) \n
|
DESTINATION ${HARVEST_TARGET}/${dirpath}
|
||||||
endif()\n
|
RENAME ${filename}
|
||||||
endforeach()")
|
)
|
||||||
endfunction()
|
else()
|
||||||
|
install(
|
||||||
|
DIRECTORY ${LIBDIR}/${from}/
|
||||||
|
DESTINATION ${HARVEST_TARGET}/${to}
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
FILES_MATCHING PATTERN ${pattern}
|
||||||
|
PATTERN "pkgconfig" EXCLUDE
|
||||||
|
PATTERN "cmake" EXCLUDE
|
||||||
|
PATTERN "__pycache__" EXCLUDE
|
||||||
|
PATTERN "tests" EXCLUDE
|
||||||
|
PATTERN "meson*" EXCLUDE
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
# Set rpath on utility binaries assuming they are run from their install location.
|
# Set rpath on shared libraries to $ORIGIN since all will be installed in the same
|
||||||
function(harvest_rpath_bin from to pattern)
|
# lib folder, and remove any absolute paths.
|
||||||
harvest(${from} ${to} ${pattern})
|
#
|
||||||
|
# Ideally this would be done as part of the Blender build since it makes assumptions
|
||||||
|
# about where the files will be installed. However it would add patchelf as a new
|
||||||
|
# dependency for building.
|
||||||
|
#
|
||||||
|
# Also removes versioned symlinks, which give errors with macOS notarization.
|
||||||
|
if(APPLE)
|
||||||
|
set(set_rpath_cmd python3 ${CMAKE_CURRENT_SOURCE_DIR}/darwin/set_rpath.py @loader_path)
|
||||||
|
else()
|
||||||
|
set(set_rpath_cmd patchelf --set-rpath $ORIGIN)
|
||||||
|
endif()
|
||||||
|
|
||||||
install(CODE "\
|
function(harvest_rpath_lib from to pattern)
|
||||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
harvest(${from} ${to} ${pattern})
|
||||||
foreach(f \${shared_libs}) \n
|
|
||||||
execute_process(COMMAND ${set_rpath_cmd}/../lib; \${f}) \n
|
|
||||||
endforeach()")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# Set rpath on Python module to point to the shared libraries folder in the Blender
|
install(CODE "\
|
||||||
# installation.
|
cmake_policy(SET CMP0009 NEW)\n
|
||||||
function(harvest_rpath_python from to pattern)
|
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
||||||
harvest(${from} ${to} ${pattern})
|
foreach(f \${shared_libs}) \n
|
||||||
|
if(IS_SYMLINK \${f})\n
|
||||||
|
if(APPLE)\n
|
||||||
|
file(REMOVE_RECURSE \${f})
|
||||||
|
endif()\n
|
||||||
|
else()\n
|
||||||
|
execute_process(COMMAND ${set_rpath_cmd} \${f}) \n
|
||||||
|
endif()\n
|
||||||
|
endforeach()")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
install(CODE "\
|
# Set rpath on utility binaries assuming they are run from their install location.
|
||||||
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}\.so*) \n
|
function(harvest_rpath_bin from to pattern)
|
||||||
foreach(f \${shared_libs}) \n
|
harvest(${from} ${to} ${pattern})
|
||||||
get_filename_component(f_dir \${f} DIRECTORY) \n
|
|
||||||
file(RELATIVE_PATH relative_dir \${f_dir} ${HARVEST_TARGET}) \n
|
|
||||||
execute_process(COMMAND ${set_rpath_cmd}/\${relative_dir}../lib \${f}) \n
|
|
||||||
endforeach()")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
harvest(alembic/include alembic/include "*.h")
|
install(CODE "\
|
||||||
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
|
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}) \n
|
||||||
harvest(alembic/bin alembic/bin "*")
|
foreach(f \${shared_libs}) \n
|
||||||
harvest(brotli/include brotli/include "*.h")
|
execute_process(COMMAND ${set_rpath_cmd}/../lib; \${f}) \n
|
||||||
harvest(brotli/lib brotli/lib "*.a")
|
endforeach()")
|
||||||
harvest(boost/include boost/include "*")
|
endfunction()
|
||||||
harvest_rpath_lib(boost/lib boost/lib "*${SHAREDLIBEXT}*")
|
|
||||||
harvest(imath/include imath/include "*.h")
|
|
||||||
harvest_rpath_lib(imath/lib imath/lib "*${SHAREDLIBEXT}*")
|
|
||||||
harvest(ffmpeg/include ffmpeg/include "*.h")
|
|
||||||
harvest(ffmpeg/lib ffmpeg/lib "*.a")
|
|
||||||
harvest(fftw3/include fftw3/include "*.h")
|
|
||||||
harvest(fftw3/lib fftw3/lib "*.a")
|
|
||||||
harvest(flac/lib sndfile/lib "libFLAC.a")
|
|
||||||
harvest(freetype/include freetype/include "*.h")
|
|
||||||
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
|
|
||||||
harvest(fribidi/include fribidi/include "*.h")
|
|
||||||
harvest(fribidi/lib fribidi/lib "*.a")
|
|
||||||
harvest(epoxy/include epoxy/include "*.h")
|
|
||||||
harvest(epoxy/lib epoxy/lib "*.a")
|
|
||||||
harvest(gmp/include gmp/include "*.h")
|
|
||||||
harvest(gmp/lib gmp/lib "*.a")
|
|
||||||
harvest(harfbuzz/include harfbuzz/include "*.h")
|
|
||||||
harvest(harfbuzz/lib harfbuzz/lib "*.a")
|
|
||||||
harvest(jemalloc/include jemalloc/include "*.h")
|
|
||||||
harvest(jemalloc/lib jemalloc/lib "*.a")
|
|
||||||
harvest(jpeg/include jpeg/include "*.h")
|
|
||||||
harvest(jpeg/lib jpeg/lib "libjpeg.a")
|
|
||||||
harvest(lame/lib ffmpeg/lib "*.a")
|
|
||||||
if(NOT APPLE)
|
|
||||||
harvest(level-zero/include/level_zero level-zero/include/level_zero "*.h")
|
|
||||||
harvest(level-zero/lib level-zero/lib "*${SHAREDLIBEXT}*")
|
|
||||||
endif()
|
|
||||||
harvest(llvm/bin llvm/bin "clang-format")
|
|
||||||
if(BUILD_CLANG_TOOLS)
|
|
||||||
harvest(llvm/bin llvm/bin "clang-tidy")
|
|
||||||
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
|
|
||||||
endif()
|
|
||||||
harvest(llvm/include llvm/include "*")
|
|
||||||
harvest(llvm/bin llvm/bin "llvm-config")
|
|
||||||
harvest(llvm/lib llvm/lib "libLLVM*.a")
|
|
||||||
harvest(llvm/lib llvm/lib "libclang*.a")
|
|
||||||
harvest(llvm/lib/clang llvm/lib/clang "*.h")
|
|
||||||
if(APPLE)
|
|
||||||
harvest(openmp/lib openmp/lib "*")
|
|
||||||
harvest(openmp/include openmp/include "*.h")
|
|
||||||
endif()
|
|
||||||
if(BLENDER_PLATFORM_ARM)
|
|
||||||
harvest(sse2neon sse2neon "*.h")
|
|
||||||
endif()
|
|
||||||
harvest(ogg/lib ffmpeg/lib "*.a")
|
|
||||||
harvest(openal/include openal/include "*.h")
|
|
||||||
if(UNIX AND NOT APPLE)
|
|
||||||
harvest(openal/lib openal/lib "*.a")
|
|
||||||
|
|
||||||
harvest(zlib/include zlib/include "*.h")
|
# Set rpath on Python module to point to the shared libraries folder in the Blender
|
||||||
harvest(zlib/lib zlib/lib "*.a")
|
# installation.
|
||||||
|
function(harvest_rpath_python from to pattern)
|
||||||
|
harvest(${from} ${to} ${pattern})
|
||||||
|
|
||||||
harvest(xml2/include xml2/include "*.h")
|
install(CODE "\
|
||||||
harvest(xml2/lib xml2/lib "*.a")
|
file(GLOB_RECURSE shared_libs ${HARVEST_TARGET}/${to}/${pattern}\.so*) \n
|
||||||
|
foreach(f \${shared_libs}) \n
|
||||||
|
if(IS_SYMLINK \${f})\n
|
||||||
|
if(APPLE)\n
|
||||||
|
file(REMOVE_RECURSE \${f})
|
||||||
|
endif()\n
|
||||||
|
else()\n
|
||||||
|
get_filename_component(f_dir \${f} DIRECTORY) \n
|
||||||
|
file(RELATIVE_PATH relative_dir \${f_dir} ${HARVEST_TARGET}) \n
|
||||||
|
execute_process(COMMAND ${set_rpath_cmd}/\${relative_dir}../lib \${f}) \n
|
||||||
|
endif()\n
|
||||||
|
endforeach()")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml")
|
harvest(alembic/include alembic/include "*.h")
|
||||||
|
harvest(alembic/lib/libAlembic.a alembic/lib/libAlembic.a)
|
||||||
|
harvest_rpath_bin(alembic/bin alembic/bin "*")
|
||||||
|
harvest(brotli/include brotli/include "*.h")
|
||||||
|
harvest(brotli/lib brotli/lib "*.a")
|
||||||
|
harvest(boost/include boost/include "*")
|
||||||
|
harvest_rpath_lib(boost/lib boost/lib "*${SHAREDLIBEXT}*")
|
||||||
|
harvest(imath/include imath/include "*.h")
|
||||||
|
harvest_rpath_lib(imath/lib imath/lib "*${SHAREDLIBEXT}*")
|
||||||
|
harvest(ffmpeg/include ffmpeg/include "*.h")
|
||||||
|
harvest(ffmpeg/lib ffmpeg/lib "*.a")
|
||||||
|
harvest(fftw3/include fftw3/include "*.h")
|
||||||
|
harvest(fftw3/lib fftw3/lib "*.a")
|
||||||
|
harvest(flac/lib sndfile/lib "libFLAC.a")
|
||||||
|
harvest(freetype/include freetype/include "*.h")
|
||||||
|
harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a)
|
||||||
|
harvest(fribidi/include fribidi/include "*.h")
|
||||||
|
harvest(fribidi/lib fribidi/lib "*.a")
|
||||||
|
harvest(epoxy/include epoxy/include "*.h")
|
||||||
|
harvest(epoxy/lib epoxy/lib "*.a")
|
||||||
|
harvest(gmp/include gmp/include "*.h")
|
||||||
|
harvest(gmp/lib gmp/lib "*.a")
|
||||||
|
harvest(harfbuzz/include harfbuzz/include "*.h")
|
||||||
|
harvest(harfbuzz/lib harfbuzz/lib "*.a")
|
||||||
|
harvest(jemalloc/include jemalloc/include "*.h")
|
||||||
|
harvest(jemalloc/lib jemalloc/lib "*.a")
|
||||||
|
harvest(jpeg/include jpeg/include "*.h")
|
||||||
|
harvest(jpeg/lib jpeg/lib "libjpeg.a")
|
||||||
|
harvest(lame/lib ffmpeg/lib "*.a")
|
||||||
|
if(NOT APPLE)
|
||||||
|
harvest(level-zero/include/level_zero level-zero/include/level_zero "*.h")
|
||||||
|
harvest(level-zero/lib level-zero/lib "*${SHAREDLIBEXT}*")
|
||||||
|
endif()
|
||||||
|
harvest(llvm/bin llvm/bin "clang-format")
|
||||||
|
if(BUILD_CLANG_TOOLS)
|
||||||
|
harvest(llvm/bin llvm/bin "clang-tidy")
|
||||||
|
harvest(llvm/share/clang llvm/share "run-clang-tidy.py")
|
||||||
|
endif()
|
||||||
|
harvest(llvm/include llvm/include "*")
|
||||||
|
harvest(llvm/bin llvm/bin "llvm-config")
|
||||||
|
harvest(llvm/lib llvm/lib "libLLVM*.a")
|
||||||
|
harvest(llvm/lib llvm/lib "libclang*.a")
|
||||||
|
harvest(llvm/lib/clang llvm/lib/clang "*.h")
|
||||||
|
if(APPLE)
|
||||||
|
harvest(openmp/lib openmp/lib "libomp.dylib")
|
||||||
|
harvest(openmp/include openmp/include "*.h")
|
||||||
|
endif()
|
||||||
|
if(BLENDER_PLATFORM_ARM)
|
||||||
|
harvest(sse2neon sse2neon "*.h")
|
||||||
|
endif()
|
||||||
|
harvest(ogg/lib ffmpeg/lib "*.a")
|
||||||
|
harvest(openal/include openal/include "*.h")
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
harvest(openal/lib openal/lib "*.a")
|
||||||
|
|
||||||
|
harvest(zlib/include zlib/include "*.h")
|
||||||
|
harvest(zlib/lib zlib/lib "*.a")
|
||||||
|
|
||||||
|
harvest(xml2/include xml2/include "*.h")
|
||||||
|
harvest(xml2/lib xml2/lib "*.a")
|
||||||
|
|
||||||
|
harvest(
|
||||||
|
wayland-protocols/share/wayland-protocols
|
||||||
|
wayland-protocols/share/wayland-protocols/
|
||||||
|
"*.xml"
|
||||||
|
)
|
||||||
harvest(wayland/bin wayland/bin "wayland-scanner")
|
harvest(wayland/bin wayland/bin "wayland-scanner")
|
||||||
harvest(wayland/include wayland/include "*.h")
|
harvest(wayland/include wayland/include "*.h")
|
||||||
harvest(wayland_libdecor/include wayland_libdecor/include "*.h")
|
harvest(wayland_libdecor/include wayland_libdecor/include "*.h")
|
||||||
else()
|
else()
|
||||||
harvest(blosc/lib openvdb/lib "*.a")
|
harvest(blosc/lib openvdb/lib "*.a")
|
||||||
harvest(xml2/lib opencollada/lib "*.a")
|
harvest(xml2/lib opencollada/lib "*.a")
|
||||||
endif()
|
endif()
|
||||||
harvest(opencollada/include/opencollada opencollada/include "*.h")
|
harvest(opencollada/include/opencollada opencollada/include "*.h")
|
||||||
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
|
harvest(opencollada/lib/opencollada opencollada/lib "*.a")
|
||||||
harvest(opencolorio/include opencolorio/include "*.h")
|
harvest(opencolorio/include opencolorio/include "*.h")
|
||||||
harvest_rpath_lib(opencolorio/lib opencolorio/lib "*${SHAREDLIBEXT}*")
|
harvest_rpath_lib(opencolorio/lib opencolorio/lib "*${SHAREDLIBEXT}*")
|
||||||
harvest_rpath_python(opencolorio/lib/python${PYTHON_SHORT_VERSION} python/lib/python${PYTHON_SHORT_VERSION} "*")
|
harvest_rpath_python(
|
||||||
harvest(openexr/include openexr/include "*.h")
|
opencolorio/lib/python${PYTHON_SHORT_VERSION}
|
||||||
harvest_rpath_lib(openexr/lib openexr/lib "*${SHAREDLIBEXT}*")
|
python/lib/python${PYTHON_SHORT_VERSION}
|
||||||
harvest_rpath_bin(openimageio/bin openimageio/bin "idiff")
|
"*"
|
||||||
harvest_rpath_bin(openimageio/bin openimageio/bin "maketx")
|
)
|
||||||
harvest_rpath_bin(openimageio/bin openimageio/bin "oiiotool")
|
harvest(openexr/include openexr/include "*.h")
|
||||||
harvest(openimageio/include openimageio/include "*")
|
harvest_rpath_lib(openexr/lib openexr/lib "*${SHAREDLIBEXT}*")
|
||||||
harvest_rpath_lib(openimageio/lib openimageio/lib "*${SHAREDLIBEXT}*")
|
harvest_rpath_bin(openimageio/bin openimageio/bin "idiff")
|
||||||
harvest_rpath_python(openimageio/lib/python${PYTHON_SHORT_VERSION} python/lib/python${PYTHON_SHORT_VERSION} "*")
|
harvest_rpath_bin(openimageio/bin openimageio/bin "maketx")
|
||||||
harvest(openimagedenoise/include openimagedenoise/include "*")
|
harvest_rpath_bin(openimageio/bin openimageio/bin "oiiotool")
|
||||||
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
harvest(openimageio/include openimageio/include "*")
|
||||||
harvest(embree/include embree/include "*.h")
|
harvest_rpath_lib(openimageio/lib openimageio/lib "*${SHAREDLIBEXT}*")
|
||||||
harvest(embree/lib embree/lib "*.a")
|
harvest_rpath_python(
|
||||||
harvest(openpgl/include openpgl/include "*.h")
|
openimageio/lib/python${PYTHON_SHORT_VERSION}
|
||||||
harvest(openpgl/lib openpgl/lib "*.a")
|
python/lib/python${PYTHON_SHORT_VERSION}
|
||||||
harvest(openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION} openpgl/lib/cmake/openpgl "*.cmake")
|
"*"
|
||||||
harvest(openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} openjpeg/include "*.h")
|
)
|
||||||
harvest(openjpeg/lib openjpeg/lib "*.a")
|
harvest(openimagedenoise/include openimagedenoise/include "*")
|
||||||
harvest(opensubdiv/include opensubdiv/include "*.h")
|
harvest(openimagedenoise/lib openimagedenoise/lib "*.a")
|
||||||
harvest_rpath_lib(opensubdiv/lib opensubdiv/lib "*${SHAREDLIBEXT}*")
|
harvest(embree/include embree/include "*.h")
|
||||||
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
|
harvest(embree/lib embree/lib "*.a")
|
||||||
harvest(openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
|
harvest(openpgl/include openpgl/include "*.h")
|
||||||
harvest_rpath_lib(openvdb/lib openvdb/lib "*${SHAREDLIBEXT}*")
|
harvest(openpgl/lib openpgl/lib "*.a")
|
||||||
harvest_rpath_python(openvdb/lib/python${PYTHON_SHORT_VERSION} python/lib/python${PYTHON_SHORT_VERSION} "*pyopenvdb*")
|
harvest(openpgl/lib/cmake/openpgl-${OPENPGL_SHORT_VERSION} openpgl/lib/cmake/openpgl "*.cmake")
|
||||||
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
|
harvest(openjpeg/include/openjpeg-${OPENJPEG_SHORT_VERSION} openjpeg/include "*.h")
|
||||||
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
|
harvest(openjpeg/lib openjpeg/lib "*.a")
|
||||||
harvest(osl/bin osl/bin "oslc")
|
harvest(opensubdiv/include opensubdiv/include "*.h")
|
||||||
harvest(osl/include osl/include "*.h")
|
harvest_rpath_lib(opensubdiv/lib opensubdiv/lib "*${SHAREDLIBEXT}*")
|
||||||
harvest(osl/lib osl/lib "*.a")
|
harvest(openvdb/include/openvdb openvdb/include/openvdb "*.h")
|
||||||
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
|
harvest(openvdb/include/nanovdb openvdb/include/nanovdb "*.h")
|
||||||
harvest(png/include png/include "*.h")
|
harvest_rpath_lib(openvdb/lib openvdb/lib "*${SHAREDLIBEXT}*")
|
||||||
harvest(png/lib png/lib "*.a")
|
harvest_rpath_python(
|
||||||
harvest(pugixml/include pugixml/include "*.hpp")
|
openvdb/lib/python${PYTHON_SHORT_VERSION}
|
||||||
harvest(pugixml/lib pugixml/lib "*.a")
|
python/lib/python${PYTHON_SHORT_VERSION}
|
||||||
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
|
"*pyopenvdb*"
|
||||||
harvest(python/include python/include "*h")
|
)
|
||||||
harvest(python/lib python/lib "*")
|
harvest(xr_openxr_sdk/include/openxr xr_openxr_sdk/include/openxr "*.h")
|
||||||
harvest(sdl/include/SDL2 sdl/include "*.h")
|
harvest(xr_openxr_sdk/lib xr_openxr_sdk/lib "*.a")
|
||||||
harvest(sdl/lib sdl/lib "libSDL2.a")
|
harvest_rpath_bin(osl/bin osl/bin "oslc")
|
||||||
harvest(sndfile/include sndfile/include "*.h")
|
harvest(osl/include osl/include "*.h")
|
||||||
harvest(sndfile/lib sndfile/lib "*.a")
|
harvest(osl/lib osl/lib "*.a")
|
||||||
harvest(spnav/include spnav/include "*.h")
|
harvest(osl/share/OSL/shaders osl/share/OSL/shaders "*.h")
|
||||||
harvest(spnav/lib spnav/lib "*.a")
|
harvest(png/include png/include "*.h")
|
||||||
harvest(tbb/include tbb/include "*.h")
|
harvest(png/lib png/lib "*.a")
|
||||||
harvest_rpath_lib(tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}")
|
harvest(pugixml/include pugixml/include "*.hpp")
|
||||||
harvest(theora/lib ffmpeg/lib "*.a")
|
harvest(pugixml/lib pugixml/lib "*.a")
|
||||||
harvest(tiff/include tiff/include "*.h")
|
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}")
|
||||||
harvest(tiff/lib tiff/lib "*.a")
|
harvest(python/include python/include "*h")
|
||||||
harvest(vorbis/lib ffmpeg/lib "*.a")
|
harvest(python/lib python/lib "*")
|
||||||
harvest(opus/lib ffmpeg/lib "*.a")
|
harvest(sdl/include/SDL2 sdl/include "*.h")
|
||||||
harvest(vpx/lib ffmpeg/lib "*.a")
|
harvest(sdl/lib sdl/lib "libSDL2.a")
|
||||||
harvest(x264/lib ffmpeg/lib "*.a")
|
harvest(sndfile/include sndfile/include "*.h")
|
||||||
harvest(xvidcore/lib ffmpeg/lib "*.a")
|
harvest(sndfile/lib sndfile/lib "*.a")
|
||||||
harvest(aom/lib ffmpeg/lib "*.a")
|
harvest(spnav/include spnav/include "*.h")
|
||||||
harvest(webp/lib webp/lib "*.a")
|
harvest(spnav/lib spnav/lib "*.a")
|
||||||
harvest(webp/include webp/include "*.h")
|
harvest(tbb/include tbb/include "*.h")
|
||||||
harvest(usd/include usd/include "*.h")
|
harvest_rpath_lib(tbb/lib tbb/lib "libtbb${SHAREDLIBEXT}")
|
||||||
harvest_rpath_lib(usd/lib usd/lib "libusd_ms${SHAREDLIBEXT}")
|
harvest(theora/lib ffmpeg/lib "*.a")
|
||||||
harvest(usd/lib/usd usd/lib/usd "*")
|
harvest(tiff/include tiff/include "*.h")
|
||||||
harvest_rpath_python(usd/lib/python/pxr python/lib/python${PYTHON_SHORT_VERSION}/site-packages/pxr "*")
|
harvest(tiff/lib tiff/lib "*.a")
|
||||||
harvest(usd/plugin usd/plugin "*")
|
harvest(vorbis/lib ffmpeg/lib "*.a")
|
||||||
harvest(materialx/include materialx/include "*.h")
|
harvest(opus/lib ffmpeg/lib "*.a")
|
||||||
harvest(materialx/lib materialx/lib "*")
|
harvest(vpx/lib ffmpeg/lib "*.a")
|
||||||
harvest(materialx/libraries materialx/libraries "*")
|
harvest(x264/lib ffmpeg/lib "*.a")
|
||||||
harvest(materialx/python materialx/python "*")
|
harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||||
harvest(materialx/lib/cmake/MaterialX materialx/lib/cmake/MaterialX "*.cmake")
|
harvest(aom/lib ffmpeg/lib "*.a")
|
||||||
harvest_rpath_python(materialx/python/MaterialX python/lib/python${PYTHON_SHORT_VERSION}/site-packages/MaterialX "*")
|
harvest(webp/lib webp/lib "*.a")
|
||||||
# We do not need anything from the resources folder, but the MaterialX config
|
harvest(webp/include webp/include "*.h")
|
||||||
# file will complain if the folder does not exist, so just copy the readme.md
|
harvest(usd/include usd/include "*.h")
|
||||||
# files to ensure the folder will exist.
|
harvest_rpath_lib(usd/lib usd/lib "libusd_ms${SHAREDLIBEXT}")
|
||||||
harvest(materialx/resources materialx/resources "README.md")
|
harvest(usd/lib/usd usd/lib/usd "*")
|
||||||
harvest(potrace/include potrace/include "*.h")
|
harvest_rpath_python(
|
||||||
harvest(potrace/lib potrace/lib "*.a")
|
usd/lib/python/pxr
|
||||||
harvest(haru/include haru/include "*.h")
|
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/pxr
|
||||||
harvest(haru/lib haru/lib "*.a")
|
"*"
|
||||||
harvest(zstd/include zstd/include "*.h")
|
)
|
||||||
harvest(zstd/lib zstd/lib "*.a")
|
harvest(usd/plugin usd/plugin "*")
|
||||||
|
harvest(materialx/include materialx/include "*.h")
|
||||||
|
harvest_rpath_lib(materialx/lib materialx/lib "*${SHAREDLIBEXT}*")
|
||||||
|
harvest(materialx/libraries materialx/libraries "*")
|
||||||
|
harvest(materialx/lib/cmake/MaterialX materialx/lib/cmake/MaterialX "*.cmake")
|
||||||
|
harvest_rpath_python(
|
||||||
|
materialx/python/MaterialX
|
||||||
|
python/lib/python${PYTHON_SHORT_VERSION}/site-packages/MaterialX
|
||||||
|
"*"
|
||||||
|
)
|
||||||
|
# We do not need anything from the resources folder, but the MaterialX config
|
||||||
|
# file will complain if the folder does not exist, so just copy the readme.md
|
||||||
|
# files to ensure the folder will exist.
|
||||||
|
harvest(materialx/resources materialx/resources "README.md")
|
||||||
|
harvest(potrace/include potrace/include "*.h")
|
||||||
|
harvest(potrace/lib potrace/lib "*.a")
|
||||||
|
harvest(haru/include haru/include "*.h")
|
||||||
|
harvest(haru/lib haru/lib "*.a")
|
||||||
|
harvest(zstd/include zstd/include "*.h")
|
||||||
|
harvest(zstd/lib zstd/lib "*.a")
|
||||||
|
harvest(shaderc shaderc "*")
|
||||||
|
harvest(vulkan_headers vulkan "*")
|
||||||
|
harvest_rpath_lib(vulkan_loader/lib vulkan/lib "*${SHAREDLIBEXT}*")
|
||||||
|
if(APPLE)
|
||||||
|
harvest(vulkan_loader/loader vulkan/loader "*")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
harvest(libglu/lib mesa/lib "*${SHAREDLIBEXT}*")
|
harvest(libglu/lib mesa/lib "*${SHAREDLIBEXT}*")
|
||||||
harvest(mesa/lib64 mesa/lib "*${SHAREDLIBEXT}*")
|
harvest(mesa/lib64 mesa/lib "*${SHAREDLIBEXT}*")
|
||||||
|
|
||||||
harvest(dpcpp dpcpp "*")
|
harvest(dpcpp dpcpp "*")
|
||||||
harvest(igc dpcpp/lib/igc "*")
|
harvest(igc dpcpp/lib/igc "*")
|
||||||
harvest(ocloc dpcpp/lib/ocloc "*")
|
harvest(ocloc dpcpp/lib/ocloc "*")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -34,21 +34,21 @@ elseif(UNIX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ISPC_EXTRA_ARGS
|
set(ISPC_EXTRA_ARGS
|
||||||
-DISPC_NO_DUMPS=On
|
-DISPC_NO_DUMPS=On
|
||||||
-DISPC_INCLUDE_EXAMPLES=Off
|
-DISPC_INCLUDE_EXAMPLES=Off
|
||||||
-DISPC_INCLUDE_TESTS=Off
|
-DISPC_INCLUDE_TESTS=Off
|
||||||
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
|
-DLLVM_ROOT=${LIBDIR}/llvm/lib/cmake/llvm
|
||||||
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
|
-DLLVM_LIBRARY_DIR=${LIBDIR}/llvm/lib
|
||||||
-DCLANG_EXECUTABLE=${LIBDIR}/llvm/bin/clang
|
-DCLANG_EXECUTABLE=${LIBDIR}/llvm/bin/clang
|
||||||
-DCLANGPP_EXECUTABLE=${LIBDIR}/llvm/bin/clang++
|
-DCLANGPP_EXECUTABLE=${LIBDIR}/llvm/bin/clang++
|
||||||
-DISPC_INCLUDE_TESTS=Off
|
-DISPC_INCLUDE_TESTS=Off
|
||||||
-DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib
|
-DCLANG_LIBRARY_DIR=${LIBDIR}/llvm/lib
|
||||||
-DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include
|
-DCLANG_INCLUDE_DIRS=${LIBDIR}/llvm/include
|
||||||
-DPython3_ROOT_DIR=${LIBDIR}/python/
|
-DPython3_ROOT_DIR=${LIBDIR}/python/
|
||||||
-DPython3_EXECUTABLE=${PYTHON_BINARY}
|
-DPython3_EXECUTABLE=${PYTHON_BINARY}
|
||||||
${ISPC_EXTRA_ARGS_WIN}
|
${ISPC_EXTRA_ARGS_WIN}
|
||||||
${ISPC_EXTRA_ARGS_APPLE}
|
${ISPC_EXTRA_ARGS_APPLE}
|
||||||
${ISPC_EXTRA_ARGS_UNIX}
|
${ISPC_EXTRA_ARGS_UNIX}
|
||||||
)
|
)
|
||||||
|
|
||||||
ExternalProject_Add(external_ispc
|
ExternalProject_Add(external_ispc
|
||||||
|
@@ -33,6 +33,8 @@ set(MESA_EXTRA_FLAGS
|
|||||||
# At some point we will likely want to support Wayland.
|
# At some point we will likely want to support Wayland.
|
||||||
# Disable for now since it's not officially supported.
|
# Disable for now since it's not officially supported.
|
||||||
-Dplatforms=x11
|
-Dplatforms=x11
|
||||||
|
# Needed to find the local expat.
|
||||||
|
--pkg-config-path=${LIBDIR}/expat/lib/pkgconfig
|
||||||
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
|
--native-file ${BUILD_DIR}/mesa/tmp/native-file.ini
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -53,4 +55,8 @@ add_dependencies(
|
|||||||
external_mesa
|
external_mesa
|
||||||
ll
|
ll
|
||||||
external_zlib
|
external_zlib
|
||||||
|
# Run-time dependency.
|
||||||
|
external_expat
|
||||||
|
# Needed for `MESON`.
|
||||||
|
external_python_site_packages
|
||||||
)
|
)
|
||||||
|
@@ -26,9 +26,9 @@ else()
|
|||||||
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
-DLIBXML2_INCLUDE_DIR=${LIBDIR}/xml2/include/libxml2
|
||||||
)
|
)
|
||||||
if(BUILD_MODE STREQUAL Release)
|
if(BUILD_MODE STREQUAL Release)
|
||||||
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2s.lib)
|
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2s.lib)
|
||||||
else()
|
else()
|
||||||
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2sd.lib)
|
list(APPEND OPENCOLLADA_EXTRA_ARGS -DLIBXML2_LIBRARIES=${LIBDIR}/xml2/lib/libxml2sd.lib)
|
||||||
endif()
|
endif()
|
||||||
set(PATCH_MAYBE_DOS2UNIX_CMD)
|
set(PATCH_MAYBE_DOS2UNIX_CMD)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -105,10 +105,10 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
ExternalProject_Add_Step(external_opencolorio after_install
|
ExternalProject_Add_Step(external_opencolorio after_install
|
||||||
COMMAND cp ${LIBDIR}/yamlcpp/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/
|
COMMAND cp ${LIBDIR}/yamlcpp/lib/libyaml-cpp.a ${LIBDIR}/opencolorio/lib/
|
||||||
COMMAND cp ${LIBDIR}/expat/lib/libexpat.a ${LIBDIR}/opencolorio/lib/
|
COMMAND cp ${LIBDIR}/expat/lib/libexpat.a ${LIBDIR}/opencolorio/lib/
|
||||||
COMMAND cp ${LIBDIR}/pystring/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
|
COMMAND cp ${LIBDIR}/pystring/lib/libpystring.a ${LIBDIR}/opencolorio/lib/
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -39,8 +39,10 @@ if(MSVC)
|
|||||||
)
|
)
|
||||||
if(BUILD_MODE STREQUAL Release)
|
if(BUILD_MODE STREQUAL Release)
|
||||||
ExternalProject_Add_Step(external_openjpeg_msvc after_install
|
ExternalProject_Add_Step(external_openjpeg_msvc after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
COMMAND
|
||||||
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
|
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/lib ${HARVEST_TARGET}/openjpeg/lib &&
|
||||||
|
${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/openjpeg_msvc/include ${HARVEST_TARGET}/openjpeg/include
|
||||||
|
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
# library itself does not depend on them, so should give no problems.
|
# library itself does not depend on them, so should give no problems.
|
||||||
|
|
||||||
set(OPENPGL_EXTRA_ARGS
|
set(OPENPGL_EXTRA_ARGS
|
||||||
-DOPENPGL_BUILD_STATIC=ON
|
-DOPENPGL_BUILD_STATIC=ON
|
||||||
-DOPENPGL_TBB_ROOT=${LIBDIR}/tbb
|
-DOPENPGL_TBB_ROOT=${LIBDIR}/tbb
|
||||||
-DTBB_ROOT=${LIBDIR}/tbb
|
-DTBB_ROOT=${LIBDIR}/tbb
|
||||||
-DCMAKE_DEBUG_POSTFIX=_d
|
-DCMAKE_DEBUG_POSTFIX=_d
|
||||||
)
|
)
|
||||||
|
|
||||||
if(TBB_STATIC_LIBRARY)
|
if(TBB_STATIC_LIBRARY)
|
||||||
@@ -18,17 +18,17 @@ if(TBB_STATIC_LIBRARY)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(external_openpgl
|
ExternalProject_Add(external_openpgl
|
||||||
URL file://${PACKAGE_DIR}/${OPENPGL_FILE}
|
URL file://${PACKAGE_DIR}/${OPENPGL_FILE}
|
||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
URL_HASH ${OPENPGL_HASH_TYPE}=${OPENPGL_HASH}
|
URL_HASH ${OPENPGL_HASH_TYPE}=${OPENPGL_HASH}
|
||||||
PREFIX ${BUILD_DIR}/openpgl
|
PREFIX ${BUILD_DIR}/openpgl
|
||||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openpgl ${DEFAULT_CMAKE_FLAGS} ${OPENPGL_EXTRA_ARGS}
|
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openpgl ${DEFAULT_CMAKE_FLAGS} ${OPENPGL_EXTRA_ARGS}
|
||||||
INSTALL_DIR ${LIBDIR}/openpgl
|
INSTALL_DIR ${LIBDIR}/openpgl
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(
|
add_dependencies(
|
||||||
external_openpgl
|
external_openpgl
|
||||||
external_tbb
|
external_tbb
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@@ -117,7 +117,7 @@ else()
|
|||||||
set(LIBEXT ".a")
|
set(LIBEXT ".a")
|
||||||
set(LIBPREFIX "lib")
|
set(LIBPREFIX "lib")
|
||||||
set(MESON ${LIBDIR}/python/bin/meson)
|
set(MESON ${LIBDIR}/python/bin/meson)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(SHAREDLIBEXT ".dylib")
|
set(SHAREDLIBEXT ".dylib")
|
||||||
|
|
||||||
# Use same Xcode detection as Blender itself.
|
# Use same Xcode detection as Blender itself.
|
||||||
|
@@ -15,8 +15,8 @@ if((WIN32 AND BUILD_MODE STREQUAL Release) OR UNIX)
|
|||||||
)
|
)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
ExternalProject_Add_Step(external_potrace after_install
|
ExternalProject_Add_Step(external_potrace after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/potrace ${HARVEST_TARGET}/potrace
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@@ -2,37 +2,36 @@
|
|||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
||||||
if(MSVC14) # vs2015 has timespec
|
if(MSVC14) # vs2015 has timespec
|
||||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
|
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H /D_TIMESPEC_DEFINED ")
|
||||||
else() # everything before doesn't
|
else() # everything before doesn't
|
||||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
|
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
|
||||||
|
|
||||||
ExternalProject_Add(external_pthreads
|
ExternalProject_Add(external_pthreads
|
||||||
URL file://${PACKAGE_DIR}/${PTHREADS_FILE}
|
URL file://${PACKAGE_DIR}/${PTHREADS_FILE}
|
||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
URL_HASH ${PTHREADS_HASH_TYPE}=${PTHREADS_HASH}
|
URL_HASH ${PTHREADS_HASH_TYPE}=${PTHREADS_HASH}
|
||||||
PREFIX ${BUILD_DIR}/pthreads
|
PREFIX ${BUILD_DIR}/pthreads
|
||||||
CONFIGURE_COMMAND echo .
|
CONFIGURE_COMMAND echo .
|
||||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
||||||
BUILD_COMMAND ${PTHREADS_BUILD}
|
BUILD_COMMAND ${PTHREADS_BUILD}
|
||||||
INSTALL_COMMAND COMMAND
|
INSTALL_COMMAND COMMAND
|
||||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
|
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
|
||||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
|
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/pthread.h ${LIBDIR}/pthreads/inc/pthread.h &&
|
||||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
|
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/sched.h ${LIBDIR}/pthreads/inc/sched.h &&
|
||||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
|
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/semaphore.h ${LIBDIR}/pthreads/inc/semaphore.h &&
|
||||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
|
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/_ptw32.h ${LIBDIR}/pthreads/inc/_ptw32.h
|
||||||
INSTALL_DIR ${LIBDIR}/pthreads
|
INSTALL_DIR ${LIBDIR}/pthreads
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILD_MODE STREQUAL Release)
|
||||||
|
ExternalProject_Add_Step(external_pthreads after_install
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
|
||||||
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
if(BUILD_MODE STREQUAL Release)
|
|
||||||
ExternalProject_Add_Step(external_pthreads after_install
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/inc/ ${HARVEST_TARGET}/pthreads/include/
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pthreads/lib/ ${HARVEST_TARGET}/pthreads/lib
|
|
||||||
DEPENDEES install
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
@@ -32,13 +32,11 @@ if(WIN32)
|
|||||||
# Python will download its own deps and there's very little we can do about
|
# Python will download its own deps and there's very little we can do about
|
||||||
# that beyond placing some code in their externals dir before it tries.
|
# that beyond placing some code in their externals dir before it tries.
|
||||||
# the foldernames *HAVE* to match the ones inside pythons get_externals.cmd.
|
# the foldernames *HAVE* to match the ones inside pythons get_externals.cmd.
|
||||||
# python 3.10.8 still ships zlib 1.2.12, replace it with our 1.2.13
|
|
||||||
# copy until they update. Same rules apply to openssl foldernames HAVE to match
|
|
||||||
# regardless of the version actually in there.
|
# regardless of the version actually in there.
|
||||||
PATCH_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
|
PATCH_COMMAND mkdir ${PYTHON_EXTERNALS_FOLDER_DOS} &&
|
||||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.12 ${ZLIB_SOURCE_FOLDER_DOS} &&
|
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\zlib-1.2.13 ${ZLIB_SOURCE_FOLDER_DOS} &&
|
||||||
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\openssl-1.1.1q ${SSL_SOURCE_FOLDER_DOS} &&
|
mklink /J ${PYTHON_EXTERNALS_FOLDER_DOS}\\openssl-1.1.1q ${SSL_SOURCE_FOLDER_DOS} &&
|
||||||
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${PYTHON_EXTERNALS_FOLDER}/zlib-1.2.12/zconf.h &&
|
${CMAKE_COMMAND} -E copy ${ZLIB_SOURCE_FOLDER}/../external_zlib-build/zconf.h ${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_CMD} --verbose -p1 -d ${BUILD_DIR}/python/src/external_python < ${PATCH_DIR}/python_windows.diff
|
||||||
CONFIGURE_COMMAND echo "."
|
CONFIGURE_COMMAND echo "."
|
||||||
BUILD_COMMAND ${CONFIGURE_ENV_MSVC} && cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && set LDFLAGS=/DEBUG && call prepare_ssl.bat && call build.bat -e -p x64 -c ${BUILD_MODE}
|
BUILD_COMMAND ${CONFIGURE_ENV_MSVC} && cd ${BUILD_DIR}/python/src/external_python/pcbuild/ && set IncludeTkinter=false && set LDFLAGS=/DEBUG && call prepare_ssl.bat && call build.bat -e -p x64 -c ${BUILD_MODE}
|
||||||
|
@@ -5,7 +5,11 @@ if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
|||||||
# zstandard is determined to build and link release mode libs in a debug
|
# zstandard is determined to build and link release mode libs in a debug
|
||||||
# configuration, the only way to make it happy is to bend to its will
|
# configuration, the only way to make it happy is to bend to its will
|
||||||
# and give it a library to link with.
|
# and give it a library to link with.
|
||||||
set(PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib ${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib)
|
set(
|
||||||
|
PIP_CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}_d.lib
|
||||||
|
${LIBDIR}/python/libs/python${PYTHON_SHORT_VERSION_NO_DOTS}.lib
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
set(PIP_CONFIGURE_COMMAND echo ".")
|
set(PIP_CONFIGURE_COMMAND echo ".")
|
||||||
endif()
|
endif()
|
||||||
@@ -15,7 +19,23 @@ ExternalProject_Add(external_python_site_packages
|
|||||||
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
|
CONFIGURE_COMMAND ${PIP_CONFIGURE_COMMAND}
|
||||||
BUILD_COMMAND ""
|
BUILD_COMMAND ""
|
||||||
PREFIX ${BUILD_DIR}/site_packages
|
PREFIX ${BUILD_DIR}/site_packages
|
||||||
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA} cython==${CYTHON_VERSION} idna==${IDNA_VERSION} charset-normalizer==${CHARSET_NORMALIZER_VERSION} urllib3==${URLLIB3_VERSION} certifi==${CERTIFI_VERSION} requests==${REQUESTS_VERSION} zstandard==${ZSTANDARD_VERSION} autopep8==${AUTOPEP8_VERSION} pycodestyle==${PYCODESTYLE_VERSION} toml==${TOML_VERSION} meson==${MESON_VERSION} --no-binary :all:
|
|
||||||
|
# setuptools is downgraded to 63.2.0 (same as python 3.10.8) since numpy 1.23.x seemingly has
|
||||||
|
# issues building on windows with the newer versions that ships with python 3.10.9+
|
||||||
|
INSTALL_COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir ${SITE_PACKAGES_EXTRA}
|
||||||
|
setuptools==63.2.0
|
||||||
|
cython==${CYTHON_VERSION}
|
||||||
|
idna==${IDNA_VERSION}
|
||||||
|
charset-normalizer==${CHARSET_NORMALIZER_VERSION}
|
||||||
|
urllib3==${URLLIB3_VERSION}
|
||||||
|
certifi==${CERTIFI_VERSION}
|
||||||
|
requests==${REQUESTS_VERSION}
|
||||||
|
zstandard==${ZSTANDARD_VERSION}
|
||||||
|
autopep8==${AUTOPEP8_VERSION}
|
||||||
|
pycodestyle==${PYCODESTYLE_VERSION}
|
||||||
|
toml==${TOML_VERSION}
|
||||||
|
meson==${MESON_VERSION}
|
||||||
|
--no-binary :all:
|
||||||
)
|
)
|
||||||
|
|
||||||
if(USE_PIP_NUMPY)
|
if(USE_PIP_NUMPY)
|
||||||
|
@@ -1,20 +1,5 @@
|
|||||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation; either version 2
|
|
||||||
# of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ***** END GPL LICENSE BLOCK *****
|
|
||||||
set(SHADERC_EXTRA_ARGS
|
set(SHADERC_EXTRA_ARGS
|
||||||
-DSHADERC_SKIP_TESTS=On
|
-DSHADERC_SKIP_TESTS=On
|
||||||
-DSHADERC_SPIRV_TOOLS_DIR=${BUILD_DIR}/shaderc_spirv_tools/src/external_shaderc_spirv_tools
|
-DSHADERC_SPIRV_TOOLS_DIR=${BUILD_DIR}/shaderc_spirv_tools/src/external_shaderc_spirv_tools
|
||||||
@@ -60,5 +45,3 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,20 +1,4 @@
|
|||||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation; either version 2
|
|
||||||
# of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ***** END GPL LICENSE BLOCK *****
|
|
||||||
|
|
||||||
# These are build time requirements for shaderc. We only have to unpack these
|
# These are build time requirements for shaderc. We only have to unpack these
|
||||||
# shaderc will build them.
|
# shaderc will build them.
|
||||||
@@ -48,4 +32,3 @@ ExternalProject_Add(external_shaderc_spirv_tools
|
|||||||
BUILD_COMMAND echo .
|
BUILD_COMMAND echo .
|
||||||
INSTALL_COMMAND echo .
|
INSTALL_COMMAND echo .
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -1,9 +1,15 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
set(SNDFILE_EXTRA_ARGS)
|
set(SNDFILE_EXTRA_ARGS)
|
||||||
set(SNDFILE_ENV PKG_CONFIG_PATH=${mingw_LIBDIR}/ogg/lib/pkgconfig:${mingw_LIBDIR}/vorbis/lib/pkgconfig:${mingw_LIBDIR}/flac/lib/pkgconfig:${mingw_LIBDIR}/opus/lib/pkgconfig:${mingw_LIBDIR})
|
set(SNDFILE_ENV)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
set(SNDFILE_ENV "PKG_CONFIG_PATH=\
|
||||||
|
${mingw_LIBDIR}/ogg/lib/pkgconfig:\
|
||||||
|
${mingw_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||||
|
${mingw_LIBDIR}/flac/lib/pkgconfig:\
|
||||||
|
${mingw_LIBDIR}/opus/lib/pkgconfig"
|
||||||
|
)
|
||||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||||
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
||||||
@@ -41,10 +47,10 @@ endif()
|
|||||||
|
|
||||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||||
ExternalProject_Add_Step(external_sndfile after_install
|
ExternalProject_Add_Step(external_sndfile after_install
|
||||||
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
|
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
|
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
|
||||||
|
|
||||||
DEPENDEES install
|
DEPENDEES install
|
||||||
)
|
)
|
||||||
|
@@ -5,7 +5,20 @@ ExternalProject_Add(external_spnav
|
|||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
|
URL_HASH ${SPNAV_HASH_TYPE}=${SPNAV_HASH}
|
||||||
PREFIX ${BUILD_DIR}/spnav
|
PREFIX ${BUILD_DIR}/spnav
|
||||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/spnav --disable-shared --enable-static --with-pic
|
|
||||||
|
CONFIGURE_COMMAND
|
||||||
|
${CONFIGURE_ENV} &&
|
||||||
|
cd ${BUILD_DIR}/spnav/src/external_spnav/ &&
|
||||||
|
${CONFIGURE_COMMAND}
|
||||||
|
--prefix=${LIBDIR}/spnav
|
||||||
|
# X11 is not needed as Blender polls the device as part of the GHOST event loop.
|
||||||
|
# This is used to support `3dxserv`, however this is no longer supported by 3DCONNEXION.
|
||||||
|
# Disable so building without X11 is supported (WAYLAND only).
|
||||||
|
--disable-x11
|
||||||
|
--disable-shared
|
||||||
|
--enable-static
|
||||||
|
--with-pic
|
||||||
|
|
||||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
|
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make -j${MAKE_THREADS}
|
||||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
|
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/spnav/src/external_spnav/ && make install
|
||||||
INSTALL_DIR ${LIBDIR}/spnav
|
INSTALL_DIR ${LIBDIR}/spnav
|
||||||
|
@@ -34,7 +34,8 @@ elseif(UNIX)
|
|||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(USD_SHARED_LINKER_FLAGS "-Xlinker -undefined -Xlinker dynamic_lookup")
|
set(USD_SHARED_LINKER_FLAGS "-Xlinker -undefined -Xlinker dynamic_lookup")
|
||||||
list(APPEND USD_PLATFORM_FLAGS
|
list(APPEND USD_PLATFORM_FLAGS
|
||||||
-DCMAKE_SHARED_LINKER_FLAGS=${USD_SHARED_LINKER_FLAGS})
|
-DCMAKE_SHARED_LINKER_FLAGS=${USD_SHARED_LINKER_FLAGS}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -112,7 +113,7 @@ add_dependencies(
|
|||||||
# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
|
# Since USD 21.11 the libraries are prefixed with "usd_", i.e. "libusd_m.a" became "libusd_usd_m.a".
|
||||||
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
|
# See https://github.com/PixarAnimationStudios/USD/blob/release/CHANGELOG.md#2111---2021-11-01
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
if (USD_VERSION VERSION_LESS 21.11)
|
if(USD_VERSION VERSION_LESS 21.11)
|
||||||
set(PXR_LIB_PREFIX "")
|
set(PXR_LIB_PREFIX "")
|
||||||
else()
|
else()
|
||||||
set(PXR_LIB_PREFIX "usd_")
|
set(PXR_LIB_PREFIX "usd_")
|
||||||
|
@@ -195,12 +195,20 @@ set(TIFF_HASH_TYPE MD5)
|
|||||||
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
|
set(TIFF_FILE tiff-${TIFF_VERSION}.tar.gz)
|
||||||
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
|
set(TIFF_CPE "cpe:2.3:a:libtiff:libtiff:${TIFF_VERSION}:*:*:*:*:*:*:*")
|
||||||
|
|
||||||
set(OSL_VERSION 1.12.7.1)
|
# Recent commit from 1.13.0.2 under development, which includes string table
|
||||||
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/v${OSL_VERSION}.tar.gz)
|
# changes that make the Cycles OptiX implementation work. Official 1.12 OSL
|
||||||
set(OSL_HASH 53211da86c34ba6e0344998c1a6d219c)
|
# releases should also build but without OptiX support.
|
||||||
|
set(OSL_VERSION 1a7670600c8b08c2443a78d03c8c27e9a1149140)
|
||||||
|
set(OSL_URI https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/archive/${OSL_VERSION}.tar.gz)
|
||||||
|
set(OSL_HASH 7b6d6716b05d1addb92a8f47280bf77f)
|
||||||
set(OSL_HASH_TYPE MD5)
|
set(OSL_HASH_TYPE MD5)
|
||||||
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
|
set(OSL_FILE OpenShadingLanguage-${OSL_VERSION}.tar.gz)
|
||||||
|
|
||||||
|
# NOTE: When updating the python version, it's required to check the versions of
|
||||||
|
# it wants to use in PCbuild/get_externals.bat for the following dependencies:
|
||||||
|
# BZIP2, FFI, SQLITE and change the versions in this file as well. For compliance
|
||||||
|
# reasons there can be no exceptions to this.
|
||||||
|
|
||||||
set(PYTHON_VERSION 3.10.9)
|
set(PYTHON_VERSION 3.10.9)
|
||||||
set(PYTHON_SHORT_VERSION 3.10)
|
set(PYTHON_SHORT_VERSION 3.10)
|
||||||
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
|
set(PYTHON_SHORT_VERSION_NO_DOTS 310)
|
||||||
@@ -224,26 +232,40 @@ set(OPENVDB_HASH 64301c737e16b26c8f3085a31e6397e9)
|
|||||||
set(OPENVDB_HASH_TYPE MD5)
|
set(OPENVDB_HASH_TYPE MD5)
|
||||||
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
|
set(OPENVDB_FILE openvdb-${OPENVDB_VERSION}.tar.gz)
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Python Modules
|
||||||
|
|
||||||
|
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||||
set(IDNA_VERSION 3.3)
|
set(IDNA_VERSION 3.3)
|
||||||
|
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||||
set(CHARSET_NORMALIZER_VERSION 2.0.10)
|
set(CHARSET_NORMALIZER_VERSION 2.0.10)
|
||||||
|
# Needed by: `requests` module (so the version doesn't change on rebuild).
|
||||||
set(URLLIB3_VERSION 1.26.8)
|
set(URLLIB3_VERSION 1.26.8)
|
||||||
set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
|
set(URLLIB3_CPE "cpe:2.3:a:urllib3:urllib3:${URLLIB3_VERSION}:*:*:*:*:*:*:*")
|
||||||
|
# Needed by: Python's `requests` module (so add-ons can authenticate against trusted certificates).
|
||||||
set(CERTIFI_VERSION 2021.10.8)
|
set(CERTIFI_VERSION 2021.10.8)
|
||||||
|
# Needed by: Some of Blender's add-ons (to support convenient interaction with online services).
|
||||||
set(REQUESTS_VERSION 2.27.1)
|
set(REQUESTS_VERSION 2.27.1)
|
||||||
|
# Needed by: Python's `numpy` module (used by some add-ons).
|
||||||
set(CYTHON_VERSION 0.29.30)
|
set(CYTHON_VERSION 0.29.30)
|
||||||
# The version of the zstd library used to build the Python package should match ZSTD_VERSION
|
# Needed by: Python scripts that read `.blend` files, as files may use Z-standard compression.
|
||||||
|
# The version of the ZSTD library used to build the Python package should match ZSTD_VERSION
|
||||||
# defined below. At this time of writing, 0.17.0 was already released,
|
# defined below. At this time of writing, 0.17.0 was already released,
|
||||||
# but built against zstd 1.5.1, while we use 1.5.0.
|
# but built against ZSTD 1.5.1, while we use 1.5.0.
|
||||||
set(ZSTANDARD_VERSION 0.16.0)
|
set(ZSTANDARD_VERSION 0.16.0)
|
||||||
|
# Auto-format Python source (developer tool, not used by Blender at run-time).
|
||||||
set(AUTOPEP8_VERSION 1.6.0)
|
set(AUTOPEP8_VERSION 1.6.0)
|
||||||
|
# Needed by: `autopep8` (so the version doesn't change on rebuild).
|
||||||
set(PYCODESTYLE_VERSION 2.8.0)
|
set(PYCODESTYLE_VERSION 2.8.0)
|
||||||
|
# Needed by: `autopep8` (so the version doesn't change on rebuild).
|
||||||
set(TOML_VERSION 0.10.2)
|
set(TOML_VERSION 0.10.2)
|
||||||
|
# Build system for other packages (not used by Blender at run-time).
|
||||||
set(MESON_VERSION 0.63.0)
|
set(MESON_VERSION 0.63.0)
|
||||||
|
|
||||||
set(NUMPY_VERSION 1.23.2)
|
set(NUMPY_VERSION 1.23.5)
|
||||||
set(NUMPY_SHORT_VERSION 1.23)
|
set(NUMPY_SHORT_VERSION 1.23)
|
||||||
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz)
|
set(NUMPY_URI https://github.com/numpy/numpy/releases/download/v${NUMPY_VERSION}/numpy-${NUMPY_VERSION}.tar.gz)
|
||||||
set(NUMPY_HASH 9bf2a361509797de14ceee607387fe0f)
|
set(NUMPY_HASH 8b2692a511a3795f3af8af2cd7566a15)
|
||||||
set(NUMPY_HASH_TYPE MD5)
|
set(NUMPY_HASH_TYPE MD5)
|
||||||
set(NUMPY_FILE numpy-${NUMPY_VERSION}.tar.gz)
|
set(NUMPY_FILE numpy-${NUMPY_VERSION}.tar.gz)
|
||||||
set(NUMPY_CPE "cpe:2.3:a:numpy:numpy:${NUMPY_VERSION}:*:*:*:*:*:*:*")
|
set(NUMPY_CPE "cpe:2.3:a:numpy:numpy:${NUMPY_VERSION}:*:*:*:*:*:*:*")
|
||||||
@@ -337,7 +359,7 @@ set(SNDFILE_VERSION 1.1.0)
|
|||||||
set(SNDFILE_URI https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-${SNDFILE_VERSION}.tar.xz)
|
set(SNDFILE_URI https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-${SNDFILE_VERSION}.tar.xz)
|
||||||
set(SNDFILE_HASH e63dead2b4f0aaf323687619d007ee6a)
|
set(SNDFILE_HASH e63dead2b4f0aaf323687619d007ee6a)
|
||||||
set(SNDFILE_HASH_TYPE MD5)
|
set(SNDFILE_HASH_TYPE MD5)
|
||||||
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.gz)
|
set(SNDFILE_FILE libsndfile-${SNDFILE_VERSION}.tar.xz)
|
||||||
set(SNDFILE_CPE "cpe:2.3:a:libsndfile_project:libsndfile:${SNDFILE_VERSION}:*:*:*:*:*:*:*")
|
set(SNDFILE_CPE "cpe:2.3:a:libsndfile_project:libsndfile:${SNDFILE_VERSION}:*:*:*:*:*:*:*")
|
||||||
|
|
||||||
set(WEBP_VERSION 1.2.2)
|
set(WEBP_VERSION 1.2.2)
|
||||||
@@ -347,9 +369,9 @@ set(WEBP_HASH_TYPE MD5)
|
|||||||
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
|
set(WEBP_FILE libwebp-${WEBP_VERSION}.tar.gz)
|
||||||
set(WEBP_CPE "cpe:2.3:a:webmproject:libwebp:${WEBP_VERSION}:*:*:*:*:*:*:*")
|
set(WEBP_CPE "cpe:2.3:a:webmproject:libwebp:${WEBP_VERSION}:*:*:*:*:*:*:*")
|
||||||
|
|
||||||
set(SPNAV_VERSION 0.2.3)
|
set(SPNAV_VERSION 1.1)
|
||||||
set(SPNAV_URI http://downloads.sourceforge.net/project/spacenav/spacenav%20library%20%28SDK%29/libspnav%20${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
set(SPNAV_URI https://github.com/FreeSpacenav/libspnav/releases/download/v${SPNAV_VERSION}/libspnav-${SPNAV_VERSION}.tar.gz)
|
||||||
set(SPNAV_HASH 44d840540d53326d4a119c0f1aa7bf0a)
|
set(SPNAV_HASH 7c0032034672dfba3c4bb9b49a440e70)
|
||||||
set(SPNAV_HASH_TYPE MD5)
|
set(SPNAV_HASH_TYPE MD5)
|
||||||
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
|
set(SPNAV_FILE libspnav-${SPNAV_VERSION}.tar.gz)
|
||||||
|
|
||||||
@@ -437,9 +459,7 @@ set(LZMA_HASH 5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df)
|
|||||||
set(LZMA_HASH_TYPE SHA256)
|
set(LZMA_HASH_TYPE SHA256)
|
||||||
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
|
set(LZMA_FILE xz-${LZMA_VERSION}.tar.bz2)
|
||||||
|
|
||||||
# NOTE: This will *HAVE* to match the version python ships on windows which
|
# NOTE: Python's build has been modified to use our ssl version.
|
||||||
# is hardcoded in pythons PCbuild/get_externals.bat. For compliance reasons there
|
|
||||||
# can be no exceptions to this.
|
|
||||||
set(SSL_VERSION 1.1.1q)
|
set(SSL_VERSION 1.1.1q)
|
||||||
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
|
set(SSL_URI https://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz)
|
||||||
set(SSL_HASH d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca)
|
set(SSL_HASH d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca)
|
||||||
@@ -450,10 +470,10 @@ set(SSL_CPE "cpe:2.3:a:openssl:openssl:${SSL_VERSION}:*:*:*:*:*:*:*")
|
|||||||
# Note: This will *HAVE* to match the version python ships on windows which
|
# Note: This will *HAVE* to match the version python ships on windows which
|
||||||
# is hardcoded in pythons PCbuild/get_externals.bat for compliance reasons there
|
# is hardcoded in pythons PCbuild/get_externals.bat for compliance reasons there
|
||||||
# can be no exceptions to this.
|
# can be no exceptions to this.
|
||||||
set(SQLITE_VERSION 3.37.2)
|
set(SQLITE_VERSION 3.39.4)
|
||||||
set(SQLLITE_LONG_VERSION 3370200)
|
set(SQLLITE_LONG_VERSION 3390400)
|
||||||
set(SQLITE_URI https://www.sqlite.org/2022/sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
set(SQLITE_URI https://www.sqlite.org/2022/sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
||||||
set(SQLITE_HASH e56faacadfb4154f8fbd0f2a3f827d13706b70a1)
|
set(SQLITE_HASH c4c5c39269d1b9bb1487cff580c1f583608229b2)
|
||||||
set(SQLITE_HASH_TYPE SHA1)
|
set(SQLITE_HASH_TYPE SHA1)
|
||||||
set(SQLITE_FILE sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
set(SQLITE_FILE sqlite-autoconf-${SQLLITE_LONG_VERSION}.tar.gz)
|
||||||
set(SQLITE_CPE "cpe:2.3:a:sqlite:sqlite:${SQLITE_VERSION}:*:*:*:*:*:*:*")
|
set(SQLITE_CPE "cpe:2.3:a:sqlite:sqlite:${SQLITE_VERSION}:*:*:*:*:*:*:*")
|
||||||
|
@@ -1,20 +1,4 @@
|
|||||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation; either version 2
|
|
||||||
# of the License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software Foundation,
|
|
||||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
#
|
|
||||||
# ***** END GPL LICENSE BLOCK *****
|
|
||||||
|
|
||||||
set(VULKAN_HEADERS_EXTRA_ARGS)
|
set(VULKAN_HEADERS_EXTRA_ARGS)
|
||||||
|
|
||||||
@@ -30,6 +14,17 @@ set(VULKAN_LOADER_EXTRA_ARGS
|
|||||||
-DVULKAN_HEADERS_INSTALL_DIR=${LIBDIR}/vulkan_headers
|
-DVULKAN_HEADERS_INSTALL_DIR=${LIBDIR}/vulkan_headers
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(UNIX AND NOT APPLE)
|
||||||
|
# These are used in `cmake/FindWayland.cmake` from `external_vulkan_loader`.
|
||||||
|
# NOTE: When upgrading to CMAKE 3.22 we it would be cleaner to use: `PKG_CONFIG_ARGN`,
|
||||||
|
# so `pkgconfig` would find wayland.
|
||||||
|
set(VULKAN_LOADER_EXTRA_ARGS
|
||||||
|
${VULKAN_LOADER_EXTRA_ARGS}
|
||||||
|
-DPKG_WAYLAND_INCLUDE_DIRS=${LIBDIR}/wayland/include
|
||||||
|
-DPKG_WAYLAND_LIBRARY_DIRS=${LIBDIR}/wayland/lib64
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(external_vulkan_loader
|
ExternalProject_Add(external_vulkan_loader
|
||||||
URL file://${PACKAGE_DIR}/${VULKAN_LOADER_FILE}
|
URL file://${PACKAGE_DIR}/${VULKAN_LOADER_FILE}
|
||||||
URL_HASH ${VULKAN_LOADER_HASH_TYPE}=${VULKAN_LOADER_HASH}
|
URL_HASH ${VULKAN_LOADER_HASH_TYPE}=${VULKAN_LOADER_HASH}
|
||||||
@@ -43,7 +38,12 @@ add_dependencies(
|
|||||||
external_vulkan_headers
|
external_vulkan_headers
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(UNIX AND NOT APPLE)
|
||||||
|
add_dependencies(
|
||||||
|
external_vulkan_loader
|
||||||
|
external_wayland
|
||||||
|
)
|
||||||
|
elseif(WIN32)
|
||||||
if(BUILD_MODE STREQUAL Release)
|
if(BUILD_MODE STREQUAL Release)
|
||||||
ExternalProject_Add_Step(external_vulkan_loader after_install
|
ExternalProject_Add_Step(external_vulkan_loader after_install
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/vulkan_loader/ ${HARVEST_TARGET}/vulkan
|
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/vulkan_loader/ ${HARVEST_TARGET}/vulkan
|
||||||
@@ -52,4 +52,3 @@ if(WIN32)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -5,7 +5,6 @@ ExternalProject_Add(external_wayland
|
|||||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||||
URL_HASH ${WAYLAND_HASH_TYPE}=${WAYLAND_HASH}
|
URL_HASH ${WAYLAND_HASH_TYPE}=${WAYLAND_HASH}
|
||||||
PREFIX ${BUILD_DIR}/wayland
|
PREFIX ${BUILD_DIR}/wayland
|
||||||
PATCH_COMMAND ${PATCH_CMD} -d ${BUILD_DIR}/wayland/src/external_wayland < ${PATCH_DIR}/wayland.diff
|
|
||||||
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own LIBEXPAT & LIBXML2.
|
# Use `-E` so the `PKG_CONFIG_PATH` can be defined to link against our own LIBEXPAT & LIBXML2.
|
||||||
#
|
#
|
||||||
# NOTE: passing link args "ffi/lib" should not be needed, but
|
# NOTE: passing link args "ffi/lib" should not be needed, but
|
||||||
@@ -24,4 +23,7 @@ add_dependencies(
|
|||||||
external_expat
|
external_expat
|
||||||
external_xml2
|
external_xml2
|
||||||
external_ffi
|
external_ffi
|
||||||
|
|
||||||
|
# Needed for `MESON`.
|
||||||
|
external_python_site_packages
|
||||||
)
|
)
|
||||||
|
@@ -15,4 +15,6 @@ ExternalProject_Add(external_wayland_protocols
|
|||||||
add_dependencies(
|
add_dependencies(
|
||||||
external_wayland_protocols
|
external_wayland_protocols
|
||||||
external_wayland
|
external_wayland
|
||||||
|
# Needed for `MESON`.
|
||||||
|
external_python_site_packages
|
||||||
)
|
)
|
||||||
|
@@ -10,7 +10,8 @@ if(WIN32)
|
|||||||
set(YAMLCPP_EXTRA_ARGS
|
set(YAMLCPP_EXTRA_ARGS
|
||||||
${YAMLCPP_EXTRA_ARGS}
|
${YAMLCPP_EXTRA_ARGS}
|
||||||
-DBUILD_GMOCK=OFF
|
-DBUILD_GMOCK=OFF
|
||||||
-DYAML_MSVC_SHARED_RT=ON)
|
-DYAML_MSVC_SHARED_RT=ON
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(external_yamlcpp
|
ExternalProject_Add(external_yamlcpp
|
||||||
|
@@ -1,9 +1,23 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# macOS utility to remove all rpaths and add a new one.
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
# macOS utility to remove all `rpaths` and add a new one.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
# Strip version numbers from dependenciesm macOS notarizatiom fails
|
||||||
|
# with version symlinks.
|
||||||
|
def strip_lib_version(name):
|
||||||
|
name = re.sub(r'(\.[0-9]+)+.dylib', '.dylib', name)
|
||||||
|
name = re.sub(r'(\.[0-9]+)+.so', '.so', name)
|
||||||
|
name = re.sub(r'(\.[0-9]+)+.cpython', '.cpython', name)
|
||||||
|
return name
|
||||||
|
|
||||||
|
|
||||||
rpath = sys.argv[1]
|
rpath = sys.argv[1]
|
||||||
file = sys.argv[2]
|
file = sys.argv[2]
|
||||||
|
|
||||||
@@ -17,3 +31,18 @@ for i, token in enumerate(tokens):
|
|||||||
subprocess.run(['install_name_tool', '-delete_rpath', old_rpath, file])
|
subprocess.run(['install_name_tool', '-delete_rpath', old_rpath, file])
|
||||||
|
|
||||||
subprocess.run(['install_name_tool', '-add_rpath', rpath, file])
|
subprocess.run(['install_name_tool', '-add_rpath', rpath, file])
|
||||||
|
|
||||||
|
# Strip version from dependencies.
|
||||||
|
p = subprocess.run(['otool', '-L', file], capture_output=True)
|
||||||
|
tokens = p.stdout.split()
|
||||||
|
for i, token in enumerate(tokens):
|
||||||
|
token = token.decode("utf-8")
|
||||||
|
if token.startswith("@rpath"):
|
||||||
|
new_token = strip_lib_version(token)
|
||||||
|
subprocess.run(['install_name_tool', '-change', token, new_token, file])
|
||||||
|
|
||||||
|
# Strip version from library itself.
|
||||||
|
new_file = strip_lib_version(file)
|
||||||
|
new_id = '@rpath/' + os.path.basename(new_file)
|
||||||
|
os.rename(file, new_file)
|
||||||
|
subprocess.run(['install_name_tool', '-id', new_id, new_file])
|
||||||
|
@@ -39,15 +39,15 @@ with-all,with-opencollada,with-jack,with-pulseaudio,with-embree,with-oidn,with-n
|
|||||||
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,ver-level-zero:\
|
ver-ocio:,ver-oiio:,ver-llvm:,ver-osl:,ver-osd:,ver-openvdb:,ver-xr-openxr:,ver-level-zero:\
|
||||||
force-all,force-python,force-boost,force-tbb,\
|
force-all,force-python,force-boost,force-tbb,\
|
||||||
force-ocio,force-imath,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
force-ocio,force-imath,force-openexr,force-oiio,force-llvm,force-osl,force-osd,force-openvdb,\
|
||||||
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-usd,\
|
force-ffmpeg,force-opencollada,force-alembic,force-embree,force-oidn,force-materialx,force-usd,\
|
||||||
force-xr-openxr,force-level-zero,force-openpgl,\
|
force-xr-openxr,force-level-zero,force-openpgl,\
|
||||||
build-all,build-python,build-boost,build-tbb,\
|
build-all,build-python,build-boost,build-tbb,\
|
||||||
build-ocio,build-imath,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
build-ocio,build-imath,build-openexr,build-oiio,build-llvm,build-osl,build-osd,build-openvdb,\
|
||||||
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-usd,\
|
build-ffmpeg,build-opencollada,build-alembic,build-embree,build-oidn,build-materialx,build-usd,\
|
||||||
build-xr-openxr,build-level-zero,build-openpgl,\
|
build-xr-openxr,build-level-zero,build-openpgl,\
|
||||||
skip-python,skip-boost,skip-tbb,\
|
skip-python,skip-boost,skip-tbb,\
|
||||||
skip-ocio,skip-imath,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
skip-ocio,skip-imath,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,skip-openvdb,\
|
||||||
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-usd,\
|
skip-ffmpeg,skip-opencollada,skip-alembic,skip-embree,skip-oidn,skip-materialx,skip-usd,\
|
||||||
skip-xr-openxr,skip-level-zero,skip-openpgl \
|
skip-xr-openxr,skip-level-zero,skip-openpgl \
|
||||||
-- "$@" \
|
-- "$@" \
|
||||||
)
|
)
|
||||||
@@ -223,6 +223,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--build-ffmpeg
|
--build-ffmpeg
|
||||||
Force the build of FFMpeg.
|
Force the build of FFMpeg.
|
||||||
|
|
||||||
|
--build-materialx
|
||||||
|
Force the build of MaterialX.
|
||||||
|
|
||||||
--build-usd
|
--build-usd
|
||||||
Force the build of Universal Scene Description.
|
Force the build of Universal Scene Description.
|
||||||
|
|
||||||
@@ -296,6 +299,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--force-ffmpeg
|
--force-ffmpeg
|
||||||
Force the rebuild of FFMpeg.
|
Force the rebuild of FFMpeg.
|
||||||
|
|
||||||
|
--force-materialx
|
||||||
|
Force the rebuild of MaterialX.
|
||||||
|
|
||||||
--force-usd
|
--force-usd
|
||||||
Force the rebuild of Universal Scene Description.
|
Force the rebuild of Universal Scene Description.
|
||||||
|
|
||||||
@@ -362,6 +368,9 @@ ARGUMENTS_INFO="\"COMMAND LINE ARGUMENTS:
|
|||||||
--skip-ffmpeg
|
--skip-ffmpeg
|
||||||
Unconditionally skip FFMpeg installation/building.
|
Unconditionally skip FFMpeg installation/building.
|
||||||
|
|
||||||
|
--skip-materialx
|
||||||
|
Unconditionally skip MaterialX installation/building.
|
||||||
|
|
||||||
--skip-usd
|
--skip-usd
|
||||||
Unconditionally skip Universal Scene Description installation/building.
|
Unconditionally skip Universal Scene Description installation/building.
|
||||||
|
|
||||||
@@ -394,7 +403,7 @@ CLANG_FORMAT_VERSION="10.0"
|
|||||||
CLANG_FORMAT_VERSION_MIN="6.0"
|
CLANG_FORMAT_VERSION_MIN="6.0"
|
||||||
CLANG_FORMAT_VERSION_MEX="14.0"
|
CLANG_FORMAT_VERSION_MEX="14.0"
|
||||||
|
|
||||||
PYTHON_VERSION="3.10.8"
|
PYTHON_VERSION="3.10.9"
|
||||||
PYTHON_VERSION_SHORT="3.10"
|
PYTHON_VERSION_SHORT="3.10"
|
||||||
PYTHON_VERSION_MIN="3.10"
|
PYTHON_VERSION_MIN="3.10"
|
||||||
PYTHON_VERSION_MEX="3.12"
|
PYTHON_VERSION_MEX="3.12"
|
||||||
@@ -402,6 +411,7 @@ PYTHON_VERSION_INSTALLED=$PYTHON_VERSION_SHORT
|
|||||||
PYTHON_FORCE_BUILD=false
|
PYTHON_FORCE_BUILD=false
|
||||||
PYTHON_FORCE_REBUILD=false
|
PYTHON_FORCE_REBUILD=false
|
||||||
PYTHON_SKIP=false
|
PYTHON_SKIP=false
|
||||||
|
_with_built_python=false
|
||||||
|
|
||||||
# Additional Python modules.
|
# Additional Python modules.
|
||||||
PYTHON_IDNA_VERSION="3.3"
|
PYTHON_IDNA_VERSION="3.3"
|
||||||
@@ -434,7 +444,7 @@ PYTHON_ZSTANDARD_VERSION_MIN="0.15.2"
|
|||||||
PYTHON_ZSTANDARD_VERSION_MEX="0.20.0"
|
PYTHON_ZSTANDARD_VERSION_MEX="0.20.0"
|
||||||
PYTHON_ZSTANDARD_NAME="zstandard"
|
PYTHON_ZSTANDARD_NAME="zstandard"
|
||||||
|
|
||||||
PYTHON_NUMPY_VERSION="1.22.0"
|
PYTHON_NUMPY_VERSION="1.23.5"
|
||||||
PYTHON_NUMPY_VERSION_MIN="1.14"
|
PYTHON_NUMPY_VERSION_MIN="1.14"
|
||||||
PYTHON_NUMPY_VERSION_MEX="2.0"
|
PYTHON_NUMPY_VERSION_MEX="2.0"
|
||||||
PYTHON_NUMPY_NAME="numpy"
|
PYTHON_NUMPY_NAME="numpy"
|
||||||
@@ -462,11 +472,13 @@ PYTHON_MODULES_PIP=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
BOOST_VERSION="1.78.0"
|
BOOST_VERSION="1.80.0"
|
||||||
BOOST_VERSION_SHORT="1.78"
|
BOOST_VERSION_SHORT="1.80"
|
||||||
BOOST_VERSION_MIN="1.49"
|
BOOST_VERSION_MIN="1.49"
|
||||||
BOOST_VERSION_MEX="2.0"
|
BOOST_VERSION_MEX="2.0"
|
||||||
BOOST_FORCE_BUILD=false
|
# XXX Boost currently has an issue with python/tbb, see rB019b930 for details and patch used to fix it.
|
||||||
|
# So for now it has to be built, system packages are not usable. :(
|
||||||
|
BOOST_FORCE_BUILD=true
|
||||||
BOOST_FORCE_REBUILD=false
|
BOOST_FORCE_REBUILD=false
|
||||||
BOOST_SKIP=false
|
BOOST_SKIP=false
|
||||||
|
|
||||||
@@ -479,8 +491,8 @@ TBB_FORCE_BUILD=false
|
|||||||
TBB_FORCE_REBUILD=false
|
TBB_FORCE_REBUILD=false
|
||||||
TBB_SKIP=false
|
TBB_SKIP=false
|
||||||
|
|
||||||
OCIO_VERSION="2.1.1"
|
OCIO_VERSION="2.2.0"
|
||||||
OCIO_VERSION_SHORT="2.1"
|
OCIO_VERSION_SHORT="2.2"
|
||||||
OCIO_VERSION_MIN="2.0"
|
OCIO_VERSION_MIN="2.0"
|
||||||
OCIO_VERSION_MEX="3.0"
|
OCIO_VERSION_MEX="3.0"
|
||||||
OCIO_FORCE_BUILD=false
|
OCIO_FORCE_BUILD=false
|
||||||
@@ -505,10 +517,10 @@ OPENEXR_FORCE_REBUILD=false
|
|||||||
OPENEXR_SKIP=false
|
OPENEXR_SKIP=false
|
||||||
_with_built_openexr=false
|
_with_built_openexr=false
|
||||||
|
|
||||||
OIIO_VERSION="2.3.20.0"
|
OIIO_VERSION="2.4.6.0"
|
||||||
OIIO_VERSION_SHORT="2.3"
|
OIIO_VERSION_SHORT="2.4"
|
||||||
OIIO_VERSION_MIN="2.1.12"
|
OIIO_VERSION_MIN="2.2.0"
|
||||||
OIIO_VERSION_MEX="2.4.0"
|
OIIO_VERSION_MEX="2.5.0"
|
||||||
OIIO_FORCE_BUILD=false
|
OIIO_FORCE_BUILD=false
|
||||||
OIIO_FORCE_REBUILD=false
|
OIIO_FORCE_REBUILD=false
|
||||||
OIIO_SKIP=false
|
OIIO_SKIP=false
|
||||||
@@ -523,8 +535,8 @@ LLVM_FORCE_REBUILD=false
|
|||||||
LLVM_SKIP=false
|
LLVM_SKIP=false
|
||||||
|
|
||||||
# OSL needs to be compiled for now!
|
# OSL needs to be compiled for now!
|
||||||
OSL_VERSION="1.12.6.2"
|
OSL_VERSION="1.13.0.2"
|
||||||
OSL_VERSION_SHORT="1.12"
|
OSL_VERSION_SHORT="1.13"
|
||||||
OSL_VERSION_MIN="1.11"
|
OSL_VERSION_MIN="1.11"
|
||||||
OSL_VERSION_MEX="2.0"
|
OSL_VERSION_MEX="2.0"
|
||||||
OSL_FORCE_BUILD=false
|
OSL_FORCE_BUILD=false
|
||||||
@@ -532,9 +544,9 @@ OSL_FORCE_REBUILD=false
|
|||||||
OSL_SKIP=false
|
OSL_SKIP=false
|
||||||
|
|
||||||
# OpenSubdiv needs to be compiled for now
|
# OpenSubdiv needs to be compiled for now
|
||||||
OSD_VERSION="3.4.4"
|
OSD_VERSION="3.5.0"
|
||||||
OSD_VERSION_SHORT="3.4"
|
OSD_VERSION_SHORT="3.5"
|
||||||
OSD_VERSION_MIN="3.4"
|
OSD_VERSION_MIN="3.5"
|
||||||
OSD_VERSION_MEX="4.0"
|
OSD_VERSION_MEX="4.0"
|
||||||
OSD_FORCE_BUILD=false
|
OSD_FORCE_BUILD=false
|
||||||
OSD_FORCE_REBUILD=false
|
OSD_FORCE_REBUILD=false
|
||||||
@@ -543,10 +555,10 @@ OSD_SKIP=false
|
|||||||
# OpenVDB needs to be compiled for now
|
# OpenVDB needs to be compiled for now
|
||||||
OPENVDB_BLOSC_VERSION="1.21.1"
|
OPENVDB_BLOSC_VERSION="1.21.1"
|
||||||
|
|
||||||
OPENVDB_VERSION="9.0.0"
|
OPENVDB_VERSION="10.0.0"
|
||||||
OPENVDB_VERSION_SHORT="9.0"
|
OPENVDB_VERSION_SHORT="10.0"
|
||||||
OPENVDB_VERSION_MIN="9.0"
|
OPENVDB_VERSION_MIN="10.0"
|
||||||
OPENVDB_VERSION_MEX="9.1"
|
OPENVDB_VERSION_MEX="11.0"
|
||||||
OPENVDB_FORCE_BUILD=false
|
OPENVDB_FORCE_BUILD=false
|
||||||
OPENVDB_FORCE_REBUILD=false
|
OPENVDB_FORCE_REBUILD=false
|
||||||
OPENVDB_SKIP=false
|
OPENVDB_SKIP=false
|
||||||
@@ -560,8 +572,16 @@ ALEMBIC_FORCE_BUILD=false
|
|||||||
ALEMBIC_FORCE_REBUILD=false
|
ALEMBIC_FORCE_REBUILD=false
|
||||||
ALEMBIC_SKIP=false
|
ALEMBIC_SKIP=false
|
||||||
|
|
||||||
USD_VERSION="22.03"
|
MATERIALX_VERSION="1.38.6"
|
||||||
USD_VERSION_SHORT="22.03"
|
MATERIALX_VERSION_SHORT="1.38"
|
||||||
|
MATERIALX_VERSION_MIN="1.38"
|
||||||
|
MATERIALX_VERSION_MEX="1.40"
|
||||||
|
MATERIALX_FORCE_BUILD=false
|
||||||
|
MATERIALX_FORCE_REBUILD=false
|
||||||
|
MATERIALX_SKIP=false
|
||||||
|
|
||||||
|
USD_VERSION="22.11"
|
||||||
|
USD_VERSION_SHORT="22.11"
|
||||||
USD_VERSION_MIN="20.05"
|
USD_VERSION_MIN="20.05"
|
||||||
USD_VERSION_MEX="23.00"
|
USD_VERSION_MEX="23.00"
|
||||||
USD_FORCE_BUILD=false
|
USD_FORCE_BUILD=false
|
||||||
@@ -896,6 +916,9 @@ while true; do
|
|||||||
--build-alembic)
|
--build-alembic)
|
||||||
ALEMBIC_FORCE_BUILD=true; shift; continue
|
ALEMBIC_FORCE_BUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
|
--build-materialx)
|
||||||
|
MATERIALX_FORCE_BUILD=true; shift; continue
|
||||||
|
;;
|
||||||
--build-usd)
|
--build-usd)
|
||||||
USD_FORCE_BUILD=true; shift; continue
|
USD_FORCE_BUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -925,6 +948,7 @@ while true; do
|
|||||||
OIDN_FORCE_REBUILD=true
|
OIDN_FORCE_REBUILD=true
|
||||||
FFMPEG_FORCE_REBUILD=true
|
FFMPEG_FORCE_REBUILD=true
|
||||||
ALEMBIC_FORCE_REBUILD=true
|
ALEMBIC_FORCE_REBUILD=true
|
||||||
|
MATERIALX_FORCE_REBUILD=true
|
||||||
USD_FORCE_REBUILD=true
|
USD_FORCE_REBUILD=true
|
||||||
XR_OPENXR_FORCE_REBUILD=true
|
XR_OPENXR_FORCE_REBUILD=true
|
||||||
LEVEL_ZERO_FORCE_REBUILD=true
|
LEVEL_ZERO_FORCE_REBUILD=true
|
||||||
@@ -980,6 +1004,9 @@ while true; do
|
|||||||
--force-alembic)
|
--force-alembic)
|
||||||
ALEMBIC_FORCE_REBUILD=true; shift; continue
|
ALEMBIC_FORCE_REBUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
|
--force-materialx)
|
||||||
|
MATERIALX_FORCE_REBUILD=true; shift; continue
|
||||||
|
;;
|
||||||
--force-usd)
|
--force-usd)
|
||||||
USD_FORCE_REBUILD=true; shift; continue
|
USD_FORCE_REBUILD=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -1043,6 +1070,9 @@ while true; do
|
|||||||
--skip-usd)
|
--skip-usd)
|
||||||
USD_SKIP=true; shift; continue
|
USD_SKIP=true; shift; continue
|
||||||
;;
|
;;
|
||||||
|
--skip-materialx)
|
||||||
|
MATERIALX_SKIP=true; shift; continue
|
||||||
|
;;
|
||||||
--skip-xr-openxr)
|
--skip-xr-openxr)
|
||||||
XR_OPENXR_SKIP=true; shift; continue
|
XR_OPENXR_SKIP=true; shift; continue
|
||||||
;;
|
;;
|
||||||
@@ -1108,7 +1138,9 @@ PYTHON_SOURCE=( "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHO
|
|||||||
|
|
||||||
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
_boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
|
||||||
BOOST_SOURCE=( "https://boostorg.jfrog.io/artifactory/main/release/$BOOST_VERSION/source/boost_$_boost_version_nodots.tar.bz2" )
|
BOOST_SOURCE=( "https://boostorg.jfrog.io/artifactory/main/release/$BOOST_VERSION/source/boost_$_boost_version_nodots.tar.bz2" )
|
||||||
BOOST_BUILD_MODULES="--with-system --with-filesystem --with-thread --with-regex --with-locale --with-date_time --with-wave --with-iostreams --with-python --with-program_options --with-serialization --with-atomic"
|
BOOST_BUILD_MODULES="--with-filesystem --with-locale --with-thread --with-regex --with-system --with-date_time --with-wave --with-atomic --with-serialization --with-program_options --with-iostreams --with-python"
|
||||||
|
# Used by debian distros.
|
||||||
|
BOOST_DEB_PACKAGE_MODULES=( "libboost-filesystem" "libboost-locale" "libboost-thread" "libboost-regex" "libboost-system" "libboost-date-time" "libboost-wave" "libboost-atomic" "libboost-serialization" "libboost-program-options" "libboost-iostreams" "libboost-python" "libboost-numpy" )
|
||||||
|
|
||||||
TBB_SOURCE=( "https://github.com/oneapi-src/oneTBB/archive/$TBB_VERSION$TBB_VERSION_UPDATE.tar.gz" )
|
TBB_SOURCE=( "https://github.com/oneapi-src/oneTBB/archive/$TBB_VERSION$TBB_VERSION_UPDATE.tar.gz" )
|
||||||
TBB_SOURCE_CMAKE=( "https://raw.githubusercontent.com/wjakob/tbb/master/CMakeLists.txt" )
|
TBB_SOURCE_CMAKE=( "https://raw.githubusercontent.com/wjakob/tbb/master/CMakeLists.txt" )
|
||||||
@@ -1138,17 +1170,11 @@ _LLVM_SOURCE_ROOT="https://github.com/llvm/llvm-project/releases/download/llvmor
|
|||||||
LLVM_SOURCE=( "$_LLVM_SOURCE_ROOT/llvm-$LLVM_VERSION.src.tar.xz" )
|
LLVM_SOURCE=( "$_LLVM_SOURCE_ROOT/llvm-$LLVM_VERSION.src.tar.xz" )
|
||||||
LLVM_CLANG_SOURCE=( "$_LLVM_SOURCE_ROOT/clang-$LLVM_VERSION.src.tar.xz" "$_LLVM_SOURCE_ROOT/cfe-$LLVM_VERSION.src.tar.xz" )
|
LLVM_CLANG_SOURCE=( "$_LLVM_SOURCE_ROOT/clang-$LLVM_VERSION.src.tar.xz" "$_LLVM_SOURCE_ROOT/cfe-$LLVM_VERSION.src.tar.xz" )
|
||||||
|
|
||||||
OSL_USE_REPO=false
|
OSL_USE_REPO=true
|
||||||
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/v$OSL_VERSION.tar.gz" )
|
OSL_SOURCE=( "https://github.com/imageworks/OpenShadingLanguage/archive/v$OSL_VERSION.tar.gz" )
|
||||||
#~ OSL_SOURCE_REPO=( "https://github.com/imageworks/OpenShadingLanguage.git" )
|
OSL_SOURCE_REPO=( "https://github.com/AcademySoftwareFoundation/OpenShadingLanguage.git" )
|
||||||
#~ OSL_SOURCE_REPO_BRANCH="master"
|
OSL_SOURCE_REPO_BRANCH="main"
|
||||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
OSL_SOURCE_REPO_UID="1a7670600c8b08c2443a78d03c8c27e9a1149140"
|
||||||
#~ OSL_SOURCE=( "https://github.com/Nazg-Gul/OpenShadingLanguage/archive/Release-1.5.11.tar.gz" )
|
|
||||||
#~ OSL_SOURCE_REPO=( "https://github.com/mont29/OpenShadingLanguage.git" )
|
|
||||||
#~ OSL_SOURCE_REPO_UID="85179714e1bc69cd25ecb6bb711c1a156685d395"
|
|
||||||
#~ OSL_SOURCE_REPO=( "https://github.com/Nazg-Gul/OpenShadingLanguage.git" )
|
|
||||||
#~ OSL_SOURCE_REPO_UID="7d40ff5fe8e47b030042afb92d0e955f5aa96f48"
|
|
||||||
#~ OSL_SOURCE_REPO_BRANCH="blender-fixes"
|
|
||||||
|
|
||||||
OSD_USE_REPO=false
|
OSD_USE_REPO=false
|
||||||
# Script foo to make the version string compliant with the archive name:
|
# Script foo to make the version string compliant with the archive name:
|
||||||
@@ -1171,6 +1197,8 @@ ALEMBIC_SOURCE=( "https://github.com/alembic/alembic/archive/${ALEMBIC_VERSION}.
|
|||||||
# ALEMBIC_SOURCE_REPO_UID="e6c90d4faa32c4550adeaaf3f556dad4b73a92bb"
|
# ALEMBIC_SOURCE_REPO_UID="e6c90d4faa32c4550adeaaf3f556dad4b73a92bb"
|
||||||
# ALEMBIC_SOURCE_REPO_BRANCH="master"
|
# ALEMBIC_SOURCE_REPO_BRANCH="master"
|
||||||
|
|
||||||
|
MATERIALX_SOURCE=( "https://github.com/AcademySoftwareFoundation/MaterialX/archive/refs/tags/v${MATERIALX_VERSION}.tar.gz" )
|
||||||
|
|
||||||
USD_SOURCE=( "https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz" )
|
USD_SOURCE=( "https://github.com/PixarAnimationStudios/USD/archive/v${USD_VERSION}.tar.gz" )
|
||||||
|
|
||||||
OPENCOLLADA_USE_REPO=false
|
OPENCOLLADA_USE_REPO=false
|
||||||
@@ -1223,8 +1251,10 @@ Those libraries should be available as packages in all recent distributions (opt
|
|||||||
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
|
* libjpeg, libpng, libtiff, [openjpeg2], [libopenal].
|
||||||
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
* libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed).
|
||||||
* libwayland-client0, libdecor, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland)
|
* libwayland-client0, libdecor, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland)
|
||||||
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex.
|
* libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex, pybind11.
|
||||||
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\""
|
* libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].
|
||||||
|
* [libvulkan/vulkan-loader].
|
||||||
|
* [libfribidi], [libharfbuzz].\""
|
||||||
|
|
||||||
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES:
|
||||||
|
|
||||||
@@ -1485,9 +1515,17 @@ _init_python() {
|
|||||||
_update_deps_python() {
|
_update_deps_python() {
|
||||||
if [ "$1" = true ]; then
|
if [ "$1" = true ]; then
|
||||||
BOOST_FORCE_BUILD=true
|
BOOST_FORCE_BUILD=true
|
||||||
|
OCIO_FORCE_BUILD=true
|
||||||
|
OIIO_FORCE_BUILD=true
|
||||||
|
OPENVDB_FORCE_BUILD=true
|
||||||
|
USD_FORCE_BUILD=true
|
||||||
fi
|
fi
|
||||||
if [ "$2" = true ]; then
|
if [ "$2" = true ]; then
|
||||||
BOOST_FORCE_REBUILD=true
|
BOOST_FORCE_REBUILD=true
|
||||||
|
OCIO_FORCE_REBUILD=true
|
||||||
|
OIIO_FORCE_REBUILD=true
|
||||||
|
OPENVDB_FORCE_REBUILD=true
|
||||||
|
USD_FORCE_REBUILD=true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1573,6 +1611,9 @@ compile_Python() {
|
|||||||
PRINT ""
|
PRINT ""
|
||||||
$_python -m pip install $module --no-binary :all:
|
$_python -m pip install $module --no-binary :all:
|
||||||
done
|
done
|
||||||
|
|
||||||
|
_with_built_python=true
|
||||||
|
_with_built_python_execpath="$INST/python-$PYTHON_VERSION_SHORT/bin/python3"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
@@ -1591,12 +1632,14 @@ _update_deps_boost() {
|
|||||||
OSL_FORCE_BUILD=true
|
OSL_FORCE_BUILD=true
|
||||||
OPENVDB_FORCE_BUILD=true
|
OPENVDB_FORCE_BUILD=true
|
||||||
ALEMBIC_FORCE_BUILD=true
|
ALEMBIC_FORCE_BUILD=true
|
||||||
|
USD_FORCE_BUILD=true
|
||||||
fi
|
fi
|
||||||
if [ "$2" = true ]; then
|
if [ "$2" = true ]; then
|
||||||
OIIO_FORCE_REBUILD=true
|
OIIO_FORCE_REBUILD=true
|
||||||
OSL_FORCE_REBUILD=true
|
OSL_FORCE_REBUILD=true
|
||||||
OPENVDB_FORCE_REBUILD=true
|
OPENVDB_FORCE_REBUILD=true
|
||||||
ALEMBIC_FORCE_REBUILD=true
|
ALEMBIC_FORCE_REBUILD=true
|
||||||
|
USD_FORCE_REBUILD=true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1616,7 +1659,7 @@ compile_Boost() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
boost_magic=14
|
boost_magic=15
|
||||||
|
|
||||||
_init_boost
|
_init_boost
|
||||||
|
|
||||||
@@ -1642,11 +1685,13 @@ compile_Boost() {
|
|||||||
mkdir -p $SRC
|
mkdir -p $SRC
|
||||||
download BOOST_SOURCE[@] $_src.tar.bz2
|
download BOOST_SOURCE[@] $_src.tar.bz2
|
||||||
tar -C $SRC --transform "s,\w*,boost-$BOOST_VERSION,x" -xf $_src.tar.bz2
|
tar -C $SRC --transform "s,\w*,boost-$BOOST_VERSION,x" -xf $_src.tar.bz2
|
||||||
|
|
||||||
|
patch -d $_src -p1 < $SCRIPT_DIR/patches/boost.diff
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $_src
|
cd $_src
|
||||||
if [ ! -f $_src/b2 ]; then
|
if [ ! -f $_src/b2 ]; then
|
||||||
if [ -d $INST/python-$PYTHON_VERSION_INSTALLED ]; then
|
if [ -d $_with_built_python ]; then
|
||||||
./bootstrap.sh --with-python-root="$INST/python-$PYTHON_VERSION_INSTALLED"
|
./bootstrap.sh --with-python-root="$INST/python-$PYTHON_VERSION_INSTALLED"
|
||||||
else
|
else
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
@@ -1841,7 +1886,7 @@ compile_OCIO() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
ocio_magic=3
|
ocio_magic=5
|
||||||
_init_ocio
|
_init_ocio
|
||||||
|
|
||||||
# Force having own builds for the dependencies.
|
# Force having own builds for the dependencies.
|
||||||
@@ -1896,9 +1941,13 @@ compile_OCIO() {
|
|||||||
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
cmake_d="$cmake_d -D CMAKE_PREFIX_PATH=$_inst"
|
||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||||
cmake_d="$cmake_d -D OCIO_BUILD_APPS=OFF"
|
cmake_d="$cmake_d -D OCIO_BUILD_APPS=OFF"
|
||||||
cmake_d="$cmake_d -D OCIO_BUILD_PYTHON=OFF"
|
cmake_d="$cmake_d -D OCIO_BUILD_PYTHON=ON"
|
||||||
cmake_d="$cmake_d -D OCIO_BUILD_GPU_TESTS=OFF"
|
cmake_d="$cmake_d -D OCIO_BUILD_GPU_TESTS=OFF"
|
||||||
|
|
||||||
|
if [ "$_with_built_python" = true ]; then
|
||||||
|
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $(uname -m) == "aarch64" ]; then
|
if [ $(uname -m) == "aarch64" ]; then
|
||||||
cmake_d="$cmake_d -D OCIO_USE_SSE=OFF"
|
cmake_d="$cmake_d -D OCIO_USE_SSE=OFF"
|
||||||
fi
|
fi
|
||||||
@@ -2088,11 +2137,13 @@ _update_deps_openexr() {
|
|||||||
OIIO_FORCE_BUILD=true
|
OIIO_FORCE_BUILD=true
|
||||||
OPENVDB_FORCE_BUILD=true
|
OPENVDB_FORCE_BUILD=true
|
||||||
ALEMBIC_FORCE_BUILD=true
|
ALEMBIC_FORCE_BUILD=true
|
||||||
|
USD_FORCE_BUILD=true
|
||||||
fi
|
fi
|
||||||
if [ "$2" = true ]; then
|
if [ "$2" = true ]; then
|
||||||
OIIO_FORCE_REBUILD=true
|
OIIO_FORCE_REBUILD=true
|
||||||
OPENVDB_FORCE_REBUILD=true
|
OPENVDB_FORCE_REBUILD=true
|
||||||
ALEMBIC_FORCE_REBUILD=true
|
ALEMBIC_FORCE_REBUILD=true
|
||||||
|
USD_FORCE_REBUILD=true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2221,9 +2272,11 @@ _init_oiio() {
|
|||||||
_update_deps_oiio() {
|
_update_deps_oiio() {
|
||||||
if [ "$1" = true ]; then
|
if [ "$1" = true ]; then
|
||||||
OSL_FORCE_BUILD=true
|
OSL_FORCE_BUILD=true
|
||||||
|
USD_FORCE_BUILD=true
|
||||||
fi
|
fi
|
||||||
if [ "$2" = true ]; then
|
if [ "$2" = true ]; then
|
||||||
OSL_FORCE_REBUILD=true
|
OSL_FORCE_REBUILD=true
|
||||||
|
USD_FORCE_REBUILD=true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2243,7 +2296,7 @@ compile_OIIO() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
oiio_magic=18
|
oiio_magic=20
|
||||||
_init_oiio
|
_init_oiio
|
||||||
|
|
||||||
# Force having own builds for the dependencies.
|
# Force having own builds for the dependencies.
|
||||||
@@ -2297,6 +2350,7 @@ compile_OIIO() {
|
|||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||||
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
cmake_d="$cmake_d -D STOP_ON_WARNING=OFF"
|
||||||
cmake_d="$cmake_d -D LINKSTATIC=OFF"
|
cmake_d="$cmake_d -D LINKSTATIC=OFF"
|
||||||
|
cmake_d="$cmake_d -D BUILD_SHARED_LIBS=ON"
|
||||||
|
|
||||||
if [ $(uname -m) != "aarch64" ]; then
|
if [ $(uname -m) != "aarch64" ]; then
|
||||||
cmake_d="$cmake_d -D USE_SIMD=sse2"
|
cmake_d="$cmake_d -D USE_SIMD=sse2"
|
||||||
@@ -2312,21 +2366,37 @@ compile_OIIO() {
|
|||||||
cmake_d="$cmake_d -D OpenEXR_ROOT=$INST/openexr"
|
cmake_d="$cmake_d -D OpenEXR_ROOT=$INST/openexr"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ptex is only needed when nicholas bishop is ready
|
cmake_d="$cmake_d -D USE_PYTHON=ON"
|
||||||
cmake_d="$cmake_d -D USE_PTEX=OFF"
|
if [ "$_with_built_python" = true ]; then
|
||||||
|
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||||
|
fi
|
||||||
|
|
||||||
# Optional tests and cmd tools
|
# Optional tests and cmd tools
|
||||||
cmake_d="$cmake_d -D USE_QT=OFF"
|
cmake_d="$cmake_d -D USE_QT=OFF"
|
||||||
cmake_d="$cmake_d -D USE_PYTHON=OFF"
|
cmake_d="$cmake_d -D USE_QT5=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_OPENGL=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_TBB=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_BZIP2=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_FREETYPE=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_OPENCOLORIO=OFF"
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -D USE_WEBP=ON"
|
||||||
|
cmake_d="$cmake_d -D USE_OPENJPEG=ON"
|
||||||
|
|
||||||
cmake_d="$cmake_d -D USE_FFMPEG=OFF"
|
cmake_d="$cmake_d -D USE_FFMPEG=OFF"
|
||||||
cmake_d="$cmake_d -D USE_OPENCV=OFF"
|
cmake_d="$cmake_d -D USE_OPENCV=OFF"
|
||||||
cmake_d="$cmake_d -D USE_OPENVDB=OFF"
|
cmake_d="$cmake_d -D USE_OPENVDB=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_NUKE=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_DCMTK=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_LIBHEIF=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_GIF=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_LIBRAW=OFF"
|
||||||
|
cmake_d="$cmake_d -D USE_LIBSQUISH=OFF"
|
||||||
|
|
||||||
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
cmake_d="$cmake_d -D BUILD_TESTING=OFF"
|
||||||
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
|
cmake_d="$cmake_d -D OIIO_BUILD_TESTS=OFF"
|
||||||
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=OFF"
|
cmake_d="$cmake_d -D OIIO_BUILD_TOOLS=ON"
|
||||||
cmake_d="$cmake_d -D TXT2MAN="
|
cmake_d="$cmake_d -D TXT2MAN="
|
||||||
#cmake_d="$cmake_d -D CMAKE_EXPORT_COMPILE_COMMANDS=ON"
|
|
||||||
#cmake_d="$cmake_d -D CMAKE_VERBOSE_MAKEFILE=ON"
|
|
||||||
|
|
||||||
if [ -d $INST/boost ]; then
|
if [ -d $INST/boost ]; then
|
||||||
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON -D Boost_NO_BOOST_CMAKE=ON"
|
cmake_d="$cmake_d -D BOOST_ROOT=$INST/boost -D Boost_NO_SYSTEM_PATHS=ON -D Boost_NO_BOOST_CMAKE=ON"
|
||||||
@@ -2404,7 +2474,7 @@ compile_LLVM() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
llvm_magic=3
|
llvm_magic=4
|
||||||
_init_llvm
|
_init_llvm
|
||||||
|
|
||||||
# Force having own builds for the dependencies.
|
# Force having own builds for the dependencies.
|
||||||
@@ -2453,9 +2523,9 @@ compile_LLVM() {
|
|||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
LLVM_TARGETS="X86"
|
LLVM_TARGETS="X86;NVPTX"
|
||||||
if [ $(uname -m) == "aarch64" ]; then
|
if [ $(uname -m) == "aarch64" ]; then
|
||||||
LLVM_TARGETS="AArch64"
|
LLVM_TARGETS="AArch64;NVPTX"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||||
@@ -2522,7 +2592,7 @@ compile_OSL() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
osl_magic=21
|
osl_magic=22
|
||||||
_init_osl
|
_init_osl
|
||||||
|
|
||||||
# Force having own builds for the dependencies.
|
# Force having own builds for the dependencies.
|
||||||
@@ -2553,8 +2623,9 @@ compile_OSL() {
|
|||||||
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
INFO "Unpacking OpenShadingLanguage-$OSL_VERSION"
|
||||||
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
tar -C $SRC --transform "s,(.*/?)OpenShadingLanguage-[^/]*(.*),\1OpenShadingLanguage-$OSL_VERSION\2,x" \
|
||||||
-xf $_src.tar.gz
|
-xf $_src.tar.gz
|
||||||
|
|
||||||
|
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||||
fi
|
fi
|
||||||
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $_src
|
cd $_src
|
||||||
@@ -2566,6 +2637,8 @@ compile_OSL() {
|
|||||||
# Stick to same rev as windows' libs...
|
# Stick to same rev as windows' libs...
|
||||||
git checkout $OSL_SOURCE_REPO_UID
|
git checkout $OSL_SOURCE_REPO_UID
|
||||||
git reset --hard
|
git reset --hard
|
||||||
|
|
||||||
|
patch -d $_src -p1 < $SCRIPT_DIR/patches/osl.diff
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Always refresh the whole build!
|
# Always refresh the whole build!
|
||||||
@@ -2881,7 +2954,12 @@ _init_openvdb() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_update_deps_openvdb() {
|
_update_deps_openvdb() {
|
||||||
:
|
if [ "$1" = true ]; then
|
||||||
|
USD_FORCE_BUILD=true
|
||||||
|
fi
|
||||||
|
if [ "$2" = true ]; then
|
||||||
|
USD_FORCE_REBUILD=true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_OPENVDB() {
|
clean_OPENVDB() {
|
||||||
@@ -2903,7 +2981,7 @@ compile_OPENVDB() {
|
|||||||
PRINT ""
|
PRINT ""
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
openvdb_magic=4
|
openvdb_magic=5
|
||||||
_init_openvdb
|
_init_openvdb
|
||||||
|
|
||||||
# Force having own builds for the dependencies.
|
# Force having own builds for the dependencies.
|
||||||
@@ -2952,12 +3030,18 @@ compile_OPENVDB() {
|
|||||||
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
cmake_d="-D CMAKE_BUILD_TYPE=Release"
|
||||||
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
cmake_d="$cmake_d -D CMAKE_INSTALL_PREFIX=$_inst"
|
||||||
cmake_d="$cmake_d -D USE_STATIC_DEPENDENCIES=OFF"
|
cmake_d="$cmake_d -D USE_STATIC_DEPENDENCIES=OFF"
|
||||||
|
cmake_d="$cmake_d -D OPENVDB_CORE_SHARED=ON"
|
||||||
|
cmake_d="$cmake_d -D OPENVDB_CORE_STATIC=OFF"
|
||||||
cmake_d="$cmake_d -D OPENVDB_BUILD_BINARIES=OFF"
|
cmake_d="$cmake_d -D OPENVDB_BUILD_BINARIES=OFF"
|
||||||
|
|
||||||
if [ "$WITH_NANOVDB" = true ]; then
|
if [ "$WITH_NANOVDB" = true ]; then
|
||||||
cmake_d="$cmake_d -D USE_NANOVDB=ON"
|
cmake_d="$cmake_d -D USE_NANOVDB=ON"
|
||||||
|
cmake_d="$cmake_d -D OPENVDB_BUILD_NANOVDB=ON"
|
||||||
|
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
|
||||||
else
|
else
|
||||||
cmake_d="$cmake_d -D USE_NANOVDB=OFF"
|
cmake_d="$cmake_d -D USE_NANOVDB=OFF"
|
||||||
|
cmake_d="$cmake_d -D OPENVDB_BUILD_NANOVDB=OFF"
|
||||||
|
cmake_d="$cmake_d -D NANOVDB_BUILD_TOOLS=OFF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $INST/boost ]; then
|
if [ -d $INST/boost ]; then
|
||||||
@@ -2969,6 +3053,9 @@ compile_OPENVDB() {
|
|||||||
fi
|
fi
|
||||||
if [ -d $INST/tbb ]; then
|
if [ -d $INST/tbb ]; then
|
||||||
cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb"
|
cmake_d="$cmake_d -D TBB_ROOT=$INST/tbb"
|
||||||
|
# Work around until we use oneTBB, otherwise OpenVDB forcefully
|
||||||
|
# uses oneTBB if it can find it on the system.
|
||||||
|
cmake_d="$cmake_d -D Tbb_INCLUDE_DIR=$INST/tbb/include"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$_with_built_imath" = true ]; then
|
if [ "$_with_built_imath" = true ]; then
|
||||||
@@ -2982,6 +3069,13 @@ compile_OPENVDB() {
|
|||||||
cmake_d="$cmake_d -D Blosc_ROOT=$INST/blosc"
|
cmake_d="$cmake_d -D Blosc_ROOT=$INST/blosc"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -D OPENVDB_BUILD_PYTHON_MODULE=ON"
|
||||||
|
cmake_d="$cmake_d -D OPENVDB_PYTHON_WRAP_ALL_GRID_TYPES=ON"
|
||||||
|
cmake_d="$cmake_d -D USE_NUMPY=ON"
|
||||||
|
if [ "$_with_built_python" = true ]; then
|
||||||
|
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||||
|
fi
|
||||||
|
|
||||||
cmake $cmake_d ..
|
cmake $cmake_d ..
|
||||||
|
|
||||||
make -j$THREADS install
|
make -j$THREADS install
|
||||||
@@ -3119,6 +3213,103 @@ compile_ALEMBIC() {
|
|||||||
run_ldconfig "alembic"
|
run_ldconfig "alembic"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#### Build materialX ####
|
||||||
|
_init_materialx() {
|
||||||
|
_src=$SRC/MaterialX-$MATERIALX_VERSION
|
||||||
|
_git=false
|
||||||
|
_inst=$INST/materialx-$MATERIALX_VERSION_SHORT
|
||||||
|
_inst_shortcut=$INST/materialx
|
||||||
|
}
|
||||||
|
|
||||||
|
_update_deps_materialx() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
clean_MATERIALX() {
|
||||||
|
_init_materialx
|
||||||
|
if [ -d $_inst ]; then
|
||||||
|
# Force rebuilding the dependencies if needed.
|
||||||
|
_update_deps_materialx false true
|
||||||
|
fi
|
||||||
|
_clean
|
||||||
|
}
|
||||||
|
|
||||||
|
compile_MATERIALX() {
|
||||||
|
if [ "$NO_BUILD" = true ]; then
|
||||||
|
WARNING "--no-build enabled, MaterialX will not be compiled!"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
|
materialx_magic=1
|
||||||
|
_init_materialx
|
||||||
|
|
||||||
|
# Force having own builds for the dependencies.
|
||||||
|
_update_deps_materialx true false
|
||||||
|
|
||||||
|
# Clean install if needed!
|
||||||
|
magic_compile_check materialx-$MATERIALX_VERSION $materialx_magic
|
||||||
|
if [ $? -eq 1 -o "$MATERIALX_FORCE_REBUILD" = true ]; then
|
||||||
|
clean_MATERIALX
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d $_inst ]; then
|
||||||
|
INFO "Building MaterialX-$MATERIALX_VERSION"
|
||||||
|
|
||||||
|
# Force rebuilding the dependencies.
|
||||||
|
_update_deps_materialx true true
|
||||||
|
|
||||||
|
prepare_inst
|
||||||
|
|
||||||
|
if [ ! -d $_src ]; then
|
||||||
|
mkdir -p $SRC
|
||||||
|
download MATERIALX_SOURCE[@] "$_src.tar.gz"
|
||||||
|
|
||||||
|
INFO "Unpacking MaterialX-$MATERIALX_VERSION"
|
||||||
|
tar -C $SRC -xf $_src.tar.gz
|
||||||
|
|
||||||
|
patch -d $_src -p1 < $SCRIPT_DIR/patches/materialx.diff
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $_src
|
||||||
|
|
||||||
|
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DMATERIALX_BUILD_SHARED_LIBS=ON"
|
||||||
|
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DMATERIALX_BUILD_RENDER=OFF"
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DMATERIALX_BUILD_PYTHON=ON"
|
||||||
|
cmake_d="$cmake_d -DMATERIALX_INSTALL_PYTHON=OFF"
|
||||||
|
if [ "$_with_built_python" = true ]; then
|
||||||
|
cmake_d="$cmake_d -D Python_EXECUTABLE=$_with_built_python_execpath"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake $cmake_d ./
|
||||||
|
make -j$THREADS install
|
||||||
|
make clean
|
||||||
|
|
||||||
|
if [ ! -d $_inst ]; then
|
||||||
|
ERROR "MaterialX-$MATERIALX_VERSION failed to compile, exiting"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
magic_compile_set materialx-$MATERIALX_VERSION $materialx_magic
|
||||||
|
|
||||||
|
cd $CWD
|
||||||
|
INFO "Done compiling MaterialX-$MATERIALX_VERSION!"
|
||||||
|
else
|
||||||
|
INFO "Own MaterialX-$MATERIALX_VERSION is up to date, nothing to do!"
|
||||||
|
INFO "If you want to force rebuild of this lib, use the --force-materialx option."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $_inst ]; then
|
||||||
|
_create_inst_shortcut
|
||||||
|
fi
|
||||||
|
run_ldconfig "materialx"
|
||||||
|
}
|
||||||
|
|
||||||
#### Build USD ####
|
#### Build USD ####
|
||||||
_init_usd() {
|
_init_usd() {
|
||||||
_src=$SRC/USD-$USD_VERSION
|
_src=$SRC/USD-$USD_VERSION
|
||||||
@@ -3147,7 +3338,7 @@ compile_USD() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# To be changed each time we make edits that would modify the compiled result!
|
# To be changed each time we make edits that would modify the compiled result!
|
||||||
usd_magic=1
|
usd_magic=2
|
||||||
_init_usd
|
_init_usd
|
||||||
|
|
||||||
# Force having own builds for the dependencies.
|
# Force having own builds for the dependencies.
|
||||||
@@ -3181,18 +3372,46 @@ compile_USD() {
|
|||||||
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
cmake_d="-D CMAKE_INSTALL_PREFIX=$_inst"
|
||||||
# For the reasoning behind these options, please see usd.cmake.
|
# For the reasoning behind these options, please see usd.cmake.
|
||||||
if [ -d $INST/boost ]; then
|
if [ -d $INST/boost ]; then
|
||||||
cmake_d="$cmake_d $cmake_d -D BOOST_ROOT=$INST/boost"
|
cmake_d="$cmake_d -DBOOST_ROOT=$INST/boost"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d $INST/tbb ]; then
|
if [ -d $INST/tbb ]; then
|
||||||
cmake_d="$cmake_d $cmake_d -D TBB_ROOT_DIR=$INST/tbb"
|
cmake_d="$cmake_d -DTBB_ROOT_DIR=$INST/tbb"
|
||||||
fi
|
fi
|
||||||
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=OFF"
|
|
||||||
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=OFF"
|
cmake_d="$cmake_d -DPXR_ENABLE_PYTHON_SUPPORT=ON"
|
||||||
|
cmake_d="$cmake_d -DPXR_USE_PYTHON_3=ON"
|
||||||
|
if [ "$_with_built_python" = true ]; then
|
||||||
|
cmake_d="$cmake_d -D PYTHON_EXECUTABLE=$_with_built_python_execpath"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DPXR_BUILD_IMAGING=ON"
|
||||||
|
cmake_d="$cmake_d -DPXR_BUILD_OPENIMAGEIO_PLUGIN=ON"
|
||||||
|
if [ -d $INST/openexr ]; then
|
||||||
|
cmake_d="$cmake_d -DOPENEXR_LOCATION=$INST/openexr"
|
||||||
|
fi
|
||||||
|
if [ -d $INST/oiio ]; then
|
||||||
|
cmake_d="$cmake_d -DOpenImageIO_ROOT=$INST/oiio"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DPXR_ENABLE_OPENVDB_SUPPORT=ON"
|
||||||
|
if [ -d $INST/openvdb ]; then
|
||||||
|
cmake_d="$cmake_d -DOPENVDB_LOCATION=$INST/openvdb"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DPXR_ENABLE_GL_SUPPORT=ON"
|
||||||
|
|
||||||
cmake_d="$cmake_d -DPXR_BUILD_TESTS=OFF"
|
cmake_d="$cmake_d -DPXR_BUILD_TESTS=OFF"
|
||||||
cmake_d="$cmake_d -DBUILD_SHARED_LIBS=ON"
|
cmake_d="$cmake_d -DPXR_BUILD_EXAMPLES=OFF"
|
||||||
cmake_d="$cmake_d -DPXR_BUILD_MONOLITHIC=ON"
|
cmake_d="$cmake_d -DPXR_BUILD_TUTORIALS=OFF"
|
||||||
|
|
||||||
cmake_d="$cmake_d -DPXR_BUILD_USD_TOOLS=OFF"
|
cmake_d="$cmake_d -DPXR_BUILD_USD_TOOLS=OFF"
|
||||||
|
cmake_d="$cmake_d -DPXR_ENABLE_HDF5_SUPPORT=OFF"
|
||||||
|
cmake_d="$cmake_d -DPXR_ENABLE_MATERIALX_SUPPORT=OFF"
|
||||||
|
cmake_d="$cmake_d -DPXR_BUILD_USDVIEW=OFF"
|
||||||
|
|
||||||
|
cmake_d="$cmake_d -DPXR_BUILD_MONOLITHIC=ON"
|
||||||
|
cmake_d="$cmake_d -DBUILD_SHARED_LIBS=ON"
|
||||||
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
cmake_d="$cmake_d -DCMAKE_DEBUG_POSTFIX=_d"
|
||||||
|
|
||||||
cmake $cmake_d ./
|
cmake $cmake_d ./
|
||||||
@@ -4205,11 +4424,12 @@ install_DEB() {
|
|||||||
git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \
|
git libfreetype6-dev libfontconfig-dev libx11-dev flex bison libxxf86vm-dev \
|
||||||
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \
|
||||||
libwayland-dev libdecor-0-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \
|
libwayland-dev libdecor-0-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \
|
||||||
|
libvulkan-dev libshaderc-dev \
|
||||||
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \
|
||||||
libopenal-dev libepoxy-dev yasm \
|
libopenal-dev libepoxy-dev yasm pybind11-dev \
|
||||||
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \
|
libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \
|
||||||
libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev \
|
libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev \
|
||||||
libglfw3-dev"
|
libglfw3-dev libfribidi-dev libharfbuzz-dev"
|
||||||
|
|
||||||
VORBIS_USE=true
|
VORBIS_USE=true
|
||||||
OGG_USE=true
|
OGG_USE=true
|
||||||
@@ -4393,7 +4613,7 @@ install_DEB() {
|
|||||||
|
|
||||||
boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
|
boost_version=$(echo `get_package_version_DEB libboost-dev` | sed -r 's/^([0-9]+\.[0-9]+).*/\1/')
|
||||||
|
|
||||||
install_packages_DEB libboost-{filesystem,iostreams,locale,regex,system,thread,wave,program-options}$boost_version-dev
|
install_packages_DEB ${BOOST_DEB_PACKAGE_MODULES[@]/%/$boost_version-dev}
|
||||||
clean_Boost
|
clean_Boost
|
||||||
else
|
else
|
||||||
compile_Boost
|
compile_Boost
|
||||||
@@ -4585,6 +4805,16 @@ install_DEB() {
|
|||||||
compile_ALEMBIC
|
compile_ALEMBIC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PRINT ""
|
||||||
|
if [ "$MATERIALX_SKIP" = true ]; then
|
||||||
|
WARNING "Skipping MaterialX installation, as requested..."
|
||||||
|
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||||
|
INFO "Forced MaterialX building, as requested..."
|
||||||
|
compile_MATERIALX
|
||||||
|
else
|
||||||
|
compile_MATERIALX
|
||||||
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$USD_SKIP" = true ]; then
|
if [ "$USD_SKIP" = true ]; then
|
||||||
WARNING "Skipping USD installation, as requested..."
|
WARNING "Skipping USD installation, as requested..."
|
||||||
@@ -4928,10 +5158,12 @@ install_RPM() {
|
|||||||
libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \
|
libtiff-devel libjpeg-devel libpng-devel sqlite-devel fftw-devel SDL2-devel \
|
||||||
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
|
libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \
|
||||||
wayland-devel libdecor-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \
|
wayland-devel libdecor-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \
|
||||||
|
vulkan-loader-devel libshaderc-devel \
|
||||||
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
|
wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \
|
||||||
libepoxy-devel yasm patch \
|
libepoxy-devel yasm patch pybind11-devel \
|
||||||
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \
|
libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \
|
||||||
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel"
|
gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel \
|
||||||
|
fribidi-devel harfbuzz-devel"
|
||||||
|
|
||||||
OPENJPEG_USE=true
|
OPENJPEG_USE=true
|
||||||
VORBIS_USE=true
|
VORBIS_USE=true
|
||||||
@@ -5312,6 +5544,16 @@ install_RPM() {
|
|||||||
compile_ALEMBIC
|
compile_ALEMBIC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PRINT ""
|
||||||
|
if [ "$MATERIALX_SKIP" = true ]; then
|
||||||
|
WARNING "Skipping MaterialX installation, as requested..."
|
||||||
|
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||||
|
INFO "Forced MaterialX building, as requested..."
|
||||||
|
compile_MATERIALX
|
||||||
|
else
|
||||||
|
compile_MATERIALX
|
||||||
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$USD_SKIP" = true ]; then
|
if [ "$USD_SKIP" = true ]; then
|
||||||
WARNING "Skipping USD installation, as requested..."
|
WARNING "Skipping USD installation, as requested..."
|
||||||
@@ -5582,9 +5824,10 @@ install_ARCH() {
|
|||||||
|
|
||||||
_packages="$BASE_DEVEL git cmake fontconfig flex \
|
_packages="$BASE_DEVEL git cmake fontconfig flex \
|
||||||
libxi libxcursor libxrandr libxinerama libepoxy libdecor libpng libtiff wget openal \
|
libxi libxcursor libxrandr libxinerama libepoxy libdecor libpng libtiff wget openal \
|
||||||
$OPENJPEG_DEV yasm sdl2 fftw \
|
vulkan-icd-loader vulkan-headers shaderc \
|
||||||
|
$OPENJPEG_DEV yasm sdl2 fftw pybind11 \
|
||||||
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml libharu \
|
libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml libharu \
|
||||||
zstd pystring"
|
zstd pystring fribidi harfbuzz"
|
||||||
|
|
||||||
OPENJPEG_USE=true
|
OPENJPEG_USE=true
|
||||||
VORBIS_USE=true
|
VORBIS_USE=true
|
||||||
@@ -5916,6 +6159,16 @@ install_ARCH() {
|
|||||||
compile_ALEMBIC
|
compile_ALEMBIC
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PRINT ""
|
||||||
|
if [ "$MATERIALX_SKIP" = true ]; then
|
||||||
|
WARNING "Skipping MaterialX installation, as requested..."
|
||||||
|
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||||
|
INFO "Forced MaterialX building, as requested..."
|
||||||
|
compile_MATERIALX
|
||||||
|
else
|
||||||
|
compile_MATERIALX
|
||||||
|
fi
|
||||||
|
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$USD_SKIP" = true ]; then
|
if [ "$USD_SKIP" = true ]; then
|
||||||
WARNING "Skipping USD installation, as requested..."
|
WARNING "Skipping USD installation, as requested..."
|
||||||
@@ -6207,6 +6460,27 @@ install_OTHER() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
PRINT ""
|
||||||
|
if [ "$MATERIALX_SKIP" = true ]; then
|
||||||
|
WARNING "Skipping MaterialX installation, as requested..."
|
||||||
|
elif [ "$MATERIALX_FORCE_BUILD" = true ]; then
|
||||||
|
INFO "Forced MaterialX building, as requested..."
|
||||||
|
compile_MATERIALX
|
||||||
|
else
|
||||||
|
compile_MATERIALX
|
||||||
|
fi
|
||||||
|
|
||||||
|
PRINT ""
|
||||||
|
if [ "$USD_SKIP" = true ]; then
|
||||||
|
WARNING "Skipping USD installation, as requested..."
|
||||||
|
elif [ "$USD_FORCE_BUILD" = true ]; then
|
||||||
|
INFO "Forced USD building, as requested..."
|
||||||
|
compile_USD
|
||||||
|
else
|
||||||
|
compile_USD
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$WITH_OPENCOLLADA" = true ]; then
|
if [ "$WITH_OPENCOLLADA" = true ]; then
|
||||||
PRINT ""
|
PRINT ""
|
||||||
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
if [ "$OPENCOLLADA_SKIP" = true ]; then
|
||||||
@@ -6284,7 +6558,8 @@ print_info() {
|
|||||||
|
|
||||||
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
|
_buildargs="-U *SNDFILE* -U PYTHON* -U *BOOST* -U *Boost* -U *TBB*"
|
||||||
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CLANG* -U *CYCLES*"
|
_buildargs="$_buildargs -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CLANG* -U *CYCLES*"
|
||||||
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -U *USD*"
|
_buildargs="$_buildargs -U *OPENSUBDIV* -U *OPENVDB* -U *BLOSC* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC*"
|
||||||
|
_buildargs="$_buildargs -U *MATERIALX* -U *USD*"
|
||||||
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR* -U *OPENPGL*"
|
_buildargs="$_buildargs -U *EMBREE* -U *OPENIMAGEDENOISE* -U *OPENXR* -U *OPENPGL*"
|
||||||
|
|
||||||
_1="-D WITH_CODEC_SNDFILE=ON"
|
_1="-D WITH_CODEC_SNDFILE=ON"
|
||||||
@@ -6471,6 +6746,17 @@ print_info() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$MATERIALX_SKIP" = false ]; then
|
||||||
|
_1="-D WITH_MATERIALX=ON"
|
||||||
|
PRINT " $_1"
|
||||||
|
_buildargs="$_buildargs $_1"
|
||||||
|
if [ -d $INST/materialx ]; then
|
||||||
|
_1="-D MaterialX_DIR=$INST/materialx/lib/cmake/MaterialX"
|
||||||
|
PRINT " $_1"
|
||||||
|
_buildargs="$_buildargs $_1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$USD_SKIP" = false ]; then
|
if [ "$USD_SKIP" = false ]; then
|
||||||
_1="-D WITH_USD=ON"
|
_1="-D WITH_USD=ON"
|
||||||
PRINT " $_1"
|
PRINT " $_1"
|
||||||
|
@@ -11,19 +11,31 @@ if [ `id -u` -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# yum-config-manager does not come in the default minimal install,
|
# Required by: config manager command below to enable powertools.
|
||||||
|
dnf install 'dnf-command(config-manager)'
|
||||||
|
|
||||||
|
# Packages `ninja-build` and `meson` are not available unless CBR or PowerTools repositories are enabled.
|
||||||
|
# See: https://wiki.rockylinux.org/rocky/repo/#notes-on-unlisted-repositories
|
||||||
|
dnf config-manager --set-enabled powertools
|
||||||
|
|
||||||
|
# Required by: epel-release has the patchelf and rubygem-asciidoctor packages
|
||||||
|
dnf install epel-release
|
||||||
|
|
||||||
|
# `yum-config-manager` does not come in the default minimal install,
|
||||||
# so make sure it is installed and available.
|
# so make sure it is installed and available.
|
||||||
yum -y update
|
yum -y update
|
||||||
yum -y install yum-utils
|
yum -y install yum-utils
|
||||||
|
|
||||||
# Install all the packages needed for a new toolchain.
|
# Install all the packages needed for a new tool-chain.
|
||||||
#
|
#
|
||||||
# NOTE: Keep this separate from the packages install, since otherwise
|
# NOTE: Keep this separate from the packages install, since otherwise
|
||||||
# older toolchain will be installed.
|
# older tool-chain will be installed.
|
||||||
yum -y update
|
yum -y update
|
||||||
yum -y install epel-release
|
yum -y install scl-utils
|
||||||
yum -y install centos-release-scl
|
yum -y install scl-utils-build
|
||||||
yum -y install devtoolset-9
|
|
||||||
|
# Currently this is defined by the VFX platform (CY2023), see: https://vfxplatform.com
|
||||||
|
yum -y install gcc-toolset-11
|
||||||
|
|
||||||
# Install packages needed for Blender's dependencies.
|
# Install packages needed for Blender's dependencies.
|
||||||
PACKAGES_FOR_LIBS=(
|
PACKAGES_FOR_LIBS=(
|
||||||
@@ -47,19 +59,12 @@ PACKAGES_FOR_LIBS=(
|
|||||||
automake
|
automake
|
||||||
libtool
|
libtool
|
||||||
|
|
||||||
# Meta-build system used by various packages.
|
# TODO: why is this needed?
|
||||||
meson
|
patchelf
|
||||||
|
|
||||||
# Builds generated by meson use Ninja for the actual build.
|
# Builds generated by meson use Ninja for the actual build.
|
||||||
ninja-build
|
ninja-build
|
||||||
|
|
||||||
# Required by Blender build option: `WITH_GHOST_X11`.
|
|
||||||
libXrandr-devel
|
|
||||||
libXinerama-devel
|
|
||||||
libXcursor-devel
|
|
||||||
libXi-devel
|
|
||||||
libX11-devel
|
|
||||||
libXt-devel
|
|
||||||
|
|
||||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||||
mesa-libEGL-devel
|
mesa-libEGL-devel
|
||||||
# Required by: Blender & `external_opensubdiv` (probably others).
|
# Required by: Blender & `external_opensubdiv` (probably others).
|
||||||
@@ -79,52 +84,47 @@ PACKAGES_FOR_LIBS=(
|
|||||||
# Why are both needed?
|
# Why are both needed?
|
||||||
yasm
|
yasm
|
||||||
|
|
||||||
# Required by: `meson` (Python based build system).
|
# NOTE(@campbellbarton): while `python39` is available, the default Python version is 3.6.
|
||||||
python36
|
# This is used for the `python3-mako` package for e.g.
|
||||||
# Required by: `mako` (Python module used for building `external_mesa`)
|
# So use the "default" system Python since it means it's most compatible with other packages.
|
||||||
python-setuptools
|
python3
|
||||||
|
# Required by: `external_mesa`.
|
||||||
|
python3-mako
|
||||||
|
|
||||||
|
# Required by: `external_mesa`.
|
||||||
|
expat-devel
|
||||||
|
|
||||||
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
# Required by: `external_igc` & `external_osl` as a build-time dependency.
|
||||||
bison
|
bison
|
||||||
# Required by: `external_osl` as a build-time dependency.
|
# Required by: `external_osl` as a build-time dependency.
|
||||||
flex
|
flex
|
||||||
# TODO: dependencies build without this, consider removal.
|
|
||||||
|
# Required by: `external_ispc`.
|
||||||
ncurses-devel
|
ncurses-devel
|
||||||
|
# Required by: `external_ispc` (when building with CLANG).
|
||||||
|
libstdc++-static
|
||||||
)
|
)
|
||||||
|
|
||||||
# Additional packages needed for building Blender.
|
# Additional packages needed for building Blender.
|
||||||
PACKAGES_FOR_BLENDER=(
|
PACKAGES_FOR_BLENDER=(
|
||||||
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
# Required by Blender build option: `WITH_GHOST_WAYLAND`.
|
||||||
libxkbcommon-devel
|
libxkbcommon-devel
|
||||||
|
|
||||||
|
# Required by Blender build option: `WITH_GHOST_X11`.
|
||||||
|
libX11-devel
|
||||||
|
libXcursor-devel
|
||||||
|
libXi-devel
|
||||||
|
libXinerama-devel
|
||||||
|
libXrandr-devel
|
||||||
|
libXt-devel
|
||||||
|
libXxf86vm-devel
|
||||||
)
|
)
|
||||||
|
|
||||||
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
yum -y install -y ${PACKAGES_FOR_LIBS[@]} ${PACKAGES_FOR_BLENDER[@]}
|
||||||
|
|
||||||
# Dependencies for Mesa
|
# Dependencies for pip (needed for `buildbot-worker`), uses Python3.6.
|
||||||
yum -y install expat-devel
|
yum -y install python3 python3-pip python3-devel
|
||||||
python3 -m pip install mako
|
|
||||||
|
|
||||||
# Dependencies for pip (needed for buildbot-worker).
|
|
||||||
yum -y install python36-pip python36-devel
|
|
||||||
|
|
||||||
# Dependencies for asound.
|
# Dependencies for asound.
|
||||||
yum -y install -y \
|
yum -y install -y \
|
||||||
alsa-lib-devel pulseaudio-libs-devel
|
alsa-lib-devel pulseaudio-libs-devel
|
||||||
|
|
||||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \
|
|
||||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest \
|
|
||||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack \
|
|
||||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \
|
|
||||||
--family cmake
|
|
||||||
|
|
||||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
|
||||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
|
||||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
|
||||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
|
||||||
--family cmake
|
|
||||||
|
|
||||||
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
|
|
||||||
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
|
|
||||||
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
|
|
||||||
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
|
|
||||||
--family cmake
|
|
12
build_files/build_environment/patches/boost.diff
Normal file
12
build_files/build_environment/patches/boost.diff
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
--- a/boost/python//detail/wrap_python.hpp 2022-12-09 19:16:17
|
||||||
|
+++ b/boost/python//detail/wrap_python.hpp 2022-12-09 19:18:08
|
||||||
|
@@ -206,7 +206,8 @@
|
||||||
|
|
||||||
|
#ifdef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
|
||||||
|
# undef DEBUG_UNDEFINED_FROM_WRAP_PYTHON_H
|
||||||
|
-# define _DEBUG
|
||||||
|
+// BLENDER: TBB excepts this to have a value.
|
||||||
|
+# define _DEBUG 1
|
||||||
|
# ifdef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
|
||||||
|
# undef _CRT_NOFORCE_MANIFEST_DEFINED_FROM_WRAP_PYTHON_H
|
||||||
|
# undef _CRT_NOFORCE_MANIFEST
|
@@ -90,3 +90,25 @@ diff -Naur orig/openvdb/openvdb/tree/ValueAccessor.h openvdb/openvdb/openvdb/tre
|
|||||||
|
|
||||||
CacheItem(TreeCacheT& parent)
|
CacheItem(TreeCacheT& parent)
|
||||||
: mParent(&parent)
|
: mParent(&parent)
|
||||||
|
diff --git a/nanovdb/nanovdb/NanoVDB.h b/nanovdb/nanovdb/NanoVDB.h
|
||||||
|
index f7fc304..fde5c47 100644
|
||||||
|
--- a/nanovdb/nanovdb/NanoVDB.h
|
||||||
|
+++ b/nanovdb/nanovdb/NanoVDB.h
|
||||||
|
@@ -1877,7 +1877,7 @@ __hostdev__ static inline uint32_t FindLowestOn(uint64_t v)
|
||||||
|
{
|
||||||
|
NANOVDB_ASSERT(v);
|
||||||
|
#if (defined(__CUDA_ARCH__) || defined(__HIP__)) && defined(NANOVDB_USE_INTRINSICS)
|
||||||
|
- return __ffsll(v);
|
||||||
|
+ return __ffsll(static_cast<unsigned long long int>(v));
|
||||||
|
#elif defined(_MSC_VER) && defined(NANOVDB_USE_INTRINSICS)
|
||||||
|
unsigned long index;
|
||||||
|
_BitScanForward64(&index, v);
|
||||||
|
@@ -2592,7 +2592,7 @@ public:
|
||||||
|
///
|
||||||
|
/// @note This method is only defined for IndexGrid = NanoGrid<ValueIndex>
|
||||||
|
template <typename T = BuildType>
|
||||||
|
- __hostdev__ typename enable_if<is_same<T, ValueIndex>::value, uint64_t>::type valueCount() const {return DataType::mData1;}
|
||||||
|
+ __hostdev__ typename enable_if<is_same<T, ValueIndex>::value, const uint64_t&>::type valueCount() const {return DataType::mData1;}
|
||||||
|
|
||||||
|
/// @brief Return a const reference to the tree
|
||||||
|
__hostdev__ const TreeT& tree() const { return *reinterpret_cast<const TreeT*>(this->treePtr()); }
|
||||||
|
@@ -36,3 +36,39 @@ index a97a755..07ce853 100644
|
|||||||
if (self.compiler.find_library_file(self.lib_dirs, lib_name)):
|
if (self.compiler.find_library_file(self.lib_dirs, lib_name)):
|
||||||
ffi_lib = lib_name
|
ffi_lib = lib_name
|
||||||
break
|
break
|
||||||
|
--- a/Modules/posixmodule.c 2022-12-09 21:44:03
|
||||||
|
+++ b/Modules/posixmodule.c 2022-12-09 21:39:46
|
||||||
|
@@ -10564,10 +10564,15 @@
|
||||||
|
Py_BEGIN_ALLOW_THREADS
|
||||||
|
#ifdef HAVE_MKFIFOAT
|
||||||
|
if (dir_fd != DEFAULT_DIR_FD) {
|
||||||
|
+// BLENDER: disable also at compile time for compatibility when linking with older Xcode.
|
||||||
|
+// https://github.com/python/cpython/issues/97897
|
||||||
|
+#ifndef __APPLE__
|
||||||
|
if (HAVE_MKFIFOAT_RUNTIME) {
|
||||||
|
result = mkfifoat(dir_fd, path->narrow, mode);
|
||||||
|
|
||||||
|
+ } else
|
||||||
|
+#endif
|
||||||
|
+ {
|
||||||
|
- } else {
|
||||||
|
mkfifoat_unavailable = 1;
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
@@ -10638,10 +10633,15 @@
|
||||||
|
Py_BEGIN_ALLOW_THREADS
|
||||||
|
#ifdef HAVE_MKNODAT
|
||||||
|
if (dir_fd != DEFAULT_DIR_FD) {
|
||||||
|
+// BLENDER: disable also at compile time for compatibility when linking with older Xcode.
|
||||||
|
+// https://github.com/python/cpython/issues/97897
|
||||||
|
+#ifndef __APPLE__
|
||||||
|
if (HAVE_MKNODAT_RUNTIME) {
|
||||||
|
result = mknodat(dir_fd, path->narrow, mode, device);
|
||||||
|
|
||||||
|
+ } else
|
||||||
|
+#endif
|
||||||
|
+ {
|
||||||
|
- } else {
|
||||||
|
mknodat_unavailable = 1;
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
@@ -30,3 +30,19 @@ diff -ru ./src/video/SDL_video.c ./src/video/SDL_video.c
|
|||||||
if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */
|
if (SDL_strcmp(_this->name, "cocoa") == 0) { /* don't do this for X11, etc */
|
||||||
if (Cocoa_IsWindowInFullscreenSpace(window)) {
|
if (Cocoa_IsWindowInFullscreenSpace(window)) {
|
||||||
return SDL_FALSE;
|
return SDL_FALSE;
|
||||||
|
--- CMakeLists.txt 2022-12-09 20:40:00
|
||||||
|
+++ CMakeLists.txt 2022-12-09 20:40:00
|
||||||
|
@@ -526,6 +526,13 @@
|
||||||
|
list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+ # BLENDER: make libs compatible with older Xcode.
|
||||||
|
+ # https://github.com/KhronosGroup/MoltenVK/issues/1756
|
||||||
|
+ check_c_compiler_flag(-fno-objc-msgsend-selector-stubs HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||||
|
+ if(HAVE_GCC_NO_OBJC_MSGSEND_SELECTOR_STUBS)
|
||||||
|
+ list(APPEND EXTRA_CFLAGS "-fno-objc-msgsend-selector-stubs")
|
||||||
|
+ endif()
|
||||||
|
+
|
||||||
|
check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||||
|
if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
|
||||||
|
check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
|
||||||
|
@@ -1,11 +0,0 @@
|
|||||||
--- meson.build.orig 2022-06-30 22:59:11.000000000 +0100
|
|
||||||
+++ meson.build 2022-09-27 13:21:26.428517668 +0100
|
|
||||||
@@ -2,7 +2,7 @@
|
|
||||||
'wayland', 'c',
|
|
||||||
version: '1.21.0',
|
|
||||||
license: 'MIT',
|
|
||||||
- meson_version: '>= 0.56.0',
|
|
||||||
+ meson_version: '>= 0.55.1',
|
|
||||||
default_options: [
|
|
||||||
'warning_level=2',
|
|
||||||
'buildtype=debugoptimized',
|
|
@@ -4,10 +4,9 @@
|
|||||||
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_release.cmake")
|
||||||
|
|
||||||
message(STATUS "Building in CentOS 7 64bit environment")
|
message(STATUS "Building in Rocky 8 Linux 64bit environment")
|
||||||
|
|
||||||
set(LIBDIR_NAME "linux_centos7_x86_64")
|
set(LIBDIR_NAME "linux_x86_64_glibc_228")
|
||||||
set(WITH_CXX11_ABI OFF CACHE BOOL "" FORCE)
|
|
||||||
|
|
||||||
# ######## Linux-specific build options ########
|
# ######## Linux-specific build options ########
|
||||||
# Options which are specific to Linux-only platforms
|
# Options which are specific to Linux-only platforms
|
||||||
@@ -28,4 +27,4 @@ set(LIBDIR "${CMAKE_CURRENT_LIST_DIR}/../../../../lib/${LIBDIR_NAME}" CACHE STRI
|
|||||||
# Platform specific configuration, to ensure static linking against everything.
|
# Platform specific configuration, to ensure static linking against everything.
|
||||||
|
|
||||||
# Additional linking libraries
|
# Additional linking libraries
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-lrt -no-pie" CACHE STRING "" FORCE)
|
set(CMAKE_EXE_LINKER_FLAGS "-lrt -no-pie" CACHE STRING "" FORCE)
|
||||||
|
@@ -172,7 +172,7 @@ ENDIF()
|
|||||||
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR DEFAULT_MSG
|
||||||
_openexr_LIBRARIES OPENEXR_INCLUDE_DIR)
|
_openexr_LIBRARIES OPENEXR_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(OPENEXR_FOUND)
|
IF(OPENEXR_FOUND)
|
||||||
|
@@ -22,7 +22,7 @@ endif()
|
|||||||
|
|
||||||
# Used for: `source/blender/blenlib/intern/system.c`.
|
# Used for: `source/blender/blenlib/intern/system.c`.
|
||||||
# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC),
|
# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC),
|
||||||
# so check the presence of the header before including it and using the it for back-trace.
|
# so check the presence of the header before including it and using the it for back-trace.
|
||||||
set(HAVE_EXECINFO_H OFF)
|
set(HAVE_EXECINFO_H OFF)
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
include(CheckIncludeFiles)
|
include(CheckIncludeFiles)
|
||||||
|
@@ -326,8 +326,8 @@ function(blender_add_lib__impl
|
|||||||
# NOTE: If separated libraries for debug and release are needed every library is the list are
|
# NOTE: If separated libraries for debug and release are needed every library is the list are
|
||||||
# to be prefixed explicitly.
|
# to be prefixed explicitly.
|
||||||
#
|
#
|
||||||
# Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d"
|
# Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d"
|
||||||
# NOT: "optimized libfoo libbar debug libfoo_d libbar_d"
|
# NOT: "optimized libfoo libbar debug libfoo_d libbar_d"
|
||||||
if(NOT "${library_deps}" STREQUAL "")
|
if(NOT "${library_deps}" STREQUAL "")
|
||||||
set(next_library_mode "")
|
set(next_library_mode "")
|
||||||
foreach(library ${library_deps})
|
foreach(library ${library_deps})
|
||||||
@@ -535,7 +535,7 @@ function(setup_platform_linker_flags
|
|||||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " ${PLATFORM_LINKFLAGS_DEBUG}")
|
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " ${PLATFORM_LINKFLAGS_DEBUG}")
|
||||||
|
|
||||||
get_target_property(target_type ${target} TYPE)
|
get_target_property(target_type ${target} TYPE)
|
||||||
if (target_type STREQUAL "EXECUTABLE")
|
if(target_type STREQUAL "EXECUTABLE")
|
||||||
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${PLATFORM_LINKFLAGS_EXECUTABLE}")
|
set_property(TARGET ${target} APPEND_STRING PROPERTY LINK_FLAGS " ${PLATFORM_LINKFLAGS_EXECUTABLE}")
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
@@ -1219,10 +1219,10 @@ macro(openmp_delayload
|
|||||||
else()
|
else()
|
||||||
set(OPENMP_DLL_NAME "vcomp140")
|
set(OPENMP_DLL_NAME "vcomp140")
|
||||||
endif()
|
endif()
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
@@ -1334,13 +1334,13 @@ macro(windows_generate_shared_manifest)
|
|||||||
NAME "blender.shared"
|
NAME "blender.shared"
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_BINARY_DIR}/Release/blender.shared.manifest
|
FILES ${CMAKE_BINARY_DIR}/Release/blender.shared.manifest
|
||||||
DESTINATION "./blender.shared"
|
DESTINATION "./blender.shared"
|
||||||
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
|
||||||
)
|
)
|
||||||
install(
|
install(
|
||||||
FILES ${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest
|
FILES ${CMAKE_BINARY_DIR}/Debug/blender.shared.manifest
|
||||||
DESTINATION "./blender.shared"
|
DESTINATION "./blender.shared"
|
||||||
CONFIGURATIONS Debug
|
CONFIGURATIONS Debug
|
||||||
)
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
@@ -86,16 +86,14 @@ endif()
|
|||||||
|
|
||||||
if(WITH_USD)
|
if(WITH_USD)
|
||||||
find_package(USD REQUIRED)
|
find_package(USD REQUIRED)
|
||||||
add_bundled_libraries(usd/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(usd/lib)
|
||||||
|
|
||||||
if(WITH_MATERIALX)
|
if(WITH_MATERIALX)
|
||||||
find_package(MaterialX)
|
find_package(MaterialX)
|
||||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||||
if(WITH_MATERIALX)
|
|
||||||
add_bundled_libraries(materialx/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(materialx/lib)
|
||||||
|
|
||||||
if(WITH_VULKAN_BACKEND)
|
if(WITH_VULKAN_BACKEND)
|
||||||
find_package(MoltenVK REQUIRED)
|
find_package(MoltenVK REQUIRED)
|
||||||
@@ -105,9 +103,10 @@ if(WITH_VULKAN_BACKEND)
|
|||||||
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan/macOS)
|
set(VULKAN_ROOT_DIR ${LIBDIR}/vulkan/macOS)
|
||||||
set(VULKAN_INCLUDE_DIR ${VULKAN_ROOT_DIR}/include)
|
set(VULKAN_INCLUDE_DIR ${VULKAN_ROOT_DIR}/include)
|
||||||
set(VULKAN_LIBRARY ${VULKAN_ROOT_DIR}/lib/libvulkan.1.dylib)
|
set(VULKAN_LIBRARY ${VULKAN_ROOT_DIR}/lib/libvulkan.1.dylib)
|
||||||
|
set(SHADERC_LIBRARY ${VULKAN_ROOT_DIR}/lib/libshaderc_combined.a)
|
||||||
|
|
||||||
set(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR} ${MOLTENVK_INCLUDE_DIRS})
|
set(VULKAN_INCLUDE_DIRS ${VULKAN_INCLUDE_DIR} ${MOLTENVK_INCLUDE_DIRS})
|
||||||
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY} ${MOLTENVK_LIBRARIES})
|
set(VULKAN_LIBRARIES ${VULKAN_LIBRARY} ${SHADERC_LIBRARY} ${MOLTENVK_LIBRARIES})
|
||||||
else()
|
else()
|
||||||
message(WARNING "Vulkan SDK was not found, disabling WITH_VULKAN_BACKEND")
|
message(WARNING "Vulkan SDK was not found, disabling WITH_VULKAN_BACKEND")
|
||||||
set(WITH_VULKAN_BACKEND OFF)
|
set(WITH_VULKAN_BACKEND OFF)
|
||||||
@@ -116,8 +115,8 @@ endif()
|
|||||||
|
|
||||||
if(WITH_OPENSUBDIV)
|
if(WITH_OPENSUBDIV)
|
||||||
find_package(OpenSubdiv)
|
find_package(OpenSubdiv)
|
||||||
add_bundled_libraries(opensubdiv/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(opensubdiv/lib)
|
||||||
|
|
||||||
if(WITH_CODEC_SNDFILE)
|
if(WITH_CODEC_SNDFILE)
|
||||||
find_package(SndFile)
|
find_package(SndFile)
|
||||||
@@ -155,9 +154,9 @@ list(APPEND FREETYPE_LIBRARIES
|
|||||||
|
|
||||||
if(WITH_IMAGE_OPENEXR)
|
if(WITH_IMAGE_OPENEXR)
|
||||||
find_package(OpenEXR)
|
find_package(OpenEXR)
|
||||||
add_bundled_libraries(openexr/lib)
|
|
||||||
add_bundled_libraries(imath/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openexr/lib)
|
||||||
|
add_bundled_libraries(imath/lib)
|
||||||
|
|
||||||
if(WITH_CODEC_FFMPEG)
|
if(WITH_CODEC_FFMPEG)
|
||||||
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
|
set(FFMPEG_ROOT_DIR ${LIBDIR}/ffmpeg)
|
||||||
@@ -269,12 +268,11 @@ if(WITH_BOOST)
|
|||||||
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
|
||||||
set(BOOST_DEFINITIONS)
|
set(BOOST_DEFINITIONS)
|
||||||
|
|
||||||
add_bundled_libraries(boost/lib)
|
|
||||||
|
|
||||||
mark_as_advanced(Boost_LIBRARIES)
|
mark_as_advanced(Boost_LIBRARIES)
|
||||||
mark_as_advanced(Boost_INCLUDE_DIRS)
|
mark_as_advanced(Boost_INCLUDE_DIRS)
|
||||||
unset(_boost_FIND_COMPONENTS)
|
unset(_boost_FIND_COMPONENTS)
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(boost/lib)
|
||||||
|
|
||||||
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
|
||||||
string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
|
string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
|
||||||
@@ -296,13 +294,13 @@ if(WITH_OPENIMAGEIO)
|
|||||||
)
|
)
|
||||||
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
|
||||||
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
|
||||||
add_bundled_libraries(openimageio/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openimageio/lib)
|
||||||
|
|
||||||
if(WITH_OPENCOLORIO)
|
if(WITH_OPENCOLORIO)
|
||||||
find_package(OpenColorIO 2.0.0 REQUIRED)
|
find_package(OpenColorIO 2.0.0 REQUIRED)
|
||||||
add_bundled_libraries(opencolorio/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(opencolorio/lib)
|
||||||
|
|
||||||
if(WITH_OPENVDB)
|
if(WITH_OPENVDB)
|
||||||
find_package(OpenVDB)
|
find_package(OpenVDB)
|
||||||
@@ -313,8 +311,8 @@ if(WITH_OPENVDB)
|
|||||||
unset(BLOSC_LIBRARIES CACHE)
|
unset(BLOSC_LIBRARIES CACHE)
|
||||||
endif()
|
endif()
|
||||||
set(OPENVDB_DEFINITIONS)
|
set(OPENVDB_DEFINITIONS)
|
||||||
add_bundled_libraries(openvdb/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openvdb/lib)
|
||||||
|
|
||||||
if(WITH_NANOVDB)
|
if(WITH_NANOVDB)
|
||||||
find_package(NanoVDB)
|
find_package(NanoVDB)
|
||||||
@@ -362,8 +360,8 @@ endif()
|
|||||||
|
|
||||||
if(WITH_TBB)
|
if(WITH_TBB)
|
||||||
find_package(TBB REQUIRED)
|
find_package(TBB REQUIRED)
|
||||||
add_bundled_libraries(tbb/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(tbb/lib)
|
||||||
|
|
||||||
if(WITH_POTRACE)
|
if(WITH_POTRACE)
|
||||||
find_package(Potrace REQUIRED)
|
find_package(Potrace REQUIRED)
|
||||||
@@ -381,9 +379,9 @@ if(WITH_OPENMP)
|
|||||||
set(OpenMP_LIBRARY_DIR "${LIBDIR}/openmp/lib/")
|
set(OpenMP_LIBRARY_DIR "${LIBDIR}/openmp/lib/")
|
||||||
set(OpenMP_LINKER_FLAGS "-L'${OpenMP_LIBRARY_DIR}' -lomp")
|
set(OpenMP_LINKER_FLAGS "-L'${OpenMP_LIBRARY_DIR}' -lomp")
|
||||||
set(OpenMP_LIBRARY "${OpenMP_LIBRARY_DIR}/libomp.dylib")
|
set(OpenMP_LIBRARY "${OpenMP_LIBRARY_DIR}/libomp.dylib")
|
||||||
add_bundled_libraries(openmp/lib)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openmp/lib)
|
||||||
|
|
||||||
if(WITH_XR_OPENXR)
|
if(WITH_XR_OPENXR)
|
||||||
find_package(XR_OpenXR_SDK REQUIRED)
|
find_package(XR_OpenXR_SDK REQUIRED)
|
||||||
|
@@ -3,15 +3,40 @@
|
|||||||
|
|
||||||
# Auto update existing CMake caches for new libraries
|
# Auto update existing CMake caches for new libraries
|
||||||
|
|
||||||
|
# Clear cached variables whose name matches `pattern`.
|
||||||
function(unset_cache_variables pattern)
|
function(unset_cache_variables pattern)
|
||||||
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
||||||
foreach (_cache_variable ${_cache_variables})
|
foreach(_cache_variable ${_cache_variables})
|
||||||
if("${_cache_variable}" MATCHES "${pattern}")
|
if("${_cache_variable}" MATCHES "${pattern}")
|
||||||
unset(${_cache_variable} CACHE)
|
unset(${_cache_variable} CACHE)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
# Clear cached variables with values containing `contents`.
|
||||||
|
function(unset_cached_varables_containting contents msg)
|
||||||
|
get_cmake_property(_cache_variables CACHE_VARIABLES)
|
||||||
|
set(_found)
|
||||||
|
set(_print_msg)
|
||||||
|
foreach(_cache_variable ${_cache_variables})
|
||||||
|
# Skip "_" prefixed variables, these are used for internal book-keeping,
|
||||||
|
# not under user control.
|
||||||
|
string(FIND "${_cache_variable}" "_" _found)
|
||||||
|
if(NOT (_found EQUAL 0))
|
||||||
|
string(FIND "${${_cache_variable}}" "${contents}" _found)
|
||||||
|
if(NOT (_found EQUAL -1))
|
||||||
|
if(_found)
|
||||||
|
unset(${_cache_variable} CACHE)
|
||||||
|
set(_print_msg ON)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if(_print_msg)
|
||||||
|
message(STATUS ${msg})
|
||||||
|
endif()
|
||||||
|
endfunction()
|
||||||
|
|
||||||
# Detect update from 3.1 to 3.2 libs.
|
# Detect update from 3.1 to 3.2 libs.
|
||||||
if(UNIX AND
|
if(UNIX AND
|
||||||
DEFINED OPENEXR_VERSION AND
|
DEFINED OPENEXR_VERSION AND
|
||||||
@@ -63,3 +88,13 @@ if(UNIX AND
|
|||||||
unset_cache_variables("^TBB")
|
unset_cache_variables("^TBB")
|
||||||
unset_cache_variables("^USD")
|
unset_cache_variables("^USD")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(UNIX AND (NOT APPLE) AND LIBDIR AND (EXISTS ${LIBDIR}))
|
||||||
|
# Only search for the path if it's found on the system.
|
||||||
|
set(_libdir_stale "/lib/linux_centos7_x86_64/")
|
||||||
|
unset_cached_varables_containting(
|
||||||
|
"${_libdir_stale}"
|
||||||
|
"Auto clearing old ${_libdir_stale} paths from CMake configuration"
|
||||||
|
)
|
||||||
|
unset(_libdir_stale)
|
||||||
|
endif()
|
||||||
|
@@ -10,16 +10,15 @@ if(NOT DEFINED LIBDIR)
|
|||||||
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
|
||||||
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
|
||||||
|
|
||||||
# Path to precompiled libraries with known CentOS 7 ABI.
|
# Path to precompiled libraries with known glibc 2.28 ABI.
|
||||||
set(LIBDIR_CENTOS7_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_centos7_x86_64)
|
set(LIBDIR_GLIBC228_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_x86_64_glibc_228)
|
||||||
|
|
||||||
# Choose the best suitable libraries.
|
# Choose the best suitable libraries.
|
||||||
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
if(EXISTS ${LIBDIR_NATIVE_ABI})
|
||||||
set(LIBDIR ${LIBDIR_NATIVE_ABI})
|
set(LIBDIR ${LIBDIR_NATIVE_ABI})
|
||||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND True)
|
||||||
elseif(EXISTS ${LIBDIR_CENTOS7_ABI})
|
elseif(EXISTS ${LIBDIR_GLIBC228_ABI})
|
||||||
set(LIBDIR ${LIBDIR_CENTOS7_ABI})
|
set(LIBDIR ${LIBDIR_GLIBC228_ABI})
|
||||||
set(WITH_CXX11_ABI OFF)
|
|
||||||
if(WITH_MEM_JEMALLOC)
|
if(WITH_MEM_JEMALLOC)
|
||||||
# jemalloc provides malloc hooks.
|
# jemalloc provides malloc hooks.
|
||||||
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
|
set(WITH_LIBC_MALLOC_HOOK_WORKAROUND False)
|
||||||
@@ -30,7 +29,7 @@ if(NOT DEFINED LIBDIR)
|
|||||||
|
|
||||||
# Avoid namespace pollustion.
|
# Avoid namespace pollustion.
|
||||||
unset(LIBDIR_NATIVE_ABI)
|
unset(LIBDIR_NATIVE_ABI)
|
||||||
unset(LIBDIR_CENTOS7_ABI)
|
unset(LIBDIR_GLIBC228_ABI)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Support restoring this value once pre-compiled libraries have been handled.
|
# Support restoring this value once pre-compiled libraries have been handled.
|
||||||
@@ -167,11 +166,9 @@ endif()
|
|||||||
if(WITH_IMAGE_OPENEXR)
|
if(WITH_IMAGE_OPENEXR)
|
||||||
find_package_wrapper(OpenEXR) # our own module
|
find_package_wrapper(OpenEXR) # our own module
|
||||||
set_and_warn_library_found("OpenEXR" OPENEXR_FOUND WITH_IMAGE_OPENEXR)
|
set_and_warn_library_found("OpenEXR" OPENEXR_FOUND WITH_IMAGE_OPENEXR)
|
||||||
if(WITH_IMAGE_OPENEXR)
|
|
||||||
add_bundled_libraries(openexr/lib)
|
|
||||||
add_bundled_libraries(imath/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openexr/lib)
|
||||||
|
add_bundled_libraries(imath/lib)
|
||||||
|
|
||||||
if(WITH_IMAGE_OPENJPEG)
|
if(WITH_IMAGE_OPENJPEG)
|
||||||
find_package_wrapper(OpenJPEG)
|
find_package_wrapper(OpenJPEG)
|
||||||
@@ -329,13 +326,8 @@ endif()
|
|||||||
if(WITH_OPENVDB)
|
if(WITH_OPENVDB)
|
||||||
find_package(OpenVDB)
|
find_package(OpenVDB)
|
||||||
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
set_and_warn_library_found("OpenVDB" OPENVDB_FOUND WITH_OPENVDB)
|
||||||
|
|
||||||
if(OPENVDB_FOUND)
|
|
||||||
add_bundled_libraries(openvdb/lib)
|
|
||||||
find_package_wrapper(Blosc)
|
|
||||||
set_and_warn_library_found("Blosc" BLOSC_FOUND WITH_OPENVDB_BLOSC)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openvdb/lib)
|
||||||
|
|
||||||
if(WITH_NANOVDB)
|
if(WITH_NANOVDB)
|
||||||
find_package_wrapper(NanoVDB)
|
find_package_wrapper(NanoVDB)
|
||||||
@@ -354,18 +346,14 @@ endif()
|
|||||||
if(WITH_USD)
|
if(WITH_USD)
|
||||||
find_package_wrapper(USD)
|
find_package_wrapper(USD)
|
||||||
set_and_warn_library_found("USD" USD_FOUND WITH_USD)
|
set_and_warn_library_found("USD" USD_FOUND WITH_USD)
|
||||||
if(WITH_USD)
|
|
||||||
add_bundled_libraries(usd/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(usd/lib)
|
||||||
|
|
||||||
if(WITH_MATERIALX)
|
if(WITH_MATERIALX)
|
||||||
find_package_wrapper(MaterialX)
|
find_package_wrapper(MaterialX)
|
||||||
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
set_and_warn_library_found("MaterialX" MaterialX_FOUND WITH_MATERIALX)
|
||||||
if(WITH_MATERIALX)
|
|
||||||
add_bundled_libraries(materialx/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(materialx/lib)
|
||||||
|
|
||||||
if(WITH_BOOST)
|
if(WITH_BOOST)
|
||||||
# uses in build instructions to override include and library variables
|
# uses in build instructions to override include and library variables
|
||||||
@@ -421,9 +409,8 @@ if(WITH_BOOST)
|
|||||||
find_package(IcuLinux)
|
find_package(IcuLinux)
|
||||||
list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES})
|
list(APPEND BOOST_LIBRARIES ${ICU_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_bundled_libraries(boost/lib)
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(boost/lib)
|
||||||
|
|
||||||
if(WITH_PUGIXML)
|
if(WITH_PUGIXML)
|
||||||
find_package_wrapper(PugiXML)
|
find_package_wrapper(PugiXML)
|
||||||
@@ -458,21 +445,16 @@ if(WITH_OPENIMAGEIO)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_and_warn_library_found("OPENIMAGEIO" OPENIMAGEIO_FOUND WITH_OPENIMAGEIO)
|
set_and_warn_library_found("OPENIMAGEIO" OPENIMAGEIO_FOUND WITH_OPENIMAGEIO)
|
||||||
if(WITH_OPENIMAGEIO)
|
|
||||||
add_bundled_libraries(openimageio/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(openimageio/lib)
|
||||||
|
|
||||||
if(WITH_OPENCOLORIO)
|
if(WITH_OPENCOLORIO)
|
||||||
find_package_wrapper(OpenColorIO 2.0.0)
|
find_package_wrapper(OpenColorIO 2.0.0)
|
||||||
|
|
||||||
set(OPENCOLORIO_DEFINITIONS)
|
set(OPENCOLORIO_DEFINITIONS)
|
||||||
set_and_warn_library_found("OpenColorIO" OPENCOLORIO_FOUND WITH_OPENCOLORIO)
|
set_and_warn_library_found("OpenColorIO" OPENCOLORIO_FOUND WITH_OPENCOLORIO)
|
||||||
|
|
||||||
if(WITH_OPENCOLORIO)
|
|
||||||
add_bundled_libraries(opencolorio/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(opencolorio/lib)
|
||||||
|
|
||||||
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
|
||||||
find_package(Embree 3.8.0 REQUIRED)
|
find_package(Embree 3.8.0 REQUIRED)
|
||||||
@@ -513,18 +495,14 @@ if(WITH_OPENSUBDIV)
|
|||||||
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
set(OPENSUBDIV_LIBPATH) # TODO, remove and reference the absolute path everywhere
|
||||||
|
|
||||||
set_and_warn_library_found("OpenSubdiv" OPENSUBDIV_FOUND WITH_OPENSUBDIV)
|
set_and_warn_library_found("OpenSubdiv" OPENSUBDIV_FOUND WITH_OPENSUBDIV)
|
||||||
if(WITH_OPENSUBDIV)
|
|
||||||
add_bundled_libraries(opensubdiv/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(opensubdiv/lib)
|
||||||
|
|
||||||
if(WITH_TBB)
|
if(WITH_TBB)
|
||||||
find_package_wrapper(TBB)
|
find_package_wrapper(TBB)
|
||||||
set_and_warn_library_found("TBB" TBB_FOUND WITH_TBB)
|
set_and_warn_library_found("TBB" TBB_FOUND WITH_TBB)
|
||||||
if(WITH_TBB)
|
|
||||||
add_bundled_libraries(tbb/lib)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
add_bundled_libraries(tbb/lib)
|
||||||
|
|
||||||
if(WITH_XR_OPENXR)
|
if(WITH_XR_OPENXR)
|
||||||
find_package(XR_OpenXR_SDK)
|
find_package(XR_OpenXR_SDK)
|
||||||
@@ -667,8 +645,7 @@ if(WITH_GHOST_WAYLAND)
|
|||||||
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
||||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||||
else()
|
else()
|
||||||
# CentOS 7 packages have too old a version, a newer version exist in the
|
# Rocky8 packages have too old a version, a newer version exist in the pre-compiled libraries.
|
||||||
# precompiled libraries.
|
|
||||||
find_path(WAYLAND_PROTOCOLS_DIR
|
find_path(WAYLAND_PROTOCOLS_DIR
|
||||||
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
NAMES unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
||||||
PATH_SUFFIXES share/wayland-protocols
|
PATH_SUFFIXES share/wayland-protocols
|
||||||
@@ -793,7 +770,7 @@ if(WITH_GHOST_X11)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_X11_ALPHA)
|
if(WITH_X11_ALPHA)
|
||||||
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
|
find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
|
||||||
mark_as_advanced(X11_Xrender_LIB)
|
mark_as_advanced(X11_Xrender_LIB)
|
||||||
if(NOT X11_Xrender_LIB)
|
if(NOT X11_Xrender_LIB)
|
||||||
message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
|
message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
|
||||||
|
@@ -140,8 +140,8 @@ if(WITH_WINDOWS_BUNDLE_CRT)
|
|||||||
|
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
|
install(FILES ${CMAKE_BINARY_DIR}/blender.crt.manifest DESTINATION ./blender.crt)
|
||||||
set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
set(BUNDLECRT "<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.crt\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||||
set(BUNDLECRT "${BUNDLECRT}<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.shared\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
|
||||||
endif()
|
endif()
|
||||||
|
set(BUNDLECRT "${BUNDLECRT}<dependency><dependentAssembly><assemblyIdentity type=\"win32\" name=\"blender.shared\" version=\"1.0.0.0\" /></dependentAssembly></dependency>")
|
||||||
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)
|
||||||
|
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ endif()
|
|||||||
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
file(GLOB children RELATIVE ${LIBDIR} ${LIBDIR}/*)
|
||||||
foreach(child ${children})
|
foreach(child ${children})
|
||||||
if(IS_DIRECTORY ${LIBDIR}/${child})
|
if(IS_DIRECTORY ${LIBDIR}/${child})
|
||||||
list(APPEND CMAKE_PREFIX_PATH ${LIBDIR}/${child})
|
list(APPEND CMAKE_PREFIX_PATH ${LIBDIR}/${child})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ if(WITH_BOOST)
|
|||||||
set(BOOST_PREFIX "")
|
set(BOOST_PREFIX "")
|
||||||
# This is file new in 3.4 if it does not exist, assume we are building against 3.3 libs
|
# This is file new in 3.4 if it does not exist, assume we are building against 3.3 libs
|
||||||
set(BOOST_34_TRIGGER_FILE ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${BOOST_DEBUG_POSTFIX}.lib)
|
set(BOOST_34_TRIGGER_FILE ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${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_DEBUG_POSTFIX "vc142-mt-gd-x64-${BOOST_VERSION}")
|
||||||
set(BOOST_PREFIX "lib")
|
set(BOOST_PREFIX "lib")
|
||||||
endif()
|
endif()
|
||||||
@@ -573,7 +573,7 @@ if(WITH_BOOST)
|
|||||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_thread-${BOOST_DEBUG_POSTFIX}.lib
|
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_thread-${BOOST_DEBUG_POSTFIX}.lib
|
||||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_chrono-${BOOST_DEBUG_POSTFIX}.lib
|
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_chrono-${BOOST_DEBUG_POSTFIX}.lib
|
||||||
)
|
)
|
||||||
if (EXISTS ${BOOST_34_TRIGGER_FILE})
|
if(EXISTS ${BOOST_34_TRIGGER_FILE})
|
||||||
if(WITH_USD)
|
if(WITH_USD)
|
||||||
set(BOOST_PYTHON_LIBRARIES
|
set(BOOST_PYTHON_LIBRARIES
|
||||||
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${BOOST_DEBUG_POSTFIX}.lib
|
debug ${BOOST_LIBPATH}/${BOOST_PREFIX}boost_python310-${BOOST_DEBUG_POSTFIX}.lib
|
||||||
@@ -624,7 +624,7 @@ endif()
|
|||||||
|
|
||||||
if(WITH_LLVM)
|
if(WITH_LLVM)
|
||||||
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
set(LLVM_ROOT_DIR ${LIBDIR}/llvm CACHE PATH "Path to the LLVM installation")
|
||||||
set(LLVM_INCLUDE_DIRS ${LLVM_ROOT_DIR}/$<$<CONFIG:Debug>:Debug>/include CACHE PATH "Path to the LLVM include directory")
|
set(LLVM_INCLUDE_DIRS ${LLVM_ROOT_DIR}/$<$<CONFIG:Debug>:Debug>/include CACHE PATH "Path to the LLVM include directory")
|
||||||
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
|
file(GLOB LLVM_LIBRARY_OPTIMIZED ${LLVM_ROOT_DIR}/lib/*.lib)
|
||||||
|
|
||||||
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
|
if(EXISTS ${LLVM_ROOT_DIR}/debug/lib)
|
||||||
@@ -1030,7 +1030,7 @@ if(WITH_CYCLES AND WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
${SYCL_ROOT_DIR}/bin/pi_*.dll
|
${SYCL_ROOT_DIR}/bin/pi_*.dll
|
||||||
)
|
)
|
||||||
list(REMOVE_ITEM _sycl_pi_runtime_libraries_glob "${SYCL_ROOT_DIR}/bin/pi_opencl.dll")
|
list(REMOVE_ITEM _sycl_pi_runtime_libraries_glob "${SYCL_ROOT_DIR}/bin/pi_opencl.dll")
|
||||||
list (APPEND _sycl_runtime_libraries ${_sycl_pi_runtime_libraries_glob})
|
list(APPEND _sycl_runtime_libraries ${_sycl_pi_runtime_libraries_glob})
|
||||||
unset(_sycl_pi_runtime_libraries_glob)
|
unset(_sycl_pi_runtime_libraries_glob)
|
||||||
|
|
||||||
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
|
list(APPEND PLATFORM_BUNDLED_LIBRARIES ${_sycl_runtime_libraries})
|
||||||
|
@@ -30,7 +30,7 @@ update-code:
|
|||||||
linux-x86_64:
|
linux-x86_64:
|
||||||
branch: trunk
|
branch: trunk
|
||||||
commit_id: HEAD
|
commit_id: HEAD
|
||||||
path: lib/linux_centos7_x86_64
|
path: lib/linux_x86_64_glibc_228
|
||||||
windows-amd64:
|
windows-amd64:
|
||||||
branch: trunk
|
branch: trunk
|
||||||
commit_id: HEAD
|
commit_id: HEAD
|
||||||
@@ -49,7 +49,7 @@ update-code:
|
|||||||
#
|
#
|
||||||
buildbot:
|
buildbot:
|
||||||
gcc:
|
gcc:
|
||||||
version: '9.0.0'
|
version: '11.0.0'
|
||||||
cuda10:
|
cuda10:
|
||||||
version: '10.1.243'
|
version: '10.1.243'
|
||||||
cuda11:
|
cuda11:
|
||||||
|
@@ -41,7 +41,7 @@ def parse_arguments() -> argparse.Namespace:
|
|||||||
parser.add_argument("--svn-command", default="svn")
|
parser.add_argument("--svn-command", default="svn")
|
||||||
parser.add_argument("--svn-branch", default=None)
|
parser.add_argument("--svn-branch", default=None)
|
||||||
parser.add_argument("--git-command", default="git")
|
parser.add_argument("--git-command", default="git")
|
||||||
parser.add_argument("--use-centos-libraries", action="store_true")
|
parser.add_argument("--use-linux-libraries", action="store_true")
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@@ -71,8 +71,8 @@ def svn_update(args: argparse.Namespace, release_version: Optional[str]) -> None
|
|||||||
# this script is bundled as part of the precompiled libraries. However it
|
# this script is bundled as part of the precompiled libraries. However it
|
||||||
# is used by the buildbot.
|
# is used by the buildbot.
|
||||||
lib_platform = "win64_vc15"
|
lib_platform = "win64_vc15"
|
||||||
elif args.use_centos_libraries:
|
elif args.use_linux_libraries:
|
||||||
lib_platform = "linux_centos7_x86_64"
|
lib_platform = "linux_x86_64_glibc_228"
|
||||||
else:
|
else:
|
||||||
# No precompiled libraries for Linux.
|
# No precompiled libraries for Linux.
|
||||||
lib_platform = None
|
lib_platform = None
|
||||||
|
@@ -10,8 +10,9 @@ Only keyword arguments can be used to pass operator properties.
|
|||||||
Operators don't have return values as you might expect,
|
Operators don't have return values as you might expect,
|
||||||
instead they return a set() which is made up of:
|
instead they return a set() which is made up of:
|
||||||
``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
|
``{'RUNNING_MODAL', 'CANCELLED', 'FINISHED', 'PASS_THROUGH'}``.
|
||||||
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``.
|
Common return values are ``{'FINISHED'}`` and ``{'CANCELLED'}``, the latter
|
||||||
|
meaning that the operator execution was aborted without making any changes or
|
||||||
|
saving an undo history entry.
|
||||||
|
|
||||||
Calling an operator in the wrong context will raise a ``RuntimeError``,
|
Calling an operator in the wrong context will raise a ``RuntimeError``,
|
||||||
there is a poll() method to avoid this problem.
|
there is a poll() method to avoid this problem.
|
||||||
|
@@ -44,6 +44,7 @@ class ModalOperator(bpy.types.Operator):
|
|||||||
elif event.type == 'LEFTMOUSE': # Confirm
|
elif event.type == 'LEFTMOUSE': # Confirm
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
|
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
|
||||||
|
# Revert all changes that have been made
|
||||||
context.object.location.x = self.init_loc_x
|
context.object.location.x = self.init_loc_x
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
|
@@ -7,9 +7,16 @@ This script shows simple operator which prints a message.
|
|||||||
Since the operator only has an :class:`Operator.execute` function it takes no
|
Since the operator only has an :class:`Operator.execute` function it takes no
|
||||||
user input.
|
user input.
|
||||||
|
|
||||||
|
The function should return ``{'FINISHED'}`` or ``{'CANCELLED'}``, the latter
|
||||||
|
meaning that operator execution was aborted without making any changes, and
|
||||||
|
saving an undo entry isn't neccesary. If an error is detected after some changes
|
||||||
|
have already been made, use the ``{'FINISHED'}`` return code, or the behavior
|
||||||
|
of undo will be confusing for the user.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Operator subclasses must be registered before accessing them from blender.
|
Operator subclasses must be registered before accessing them from blender.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
@@ -370,7 +370,7 @@ def main():
|
|||||||
|
|
||||||
args_in_wash = get_args_wash(args_in, args_in_index, False)
|
args_in_wash = get_args_wash(args_in, args_in_index, False)
|
||||||
|
|
||||||
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([print_arg_in(arg) for arg in args_in_wash])))
|
fw(".. function:: %s(bm, %s)\n\n" % (b[0], ", ".join([arg_name_with_default(arg) for arg in args_in_wash])))
|
||||||
|
|
||||||
# -- wash the comment
|
# -- wash the comment
|
||||||
comment_washed = []
|
comment_washed = []
|
||||||
@@ -423,8 +423,8 @@ def main():
|
|||||||
print(OUT_RST)
|
print(OUT_RST)
|
||||||
|
|
||||||
|
|
||||||
def print_arg_in(arg):
|
def arg_name_with_default(arg):
|
||||||
(name, default_value, _, _) = arg
|
name, default_value, _, _ = arg
|
||||||
if default_value is None:
|
if default_value is None:
|
||||||
return name
|
return name
|
||||||
return name + '=' + default_value
|
return name + '=' + default_value
|
||||||
|
@@ -298,7 +298,7 @@ if(WITH_CYCLES_DEVICE_METAL)
|
|||||||
add_definitions(-DWITH_METAL)
|
add_definitions(-DWITH_METAL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WITH_CYCLES_DEVICE_ONEAPI)
|
if(WITH_CYCLES_DEVICE_ONEAPI)
|
||||||
add_definitions(-DWITH_ONEAPI)
|
add_definitions(-DWITH_ONEAPI)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -92,7 +92,7 @@ class AddPresetPerformance(AddPresetBase, Operator):
|
|||||||
|
|
||||||
preset_defines = [
|
preset_defines = [
|
||||||
"render = bpy.context.scene.render",
|
"render = bpy.context.scene.render",
|
||||||
"cycles = bpy.context.scene.cycles"
|
"cycles = bpy.context.scene.cycles",
|
||||||
]
|
]
|
||||||
|
|
||||||
preset_values = [
|
preset_values = [
|
||||||
|
@@ -82,8 +82,8 @@ enum_use_layer_samples = (
|
|||||||
)
|
)
|
||||||
|
|
||||||
enum_sampling_pattern = (
|
enum_sampling_pattern = (
|
||||||
('SOBOL', "Sobol-Burley", "Use Sobol-Burley random sampling pattern", 0),
|
('SOBOL_BURLEY', "Sobol-Burley", "Use on-the-fly computed Owen-scrambled Sobol for random sampling", 0),
|
||||||
('PROGRESSIVE_MULTI_JITTER', "Progressive Multi-Jitter", "Use Progressive Multi-Jitter random sampling pattern", 1),
|
('TABULATED_SOBOL', "Tabulated Sobol", "Use pre-computed tables of Owen-scrambled Sobol for random sampling", 1),
|
||||||
)
|
)
|
||||||
|
|
||||||
enum_emission_sampling = (
|
enum_emission_sampling = (
|
||||||
@@ -412,9 +412,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
|||||||
|
|
||||||
sampling_pattern: EnumProperty(
|
sampling_pattern: EnumProperty(
|
||||||
name="Sampling Pattern",
|
name="Sampling Pattern",
|
||||||
description="Random sampling pattern used by the integrator. When adaptive sampling is enabled, Progressive Multi-Jitter is always used instead of Sobol-Burley",
|
description="Random sampling pattern used by the integrator",
|
||||||
items=enum_sampling_pattern,
|
items=enum_sampling_pattern,
|
||||||
default='PROGRESSIVE_MULTI_JITTER',
|
default='TABULATED_SOBOL',
|
||||||
)
|
)
|
||||||
|
|
||||||
scrambling_distance: FloatProperty(
|
scrambling_distance: FloatProperty(
|
||||||
@@ -905,7 +905,8 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
|||||||
|
|
||||||
use_fast_gi: BoolProperty(
|
use_fast_gi: BoolProperty(
|
||||||
name="Fast GI Approximation",
|
name="Fast GI Approximation",
|
||||||
description="Approximate diffuse indirect light with background tinted ambient occlusion. This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
|
description="Approximate diffuse indirect light with background tinted ambient occlusion. "
|
||||||
|
"This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality",
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1206,7 +1207,7 @@ class CyclesWorldSettings(bpy.types.PropertyGroup):
|
|||||||
)
|
)
|
||||||
homogeneous_volume: BoolProperty(
|
homogeneous_volume: BoolProperty(
|
||||||
name="Homogeneous Volume",
|
name="Homogeneous Volume",
|
||||||
description="When using volume rendering, assume volume has the same density everywhere"
|
description="When using volume rendering, assume volume has the same density everywhere "
|
||||||
"(not using any textures), for faster rendering",
|
"(not using any textures), for faster rendering",
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
@@ -1539,10 +1540,24 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
|||||||
|
|
||||||
use_metalrt: BoolProperty(
|
use_metalrt: BoolProperty(
|
||||||
name="MetalRT (Experimental)",
|
name="MetalRT (Experimental)",
|
||||||
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better performance in specific cases. However this support is experimental and some scenes may render incorrectly",
|
description="MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better "
|
||||||
|
"performance in specific cases. However this support is experimental and some scenes may render incorrectly",
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
kernel_optimization_level: EnumProperty(
|
||||||
|
name="Kernel Optimization",
|
||||||
|
description="Kernels can be optimized based on scene content. Optimized kernels are requested at the start of a render. "
|
||||||
|
"If optimized kernels are not available, rendering will proceed using generic kernels until the optimized set "
|
||||||
|
"is available in the cache. This can result in additional CPU usage for a brief time (tens of seconds)",
|
||||||
|
default='FULL',
|
||||||
|
items=(
|
||||||
|
('OFF', "Off", "Disable kernel optimization. Slowest rendering, no extra background CPU usage"),
|
||||||
|
('INTERSECT', "Intersection only", "Optimize only intersection kernels. Faster rendering, negligible extra background CPU usage"),
|
||||||
|
('FULL', "Full", "Optimize all kernels. Fastest rendering, may result in extra background CPU usage"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
def find_existing_device_entry(self, device):
|
def find_existing_device_entry(self, device):
|
||||||
for device_entry in self.devices:
|
for device_entry in self.devices:
|
||||||
if device_entry.id == device[2] and device_entry.type == device[1]:
|
if device_entry.id == device[2] and device_entry.type == device[1]:
|
||||||
@@ -1711,10 +1726,12 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
|||||||
if compute_device_type == 'METAL':
|
if compute_device_type == 'METAL':
|
||||||
import platform
|
import platform
|
||||||
# MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD
|
# MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD
|
||||||
|
# Kernel specialization is only viable on Apple Silicon at present due to relative compilation speed
|
||||||
if platform.machine() == 'arm64':
|
if platform.machine() == 'arm64':
|
||||||
row = layout.row()
|
col = layout.column()
|
||||||
row.use_property_split = True
|
col.use_property_split = True
|
||||||
row.prop(self, "use_metalrt")
|
col.prop(self, "kernel_optimization_level")
|
||||||
|
col.prop(self, "use_metalrt")
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_impl(self.layout, context)
|
self.draw_impl(self.layout, context)
|
||||||
|
@@ -193,7 +193,7 @@ class CYCLES_RENDER_PT_sampling_viewport(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
if cscene.use_preview_adaptive_sampling:
|
if cscene.use_preview_adaptive_sampling:
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.prop(cscene, "preview_samples", text=" Max Samples")
|
col.prop(cscene, "preview_samples", text="Max Samples")
|
||||||
col.prop(cscene, "preview_adaptive_min_samples", text="Min Samples")
|
col.prop(cscene, "preview_adaptive_min_samples", text="Min Samples")
|
||||||
else:
|
else:
|
||||||
layout.prop(cscene, "preview_samples", text="Samples")
|
layout.prop(cscene, "preview_samples", text="Samples")
|
||||||
@@ -255,7 +255,7 @@ class CYCLES_RENDER_PT_sampling_render(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
if cscene.use_adaptive_sampling:
|
if cscene.use_adaptive_sampling:
|
||||||
col.prop(cscene, "samples", text=" Max Samples")
|
col.prop(cscene, "samples", text="Max Samples")
|
||||||
col.prop(cscene, "adaptive_min_samples", text="Min Samples")
|
col.prop(cscene, "adaptive_min_samples", text="Min Samples")
|
||||||
else:
|
else:
|
||||||
col.prop(cscene, "samples", text="Samples")
|
col.prop(cscene, "samples", text="Samples")
|
||||||
@@ -364,16 +364,13 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
|||||||
row.prop(cscene, "seed")
|
row.prop(cscene, "seed")
|
||||||
row.prop(cscene, "use_animated_seed", text="", icon='TIME')
|
row.prop(cscene, "use_animated_seed", text="", icon='TIME')
|
||||||
|
|
||||||
col = layout.column(align=True)
|
|
||||||
col.prop(cscene, "sampling_pattern", text="Pattern")
|
|
||||||
|
|
||||||
col = layout.column(align=True)
|
col = layout.column(align=True)
|
||||||
col.prop(cscene, "sample_offset")
|
col.prop(cscene, "sample_offset")
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
heading = layout.column(align=True, heading="Scrambling Distance")
|
heading = layout.column(align=True, heading="Scrambling Distance")
|
||||||
heading.active = cscene.sampling_pattern != 'SOBOL'
|
heading.active = cscene.sampling_pattern == 'TABULATED_SOBOL'
|
||||||
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
|
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
|
||||||
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
|
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
|
||||||
heading.prop(cscene, "scrambling_distance", text="Multiplier")
|
heading.prop(cscene, "scrambling_distance", text="Multiplier")
|
||||||
@@ -396,11 +393,6 @@ class CYCLES_RENDER_PT_sampling_lights(CyclesButtonsPanel, Panel):
|
|||||||
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
def draw_header(self, context):
|
|
||||||
layout = self.layout
|
|
||||||
scene = context.scene
|
|
||||||
cscene = scene.cycles
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
layout.use_property_split = True
|
layout.use_property_split = True
|
||||||
@@ -416,6 +408,23 @@ class CYCLES_RENDER_PT_sampling_lights(CyclesButtonsPanel, Panel):
|
|||||||
sub.active = not cscene.use_light_tree
|
sub.active = not cscene.use_light_tree
|
||||||
|
|
||||||
|
|
||||||
|
class CYCLES_RENDER_PT_sampling_debug(CyclesDebugButtonsPanel, Panel):
|
||||||
|
bl_label = "Debug"
|
||||||
|
bl_parent_id = "CYCLES_RENDER_PT_sampling"
|
||||||
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False
|
||||||
|
|
||||||
|
scene = context.scene
|
||||||
|
cscene = scene.cycles
|
||||||
|
|
||||||
|
col = layout.column(align=True)
|
||||||
|
col.prop(cscene, "sampling_pattern", text="Pattern")
|
||||||
|
|
||||||
|
|
||||||
class CYCLES_RENDER_PT_subdivision(CyclesButtonsPanel, Panel):
|
class CYCLES_RENDER_PT_subdivision(CyclesButtonsPanel, Panel):
|
||||||
bl_label = "Subdivision"
|
bl_label = "Subdivision"
|
||||||
bl_options = {'DEFAULT_CLOSED'}
|
bl_options = {'DEFAULT_CLOSED'}
|
||||||
@@ -2351,7 +2360,6 @@ def draw_pause(self, context):
|
|||||||
|
|
||||||
def get_panels():
|
def get_panels():
|
||||||
exclude_panels = {
|
exclude_panels = {
|
||||||
'DATA_PT_area',
|
|
||||||
'DATA_PT_camera_dof',
|
'DATA_PT_camera_dof',
|
||||||
'DATA_PT_falloff_curve',
|
'DATA_PT_falloff_curve',
|
||||||
'DATA_PT_light',
|
'DATA_PT_light',
|
||||||
@@ -2391,6 +2399,7 @@ classes = (
|
|||||||
CYCLES_RENDER_PT_sampling_path_guiding_debug,
|
CYCLES_RENDER_PT_sampling_path_guiding_debug,
|
||||||
CYCLES_RENDER_PT_sampling_lights,
|
CYCLES_RENDER_PT_sampling_lights,
|
||||||
CYCLES_RENDER_PT_sampling_advanced,
|
CYCLES_RENDER_PT_sampling_advanced,
|
||||||
|
CYCLES_RENDER_PT_sampling_debug,
|
||||||
CYCLES_RENDER_PT_light_paths,
|
CYCLES_RENDER_PT_light_paths,
|
||||||
CYCLES_RENDER_PT_light_paths_max_bounces,
|
CYCLES_RENDER_PT_light_paths_max_bounces,
|
||||||
CYCLES_RENDER_PT_light_paths_clamping,
|
CYCLES_RENDER_PT_light_paths_clamping,
|
||||||
|
@@ -228,7 +228,7 @@ def do_versions(self):
|
|||||||
cscene.use_preview_denoising = False
|
cscene.use_preview_denoising = False
|
||||||
if not cscene.is_property_set("sampling_pattern") or \
|
if not cscene.is_property_set("sampling_pattern") or \
|
||||||
cscene.get('sampling_pattern') >= 2:
|
cscene.get('sampling_pattern') >= 2:
|
||||||
cscene.sampling_pattern = 'PROGRESSIVE_MULTI_JITTER'
|
cscene.sampling_pattern = 'TABULATED_SOBOL'
|
||||||
|
|
||||||
# Removal of square samples.
|
# Removal of square samples.
|
||||||
cscene = scene.cycles
|
cscene = scene.cycles
|
||||||
@@ -241,6 +241,12 @@ def do_versions(self):
|
|||||||
layer.samples *= layer.samples
|
layer.samples *= layer.samples
|
||||||
cscene["use_square_samples"] = False
|
cscene["use_square_samples"] = False
|
||||||
|
|
||||||
|
# Disable light tree for existing scenes.
|
||||||
|
if version <= (3, 5, 3):
|
||||||
|
cscene = scene.cycles
|
||||||
|
if not cscene.is_property_set("use_light_tree"):
|
||||||
|
cscene.use_light_tree = False
|
||||||
|
|
||||||
# Lamps
|
# Lamps
|
||||||
for light in bpy.data.lights:
|
for light in bpy.data.lights:
|
||||||
if light.library not in libraries:
|
if light.library not in libraries:
|
||||||
|
@@ -30,7 +30,10 @@ int blender_device_threads(BL::Scene &b_scene)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceInfo blender_device_info(BL::Preferences &b_preferences, BL::Scene &b_scene, bool background)
|
DeviceInfo blender_device_info(BL::Preferences &b_preferences,
|
||||||
|
BL::Scene &b_scene,
|
||||||
|
bool background,
|
||||||
|
bool preview)
|
||||||
{
|
{
|
||||||
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
|
||||||
|
|
||||||
@@ -113,6 +116,18 @@ DeviceInfo blender_device_info(BL::Preferences &b_preferences, BL::Scene &b_scen
|
|||||||
device.use_metalrt = true;
|
device.use_metalrt = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preview) {
|
||||||
|
/* Disable specialization for preview renders. */
|
||||||
|
device.kernel_optimization_level = KERNEL_OPTIMIZATION_LEVEL_OFF;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
device.kernel_optimization_level = (KernelOptimizationLevel)get_enum(
|
||||||
|
cpreferences,
|
||||||
|
"kernel_optimization_level",
|
||||||
|
KERNEL_OPTIMIZATION_NUM_LEVELS,
|
||||||
|
KERNEL_OPTIMIZATION_LEVEL_FULL);
|
||||||
|
}
|
||||||
|
|
||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,8 @@ int blender_device_threads(BL::Scene &b_scene);
|
|||||||
/* Convert Blender settings to device specification. */
|
/* Convert Blender settings to device specification. */
|
||||||
DeviceInfo blender_device_info(BL::Preferences &b_preferences,
|
DeviceInfo blender_device_info(BL::Preferences &b_preferences,
|
||||||
BL::Scene &b_scene,
|
BL::Scene &b_scene,
|
||||||
bool background);
|
bool background,
|
||||||
|
bool preview);
|
||||||
|
|
||||||
CCL_NAMESPACE_END
|
CCL_NAMESPACE_END
|
||||||
|
|
||||||
|
@@ -1,12 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: Apache-2.0
|
/* SPDX-License-Identifier: Apache-2.0
|
||||||
* Copyright 2021-2022 Blender Foundation */
|
* Copyright 2021-2022 Blender Foundation */
|
||||||
|
|
||||||
#include "blender/display_driver.h"
|
|
||||||
|
|
||||||
#include "device/device.h"
|
|
||||||
#include "util/log.h"
|
|
||||||
#include "util/math.h"
|
|
||||||
|
|
||||||
#include "GPU_context.h"
|
#include "GPU_context.h"
|
||||||
#include "GPU_immediate.h"
|
#include "GPU_immediate.h"
|
||||||
#include "GPU_shader.h"
|
#include "GPU_shader.h"
|
||||||
@@ -15,6 +9,12 @@
|
|||||||
|
|
||||||
#include "RE_engine.h"
|
#include "RE_engine.h"
|
||||||
|
|
||||||
|
#include "blender/display_driver.h"
|
||||||
|
|
||||||
|
#include "device/device.h"
|
||||||
|
#include "util/log.h"
|
||||||
|
#include "util/math.h"
|
||||||
|
|
||||||
CCL_NAMESPACE_BEGIN
|
CCL_NAMESPACE_BEGIN
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
@@ -57,7 +57,6 @@ int BlenderDisplayShader::get_tex_coord_attrib_location()
|
|||||||
|
|
||||||
/* TODO move shaders to standalone .glsl file. */
|
/* TODO move shaders to standalone .glsl file. */
|
||||||
static const char *FALLBACK_VERTEX_SHADER =
|
static const char *FALLBACK_VERTEX_SHADER =
|
||||||
"#version 330\n"
|
|
||||||
"uniform vec2 fullscreen;\n"
|
"uniform vec2 fullscreen;\n"
|
||||||
"in vec2 texCoord;\n"
|
"in vec2 texCoord;\n"
|
||||||
"in vec2 pos;\n"
|
"in vec2 pos;\n"
|
||||||
@@ -75,7 +74,6 @@ static const char *FALLBACK_VERTEX_SHADER =
|
|||||||
"}\n\0";
|
"}\n\0";
|
||||||
|
|
||||||
static const char *FALLBACK_FRAGMENT_SHADER =
|
static const char *FALLBACK_FRAGMENT_SHADER =
|
||||||
"#version 330\n"
|
|
||||||
"uniform sampler2D image_texture;\n"
|
"uniform sampler2D image_texture;\n"
|
||||||
"in vec2 texCoord_interp;\n"
|
"in vec2 texCoord_interp;\n"
|
||||||
"out vec4 fragColor;\n"
|
"out vec4 fragColor;\n"
|
||||||
|
@@ -367,13 +367,11 @@ static void attr_create_generic(Scene *scene,
|
|||||||
{
|
{
|
||||||
AttributeSet &attributes = (subdivision) ? mesh->subd_attributes : mesh->attributes;
|
AttributeSet &attributes = (subdivision) ? mesh->subd_attributes : mesh->attributes;
|
||||||
static const ustring u_velocity("velocity");
|
static const ustring u_velocity("velocity");
|
||||||
|
const ustring default_color_name{b_mesh.attributes.default_color_name().c_str()};
|
||||||
int attribute_index = 0;
|
|
||||||
int render_color_index = b_mesh.attributes.render_color_index();
|
|
||||||
|
|
||||||
for (BL::Attribute &b_attribute : b_mesh.attributes) {
|
for (BL::Attribute &b_attribute : b_mesh.attributes) {
|
||||||
const ustring name{b_attribute.name().c_str()};
|
const ustring name{b_attribute.name().c_str()};
|
||||||
const bool is_render_color = (attribute_index++ == render_color_index);
|
const bool is_render_color = name == default_color_name;
|
||||||
|
|
||||||
if (need_motion && name == u_velocity) {
|
if (need_motion && name == u_velocity) {
|
||||||
attr_create_motion(mesh, b_attribute, motion_scale);
|
attr_create_motion(mesh, b_attribute, motion_scale);
|
||||||
@@ -681,7 +679,7 @@ static void attr_create_pointiness(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, b
|
|||||||
if (num_verts == 0) {
|
if (num_verts == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const MVert *verts = static_cast<const MVert *>(b_mesh.vertices[0].ptr.data);
|
const float(*positions)[3] = static_cast<const float(*)[3]>(b_mesh.vertices[0].ptr.data);
|
||||||
|
|
||||||
/* STEP 1: Find out duplicated vertices and point duplicates to a single
|
/* STEP 1: Find out duplicated vertices and point duplicates to a single
|
||||||
* original vertex.
|
* original vertex.
|
||||||
@@ -767,10 +765,8 @@ static void attr_create_pointiness(Scene *scene, Mesh *mesh, BL::Mesh &b_mesh, b
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
visited_edges.insert(v0, v1);
|
visited_edges.insert(v0, v1);
|
||||||
const MVert &b_vert_0 = verts[v0];
|
float3 co0 = make_float3(positions[v0][0], positions[v0][1], positions[v0][2]);
|
||||||
const MVert &b_vert_1 = verts[v1];
|
float3 co1 = make_float3(positions[v1][0], positions[v1][1], positions[v1][2]);
|
||||||
float3 co0 = make_float3(b_vert_0.co[0], b_vert_0.co[1], b_vert_0.co[2]);
|
|
||||||
float3 co1 = make_float3(b_vert_1.co[0], b_vert_1.co[1], b_vert_1.co[2]);
|
|
||||||
float3 edge = normalize(co1 - co0);
|
float3 edge = normalize(co1 - co0);
|
||||||
edge_accum[v0] += edge;
|
edge_accum[v0] += edge;
|
||||||
edge_accum[v1] += -edge;
|
edge_accum[v1] += -edge;
|
||||||
@@ -921,7 +917,7 @@ static void create_mesh(Scene *scene,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MVert *verts = static_cast<const MVert *>(b_mesh.vertices[0].ptr.data);
|
const float(*positions)[3] = static_cast<const float(*)[3]>(b_mesh.vertices[0].ptr.data);
|
||||||
|
|
||||||
if (!subdivision) {
|
if (!subdivision) {
|
||||||
numtris = numfaces;
|
numtris = numfaces;
|
||||||
@@ -944,8 +940,7 @@ static void create_mesh(Scene *scene,
|
|||||||
|
|
||||||
/* create vertex coordinates and normals */
|
/* create vertex coordinates and normals */
|
||||||
for (int i = 0; i < numverts; i++) {
|
for (int i = 0; i < numverts; i++) {
|
||||||
const MVert &b_vert = verts[i];
|
mesh->add_vertex(make_float3(positions[i][0], positions[i][1], positions[i][2]));
|
||||||
mesh->add_vertex(make_float3(b_vert.co[0], b_vert.co[1], b_vert.co[2]));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AttributeSet &attributes = (subdivision) ? mesh->subd_attributes : mesh->attributes;
|
AttributeSet &attributes = (subdivision) ? mesh->subd_attributes : mesh->attributes;
|
||||||
@@ -1254,14 +1249,13 @@ void BlenderSync::sync_mesh_motion(BL::Depsgraph b_depsgraph,
|
|||||||
float3 *mP = attr_mP->data_float3() + motion_step * numverts;
|
float3 *mP = attr_mP->data_float3() + motion_step * numverts;
|
||||||
float3 *mN = (attr_mN) ? attr_mN->data_float3() + motion_step * numverts : NULL;
|
float3 *mN = (attr_mN) ? attr_mN->data_float3() + motion_step * numverts : NULL;
|
||||||
|
|
||||||
const MVert *verts = static_cast<const MVert *>(b_mesh.vertices[0].ptr.data);
|
const float(*positions)[3] = static_cast<const float(*)[3]>(b_mesh.vertices[0].ptr.data);
|
||||||
|
|
||||||
/* NOTE: We don't copy more that existing amount of vertices to prevent
|
/* NOTE: We don't copy more that existing amount of vertices to prevent
|
||||||
* possible memory corruption.
|
* possible memory corruption.
|
||||||
*/
|
*/
|
||||||
for (int i = 0; i < std::min<size_t>(b_verts_num, numverts); i++) {
|
for (int i = 0; i < std::min<size_t>(b_verts_num, numverts); i++) {
|
||||||
const MVert &b_vert = verts[i];
|
mP[i] = make_float3(positions[i][0], positions[i][1], positions[i][2]);
|
||||||
mP[i] = make_float3(b_vert.co[0], b_vert.co[1], b_vert.co[2]);
|
|
||||||
}
|
}
|
||||||
if (mN) {
|
if (mN) {
|
||||||
const float(*b_vert_normals)[3] = static_cast<const float(*)[3]>(
|
const float(*b_vert_normals)[3] = static_cast<const float(*)[3]>(
|
||||||
|
@@ -754,7 +754,7 @@ static PyObject *denoise_func(PyObject * /*self*/, PyObject *args, PyObject *key
|
|||||||
RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene), &sceneptr);
|
RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene), &sceneptr);
|
||||||
BL::Scene b_scene(sceneptr);
|
BL::Scene b_scene(sceneptr);
|
||||||
|
|
||||||
DeviceInfo device = blender_device_info(b_preferences, b_scene, true);
|
DeviceInfo device = blender_device_info(b_preferences, b_scene, true, true);
|
||||||
|
|
||||||
/* Get denoising parameters from view layer. */
|
/* Get denoising parameters from view layer. */
|
||||||
PointerRNA viewlayerptr;
|
PointerRNA viewlayerptr;
|
||||||
|
@@ -357,7 +357,7 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SamplingPattern sampling_pattern = (SamplingPattern)get_enum(
|
SamplingPattern sampling_pattern = (SamplingPattern)get_enum(
|
||||||
cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_PMJ);
|
cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_TABULATED_SOBOL);
|
||||||
integrator->set_sampling_pattern(sampling_pattern);
|
integrator->set_sampling_pattern(sampling_pattern);
|
||||||
|
|
||||||
int samples = 1;
|
int samples = 1;
|
||||||
@@ -866,7 +866,8 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine,
|
|||||||
|
|
||||||
/* Device */
|
/* Device */
|
||||||
params.threads = blender_device_threads(b_scene);
|
params.threads = blender_device_threads(b_scene);
|
||||||
params.device = blender_device_info(b_preferences, b_scene, params.background);
|
params.device = blender_device_info(
|
||||||
|
b_preferences, b_scene, params.background, b_engine.is_preview());
|
||||||
|
|
||||||
/* samples */
|
/* samples */
|
||||||
int samples = get_int(cscene, "samples");
|
int samples = get_int(cscene, "samples");
|
||||||
|
@@ -113,6 +113,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData & /*data*/,
|
|||||||
|
|
||||||
if ((bool)mesh && subdivision_type == Mesh::SUBDIVISION_NONE) {
|
if ((bool)mesh && subdivision_type == Mesh::SUBDIVISION_NONE) {
|
||||||
if (mesh.use_auto_smooth()) {
|
if (mesh.use_auto_smooth()) {
|
||||||
|
mesh.calc_normals_split();
|
||||||
mesh.split_faces(false);
|
mesh.split_faces(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -45,8 +45,8 @@ macro(cycles_add_library target library_deps)
|
|||||||
# NOTE: If separated libraries for debug and release ar eneeded every library is the list are
|
# NOTE: If separated libraries for debug and release ar eneeded every library is the list are
|
||||||
# to be prefixed explicitly.
|
# to be prefixed explicitly.
|
||||||
#
|
#
|
||||||
# Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d"
|
# Use: "optimized libfoo optimized libbar debug libfoo_d debug libbar_d"
|
||||||
# NOT: "optimized libfoo libbar debug libfoo_d libbar_d"
|
# NOT: "optimized libfoo libbar debug libfoo_d libbar_d"
|
||||||
#
|
#
|
||||||
# TODO(sergey): This is the same as Blender's side CMake. Find a way to avoid duplication
|
# TODO(sergey): This is the same as Blender's side CMake. Find a way to avoid duplication
|
||||||
# somehow in a way which allows to have Cycles standalone.
|
# somehow in a way which allows to have Cycles standalone.
|
||||||
|
@@ -162,7 +162,10 @@ if(WITH_CYCLES_DEVICE_METAL)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WITH_CYCLES_DEVICE_ONEAPI)
|
if(WITH_CYCLES_DEVICE_ONEAPI)
|
||||||
|
if(WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION)
|
||||||
|
add_definitions(-DWITH_ONEAPI_SYCL_HOST_TASK)
|
||||||
|
endif()
|
||||||
if(WITH_CYCLES_ONEAPI_BINARIES)
|
if(WITH_CYCLES_ONEAPI_BINARIES)
|
||||||
set(cycles_kernel_oneapi_lib_suffix "_aot")
|
set(cycles_kernel_oneapi_lib_suffix "_aot")
|
||||||
else()
|
else()
|
||||||
|
@@ -952,6 +952,9 @@ void CUDADevice::tex_alloc(device_texture &mem)
|
|||||||
case EXTENSION_CLIP:
|
case EXTENSION_CLIP:
|
||||||
address_mode = CU_TR_ADDRESS_MODE_BORDER;
|
address_mode = CU_TR_ADDRESS_MODE_BORDER;
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
address_mode = CU_TR_ADDRESS_MODE_MIRROR;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
break;
|
break;
|
||||||
|
@@ -57,22 +57,32 @@ enum DeviceTypeMask {
|
|||||||
|
|
||||||
#define DEVICE_MASK(type) (DeviceTypeMask)(1 << type)
|
#define DEVICE_MASK(type) (DeviceTypeMask)(1 << type)
|
||||||
|
|
||||||
|
enum KernelOptimizationLevel {
|
||||||
|
KERNEL_OPTIMIZATION_LEVEL_OFF = 0,
|
||||||
|
KERNEL_OPTIMIZATION_LEVEL_INTERSECT = 1,
|
||||||
|
KERNEL_OPTIMIZATION_LEVEL_FULL = 2,
|
||||||
|
|
||||||
|
KERNEL_OPTIMIZATION_NUM_LEVELS
|
||||||
|
};
|
||||||
|
|
||||||
class DeviceInfo {
|
class DeviceInfo {
|
||||||
public:
|
public:
|
||||||
DeviceType type;
|
DeviceType type;
|
||||||
string description;
|
string description;
|
||||||
string id; /* used for user preferences, should stay fixed with changing hardware config */
|
string id; /* used for user preferences, should stay fixed with changing hardware config */
|
||||||
int num;
|
int num;
|
||||||
bool display_device; /* GPU is used as a display device. */
|
bool display_device; /* GPU is used as a display device. */
|
||||||
bool has_nanovdb; /* Support NanoVDB volumes. */
|
bool has_nanovdb; /* Support NanoVDB volumes. */
|
||||||
bool has_light_tree; /* Support light tree. */
|
bool has_light_tree; /* Support light tree. */
|
||||||
bool has_osl; /* Support Open Shading Language. */
|
bool has_osl; /* Support Open Shading Language. */
|
||||||
bool has_guiding; /* Support path guiding. */
|
bool has_guiding; /* Support path guiding. */
|
||||||
bool has_profiling; /* Supports runtime collection of profiling info. */
|
bool has_profiling; /* Supports runtime collection of profiling info. */
|
||||||
bool has_peer_memory; /* GPU has P2P access to memory of another GPU. */
|
bool has_peer_memory; /* GPU has P2P access to memory of another GPU. */
|
||||||
bool has_gpu_queue; /* Device supports GPU queue. */
|
bool has_gpu_queue; /* Device supports GPU queue. */
|
||||||
bool use_metalrt; /* Use MetalRT to accelerate ray queries (Metal only). */
|
bool use_metalrt; /* Use MetalRT to accelerate ray queries (Metal only). */
|
||||||
DenoiserTypeMask denoisers; /* Supported denoiser types. */
|
KernelOptimizationLevel kernel_optimization_level; /* Optimization level applied to path tracing
|
||||||
|
kernels (Metal only). */
|
||||||
|
DenoiserTypeMask denoisers; /* Supported denoiser types. */
|
||||||
int cpu_threads;
|
int cpu_threads;
|
||||||
vector<DeviceInfo> multi_devices;
|
vector<DeviceInfo> multi_devices;
|
||||||
string error_msg;
|
string error_msg;
|
||||||
@@ -167,6 +177,17 @@ class Device {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Request cancellation of any long-running work. */
|
||||||
|
virtual void cancel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Return true if device is ready for rendering, or report status if not. */
|
||||||
|
virtual bool is_ready(string & /*status*/) const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* GPU device only functions.
|
/* GPU device only functions.
|
||||||
* These may not be used on CPU or multi-devices. */
|
* These may not be used on CPU or multi-devices. */
|
||||||
|
|
||||||
|
@@ -163,10 +163,10 @@ void device_hip_info(vector<DeviceInfo> &devices)
|
|||||||
/* If device has a kernel timeout and no compute preemption, we assume
|
/* If device has a kernel timeout and no compute preemption, we assume
|
||||||
* it is connected to a display and will freeze the display while doing
|
* it is connected to a display and will freeze the display while doing
|
||||||
* computations. */
|
* computations. */
|
||||||
int timeout_attr = 0, preempt_attr = 0;
|
int timeout_attr = 0;
|
||||||
hipDeviceGetAttribute(&timeout_attr, hipDeviceAttributeKernelExecTimeout, num);
|
hipDeviceGetAttribute(&timeout_attr, hipDeviceAttributeKernelExecTimeout, num);
|
||||||
|
|
||||||
if (timeout_attr && !preempt_attr) {
|
if (timeout_attr) {
|
||||||
VLOG_INFO << "Device is recognized as display.";
|
VLOG_INFO << "Device is recognized as display.";
|
||||||
info.description += " (Display)";
|
info.description += " (Display)";
|
||||||
info.display_device = true;
|
info.display_device = true;
|
||||||
|
@@ -909,6 +909,9 @@ void HIPDevice::tex_alloc(device_texture &mem)
|
|||||||
* because it's unsupported in HIP. */
|
* because it's unsupported in HIP. */
|
||||||
address_mode = hipAddressModeClamp;
|
address_mode = hipAddressModeClamp;
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
address_mode = hipAddressModeMirror;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
break;
|
break;
|
||||||
|
@@ -76,7 +76,20 @@ class MetalDevice : public Device {
|
|||||||
|
|
||||||
bool use_metalrt = false;
|
bool use_metalrt = false;
|
||||||
MetalPipelineType kernel_specialization_level = PSO_GENERIC;
|
MetalPipelineType kernel_specialization_level = PSO_GENERIC;
|
||||||
std::atomic_bool async_compile_and_load = false;
|
|
||||||
|
int device_id = 0;
|
||||||
|
|
||||||
|
static thread_mutex existing_devices_mutex;
|
||||||
|
static std::map<int, MetalDevice *> active_device_ids;
|
||||||
|
|
||||||
|
static bool is_device_cancelled(int device_id);
|
||||||
|
|
||||||
|
static MetalDevice *get_device_by_ID(int device_idID,
|
||||||
|
thread_scoped_lock &existing_devices_mutex_lock);
|
||||||
|
|
||||||
|
virtual bool is_ready(string &status) const override;
|
||||||
|
|
||||||
|
virtual void cancel() override;
|
||||||
|
|
||||||
virtual BVHLayoutMask get_bvh_layout_mask() const override;
|
virtual BVHLayoutMask get_bvh_layout_mask() const override;
|
||||||
|
|
||||||
@@ -92,14 +105,12 @@ class MetalDevice : public Device {
|
|||||||
|
|
||||||
bool use_adaptive_compilation();
|
bool use_adaptive_compilation();
|
||||||
|
|
||||||
|
bool make_source_and_check_if_compile_needed(MetalPipelineType pso_type);
|
||||||
|
|
||||||
void make_source(MetalPipelineType pso_type, const uint kernel_features);
|
void make_source(MetalPipelineType pso_type, const uint kernel_features);
|
||||||
|
|
||||||
virtual bool load_kernels(const uint kernel_features) override;
|
virtual bool load_kernels(const uint kernel_features) override;
|
||||||
|
|
||||||
void reserve_local_memory(const uint kernel_features);
|
|
||||||
|
|
||||||
void init_host_memory();
|
|
||||||
|
|
||||||
void load_texture_info();
|
void load_texture_info();
|
||||||
|
|
||||||
void erase_allocation(device_memory &mem);
|
void erase_allocation(device_memory &mem);
|
||||||
@@ -112,7 +123,7 @@ class MetalDevice : public Device {
|
|||||||
|
|
||||||
virtual void optimize_for_scene(Scene *scene) override;
|
virtual void optimize_for_scene(Scene *scene) override;
|
||||||
|
|
||||||
bool compile_and_load(MetalPipelineType pso_type);
|
static void compile_and_load(int device_id, MetalPipelineType pso_type);
|
||||||
|
|
||||||
/* ------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------ */
|
||||||
/* low-level memory management */
|
/* low-level memory management */
|
||||||
|
@@ -13,10 +13,32 @@
|
|||||||
# include "util/path.h"
|
# include "util/path.h"
|
||||||
# include "util/time.h"
|
# include "util/time.h"
|
||||||
|
|
||||||
|
# include <crt_externs.h>
|
||||||
|
|
||||||
CCL_NAMESPACE_BEGIN
|
CCL_NAMESPACE_BEGIN
|
||||||
|
|
||||||
class MetalDevice;
|
class MetalDevice;
|
||||||
|
|
||||||
|
thread_mutex MetalDevice::existing_devices_mutex;
|
||||||
|
std::map<int, MetalDevice *> MetalDevice::active_device_ids;
|
||||||
|
|
||||||
|
/* Thread-safe device access for async work. Calling code must pass an appropriately scoped lock
|
||||||
|
* to existing_devices_mutex to safeguard against destruction of the returned instance. */
|
||||||
|
MetalDevice *MetalDevice::get_device_by_ID(int ID, thread_scoped_lock &existing_devices_mutex_lock)
|
||||||
|
{
|
||||||
|
auto it = active_device_ids.find(ID);
|
||||||
|
if (it != active_device_ids.end()) {
|
||||||
|
return it->second;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MetalDevice::is_device_cancelled(int ID)
|
||||||
|
{
|
||||||
|
thread_scoped_lock lock(existing_devices_mutex);
|
||||||
|
return get_device_by_ID(ID, lock) == nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
BVHLayoutMask MetalDevice::get_bvh_layout_mask() const
|
BVHLayoutMask MetalDevice::get_bvh_layout_mask() const
|
||||||
{
|
{
|
||||||
return use_metalrt ? BVH_LAYOUT_METAL : BVH_LAYOUT_BVH2;
|
return use_metalrt ? BVH_LAYOUT_METAL : BVH_LAYOUT_BVH2;
|
||||||
@@ -40,6 +62,15 @@ void MetalDevice::set_error(const string &error)
|
|||||||
MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profiler)
|
MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profiler)
|
||||||
: Device(info, stats, profiler), texture_info(this, "texture_info", MEM_GLOBAL)
|
: Device(info, stats, profiler), texture_info(this, "texture_info", MEM_GLOBAL)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
/* Assign an ID for this device which we can use to query whether async shader compilation
|
||||||
|
* requests are still relevant. */
|
||||||
|
thread_scoped_lock lock(existing_devices_mutex);
|
||||||
|
static int existing_devices_counter = 1;
|
||||||
|
device_id = existing_devices_counter++;
|
||||||
|
active_device_ids[device_id] = this;
|
||||||
|
}
|
||||||
|
|
||||||
mtlDevId = info.num;
|
mtlDevId = info.num;
|
||||||
|
|
||||||
/* select chosen device */
|
/* select chosen device */
|
||||||
@@ -57,7 +88,6 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
|||||||
if (@available(macos 11.0, *)) {
|
if (@available(macos 11.0, *)) {
|
||||||
if ([mtlDevice hasUnifiedMemory]) {
|
if ([mtlDevice hasUnifiedMemory]) {
|
||||||
default_storage_mode = MTLResourceStorageModeShared;
|
default_storage_mode = MTLResourceStorageModeShared;
|
||||||
init_host_memory();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,10 +110,6 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
|||||||
case METAL_GPU_APPLE: {
|
case METAL_GPU_APPLE: {
|
||||||
max_threads_per_threadgroup = 512;
|
max_threads_per_threadgroup = 512;
|
||||||
use_metalrt = info.use_metalrt;
|
use_metalrt = info.use_metalrt;
|
||||||
|
|
||||||
/* Specialize the intersection kernels on Apple GPUs by default as these can be built very
|
|
||||||
* quickly. */
|
|
||||||
kernel_specialization_level = PSO_SPECIALIZED_INTERSECT;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -96,6 +122,22 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
|||||||
capture_enabled = true;
|
capture_enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (device_vendor == METAL_GPU_APPLE) {
|
||||||
|
/* Set kernel_specialization_level based on user prefs. */
|
||||||
|
switch (info.kernel_optimization_level) {
|
||||||
|
case KERNEL_OPTIMIZATION_LEVEL_OFF:
|
||||||
|
kernel_specialization_level = PSO_GENERIC;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
case KERNEL_OPTIMIZATION_LEVEL_INTERSECT:
|
||||||
|
kernel_specialization_level = PSO_SPECIALIZED_INTERSECT;
|
||||||
|
break;
|
||||||
|
case KERNEL_OPTIMIZATION_LEVEL_FULL:
|
||||||
|
kernel_specialization_level = PSO_SPECIALIZED_SHADE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (auto envstr = getenv("CYCLES_METAL_SPECIALIZATION_LEVEL")) {
|
if (auto envstr = getenv("CYCLES_METAL_SPECIALIZATION_LEVEL")) {
|
||||||
kernel_specialization_level = (MetalPipelineType)atoi(envstr);
|
kernel_specialization_level = (MetalPipelineType)atoi(envstr);
|
||||||
}
|
}
|
||||||
@@ -181,6 +223,13 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
|||||||
|
|
||||||
MetalDevice::~MetalDevice()
|
MetalDevice::~MetalDevice()
|
||||||
{
|
{
|
||||||
|
/* Cancel any async shader compilations that are in flight. */
|
||||||
|
cancel();
|
||||||
|
|
||||||
|
/* This lock safeguards against destruction during use (see other uses of
|
||||||
|
* existing_devices_mutex). */
|
||||||
|
thread_scoped_lock lock(existing_devices_mutex);
|
||||||
|
|
||||||
for (auto &tex : texture_slot_map) {
|
for (auto &tex : texture_slot_map) {
|
||||||
if (tex) {
|
if (tex) {
|
||||||
[tex release];
|
[tex release];
|
||||||
@@ -326,21 +375,66 @@ bool MetalDevice::load_kernels(const uint _kernel_features)
|
|||||||
* active, but may still need to be rendered without motion blur if that isn't active as well. */
|
* active, but may still need to be rendered without motion blur if that isn't active as well. */
|
||||||
motion_blur = kernel_features & KERNEL_FEATURE_OBJECT_MOTION;
|
motion_blur = kernel_features & KERNEL_FEATURE_OBJECT_MOTION;
|
||||||
|
|
||||||
bool result = compile_and_load(PSO_GENERIC);
|
/* Only request generic kernels if they aren't cached in memory. */
|
||||||
|
if (make_source_and_check_if_compile_needed(PSO_GENERIC)) {
|
||||||
|
/* If needed, load them asynchronously in order to responsively message progress to the user.
|
||||||
|
*/
|
||||||
|
int this_device_id = this->device_id;
|
||||||
|
auto compile_kernels_fn = ^() {
|
||||||
|
compile_and_load(this_device_id, PSO_GENERIC);
|
||||||
|
};
|
||||||
|
|
||||||
reserve_local_memory(kernel_features);
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
|
||||||
return result;
|
compile_kernels_fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MetalDevice::compile_and_load(MetalPipelineType pso_type)
|
bool MetalDevice::make_source_and_check_if_compile_needed(MetalPipelineType pso_type)
|
||||||
{
|
{
|
||||||
make_source(pso_type, kernel_features);
|
if (this->source[pso_type].empty()) {
|
||||||
|
make_source(pso_type, kernel_features);
|
||||||
if (!MetalDeviceKernels::should_load_kernels(this, pso_type)) {
|
|
||||||
/* We already have a full set of matching pipelines which are cached or queued. */
|
|
||||||
metal_printf("%s kernels already requested\n", kernel_type_as_string(pso_type));
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return MetalDeviceKernels::should_load_kernels(this, pso_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MetalDevice::compile_and_load(int device_id, MetalPipelineType pso_type)
|
||||||
|
{
|
||||||
|
/* Thread-safe front-end compilation. Typically the MSL->AIR compilation can take a few seconds,
|
||||||
|
* so we avoid blocking device tear-down if the user cancels a render immediately. */
|
||||||
|
|
||||||
|
id<MTLDevice> mtlDevice;
|
||||||
|
string source;
|
||||||
|
MetalGPUVendor device_vendor;
|
||||||
|
|
||||||
|
/* Safely gather any state required for the MSL->AIR compilation. */
|
||||||
|
{
|
||||||
|
thread_scoped_lock lock(existing_devices_mutex);
|
||||||
|
|
||||||
|
/* Check whether the device still exists. */
|
||||||
|
MetalDevice *instance = get_device_by_ID(device_id, lock);
|
||||||
|
if (!instance) {
|
||||||
|
metal_printf("Ignoring %s compilation request - device no longer exists\n",
|
||||||
|
kernel_type_as_string(pso_type));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!instance->make_source_and_check_if_compile_needed(pso_type)) {
|
||||||
|
/* We already have a full set of matching pipelines which are cached or queued. Return early
|
||||||
|
* to avoid redundant MTLLibrary compilation. */
|
||||||
|
metal_printf("Ignoreing %s compilation request - kernels already requested\n",
|
||||||
|
kernel_type_as_string(pso_type));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
mtlDevice = instance->mtlDevice;
|
||||||
|
device_vendor = instance->device_vendor;
|
||||||
|
source = instance->source[pso_type];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Perform the actual compilation using our cached context. The MetalDevice can safely destruct
|
||||||
|
* in this time. */
|
||||||
|
|
||||||
MTLCompileOptions *options = [[MTLCompileOptions alloc] init];
|
MTLCompileOptions *options = [[MTLCompileOptions alloc] init];
|
||||||
|
|
||||||
@@ -359,20 +453,15 @@ bool MetalDevice::compile_and_load(MetalPipelineType pso_type)
|
|||||||
|
|
||||||
if (getenv("CYCLES_METAL_PROFILING") || getenv("CYCLES_METAL_DEBUG")) {
|
if (getenv("CYCLES_METAL_PROFILING") || getenv("CYCLES_METAL_DEBUG")) {
|
||||||
path_write_text(path_cache_get(string_printf("%s.metal", kernel_type_as_string(pso_type))),
|
path_write_text(path_cache_get(string_printf("%s.metal", kernel_type_as_string(pso_type))),
|
||||||
source[pso_type]);
|
source);
|
||||||
}
|
}
|
||||||
|
|
||||||
const double starttime = time_dt();
|
double starttime = time_dt();
|
||||||
|
|
||||||
NSError *error = NULL;
|
NSError *error = NULL;
|
||||||
mtlLibrary[pso_type] = [mtlDevice newLibraryWithSource:@(source[pso_type].c_str())
|
id<MTLLibrary> mtlLibrary = [mtlDevice newLibraryWithSource:@(source.c_str())
|
||||||
options:options
|
options:options
|
||||||
error:&error];
|
error:&error];
|
||||||
|
|
||||||
if (!mtlLibrary[pso_type]) {
|
|
||||||
NSString *err = [error localizedDescription];
|
|
||||||
set_error(string_printf("Failed to compile library:\n%s", [err UTF8String]));
|
|
||||||
}
|
|
||||||
|
|
||||||
metal_printf("Front-end compilation finished in %.1f seconds (%s)\n",
|
metal_printf("Front-end compilation finished in %.1f seconds (%s)\n",
|
||||||
time_dt() - starttime,
|
time_dt() - starttime,
|
||||||
@@ -380,17 +469,38 @@ bool MetalDevice::compile_and_load(MetalPipelineType pso_type)
|
|||||||
|
|
||||||
[options release];
|
[options release];
|
||||||
|
|
||||||
return MetalDeviceKernels::load(this, pso_type);
|
bool blocking_pso_build = (getenv("CYCLES_METAL_PROFILING") ||
|
||||||
}
|
MetalDeviceKernels::is_benchmark_warmup());
|
||||||
|
if (blocking_pso_build) {
|
||||||
|
MetalDeviceKernels::wait_for_all();
|
||||||
|
starttime = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
void MetalDevice::reserve_local_memory(const uint kernel_features)
|
/* Save the compiled MTLLibrary and trigger the AIR->PSO builds (if the MetalDevice still
|
||||||
{
|
* exists). */
|
||||||
/* METAL_WIP - implement this */
|
{
|
||||||
}
|
thread_scoped_lock lock(existing_devices_mutex);
|
||||||
|
if (MetalDevice *instance = get_device_by_ID(device_id, lock)) {
|
||||||
|
if (mtlLibrary) {
|
||||||
|
instance->mtlLibrary[pso_type] = mtlLibrary;
|
||||||
|
|
||||||
void MetalDevice::init_host_memory()
|
starttime = time_dt();
|
||||||
{
|
MetalDeviceKernels::load(instance, pso_type);
|
||||||
/* METAL_WIP - implement this */
|
}
|
||||||
|
else {
|
||||||
|
NSString *err = [error localizedDescription];
|
||||||
|
instance->set_error(string_printf("Failed to compile library:\n%s", [err UTF8String]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (starttime && blocking_pso_build) {
|
||||||
|
MetalDeviceKernels::wait_for_all();
|
||||||
|
|
||||||
|
metal_printf("Back-end compilation finished in %.1f seconds (%s)\n",
|
||||||
|
time_dt() - starttime,
|
||||||
|
kernel_type_as_string(pso_type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetalDevice::load_texture_info()
|
void MetalDevice::load_texture_info()
|
||||||
@@ -700,55 +810,72 @@ device_ptr MetalDevice::mem_alloc_sub_ptr(device_memory &mem, size_t offset, siz
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MetalDevice::cancel()
|
||||||
|
{
|
||||||
|
/* Remove this device's ID from the list of active devices. Any pending compilation requests
|
||||||
|
* originating from this session will be cancelled. */
|
||||||
|
thread_scoped_lock lock(existing_devices_mutex);
|
||||||
|
if (device_id) {
|
||||||
|
active_device_ids.erase(device_id);
|
||||||
|
device_id = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MetalDevice::is_ready(string &status) const
|
||||||
|
{
|
||||||
|
int num_loaded = MetalDeviceKernels::get_loaded_kernel_count(this, PSO_GENERIC);
|
||||||
|
if (num_loaded < DEVICE_KERNEL_NUM) {
|
||||||
|
status = string_printf("%d / %d render kernels loaded (may take a few minutes the first time)",
|
||||||
|
num_loaded,
|
||||||
|
DEVICE_KERNEL_NUM);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
metal_printf("MetalDevice::is_ready(...) --> true\n");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void MetalDevice::optimize_for_scene(Scene *scene)
|
void MetalDevice::optimize_for_scene(Scene *scene)
|
||||||
{
|
{
|
||||||
MetalPipelineType specialization_level = kernel_specialization_level;
|
MetalPipelineType specialization_level = kernel_specialization_level;
|
||||||
|
|
||||||
if (specialization_level < PSO_SPECIALIZED_INTERSECT) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PSO_SPECIALIZED_INTERSECT kernels are fast to specialize, so we always load them
|
|
||||||
* synchronously. */
|
|
||||||
compile_and_load(PSO_SPECIALIZED_INTERSECT);
|
|
||||||
|
|
||||||
if (specialization_level < PSO_SPECIALIZED_SHADE) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!scene->params.background) {
|
if (!scene->params.background) {
|
||||||
/* Don't load PSO_SPECIALIZED_SHADE kernels during viewport rendering as they are slower to
|
/* In live viewport, don't specialize beyond intersection kernels for responsiveness. */
|
||||||
* build. */
|
specialization_level = (MetalPipelineType)min(specialization_level, PSO_SPECIALIZED_INTERSECT);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PSO_SPECIALIZED_SHADE kernels are slower to specialize, so we load them asynchronously, and
|
/* For responsive rendering, specialize the kernels in the background, and only if there isn't an
|
||||||
* only if there isn't an existing load in flight.
|
* existing "optimize_for_scene" request in flight. */
|
||||||
*/
|
int this_device_id = this->device_id;
|
||||||
auto specialize_shade_fn = ^() {
|
auto specialize_kernels_fn = ^() {
|
||||||
compile_and_load(PSO_SPECIALIZED_SHADE);
|
for (int level = 1; level <= int(specialization_level); level++) {
|
||||||
async_compile_and_load = false;
|
compile_and_load(this_device_id, MetalPipelineType(level));
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool async_specialize_shade = true;
|
/* In normal use, we always compile the specialized kernels in the background. */
|
||||||
|
bool specialize_in_background = true;
|
||||||
|
|
||||||
/* Block if a per-kernel profiling is enabled (ensure steady rendering rate). */
|
/* Block if a per-kernel profiling is enabled (ensure steady rendering rate). */
|
||||||
if (getenv("CYCLES_METAL_PROFILING") != nullptr) {
|
if (getenv("CYCLES_METAL_PROFILING") != nullptr) {
|
||||||
async_specialize_shade = false;
|
specialize_in_background = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (async_specialize_shade) {
|
/* Block during benchmark warm-up to ensure kernels are cached prior to the observed run. */
|
||||||
if (!async_compile_and_load) {
|
if (MetalDeviceKernels::is_benchmark_warmup()) {
|
||||||
async_compile_and_load = true;
|
specialize_in_background = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (specialize_in_background) {
|
||||||
|
if (!MetalDeviceKernels::any_specialization_happening_now()) {
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0),
|
||||||
specialize_shade_fn);
|
specialize_kernels_fn);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
metal_printf(
|
metal_printf("\"optimize_for_scene\" request already in flight - dropping request\n");
|
||||||
"Async PSO_SPECIALIZED_SHADE load request already in progress - dropping request\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
specialize_shade_fn();
|
specialize_kernels_fn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -856,7 +983,7 @@ void MetalDevice::tex_alloc(device_texture &mem)
|
|||||||
/* sampler_index maps into the GPU's constant 'metal_samplers' array */
|
/* sampler_index maps into the GPU's constant 'metal_samplers' array */
|
||||||
uint64_t sampler_index = mem.info.extension;
|
uint64_t sampler_index = mem.info.extension;
|
||||||
if (mem.info.interpolation != INTERPOLATION_CLOSEST) {
|
if (mem.info.interpolation != INTERPOLATION_CLOSEST) {
|
||||||
sampler_index += 3;
|
sampler_index += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Image Texture Storage */
|
/* Image Texture Storage */
|
||||||
|
@@ -64,6 +64,8 @@ struct MetalKernelPipeline {
|
|||||||
|
|
||||||
void compile();
|
void compile();
|
||||||
|
|
||||||
|
int originating_device_id;
|
||||||
|
|
||||||
id<MTLLibrary> mtlLibrary = nil;
|
id<MTLLibrary> mtlLibrary = nil;
|
||||||
MetalPipelineType pso_type;
|
MetalPipelineType pso_type;
|
||||||
string source_md5;
|
string source_md5;
|
||||||
@@ -94,9 +96,13 @@ struct MetalKernelPipeline {
|
|||||||
/* Cache of Metal kernels for each DeviceKernel. */
|
/* Cache of Metal kernels for each DeviceKernel. */
|
||||||
namespace MetalDeviceKernels {
|
namespace MetalDeviceKernels {
|
||||||
|
|
||||||
bool should_load_kernels(MetalDevice *device, MetalPipelineType pso_type);
|
bool any_specialization_happening_now();
|
||||||
|
int get_loaded_kernel_count(MetalDevice const *device, MetalPipelineType pso_type);
|
||||||
|
bool should_load_kernels(MetalDevice const *device, MetalPipelineType pso_type);
|
||||||
bool load(MetalDevice *device, MetalPipelineType pso_type);
|
bool load(MetalDevice *device, MetalPipelineType pso_type);
|
||||||
const MetalKernelPipeline *get_best_pipeline(const MetalDevice *device, DeviceKernel kernel);
|
const MetalKernelPipeline *get_best_pipeline(const MetalDevice *device, DeviceKernel kernel);
|
||||||
|
void wait_for_all();
|
||||||
|
bool is_benchmark_warmup();
|
||||||
|
|
||||||
} /* namespace MetalDeviceKernels */
|
} /* namespace MetalDeviceKernels */
|
||||||
|
|
||||||
|
@@ -86,23 +86,17 @@ struct ShaderCache {
|
|||||||
void load_kernel(DeviceKernel kernel, MetalDevice *device, MetalPipelineType pso_type);
|
void load_kernel(DeviceKernel kernel, MetalDevice *device, MetalPipelineType pso_type);
|
||||||
|
|
||||||
bool should_load_kernel(DeviceKernel device_kernel,
|
bool should_load_kernel(DeviceKernel device_kernel,
|
||||||
MetalDevice *device,
|
MetalDevice const *device,
|
||||||
MetalPipelineType pso_type);
|
MetalPipelineType pso_type);
|
||||||
|
|
||||||
void wait_for_all();
|
void wait_for_all();
|
||||||
|
|
||||||
private:
|
|
||||||
friend ShaderCache *get_shader_cache(id<MTLDevice> mtlDevice);
|
friend ShaderCache *get_shader_cache(id<MTLDevice> mtlDevice);
|
||||||
|
|
||||||
void compile_thread_func(int thread_index);
|
void compile_thread_func(int thread_index);
|
||||||
|
|
||||||
using PipelineCollection = std::vector<unique_ptr<MetalKernelPipeline>>;
|
using PipelineCollection = std::vector<unique_ptr<MetalKernelPipeline>>;
|
||||||
|
|
||||||
struct PipelineRequest {
|
|
||||||
MetalKernelPipeline *pipeline = nullptr;
|
|
||||||
std::function<void(MetalKernelPipeline *)> completionHandler;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct OccupancyTuningParameters {
|
struct OccupancyTuningParameters {
|
||||||
int threads_per_threadgroup = 0;
|
int threads_per_threadgroup = 0;
|
||||||
int num_threads_per_block = 0;
|
int num_threads_per_block = 0;
|
||||||
@@ -113,35 +107,61 @@ struct ShaderCache {
|
|||||||
PipelineCollection pipelines[DEVICE_KERNEL_NUM];
|
PipelineCollection pipelines[DEVICE_KERNEL_NUM];
|
||||||
id<MTLDevice> mtlDevice;
|
id<MTLDevice> mtlDevice;
|
||||||
|
|
||||||
bool running = false;
|
static bool running;
|
||||||
std::condition_variable cond_var;
|
std::condition_variable cond_var;
|
||||||
std::deque<PipelineRequest> request_queue;
|
std::deque<MetalKernelPipeline *> request_queue;
|
||||||
std::vector<std::thread> compile_threads;
|
std::vector<std::thread> compile_threads;
|
||||||
std::atomic_int incomplete_requests = 0;
|
std::atomic_int incomplete_requests = 0;
|
||||||
|
std::atomic_int incomplete_specialization_requests = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::mutex g_shaderCacheMutex;
|
bool ShaderCache::running = true;
|
||||||
std::map<id<MTLDevice>, unique_ptr<ShaderCache>> g_shaderCache;
|
|
||||||
|
const int MAX_POSSIBLE_GPUS_ON_SYSTEM = 8;
|
||||||
|
using DeviceShaderCache = std::pair<id<MTLDevice>, unique_ptr<ShaderCache>>;
|
||||||
|
int g_shaderCacheCount = 0;
|
||||||
|
DeviceShaderCache g_shaderCache[MAX_POSSIBLE_GPUS_ON_SYSTEM];
|
||||||
|
|
||||||
ShaderCache *get_shader_cache(id<MTLDevice> mtlDevice)
|
ShaderCache *get_shader_cache(id<MTLDevice> mtlDevice)
|
||||||
{
|
{
|
||||||
thread_scoped_lock lock(g_shaderCacheMutex);
|
for (int i = 0; i < g_shaderCacheCount; i++) {
|
||||||
auto it = g_shaderCache.find(mtlDevice);
|
if (g_shaderCache[i].first == mtlDevice) {
|
||||||
if (it != g_shaderCache.end()) {
|
return g_shaderCache[i].second.get();
|
||||||
return it->second.get();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_shaderCache[mtlDevice] = make_unique<ShaderCache>(mtlDevice);
|
static thread_mutex g_shaderCacheCountMutex;
|
||||||
return g_shaderCache[mtlDevice].get();
|
g_shaderCacheCountMutex.lock();
|
||||||
|
int index = g_shaderCacheCount++;
|
||||||
|
g_shaderCacheCountMutex.unlock();
|
||||||
|
|
||||||
|
assert(index < MAX_POSSIBLE_GPUS_ON_SYSTEM);
|
||||||
|
g_shaderCache[index].first = mtlDevice;
|
||||||
|
g_shaderCache[index].second = make_unique<ShaderCache>(mtlDevice);
|
||||||
|
return g_shaderCache[index].second.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderCache::~ShaderCache()
|
ShaderCache::~ShaderCache()
|
||||||
{
|
{
|
||||||
metal_printf("ShaderCache shutting down with incomplete_requests = %d\n",
|
|
||||||
int(incomplete_requests));
|
|
||||||
|
|
||||||
running = false;
|
running = false;
|
||||||
cond_var.notify_all();
|
cond_var.notify_all();
|
||||||
|
|
||||||
|
int num_incomplete = int(incomplete_requests);
|
||||||
|
if (num_incomplete) {
|
||||||
|
/* Shutting down the app with incomplete shader compilation requests. Give 1 second's grace for
|
||||||
|
* clean shutdown. */
|
||||||
|
metal_printf("ShaderCache busy (incomplete_requests = %d)...\n", num_incomplete);
|
||||||
|
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||||
|
num_incomplete = int(incomplete_requests);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (num_incomplete && !MetalDeviceKernels::is_benchmark_warmup()) {
|
||||||
|
metal_printf("ShaderCache still busy (incomplete_requests = %d). Terminating...\n",
|
||||||
|
num_incomplete);
|
||||||
|
std::terminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
metal_printf("ShaderCache idle. Shutting down.\n");
|
||||||
for (auto &thread : compile_threads) {
|
for (auto &thread : compile_threads) {
|
||||||
thread.join();
|
thread.join();
|
||||||
}
|
}
|
||||||
@@ -156,35 +176,69 @@ void ShaderCache::wait_for_all()
|
|||||||
|
|
||||||
void ShaderCache::compile_thread_func(int thread_index)
|
void ShaderCache::compile_thread_func(int thread_index)
|
||||||
{
|
{
|
||||||
while (1) {
|
while (running) {
|
||||||
|
|
||||||
/* wait for / acquire next request */
|
/* wait for / acquire next request */
|
||||||
PipelineRequest request;
|
MetalKernelPipeline *pipeline;
|
||||||
{
|
{
|
||||||
thread_scoped_lock lock(cache_mutex);
|
thread_scoped_lock lock(cache_mutex);
|
||||||
cond_var.wait(lock, [&] { return !running || !request_queue.empty(); });
|
cond_var.wait(lock, [&] { return !running || !request_queue.empty(); });
|
||||||
if (!running) {
|
if (!running || request_queue.empty()) {
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!request_queue.empty()) {
|
pipeline = request_queue.front();
|
||||||
request = request_queue.front();
|
request_queue.pop_front();
|
||||||
request_queue.pop_front();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* service request */
|
/* Service the request. */
|
||||||
if (request.pipeline) {
|
DeviceKernel device_kernel = pipeline->device_kernel;
|
||||||
request.pipeline->compile();
|
MetalPipelineType pso_type = pipeline->pso_type;
|
||||||
incomplete_requests--;
|
|
||||||
|
if (MetalDevice::is_device_cancelled(pipeline->originating_device_id)) {
|
||||||
|
/* The originating MetalDevice is no longer active, so this request is obsolete. */
|
||||||
|
metal_printf("Cancelling compilation of %s (%s)\n",
|
||||||
|
device_kernel_as_string(device_kernel),
|
||||||
|
kernel_type_as_string(pso_type));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* Do the actual compilation. */
|
||||||
|
pipeline->compile();
|
||||||
|
|
||||||
|
thread_scoped_lock lock(cache_mutex);
|
||||||
|
auto &collection = pipelines[device_kernel];
|
||||||
|
|
||||||
|
/* Cache up to 3 kernel variants with the same pso_type in memory, purging oldest first. */
|
||||||
|
int max_entries_of_same_pso_type = 3;
|
||||||
|
for (int i = (int)collection.size() - 1; i >= 0; i--) {
|
||||||
|
if (collection[i]->pso_type == pso_type) {
|
||||||
|
max_entries_of_same_pso_type -= 1;
|
||||||
|
if (max_entries_of_same_pso_type == 0) {
|
||||||
|
metal_printf("Purging oldest %s:%s kernel from ShaderCache\n",
|
||||||
|
kernel_type_as_string(pso_type),
|
||||||
|
device_kernel_as_string(device_kernel));
|
||||||
|
collection.erase(collection.begin() + i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
collection.push_back(unique_ptr<MetalKernelPipeline>(pipeline));
|
||||||
|
}
|
||||||
|
incomplete_requests--;
|
||||||
|
if (pso_type != PSO_GENERIC) {
|
||||||
|
incomplete_specialization_requests--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ShaderCache::should_load_kernel(DeviceKernel device_kernel,
|
bool ShaderCache::should_load_kernel(DeviceKernel device_kernel,
|
||||||
MetalDevice *device,
|
MetalDevice const *device,
|
||||||
MetalPipelineType pso_type)
|
MetalPipelineType pso_type)
|
||||||
{
|
{
|
||||||
|
if (!running) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (device_kernel == DEVICE_KERNEL_INTEGRATOR_MEGAKERNEL) {
|
if (device_kernel == DEVICE_KERNEL_INTEGRATOR_MEGAKERNEL) {
|
||||||
/* Skip megakernel. */
|
/* Skip megakernel. */
|
||||||
return false;
|
return false;
|
||||||
@@ -240,7 +294,6 @@ void ShaderCache::load_kernel(DeviceKernel device_kernel,
|
|||||||
/* create compiler threads on first run */
|
/* create compiler threads on first run */
|
||||||
thread_scoped_lock lock(cache_mutex);
|
thread_scoped_lock lock(cache_mutex);
|
||||||
if (compile_threads.empty()) {
|
if (compile_threads.empty()) {
|
||||||
running = true;
|
|
||||||
for (int i = 0; i < max_mtlcompiler_threads; i++) {
|
for (int i = 0; i < max_mtlcompiler_threads; i++) {
|
||||||
compile_threads.push_back(std::thread([&] { compile_thread_func(i); }));
|
compile_threads.push_back(std::thread([&] { compile_thread_func(i); }));
|
||||||
}
|
}
|
||||||
@@ -252,65 +305,43 @@ void ShaderCache::load_kernel(DeviceKernel device_kernel,
|
|||||||
}
|
}
|
||||||
|
|
||||||
incomplete_requests++;
|
incomplete_requests++;
|
||||||
|
if (pso_type != PSO_GENERIC) {
|
||||||
|
incomplete_specialization_requests++;
|
||||||
|
}
|
||||||
|
|
||||||
PipelineRequest request;
|
MetalKernelPipeline *pipeline = new MetalKernelPipeline;
|
||||||
request.pipeline = new MetalKernelPipeline;
|
|
||||||
memcpy(&request.pipeline->kernel_data_,
|
/* Keep track of the originating device's ID so that we can cancel requests if the device ceases
|
||||||
&device->launch_params.data,
|
* to be active. */
|
||||||
sizeof(request.pipeline->kernel_data_));
|
pipeline->originating_device_id = device->device_id;
|
||||||
request.pipeline->pso_type = pso_type;
|
memcpy(&pipeline->kernel_data_, &device->launch_params.data, sizeof(pipeline->kernel_data_));
|
||||||
request.pipeline->mtlDevice = mtlDevice;
|
pipeline->pso_type = pso_type;
|
||||||
request.pipeline->source_md5 = device->source_md5[pso_type];
|
pipeline->mtlDevice = mtlDevice;
|
||||||
request.pipeline->mtlLibrary = device->mtlLibrary[pso_type];
|
pipeline->source_md5 = device->source_md5[pso_type];
|
||||||
request.pipeline->device_kernel = device_kernel;
|
pipeline->mtlLibrary = device->mtlLibrary[pso_type];
|
||||||
request.pipeline->threads_per_threadgroup = device->max_threads_per_threadgroup;
|
pipeline->device_kernel = device_kernel;
|
||||||
|
pipeline->threads_per_threadgroup = device->max_threads_per_threadgroup;
|
||||||
|
|
||||||
if (occupancy_tuning[device_kernel].threads_per_threadgroup) {
|
if (occupancy_tuning[device_kernel].threads_per_threadgroup) {
|
||||||
request.pipeline->threads_per_threadgroup =
|
pipeline->threads_per_threadgroup = occupancy_tuning[device_kernel].threads_per_threadgroup;
|
||||||
occupancy_tuning[device_kernel].threads_per_threadgroup;
|
pipeline->num_threads_per_block = occupancy_tuning[device_kernel].num_threads_per_block;
|
||||||
request.pipeline->num_threads_per_block =
|
|
||||||
occupancy_tuning[device_kernel].num_threads_per_block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* metalrt options */
|
/* metalrt options */
|
||||||
request.pipeline->use_metalrt = device->use_metalrt;
|
pipeline->use_metalrt = device->use_metalrt;
|
||||||
request.pipeline->metalrt_features = device->use_metalrt ?
|
pipeline->metalrt_features = device->use_metalrt ?
|
||||||
(device->kernel_features & METALRT_FEATURE_MASK) :
|
(device->kernel_features & METALRT_FEATURE_MASK) :
|
||||||
0;
|
0;
|
||||||
|
|
||||||
{
|
{
|
||||||
thread_scoped_lock lock(cache_mutex);
|
thread_scoped_lock lock(cache_mutex);
|
||||||
auto &collection = pipelines[device_kernel];
|
request_queue.push_back(pipeline);
|
||||||
|
|
||||||
/* Cache up to 3 kernel variants with the same pso_type, purging oldest first. */
|
|
||||||
int max_entries_of_same_pso_type = 3;
|
|
||||||
for (int i = (int)collection.size() - 1; i >= 0; i--) {
|
|
||||||
if (collection[i]->pso_type == pso_type) {
|
|
||||||
max_entries_of_same_pso_type -= 1;
|
|
||||||
if (max_entries_of_same_pso_type == 0) {
|
|
||||||
metal_printf("Purging oldest %s:%s kernel from ShaderCache\n",
|
|
||||||
kernel_type_as_string(pso_type),
|
|
||||||
device_kernel_as_string(device_kernel));
|
|
||||||
collection.erase(collection.begin() + i);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
collection.push_back(unique_ptr<MetalKernelPipeline>(request.pipeline));
|
|
||||||
request_queue.push_back(request);
|
|
||||||
}
|
}
|
||||||
cond_var.notify_one();
|
cond_var.notify_one();
|
||||||
}
|
}
|
||||||
|
|
||||||
MetalKernelPipeline *ShaderCache::get_best_pipeline(DeviceKernel kernel, const MetalDevice *device)
|
MetalKernelPipeline *ShaderCache::get_best_pipeline(DeviceKernel kernel, const MetalDevice *device)
|
||||||
{
|
{
|
||||||
thread_scoped_lock lock(cache_mutex);
|
|
||||||
auto &collection = pipelines[kernel];
|
|
||||||
if (collection.empty()) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* metalrt options */
|
/* metalrt options */
|
||||||
bool use_metalrt = device->use_metalrt;
|
bool use_metalrt = device->use_metalrt;
|
||||||
bool device_metalrt_hair = use_metalrt && device->kernel_features & KERNEL_FEATURE_HAIR;
|
bool device_metalrt_hair = use_metalrt && device->kernel_features & KERNEL_FEATURE_HAIR;
|
||||||
@@ -322,34 +353,43 @@ MetalKernelPipeline *ShaderCache::get_best_pipeline(DeviceKernel kernel, const M
|
|||||||
device->kernel_features & KERNEL_FEATURE_OBJECT_MOTION;
|
device->kernel_features & KERNEL_FEATURE_OBJECT_MOTION;
|
||||||
|
|
||||||
MetalKernelPipeline *best_pipeline = nullptr;
|
MetalKernelPipeline *best_pipeline = nullptr;
|
||||||
for (auto &pipeline : collection) {
|
while (!best_pipeline) {
|
||||||
if (!pipeline->loaded) {
|
{
|
||||||
/* still loading - ignore */
|
thread_scoped_lock lock(cache_mutex);
|
||||||
continue;
|
for (auto &pipeline : pipelines[kernel]) {
|
||||||
}
|
if (!pipeline->loaded) {
|
||||||
|
/* still loading - ignore */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bool pipeline_metalrt_hair = pipeline->metalrt_features & KERNEL_FEATURE_HAIR;
|
bool pipeline_metalrt_hair = pipeline->metalrt_features & KERNEL_FEATURE_HAIR;
|
||||||
bool pipeline_metalrt_hair_thick = pipeline->metalrt_features & KERNEL_FEATURE_HAIR_THICK;
|
bool pipeline_metalrt_hair_thick = pipeline->metalrt_features & KERNEL_FEATURE_HAIR_THICK;
|
||||||
bool pipeline_metalrt_pointcloud = pipeline->metalrt_features & KERNEL_FEATURE_POINTCLOUD;
|
bool pipeline_metalrt_pointcloud = pipeline->metalrt_features & KERNEL_FEATURE_POINTCLOUD;
|
||||||
bool pipeline_metalrt_motion = use_metalrt &&
|
bool pipeline_metalrt_motion = use_metalrt &&
|
||||||
pipeline->metalrt_features & KERNEL_FEATURE_OBJECT_MOTION;
|
pipeline->metalrt_features & KERNEL_FEATURE_OBJECT_MOTION;
|
||||||
|
|
||||||
if (pipeline->use_metalrt != use_metalrt || pipeline_metalrt_hair != device_metalrt_hair ||
|
if (pipeline->use_metalrt != use_metalrt || pipeline_metalrt_hair != device_metalrt_hair ||
|
||||||
pipeline_metalrt_hair_thick != device_metalrt_hair_thick ||
|
pipeline_metalrt_hair_thick != device_metalrt_hair_thick ||
|
||||||
pipeline_metalrt_pointcloud != device_metalrt_pointcloud ||
|
pipeline_metalrt_pointcloud != device_metalrt_pointcloud ||
|
||||||
pipeline_metalrt_motion != device_metalrt_motion) {
|
pipeline_metalrt_motion != device_metalrt_motion) {
|
||||||
/* wrong combination of metalrt options */
|
/* wrong combination of metalrt options */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pipeline->pso_type != PSO_GENERIC) {
|
if (pipeline->pso_type != PSO_GENERIC) {
|
||||||
if (pipeline->source_md5 == device->source_md5[PSO_SPECIALIZED_INTERSECT] ||
|
if (pipeline->source_md5 == device->source_md5[PSO_SPECIALIZED_INTERSECT] ||
|
||||||
pipeline->source_md5 == device->source_md5[PSO_SPECIALIZED_SHADE]) {
|
pipeline->source_md5 == device->source_md5[PSO_SPECIALIZED_SHADE]) {
|
||||||
best_pipeline = pipeline.get();
|
best_pipeline = pipeline.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!best_pipeline) {
|
||||||
|
best_pipeline = pipeline.get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!best_pipeline) {
|
|
||||||
best_pipeline = pipeline.get();
|
if (!best_pipeline) {
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -664,51 +704,60 @@ void MetalKernelPipeline::compile()
|
|||||||
|
|
||||||
double starttime = time_dt();
|
double starttime = time_dt();
|
||||||
|
|
||||||
MTLNewComputePipelineStateWithReflectionCompletionHandler completionHandler = ^(
|
/* Block on load to ensure we continue with a valid kernel function */
|
||||||
id<MTLComputePipelineState> computePipelineState,
|
if (creating_new_archive) {
|
||||||
MTLComputePipelineReflection *reflection,
|
starttime = time_dt();
|
||||||
NSError *error) {
|
NSError *error;
|
||||||
bool recreate_archive = false;
|
if (![archive addComputePipelineFunctionsWithDescriptor:computePipelineStateDescriptor
|
||||||
if (computePipelineState == nil && archive) {
|
error:&error]) {
|
||||||
NSString *errStr = [error localizedDescription];
|
NSString *errStr = [error localizedDescription];
|
||||||
metal_printf(
|
metal_printf("Failed to add PSO to archive:\n%s\n", errStr ? [errStr UTF8String] : "nil");
|
||||||
"Failed to create compute pipeline state \"%s\" from archive - attempting recreation... "
|
|
||||||
"(error: %s)\n",
|
|
||||||
device_kernel_as_string((DeviceKernel)device_kernel),
|
|
||||||
errStr ? [errStr UTF8String] : "nil");
|
|
||||||
computePipelineState = [mtlDevice
|
|
||||||
newComputePipelineStateWithDescriptor:computePipelineStateDescriptor
|
|
||||||
options:MTLPipelineOptionNone
|
|
||||||
reflection:nullptr
|
|
||||||
error:&error];
|
|
||||||
recreate_archive = true;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
double duration = time_dt() - starttime;
|
pipeline = [mtlDevice newComputePipelineStateWithDescriptor:computePipelineStateDescriptor
|
||||||
|
options:pipelineOptions
|
||||||
|
reflection:nullptr
|
||||||
|
error:&error];
|
||||||
|
|
||||||
if (computePipelineState == nil) {
|
bool recreate_archive = false;
|
||||||
NSString *errStr = [error localizedDescription];
|
if (pipeline == nil && archive) {
|
||||||
error_str = string_printf("Failed to create compute pipeline state \"%s\", error: \n",
|
NSString *errStr = [error localizedDescription];
|
||||||
device_kernel_as_string((DeviceKernel)device_kernel));
|
metal_printf(
|
||||||
error_str += (errStr ? [errStr UTF8String] : "nil");
|
"Failed to create compute pipeline state \"%s\" from archive - attempting recreation... "
|
||||||
metal_printf("%16s | %2d | %-55s | %7.2fs | FAILED!\n",
|
"(error: %s)\n",
|
||||||
kernel_type_as_string(pso_type),
|
device_kernel_as_string((DeviceKernel)device_kernel),
|
||||||
device_kernel,
|
errStr ? [errStr UTF8String] : "nil");
|
||||||
device_kernel_as_string((DeviceKernel)device_kernel),
|
pipeline = [mtlDevice newComputePipelineStateWithDescriptor:computePipelineStateDescriptor
|
||||||
duration);
|
options:MTLPipelineOptionNone
|
||||||
return;
|
reflection:nullptr
|
||||||
}
|
error:&error];
|
||||||
|
recreate_archive = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!num_threads_per_block) {
|
double duration = time_dt() - starttime;
|
||||||
num_threads_per_block = round_down(computePipelineState.maxTotalThreadsPerThreadgroup,
|
|
||||||
computePipelineState.threadExecutionWidth);
|
|
||||||
num_threads_per_block = std::max(num_threads_per_block,
|
|
||||||
(int)computePipelineState.threadExecutionWidth);
|
|
||||||
}
|
|
||||||
|
|
||||||
this->pipeline = computePipelineState;
|
if (pipeline == nil) {
|
||||||
|
NSString *errStr = [error localizedDescription];
|
||||||
|
error_str = string_printf("Failed to create compute pipeline state \"%s\", error: \n",
|
||||||
|
device_kernel_as_string((DeviceKernel)device_kernel));
|
||||||
|
error_str += (errStr ? [errStr UTF8String] : "nil");
|
||||||
|
metal_printf("%16s | %2d | %-55s | %7.2fs | FAILED!\n",
|
||||||
|
kernel_type_as_string(pso_type),
|
||||||
|
device_kernel,
|
||||||
|
device_kernel_as_string((DeviceKernel)device_kernel),
|
||||||
|
duration);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (@available(macOS 11.0, *)) {
|
if (!num_threads_per_block) {
|
||||||
|
num_threads_per_block = round_down(pipeline.maxTotalThreadsPerThreadgroup,
|
||||||
|
pipeline.threadExecutionWidth);
|
||||||
|
num_threads_per_block = std::max(num_threads_per_block, (int)pipeline.threadExecutionWidth);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (@available(macOS 11.0, *)) {
|
||||||
|
if (ShaderCache::running) {
|
||||||
if (creating_new_archive || recreate_archive) {
|
if (creating_new_archive || recreate_archive) {
|
||||||
if (![archive serializeToURL:[NSURL fileURLWithPath:@(metalbin_path.c_str())]
|
if (![archive serializeToURL:[NSURL fileURLWithPath:@(metalbin_path.c_str())]
|
||||||
error:&error]) {
|
error:&error]) {
|
||||||
@@ -720,24 +769,7 @@ void MetalKernelPipeline::compile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
/* Block on load to ensure we continue with a valid kernel function */
|
|
||||||
if (creating_new_archive) {
|
|
||||||
starttime = time_dt();
|
|
||||||
NSError *error;
|
|
||||||
if (![archive addComputePipelineFunctionsWithDescriptor:computePipelineStateDescriptor
|
|
||||||
error:&error]) {
|
|
||||||
NSString *errStr = [error localizedDescription];
|
|
||||||
metal_printf("Failed to add PSO to archive:\n%s\n", errStr ? [errStr UTF8String] : "nil");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
id<MTLComputePipelineState> pipeline = [mtlDevice
|
|
||||||
newComputePipelineStateWithDescriptor:computePipelineStateDescriptor
|
|
||||||
options:pipelineOptions
|
|
||||||
reflection:nullptr
|
|
||||||
error:&error];
|
|
||||||
completionHandler(pipeline, nullptr, error);
|
|
||||||
|
|
||||||
this->loaded = true;
|
this->loaded = true;
|
||||||
[computePipelineStateDescriptor release];
|
[computePipelineStateDescriptor release];
|
||||||
@@ -763,8 +795,6 @@ void MetalKernelPipeline::compile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
double duration = time_dt() - starttime;
|
|
||||||
|
|
||||||
if (!use_binary_archive) {
|
if (!use_binary_archive) {
|
||||||
metal_printf("%16s | %2d | %-55s | %7.2fs\n",
|
metal_printf("%16s | %2d | %-55s | %7.2fs\n",
|
||||||
kernel_type_as_string(pso_type),
|
kernel_type_as_string(pso_type),
|
||||||
@@ -785,36 +815,69 @@ void MetalKernelPipeline::compile()
|
|||||||
|
|
||||||
bool MetalDeviceKernels::load(MetalDevice *device, MetalPipelineType pso_type)
|
bool MetalDeviceKernels::load(MetalDevice *device, MetalPipelineType pso_type)
|
||||||
{
|
{
|
||||||
const double starttime = time_dt();
|
|
||||||
auto shader_cache = get_shader_cache(device->mtlDevice);
|
auto shader_cache = get_shader_cache(device->mtlDevice);
|
||||||
for (int i = 0; i < DEVICE_KERNEL_NUM; i++) {
|
for (int i = 0; i < DEVICE_KERNEL_NUM; i++) {
|
||||||
shader_cache->load_kernel((DeviceKernel)i, device, pso_type);
|
shader_cache->load_kernel((DeviceKernel)i, device, pso_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
shader_cache->wait_for_all();
|
|
||||||
metal_printf("Back-end compilation finished in %.1f seconds (%s)\n",
|
|
||||||
time_dt() - starttime,
|
|
||||||
kernel_type_as_string(pso_type));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MetalDeviceKernels::should_load_kernels(MetalDevice *device, MetalPipelineType pso_type)
|
void MetalDeviceKernels::wait_for_all()
|
||||||
{
|
{
|
||||||
auto shader_cache = get_shader_cache(device->mtlDevice);
|
for (int i = 0; i < g_shaderCacheCount; i++) {
|
||||||
for (int i = 0; i < DEVICE_KERNEL_NUM; i++) {
|
g_shaderCache[i].second->wait_for_all();
|
||||||
if (shader_cache->should_load_kernel((DeviceKernel)i, device, pso_type)) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MetalDeviceKernels::any_specialization_happening_now()
|
||||||
|
{
|
||||||
|
/* Return true if any ShaderCaches have ongoing specialization requests (typically there will be
|
||||||
|
* only 1). */
|
||||||
|
for (int i = 0; i < g_shaderCacheCount; i++) {
|
||||||
|
if (g_shaderCache[i].second->incomplete_specialization_requests > 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MetalDeviceKernels::get_loaded_kernel_count(MetalDevice const *device,
|
||||||
|
MetalPipelineType pso_type)
|
||||||
|
{
|
||||||
|
auto shader_cache = get_shader_cache(device->mtlDevice);
|
||||||
|
int loaded_count = DEVICE_KERNEL_NUM;
|
||||||
|
for (int i = 0; i < DEVICE_KERNEL_NUM; i++) {
|
||||||
|
if (shader_cache->should_load_kernel((DeviceKernel)i, device, pso_type)) {
|
||||||
|
loaded_count -= 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return loaded_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MetalDeviceKernels::should_load_kernels(MetalDevice const *device, MetalPipelineType pso_type)
|
||||||
|
{
|
||||||
|
return get_loaded_kernel_count(device, pso_type) != DEVICE_KERNEL_NUM;
|
||||||
|
}
|
||||||
|
|
||||||
const MetalKernelPipeline *MetalDeviceKernels::get_best_pipeline(const MetalDevice *device,
|
const MetalKernelPipeline *MetalDeviceKernels::get_best_pipeline(const MetalDevice *device,
|
||||||
DeviceKernel kernel)
|
DeviceKernel kernel)
|
||||||
{
|
{
|
||||||
return get_shader_cache(device->mtlDevice)->get_best_pipeline(kernel, device);
|
return get_shader_cache(device->mtlDevice)->get_best_pipeline(kernel, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MetalDeviceKernels::is_benchmark_warmup()
|
||||||
|
{
|
||||||
|
NSArray *args = [[NSProcessInfo processInfo] arguments];
|
||||||
|
for (int i = 0; i < args.count; i++) {
|
||||||
|
if (const char *arg = [[args objectAtIndex:i] cStringUsingEncoding:NSASCIIStringEncoding]) {
|
||||||
|
if (!strcmp(arg, "--warm-up")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
CCL_NAMESPACE_END
|
CCL_NAMESPACE_END
|
||||||
|
|
||||||
#endif /* WITH_METAL*/
|
#endif /* WITH_METAL*/
|
||||||
|
@@ -202,6 +202,9 @@ MetalDeviceQueue::~MetalDeviceQueue()
|
|||||||
assert(mtlCommandBuffer_ == nil);
|
assert(mtlCommandBuffer_ == nil);
|
||||||
assert(command_buffers_submitted_ == command_buffers_completed_);
|
assert(command_buffers_submitted_ == command_buffers_completed_);
|
||||||
|
|
||||||
|
close_compute_encoder();
|
||||||
|
close_blit_encoder();
|
||||||
|
|
||||||
if (@available(macos 10.14, *)) {
|
if (@available(macos 10.14, *)) {
|
||||||
[shared_event_listener_ release];
|
[shared_event_listener_ release];
|
||||||
[shared_event_ release];
|
[shared_event_ release];
|
||||||
@@ -637,9 +640,7 @@ bool MetalDeviceQueue::synchronize()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mtlComputeEncoder_) {
|
close_compute_encoder();
|
||||||
close_compute_encoder();
|
|
||||||
}
|
|
||||||
close_blit_encoder();
|
close_blit_encoder();
|
||||||
|
|
||||||
if (mtlCommandBuffer_) {
|
if (mtlCommandBuffer_) {
|
||||||
@@ -702,6 +703,10 @@ bool MetalDeviceQueue::synchronize()
|
|||||||
|
|
||||||
void MetalDeviceQueue::zero_to_device(device_memory &mem)
|
void MetalDeviceQueue::zero_to_device(device_memory &mem)
|
||||||
{
|
{
|
||||||
|
if (metal_device_->have_error()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(mem.type != MEM_GLOBAL && mem.type != MEM_TEXTURE);
|
assert(mem.type != MEM_GLOBAL && mem.type != MEM_TEXTURE);
|
||||||
|
|
||||||
if (mem.memory_size() == 0) {
|
if (mem.memory_size() == 0) {
|
||||||
@@ -729,6 +734,10 @@ void MetalDeviceQueue::zero_to_device(device_memory &mem)
|
|||||||
|
|
||||||
void MetalDeviceQueue::copy_to_device(device_memory &mem)
|
void MetalDeviceQueue::copy_to_device(device_memory &mem)
|
||||||
{
|
{
|
||||||
|
if (metal_device_->have_error()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (mem.memory_size() == 0) {
|
if (mem.memory_size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -771,6 +780,10 @@ void MetalDeviceQueue::copy_to_device(device_memory &mem)
|
|||||||
|
|
||||||
void MetalDeviceQueue::copy_from_device(device_memory &mem)
|
void MetalDeviceQueue::copy_from_device(device_memory &mem)
|
||||||
{
|
{
|
||||||
|
if (metal_device_->have_error()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
assert(mem.type != MEM_GLOBAL && mem.type != MEM_TEXTURE);
|
assert(mem.type != MEM_GLOBAL && mem.type != MEM_TEXTURE);
|
||||||
|
|
||||||
if (mem.memory_size() == 0) {
|
if (mem.memory_size() == 0) {
|
||||||
@@ -843,9 +856,7 @@ id<MTLComputeCommandEncoder> MetalDeviceQueue::get_compute_encoder(DeviceKernel
|
|||||||
if (@available(macos 10.14, *)) {
|
if (@available(macos 10.14, *)) {
|
||||||
if (timing_shared_event_) {
|
if (timing_shared_event_) {
|
||||||
/* Close the current encoder to ensure we're able to capture per-encoder timing data. */
|
/* Close the current encoder to ensure we're able to capture per-encoder timing data. */
|
||||||
if (mtlComputeEncoder_) {
|
close_compute_encoder();
|
||||||
close_compute_encoder();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mtlComputeEncoder_) {
|
if (mtlComputeEncoder_) {
|
||||||
@@ -885,9 +896,7 @@ id<MTLBlitCommandEncoder> MetalDeviceQueue::get_blit_encoder()
|
|||||||
return mtlBlitEncoder_;
|
return mtlBlitEncoder_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mtlComputeEncoder_) {
|
close_compute_encoder();
|
||||||
close_compute_encoder();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mtlCommandBuffer_) {
|
if (!mtlCommandBuffer_) {
|
||||||
mtlCommandBuffer_ = [mtlCommandQueue_ commandBuffer];
|
mtlCommandBuffer_ = [mtlCommandQueue_ commandBuffer];
|
||||||
@@ -901,12 +910,14 @@ id<MTLBlitCommandEncoder> MetalDeviceQueue::get_blit_encoder()
|
|||||||
|
|
||||||
void MetalDeviceQueue::close_compute_encoder()
|
void MetalDeviceQueue::close_compute_encoder()
|
||||||
{
|
{
|
||||||
[mtlComputeEncoder_ endEncoding];
|
if (mtlComputeEncoder_) {
|
||||||
mtlComputeEncoder_ = nil;
|
[mtlComputeEncoder_ endEncoding];
|
||||||
|
mtlComputeEncoder_ = nil;
|
||||||
|
|
||||||
if (@available(macos 10.14, *)) {
|
if (@available(macos 10.14, *)) {
|
||||||
if (timing_shared_event_) {
|
if (timing_shared_event_) {
|
||||||
[mtlCommandBuffer_ encodeSignalEvent:timing_shared_event_ value:timing_shared_event_id_++];
|
[mtlCommandBuffer_ encodeSignalEvent:timing_shared_event_ value:timing_shared_event_id_++];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -429,7 +429,12 @@ void OneapiDevice::check_usm(SyclQueue *queue_, const void *usm_ptr, bool allow_
|
|||||||
queue->get_device().get_info<sycl::info::device::device_type>();
|
queue->get_device().get_info<sycl::info::device::device_type>();
|
||||||
sycl::usm::alloc usm_type = get_pointer_type(usm_ptr, queue->get_context());
|
sycl::usm::alloc usm_type = get_pointer_type(usm_ptr, queue->get_context());
|
||||||
(void)usm_type;
|
(void)usm_type;
|
||||||
assert(usm_type == sycl::usm::alloc::device ||
|
# ifndef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
|
const sycl::usm::alloc main_memory_type = sycl::usm::alloc::device;
|
||||||
|
# else
|
||||||
|
const sycl::usm::alloc main_memory_type = sycl::usm::alloc::host;
|
||||||
|
# endif
|
||||||
|
assert(usm_type == main_memory_type ||
|
||||||
(usm_type == sycl::usm::alloc::host &&
|
(usm_type == sycl::usm::alloc::host &&
|
||||||
(allow_host || device_type == sycl::info::device_type::cpu)) ||
|
(allow_host || device_type == sycl::info::device_type::cpu)) ||
|
||||||
usm_type == sycl::usm::alloc::unknown);
|
usm_type == sycl::usm::alloc::unknown);
|
||||||
@@ -478,7 +483,11 @@ void *OneapiDevice::usm_alloc_device(SyclQueue *queue_, size_t memory_size)
|
|||||||
{
|
{
|
||||||
assert(queue_);
|
assert(queue_);
|
||||||
sycl::queue *queue = reinterpret_cast<sycl::queue *>(queue_);
|
sycl::queue *queue = reinterpret_cast<sycl::queue *>(queue_);
|
||||||
|
# ifndef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
return sycl::malloc_device(memory_size, *queue);
|
return sycl::malloc_device(memory_size, *queue);
|
||||||
|
# else
|
||||||
|
return sycl::malloc_host(memory_size, *queue);
|
||||||
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OneapiDevice::usm_free(SyclQueue *queue_, void *usm_ptr)
|
void OneapiDevice::usm_free(SyclQueue *queue_, void *usm_ptr)
|
||||||
@@ -736,7 +745,11 @@ char *OneapiDevice::device_capabilities()
|
|||||||
|
|
||||||
const std::vector<sycl::device> &oneapi_devices = available_devices();
|
const std::vector<sycl::device> &oneapi_devices = available_devices();
|
||||||
for (const sycl::device &device : oneapi_devices) {
|
for (const sycl::device &device : oneapi_devices) {
|
||||||
|
# ifndef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
const std::string &name = device.get_info<sycl::info::device::name>();
|
const std::string &name = device.get_info<sycl::info::device::name>();
|
||||||
|
# else
|
||||||
|
const std::string &name = "SYCL Host Task (Debug)";
|
||||||
|
# endif
|
||||||
|
|
||||||
capabilities << std::string("\t") << name << "\n";
|
capabilities << std::string("\t") << name << "\n";
|
||||||
# define WRITE_ATTR(attribute_name, attribute_variable) \
|
# define WRITE_ATTR(attribute_name, attribute_variable) \
|
||||||
@@ -813,7 +826,11 @@ void OneapiDevice::iterate_devices(OneAPIDeviceIteratorCallback cb, void *user_p
|
|||||||
for (sycl::device &device : devices) {
|
for (sycl::device &device : devices) {
|
||||||
const std::string &platform_name =
|
const std::string &platform_name =
|
||||||
device.get_platform().get_info<sycl::info::platform::name>();
|
device.get_platform().get_info<sycl::info::platform::name>();
|
||||||
|
# ifndef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
std::string name = device.get_info<sycl::info::device::name>();
|
std::string name = device.get_info<sycl::info::device::name>();
|
||||||
|
# else
|
||||||
|
std::string name = "SYCL Host Task (Debug)";
|
||||||
|
# endif
|
||||||
std::string id = "ONEAPI_" + platform_name + "_" + name;
|
std::string id = "ONEAPI_" + platform_name + "_" + name;
|
||||||
if (device.has(sycl::aspect::ext_intel_pci_address)) {
|
if (device.has(sycl::aspect::ext_intel_pci_address)) {
|
||||||
id.append("_" + device.get_info<sycl::ext::intel::info::device::pci_address>());
|
id.append("_" + device.get_info<sycl::ext::intel::info::device::pci_address>());
|
||||||
|
@@ -579,7 +579,11 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
|
|||||||
link_options.maxTraceDepth = 1;
|
link_options.maxTraceDepth = 1;
|
||||||
link_options.debugLevel = module_options.debugLevel;
|
link_options.debugLevel = module_options.debugLevel;
|
||||||
|
|
||||||
if (kernel_features & (KERNEL_FEATURE_NODE_RAYTRACE | KERNEL_FEATURE_MNEE) && !use_osl) {
|
if (use_osl) {
|
||||||
|
/* Re-create OSL pipeline in case kernels are reloaded after it has been created before. */
|
||||||
|
load_osl_kernels();
|
||||||
|
}
|
||||||
|
else if (kernel_features & (KERNEL_FEATURE_NODE_RAYTRACE | KERNEL_FEATURE_MNEE)) {
|
||||||
/* Create shader raytracing and MNEE pipeline. */
|
/* Create shader raytracing and MNEE pipeline. */
|
||||||
vector<OptixProgramGroup> pipeline_groups;
|
vector<OptixProgramGroup> pipeline_groups;
|
||||||
pipeline_groups.reserve(NUM_PROGRAM_GROUPS);
|
pipeline_groups.reserve(NUM_PROGRAM_GROUPS);
|
||||||
@@ -743,6 +747,11 @@ bool OptiXDevice::load_osl_kernels()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (osl_kernels.empty()) {
|
||||||
|
/* No OSL shader groups, so no need to create a pipeline. */
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
OptixProgramGroupOptions group_options = {}; /* There are no options currently. */
|
OptixProgramGroupOptions group_options = {}; /* There are no options currently. */
|
||||||
OptixModuleCompileOptions module_options = {};
|
OptixModuleCompileOptions module_options = {};
|
||||||
module_options.optLevel = OPTIX_COMPILE_OPTIMIZATION_LEVEL_3;
|
module_options.optLevel = OPTIX_COMPILE_OPTIMIZATION_LEVEL_3;
|
||||||
@@ -857,6 +866,11 @@ bool OptiXDevice::load_osl_kernels()
|
|||||||
optix_assert(optixSbtRecordPackHeader(osl_groups[i], &sbt_data[NUM_PROGRAM_GROUPS + i]));
|
optix_assert(optixSbtRecordPackHeader(osl_groups[i], &sbt_data[NUM_PROGRAM_GROUPS + i]));
|
||||||
optix_assert(optixProgramGroupGetStackSize(osl_groups[i], &osl_stack_size[i]));
|
optix_assert(optixProgramGroupGetStackSize(osl_groups[i], &osl_stack_size[i]));
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* Default to "__direct_callable__dummy_services", so that OSL evaluation for empty
|
||||||
|
* materials has direct callables to call and does not crash. */
|
||||||
|
optix_assert(optixSbtRecordPackHeader(osl_groups.back(), &sbt_data[NUM_PROGRAM_GROUPS + i]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sbt_data.copy_to_device(); /* Upload updated SBT to device. */
|
sbt_data.copy_to_device(); /* Upload updated SBT to device. */
|
||||||
|
|
||||||
|
@@ -10,4 +10,4 @@ set(LICENSES
|
|||||||
Zlib-license.txt
|
Zlib-license.txt
|
||||||
)
|
)
|
||||||
|
|
||||||
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${LICENSES}" ${CYCLES_INSTALL_PATH}/license)
|
delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${LICENSES}" ${CYCLES_INSTALL_PATH}/license)
|
||||||
|
@@ -26,9 +26,11 @@ class HdCyclesVolumeLoader : public VDBImageLoader {
|
|||||||
HdCyclesVolumeLoader(const std::string &filePath, const std::string &gridName)
|
HdCyclesVolumeLoader(const std::string &filePath, const std::string &gridName)
|
||||||
: VDBImageLoader(gridName)
|
: VDBImageLoader(gridName)
|
||||||
{
|
{
|
||||||
|
/* Disable delay loading and file copying, this has poor performance on network drivers. */
|
||||||
|
const bool delay_load = false;
|
||||||
openvdb::io::File file(filePath);
|
openvdb::io::File file(filePath);
|
||||||
file.setCopyMaxBytes(0);
|
file.setCopyMaxBytes(0);
|
||||||
if (file.open()) {
|
if (file.open(delay_load)) {
|
||||||
grid = file.readGrid(gridName);
|
grid = file.readGrid(gridName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -390,6 +390,9 @@ void PathTrace::path_trace(RenderWork &render_work)
|
|||||||
const int num_samples = render_work.path_trace.num_samples;
|
const int num_samples = render_work.path_trace.num_samples;
|
||||||
|
|
||||||
PathTraceWork *path_trace_work = path_trace_works_[i].get();
|
PathTraceWork *path_trace_work = path_trace_works_[i].get();
|
||||||
|
if (path_trace_work->get_device()->have_error()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PathTraceWork::RenderStatistics statistics;
|
PathTraceWork::RenderStatistics statistics;
|
||||||
path_trace_work->render_samples(statistics,
|
path_trace_work->render_samples(statistics,
|
||||||
|
@@ -299,12 +299,12 @@ set(SRC_KERNEL_LIGHT_HEADERS
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(SRC_KERNEL_SAMPLE_HEADERS
|
set(SRC_KERNEL_SAMPLE_HEADERS
|
||||||
sample/jitter.h
|
|
||||||
sample/lcg.h
|
sample/lcg.h
|
||||||
sample/mapping.h
|
sample/mapping.h
|
||||||
sample/mis.h
|
sample/mis.h
|
||||||
sample/pattern.h
|
sample/pattern.h
|
||||||
sample/sobol_burley.h
|
sample/sobol_burley.h
|
||||||
|
sample/tabulated_sobol.h
|
||||||
sample/util.h
|
sample/util.h
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -728,8 +728,8 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
${SRC_UTIL_HEADERS}
|
${SRC_UTIL_HEADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SYCL_OFFLINE_COMPILER_PARALLEL_JOBS 1 CACHE STRING "Number of parallel compiler instances to use for device binaries compilation (expect ~8GB peak memory usage per instance).")
|
set(SYCL_OFFLINE_COMPILER_PARALLEL_JOBS 1 CACHE STRING "Number of parallel compiler instances to use for device binaries compilation (expect ~8GB peak memory usage per instance).")
|
||||||
if (WITH_CYCLES_ONEAPI_BINARIES)
|
if(WITH_CYCLES_ONEAPI_BINARIES)
|
||||||
message(STATUS "${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS} instance(s) of oneAPI offline compiler will be used.")
|
message(STATUS "${SYCL_OFFLINE_COMPILER_PARALLEL_JOBS} instance(s) of oneAPI offline compiler will be used.")
|
||||||
endif()
|
endif()
|
||||||
# SYCL_CPP_FLAGS is a variable that the user can set to pass extra compiler options
|
# SYCL_CPP_FLAGS is a variable that the user can set to pass extra compiler options
|
||||||
@@ -752,26 +752,31 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
${SYCL_CPP_FLAGS}
|
${SYCL_CPP_FLAGS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION)
|
||||||
|
list(APPEND sycl_compiler_flags -DWITH_ONEAPI_SYCL_HOST_TASK)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set defaults for spir64 and spir64_gen options
|
# Set defaults for spir64 and spir64_gen options
|
||||||
if (NOT DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_spir64)
|
if(NOT DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_spir64)
|
||||||
set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64 "-options '-ze-opt-large-register-file -ze-opt-regular-grf-kernel integrator_intersect'")
|
set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64 "-options '-ze-opt-large-register-file -ze-opt-regular-grf-kernel integrator_intersect'")
|
||||||
endif()
|
endif()
|
||||||
if (NOT DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen)
|
if(NOT DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen)
|
||||||
SET (CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "${CYCLES_ONEAPI_SYCL_OPTIONS_spir64}" CACHE STRING "Extra build options for spir64_gen target")
|
set(CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "${CYCLES_ONEAPI_SYCL_OPTIONS_spir64}" CACHE STRING "Extra build options for spir64_gen target")
|
||||||
endif()
|
endif()
|
||||||
# Enable zebin, a graphics binary format with improved compatibility.
|
# Enable zebin, a graphics binary format with improved compatibility.
|
||||||
string(PREPEND CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "--format zebin ")
|
string(PREPEND CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "--format zebin ")
|
||||||
string(PREPEND CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "-device ${CYCLES_ONEAPI_SPIR64_GEN_DEVICES} ")
|
string(PREPEND CYCLES_ONEAPI_SYCL_OPTIONS_spir64_gen "-device ${CYCLES_ONEAPI_SPIR64_GEN_DEVICES} ")
|
||||||
|
|
||||||
if (WITH_CYCLES_ONEAPI_BINARIES)
|
# Host execution won't use GPU binaries, no need to compile them.
|
||||||
|
if(WITH_CYCLES_ONEAPI_BINARIES AND NOT WITH_CYCLES_ONEAPI_HOST_TASK_EXECUTION)
|
||||||
# AoT binaries aren't currently reused when calling sycl::build.
|
# AoT binaries aren't currently reused when calling sycl::build.
|
||||||
list (APPEND sycl_compiler_flags -DSYCL_SKIP_KERNELS_PRELOAD)
|
list(APPEND sycl_compiler_flags -DSYCL_SKIP_KERNELS_PRELOAD)
|
||||||
# Iterate over all targest and their options
|
# Iterate over all targest and their options
|
||||||
list (JOIN CYCLES_ONEAPI_SYCL_TARGETS "," targets_string)
|
list(JOIN CYCLES_ONEAPI_SYCL_TARGETS "," targets_string)
|
||||||
list (APPEND sycl_compiler_flags -fsycl-targets=${targets_string})
|
list(APPEND sycl_compiler_flags -fsycl-targets=${targets_string})
|
||||||
foreach(target ${CYCLES_ONEAPI_SYCL_TARGETS})
|
foreach(target ${CYCLES_ONEAPI_SYCL_TARGETS})
|
||||||
if(DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_${target})
|
if(DEFINED CYCLES_ONEAPI_SYCL_OPTIONS_${target})
|
||||||
list (APPEND sycl_compiler_flags -Xsycl-target-backend=${target} "${CYCLES_ONEAPI_SYCL_OPTIONS_${target}}")
|
list(APPEND sycl_compiler_flags -Xsycl-target-backend=${target} "${CYCLES_ONEAPI_SYCL_OPTIONS_${target}}")
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
else()
|
else()
|
||||||
@@ -860,8 +865,9 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||||||
else()
|
else()
|
||||||
list(APPEND sycl_compiler_flags -fPIC)
|
list(APPEND sycl_compiler_flags -fPIC)
|
||||||
|
|
||||||
# We avoid getting __FAST_MATH__ to be defined when building on CentOS 7 until the compilation
|
# We avoid getting __FAST_MATH__ to be defined when building on CentOS-7 until the compilation
|
||||||
# crash it triggers at either AoT or JIT stages gets fixed.
|
# crash it triggers at either AoT or JIT stages gets fixed.
|
||||||
|
# TODO: check if this is still needed on Rocky-8.
|
||||||
list(APPEND sycl_compiler_flags -fhonor-nans)
|
list(APPEND sycl_compiler_flags -fhonor-nans)
|
||||||
|
|
||||||
# add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and
|
# add $ORIGIN to cycles_kernel_oneapi.so rpath so libsycl.so and
|
||||||
|
@@ -580,11 +580,11 @@ ccl_device_inline
|
|||||||
case CLOSURE_BSDF_MICROFACET_GGX_FRESNEL_ID:
|
case CLOSURE_BSDF_MICROFACET_GGX_FRESNEL_ID:
|
||||||
case CLOSURE_BSDF_MICROFACET_GGX_CLEARCOAT_ID:
|
case CLOSURE_BSDF_MICROFACET_GGX_CLEARCOAT_ID:
|
||||||
case CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID:
|
case CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID:
|
||||||
eval = bsdf_microfacet_ggx_eval(sc, sd->I, omega_in, pdf);
|
eval = bsdf_microfacet_ggx_eval(sc, sd->N, sd->I, omega_in, pdf);
|
||||||
break;
|
break;
|
||||||
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID:
|
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID:
|
||||||
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_FRESNEL_ID:
|
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_FRESNEL_ID:
|
||||||
eval = bsdf_microfacet_multi_ggx_eval(sc, sd->I, omega_in, pdf, &sd->lcg_state);
|
eval = bsdf_microfacet_multi_ggx_eval(sc, sd->N, sd->I, omega_in, pdf, &sd->lcg_state);
|
||||||
break;
|
break;
|
||||||
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID:
|
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID:
|
||||||
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_FRESNEL_ID:
|
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_FRESNEL_ID:
|
||||||
@@ -592,10 +592,10 @@ ccl_device_inline
|
|||||||
break;
|
break;
|
||||||
case CLOSURE_BSDF_MICROFACET_BECKMANN_ID:
|
case CLOSURE_BSDF_MICROFACET_BECKMANN_ID:
|
||||||
case CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID:
|
case CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID:
|
||||||
eval = bsdf_microfacet_beckmann_eval(sc, sd->I, omega_in, pdf);
|
eval = bsdf_microfacet_beckmann_eval(sc, sd->N, sd->I, omega_in, pdf);
|
||||||
break;
|
break;
|
||||||
case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID:
|
case CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID:
|
||||||
eval = bsdf_ashikhmin_shirley_eval(sc, sd->I, omega_in, pdf);
|
eval = bsdf_ashikhmin_shirley_eval(sc, sd->N, sd->I, omega_in, pdf);
|
||||||
break;
|
break;
|
||||||
case CLOSURE_BSDF_ASHIKHMIN_VELVET_ID:
|
case CLOSURE_BSDF_ASHIKHMIN_VELVET_ID:
|
||||||
eval = bsdf_ashikhmin_velvet_eval(sc, sd->I, omega_in, pdf);
|
eval = bsdf_ashikhmin_velvet_eval(sc, sd->I, omega_in, pdf);
|
||||||
|
@@ -40,11 +40,13 @@ ccl_device_inline float bsdf_ashikhmin_shirley_roughness_to_exponent(float rough
|
|||||||
}
|
}
|
||||||
|
|
||||||
ccl_device_forceinline Spectrum bsdf_ashikhmin_shirley_eval(ccl_private const ShaderClosure *sc,
|
ccl_device_forceinline Spectrum bsdf_ashikhmin_shirley_eval(ccl_private const ShaderClosure *sc,
|
||||||
|
const float3 Ng,
|
||||||
const float3 I,
|
const float3 I,
|
||||||
const float3 omega_in,
|
const float3 omega_in,
|
||||||
ccl_private float *pdf)
|
ccl_private float *pdf)
|
||||||
{
|
{
|
||||||
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
||||||
|
const float cosNgI = dot(Ng, omega_in);
|
||||||
float3 N = bsdf->N;
|
float3 N = bsdf->N;
|
||||||
|
|
||||||
float NdotI = dot(N, I); /* in Cycles/OSL convention I is omega_out */
|
float NdotI = dot(N, I); /* in Cycles/OSL convention I is omega_out */
|
||||||
@@ -52,7 +54,8 @@ ccl_device_forceinline Spectrum bsdf_ashikhmin_shirley_eval(ccl_private const Sh
|
|||||||
|
|
||||||
float out = 0.0f;
|
float out = 0.0f;
|
||||||
|
|
||||||
if (fmaxf(bsdf->alpha_x, bsdf->alpha_y) <= 1e-4f || !(NdotI > 0.0f && NdotO > 0.0f)) {
|
if ((cosNgI < 0.0f) || fmaxf(bsdf->alpha_x, bsdf->alpha_y) <= 1e-4f ||
|
||||||
|
!(NdotI > 0.0f && NdotO > 0.0f)) {
|
||||||
*pdf = 0.0f;
|
*pdf = 0.0f;
|
||||||
return zero_spectrum();
|
return zero_spectrum();
|
||||||
}
|
}
|
||||||
@@ -210,7 +213,7 @@ ccl_device int bsdf_ashikhmin_shirley_sample(ccl_private const ShaderClosure *sc
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* leave the rest to eval */
|
/* leave the rest to eval */
|
||||||
*eval = bsdf_ashikhmin_shirley_eval(sc, I, *omega_in, pdf);
|
*eval = bsdf_ashikhmin_shirley_eval(sc, N, I, *omega_in, pdf);
|
||||||
}
|
}
|
||||||
|
|
||||||
return label;
|
return label;
|
||||||
|
@@ -517,27 +517,30 @@ ccl_device Spectrum bsdf_microfacet_ggx_eval_transmit(ccl_private const Microfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
ccl_device Spectrum bsdf_microfacet_ggx_eval(ccl_private const ShaderClosure *sc,
|
ccl_device Spectrum bsdf_microfacet_ggx_eval(ccl_private const ShaderClosure *sc,
|
||||||
|
const float3 Ng,
|
||||||
const float3 I,
|
const float3 I,
|
||||||
const float3 omega_in,
|
const float3 omega_in,
|
||||||
ccl_private float *pdf)
|
ccl_private float *pdf)
|
||||||
{
|
{
|
||||||
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
||||||
|
const bool m_refractive = bsdf->type == CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID;
|
||||||
const float alpha_x = bsdf->alpha_x;
|
const float alpha_x = bsdf->alpha_x;
|
||||||
const float alpha_y = bsdf->alpha_y;
|
const float alpha_y = bsdf->alpha_y;
|
||||||
const bool m_refractive = bsdf->type == CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID;
|
const float cosNgI = dot(Ng, omega_in);
|
||||||
const float3 N = bsdf->N;
|
|
||||||
const float cosNO = dot(N, I);
|
|
||||||
const float cosNI = dot(N, omega_in);
|
|
||||||
|
|
||||||
if (((cosNI < 0.0f) != m_refractive) || alpha_x * alpha_y <= 1e-7f) {
|
if (((cosNgI < 0.0f) != m_refractive) || alpha_x * alpha_y <= 1e-7f) {
|
||||||
*pdf = 0.0f;
|
*pdf = 0.0f;
|
||||||
return zero_spectrum();
|
return zero_spectrum();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (cosNI < 0.0f) ? bsdf_microfacet_ggx_eval_transmit(
|
const float3 N = bsdf->N;
|
||||||
bsdf, N, I, omega_in, pdf, alpha_x, alpha_y, cosNO, cosNI) :
|
const float cosNO = dot(N, I);
|
||||||
bsdf_microfacet_ggx_eval_reflect(
|
const float cosNI = dot(N, omega_in);
|
||||||
bsdf, N, I, omega_in, pdf, alpha_x, alpha_y, cosNO, cosNI);
|
|
||||||
|
return (cosNgI < 0.0f) ? bsdf_microfacet_ggx_eval_transmit(
|
||||||
|
bsdf, N, I, omega_in, pdf, alpha_x, alpha_y, cosNO, cosNI) :
|
||||||
|
bsdf_microfacet_ggx_eval_reflect(
|
||||||
|
bsdf, N, I, omega_in, pdf, alpha_x, alpha_y, cosNO, cosNI);
|
||||||
}
|
}
|
||||||
|
|
||||||
ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals kg,
|
ccl_device int bsdf_microfacet_ggx_sample(KernelGlobals kg,
|
||||||
@@ -942,23 +945,26 @@ ccl_device Spectrum bsdf_microfacet_beckmann_eval_transmit(ccl_private const Mic
|
|||||||
}
|
}
|
||||||
|
|
||||||
ccl_device Spectrum bsdf_microfacet_beckmann_eval(ccl_private const ShaderClosure *sc,
|
ccl_device Spectrum bsdf_microfacet_beckmann_eval(ccl_private const ShaderClosure *sc,
|
||||||
|
const float3 Ng,
|
||||||
const float3 I,
|
const float3 I,
|
||||||
const float3 omega_in,
|
const float3 omega_in,
|
||||||
ccl_private float *pdf)
|
ccl_private float *pdf)
|
||||||
{
|
{
|
||||||
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
||||||
|
const bool m_refractive = bsdf->type == CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID;
|
||||||
const float alpha_x = bsdf->alpha_x;
|
const float alpha_x = bsdf->alpha_x;
|
||||||
const float alpha_y = bsdf->alpha_y;
|
const float alpha_y = bsdf->alpha_y;
|
||||||
const bool m_refractive = bsdf->type == CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID;
|
const float cosNgI = dot(Ng, omega_in);
|
||||||
const float3 N = bsdf->N;
|
|
||||||
const float cosNO = dot(N, I);
|
|
||||||
const float cosNI = dot(N, omega_in);
|
|
||||||
|
|
||||||
if (((cosNI < 0.0f) != m_refractive) || alpha_x * alpha_y <= 1e-7f) {
|
if (((cosNgI < 0.0f) != m_refractive) || alpha_x * alpha_y <= 1e-7f) {
|
||||||
*pdf = 0.0f;
|
*pdf = 0.0f;
|
||||||
return zero_spectrum();
|
return zero_spectrum();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const float3 N = bsdf->N;
|
||||||
|
const float cosNO = dot(N, I);
|
||||||
|
const float cosNI = dot(N, omega_in);
|
||||||
|
|
||||||
return (cosNI < 0.0f) ? bsdf_microfacet_beckmann_eval_transmit(
|
return (cosNI < 0.0f) ? bsdf_microfacet_beckmann_eval_transmit(
|
||||||
bsdf, N, I, omega_in, pdf, alpha_x, alpha_y, cosNO, cosNI) :
|
bsdf, N, I, omega_in, pdf, alpha_x, alpha_y, cosNO, cosNI) :
|
||||||
bsdf_microfacet_beckmann_eval_reflect(
|
bsdf_microfacet_beckmann_eval_reflect(
|
||||||
|
@@ -416,14 +416,16 @@ ccl_device int bsdf_microfacet_multi_ggx_refraction_setup(ccl_private Microfacet
|
|||||||
}
|
}
|
||||||
|
|
||||||
ccl_device Spectrum bsdf_microfacet_multi_ggx_eval(ccl_private const ShaderClosure *sc,
|
ccl_device Spectrum bsdf_microfacet_multi_ggx_eval(ccl_private const ShaderClosure *sc,
|
||||||
|
const float3 Ng,
|
||||||
const float3 I,
|
const float3 I,
|
||||||
const float3 omega_in,
|
const float3 omega_in,
|
||||||
ccl_private float *pdf,
|
ccl_private float *pdf,
|
||||||
ccl_private uint *lcg_state)
|
ccl_private uint *lcg_state)
|
||||||
{
|
{
|
||||||
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
ccl_private const MicrofacetBsdf *bsdf = (ccl_private const MicrofacetBsdf *)sc;
|
||||||
|
const float cosNgI = dot(Ng, omega_in);
|
||||||
|
|
||||||
if (bsdf->alpha_x * bsdf->alpha_y < 1e-7f) {
|
if ((cosNgI < 0.0f) || bsdf->alpha_x * bsdf->alpha_y < 1e-7f) {
|
||||||
*pdf = 0.0f;
|
*pdf = 0.0f;
|
||||||
return zero_spectrum();
|
return zero_spectrum();
|
||||||
}
|
}
|
||||||
|
@@ -77,7 +77,7 @@ KERNEL_DATA_ARRAY(KernelShader, shaders)
|
|||||||
/* lookup tables */
|
/* lookup tables */
|
||||||
KERNEL_DATA_ARRAY(float, lookup_table)
|
KERNEL_DATA_ARRAY(float, lookup_table)
|
||||||
|
|
||||||
/* PMJ sample pattern */
|
/* tabulated Sobol sample pattern */
|
||||||
KERNEL_DATA_ARRAY(float, sample_pattern_lut)
|
KERNEL_DATA_ARRAY(float, sample_pattern_lut)
|
||||||
|
|
||||||
/* image textures */
|
/* image textures */
|
||||||
|
@@ -179,7 +179,8 @@ KERNEL_STRUCT_MEMBER(integrator, float, sample_clamp_indirect)
|
|||||||
KERNEL_STRUCT_MEMBER(integrator, int, use_caustics)
|
KERNEL_STRUCT_MEMBER(integrator, int, use_caustics)
|
||||||
/* Sampling pattern. */
|
/* Sampling pattern. */
|
||||||
KERNEL_STRUCT_MEMBER(integrator, int, sampling_pattern)
|
KERNEL_STRUCT_MEMBER(integrator, int, sampling_pattern)
|
||||||
KERNEL_STRUCT_MEMBER(integrator, int, pmj_sequence_size)
|
KERNEL_STRUCT_MEMBER(integrator, int, tabulated_sobol_sequence_size)
|
||||||
|
KERNEL_STRUCT_MEMBER(integrator, int, sobol_index_mask)
|
||||||
KERNEL_STRUCT_MEMBER(integrator, float, scrambling_distance)
|
KERNEL_STRUCT_MEMBER(integrator, float, scrambling_distance)
|
||||||
/* Volume render. */
|
/* Volume render. */
|
||||||
KERNEL_STRUCT_MEMBER(integrator, int, use_volumes)
|
KERNEL_STRUCT_MEMBER(integrator, int, use_volumes)
|
||||||
@@ -204,7 +205,6 @@ KERNEL_STRUCT_MEMBER(integrator, int, use_guiding_mis_weights)
|
|||||||
|
|
||||||
/* Padding. */
|
/* Padding. */
|
||||||
KERNEL_STRUCT_MEMBER(integrator, int, pad1)
|
KERNEL_STRUCT_MEMBER(integrator, int, pad1)
|
||||||
KERNEL_STRUCT_MEMBER(integrator, int, pad2)
|
|
||||||
KERNEL_STRUCT_END(KernelIntegrator)
|
KERNEL_STRUCT_END(KernelIntegrator)
|
||||||
|
|
||||||
/* SVM. For shader specialization. */
|
/* SVM. For shader specialization. */
|
||||||
|
@@ -202,6 +202,14 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
return clamp(x, 0, width - 1);
|
return clamp(x, 0, width - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ccl_always_inline int wrap_mirror(int x, int width)
|
||||||
|
{
|
||||||
|
const int m = abs(x + (x < 0)) % (2 * width);
|
||||||
|
if (m >= width)
|
||||||
|
return 2 * width - m - 1;
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
/* ******** 2D interpolation ******** */
|
/* ******** 2D interpolation ******** */
|
||||||
|
|
||||||
static ccl_always_inline OutT interp_closest(const TextureInfo &info, float x, float y)
|
static ccl_always_inline OutT interp_closest(const TextureInfo &info, float x, float y)
|
||||||
@@ -226,6 +234,10 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
ix = wrap_clamp(ix, width);
|
ix = wrap_clamp(ix, width);
|
||||||
iy = wrap_clamp(iy, height);
|
iy = wrap_clamp(iy, height);
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
ix = wrap_mirror(ix, width);
|
||||||
|
iy = wrap_mirror(iy, height);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
kernel_assert(0);
|
kernel_assert(0);
|
||||||
return zero();
|
return zero();
|
||||||
@@ -268,6 +280,12 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
niy = wrap_clamp(iy + 1, height);
|
niy = wrap_clamp(iy + 1, height);
|
||||||
iy = wrap_clamp(iy, height);
|
iy = wrap_clamp(iy, height);
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
nix = wrap_mirror(ix + 1, width);
|
||||||
|
ix = wrap_mirror(ix, width);
|
||||||
|
niy = wrap_mirror(iy + 1, height);
|
||||||
|
iy = wrap_mirror(iy, height);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
kernel_assert(0);
|
kernel_assert(0);
|
||||||
return zero();
|
return zero();
|
||||||
@@ -331,6 +349,17 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
nniy = wrap_clamp(iy + 2, height);
|
nniy = wrap_clamp(iy + 2, height);
|
||||||
iy = wrap_clamp(iy, height);
|
iy = wrap_clamp(iy, height);
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
pix = wrap_mirror(ix - 1, width);
|
||||||
|
nix = wrap_mirror(ix + 1, width);
|
||||||
|
nnix = wrap_mirror(ix + 2, width);
|
||||||
|
ix = wrap_mirror(ix, width);
|
||||||
|
|
||||||
|
piy = wrap_mirror(iy - 1, height);
|
||||||
|
niy = wrap_mirror(iy + 1, height);
|
||||||
|
nniy = wrap_mirror(iy + 2, height);
|
||||||
|
iy = wrap_mirror(iy, height);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
kernel_assert(0);
|
kernel_assert(0);
|
||||||
return zero();
|
return zero();
|
||||||
@@ -403,6 +432,11 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
iy = wrap_clamp(iy, height);
|
iy = wrap_clamp(iy, height);
|
||||||
iz = wrap_clamp(iz, depth);
|
iz = wrap_clamp(iz, depth);
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
ix = wrap_mirror(ix, width);
|
||||||
|
iy = wrap_mirror(iy, height);
|
||||||
|
iz = wrap_mirror(iz, depth);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
kernel_assert(0);
|
kernel_assert(0);
|
||||||
return zero();
|
return zero();
|
||||||
@@ -480,6 +514,16 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
niz = wrap_clamp(iz + 1, depth);
|
niz = wrap_clamp(iz + 1, depth);
|
||||||
iz = wrap_clamp(iz, depth);
|
iz = wrap_clamp(iz, depth);
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
nix = wrap_mirror(ix + 1, width);
|
||||||
|
ix = wrap_mirror(ix, width);
|
||||||
|
|
||||||
|
niy = wrap_mirror(iy + 1, height);
|
||||||
|
iy = wrap_mirror(iy, height);
|
||||||
|
|
||||||
|
niz = wrap_mirror(iz + 1, depth);
|
||||||
|
iz = wrap_mirror(iz, depth);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
kernel_assert(0);
|
kernel_assert(0);
|
||||||
return zero();
|
return zero();
|
||||||
@@ -595,6 +639,22 @@ template<typename TexT, typename OutT = float4> struct TextureInterpolator {
|
|||||||
nniz = wrap_clamp(iz + 2, depth);
|
nniz = wrap_clamp(iz + 2, depth);
|
||||||
iz = wrap_clamp(iz, depth);
|
iz = wrap_clamp(iz, depth);
|
||||||
break;
|
break;
|
||||||
|
case EXTENSION_MIRROR:
|
||||||
|
pix = wrap_mirror(ix - 1, width);
|
||||||
|
nix = wrap_mirror(ix + 1, width);
|
||||||
|
nnix = wrap_mirror(ix + 2, width);
|
||||||
|
ix = wrap_mirror(ix, width);
|
||||||
|
|
||||||
|
piy = wrap_mirror(iy - 1, height);
|
||||||
|
niy = wrap_mirror(iy + 1, height);
|
||||||
|
nniy = wrap_mirror(iy + 2, height);
|
||||||
|
iy = wrap_mirror(iy, height);
|
||||||
|
|
||||||
|
piz = wrap_mirror(iz - 1, depth);
|
||||||
|
niz = wrap_mirror(iz + 1, depth);
|
||||||
|
nniz = wrap_mirror(iz + 2, depth);
|
||||||
|
iz = wrap_mirror(iz, depth);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
kernel_assert(0);
|
kernel_assert(0);
|
||||||
return zero();
|
return zero();
|
||||||
|
@@ -30,6 +30,16 @@ void gpu_parallel_active_index_array_impl(const uint num_states,
|
|||||||
ccl_global int *ccl_restrict num_indices,
|
ccl_global int *ccl_restrict num_indices,
|
||||||
IsActiveOp is_active_op)
|
IsActiveOp is_active_op)
|
||||||
{
|
{
|
||||||
|
# ifdef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
|
int write_index = 0;
|
||||||
|
for (int state_index = 0; state_index < num_states; state_index++) {
|
||||||
|
if (is_active_op(state_index))
|
||||||
|
indices[write_index++] = state_index;
|
||||||
|
}
|
||||||
|
*num_indices = write_index;
|
||||||
|
return;
|
||||||
|
# endif /* WITH_ONEAPI_SYCL_HOST_TASK */
|
||||||
|
|
||||||
const sycl::nd_item<1> &item_id = sycl::ext::oneapi::experimental::this_nd_item<1>();
|
const sycl::nd_item<1> &item_id = sycl::ext::oneapi::experimental::this_nd_item<1>();
|
||||||
const uint blocksize = item_id.get_local_range(0);
|
const uint blocksize = item_id.get_local_range(0);
|
||||||
|
|
||||||
|
@@ -301,10 +301,12 @@ enum SamplerType {
|
|||||||
SamplerFilterNearest_AddressRepeat,
|
SamplerFilterNearest_AddressRepeat,
|
||||||
SamplerFilterNearest_AddressClampEdge,
|
SamplerFilterNearest_AddressClampEdge,
|
||||||
SamplerFilterNearest_AddressClampZero,
|
SamplerFilterNearest_AddressClampZero,
|
||||||
|
SamplerFilterNearest_AddressMirroredRepeat,
|
||||||
|
|
||||||
SamplerFilterLinear_AddressRepeat,
|
SamplerFilterLinear_AddressRepeat,
|
||||||
SamplerFilterLinear_AddressClampEdge,
|
SamplerFilterLinear_AddressClampEdge,
|
||||||
SamplerFilterLinear_AddressClampZero,
|
SamplerFilterLinear_AddressClampZero,
|
||||||
|
SamplerFilterLinear_AddressMirroredRepeat,
|
||||||
|
|
||||||
SamplerCount
|
SamplerCount
|
||||||
};
|
};
|
||||||
@@ -313,7 +315,9 @@ constant constexpr array<sampler, SamplerCount> metal_samplers = {
|
|||||||
sampler(address::repeat, filter::nearest),
|
sampler(address::repeat, filter::nearest),
|
||||||
sampler(address::clamp_to_edge, filter::nearest),
|
sampler(address::clamp_to_edge, filter::nearest),
|
||||||
sampler(address::clamp_to_zero, filter::nearest),
|
sampler(address::clamp_to_zero, filter::nearest),
|
||||||
|
sampler(address::mirrored_repeat, filter::nearest),
|
||||||
sampler(address::repeat, filter::linear),
|
sampler(address::repeat, filter::linear),
|
||||||
sampler(address::clamp_to_edge, filter::linear),
|
sampler(address::clamp_to_edge, filter::linear),
|
||||||
sampler(address::clamp_to_zero, filter::linear),
|
sampler(address::clamp_to_zero, filter::linear),
|
||||||
|
sampler(address::mirrored_repeat, filter::linear),
|
||||||
};
|
};
|
||||||
|
@@ -47,9 +47,11 @@ class MetalKernelContext {
|
|||||||
case 0: return texture_array[tid].tex.sample(sampler(address::repeat, filter::nearest), coords);
|
case 0: return texture_array[tid].tex.sample(sampler(address::repeat, filter::nearest), coords);
|
||||||
case 1: return texture_array[tid].tex.sample(sampler(address::clamp_to_edge, filter::nearest), coords);
|
case 1: return texture_array[tid].tex.sample(sampler(address::clamp_to_edge, filter::nearest), coords);
|
||||||
case 2: return texture_array[tid].tex.sample(sampler(address::clamp_to_zero, filter::nearest), coords);
|
case 2: return texture_array[tid].tex.sample(sampler(address::clamp_to_zero, filter::nearest), coords);
|
||||||
case 3: return texture_array[tid].tex.sample(sampler(address::repeat, filter::linear), coords);
|
case 3: return texture_array[tid].tex.sample(sampler(address::mirrored_repeat, filter::nearest), coords);
|
||||||
case 4: return texture_array[tid].tex.sample(sampler(address::clamp_to_edge, filter::linear), coords);
|
case 4: return texture_array[tid].tex.sample(sampler(address::repeat, filter::linear), coords);
|
||||||
case 5: return texture_array[tid].tex.sample(sampler(address::clamp_to_zero, filter::linear), coords);
|
case 5: return texture_array[tid].tex.sample(sampler(address::clamp_to_edge, filter::linear), coords);
|
||||||
|
case 6: return texture_array[tid].tex.sample(sampler(address::clamp_to_zero, filter::linear), coords);
|
||||||
|
case 7: return texture_array[tid].tex.sample(sampler(address::mirrored_repeat, filter::linear), coords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -56,7 +56,8 @@
|
|||||||
#define ccl_gpu_kernel(block_num_threads, thread_num_registers)
|
#define ccl_gpu_kernel(block_num_threads, thread_num_registers)
|
||||||
#define ccl_gpu_kernel_threads(block_num_threads)
|
#define ccl_gpu_kernel_threads(block_num_threads)
|
||||||
|
|
||||||
#define ccl_gpu_kernel_signature(name, ...) \
|
#ifndef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
|
# define ccl_gpu_kernel_signature(name, ...) \
|
||||||
void oneapi_kernel_##name(KernelGlobalsGPU *ccl_restrict kg, \
|
void oneapi_kernel_##name(KernelGlobalsGPU *ccl_restrict kg, \
|
||||||
size_t kernel_global_size, \
|
size_t kernel_global_size, \
|
||||||
size_t kernel_local_size, \
|
size_t kernel_local_size, \
|
||||||
@@ -67,9 +68,37 @@ void oneapi_kernel_##name(KernelGlobalsGPU *ccl_restrict kg, \
|
|||||||
sycl::nd_range<1>(kernel_global_size, kernel_local_size), \
|
sycl::nd_range<1>(kernel_global_size, kernel_local_size), \
|
||||||
[=](sycl::nd_item<1> item) {
|
[=](sycl::nd_item<1> item) {
|
||||||
|
|
||||||
#define ccl_gpu_kernel_postfix \
|
# define ccl_gpu_kernel_postfix \
|
||||||
}); \
|
}); \
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
/* Additional anonymous lambda is required to handle all "return" statements in the kernel code */
|
||||||
|
# define ccl_gpu_kernel_signature(name, ...) \
|
||||||
|
void oneapi_kernel_##name(KernelGlobalsGPU *ccl_restrict kg, \
|
||||||
|
size_t kernel_global_size, \
|
||||||
|
size_t kernel_local_size, \
|
||||||
|
sycl::handler &cgh, \
|
||||||
|
__VA_ARGS__) { \
|
||||||
|
(kg); \
|
||||||
|
(kernel_local_size); \
|
||||||
|
cgh.host_task( \
|
||||||
|
[=]() {\
|
||||||
|
for (size_t gid = (size_t)0; gid < kernel_global_size; gid++) { \
|
||||||
|
kg->nd_item_local_id_0 = 0; \
|
||||||
|
kg->nd_item_local_range_0 = 1; \
|
||||||
|
kg->nd_item_group_id_0 = gid; \
|
||||||
|
kg->nd_item_group_range_0 = kernel_global_size; \
|
||||||
|
kg->nd_item_global_id_0 = gid; \
|
||||||
|
kg->nd_item_global_range_0 = kernel_global_size; \
|
||||||
|
auto kernel = [=]() {
|
||||||
|
|
||||||
|
# define ccl_gpu_kernel_postfix \
|
||||||
|
}; \
|
||||||
|
kernel(); \
|
||||||
|
} \
|
||||||
|
}); \
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ccl_gpu_kernel_call(x) ((ONEAPIKernelContext*)kg)->x
|
#define ccl_gpu_kernel_call(x) ((ONEAPIKernelContext*)kg)->x
|
||||||
|
|
||||||
@@ -83,23 +112,40 @@ void oneapi_kernel_##name(KernelGlobalsGPU *ccl_restrict kg, \
|
|||||||
} ccl_gpu_kernel_lambda_pass((ONEAPIKernelContext *)kg)
|
} ccl_gpu_kernel_lambda_pass((ONEAPIKernelContext *)kg)
|
||||||
|
|
||||||
/* GPU thread, block, grid size and index */
|
/* GPU thread, block, grid size and index */
|
||||||
#define ccl_gpu_thread_idx_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_local_id(0))
|
|
||||||
#define ccl_gpu_block_dim_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_local_range(0))
|
|
||||||
#define ccl_gpu_block_idx_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_group(0))
|
|
||||||
#define ccl_gpu_grid_dim_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_group_range(0))
|
|
||||||
#define ccl_gpu_warp_size (sycl::ext::oneapi::experimental::this_sub_group().get_local_range()[0])
|
|
||||||
#define ccl_gpu_thread_mask(thread_warp) uint(0xFFFFFFFF >> (ccl_gpu_warp_size - thread_warp))
|
|
||||||
|
|
||||||
#define ccl_gpu_global_id_x() (sycl::ext::oneapi::experimental::this_nd_item<1>().get_global_id(0))
|
#ifndef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
#define ccl_gpu_global_size_x() (sycl::ext::oneapi::experimental::this_nd_item<1>().get_global_range(0))
|
# define ccl_gpu_thread_idx_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_local_id(0))
|
||||||
|
# define ccl_gpu_block_dim_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_local_range(0))
|
||||||
|
# define ccl_gpu_block_idx_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_group(0))
|
||||||
|
# define ccl_gpu_grid_dim_x (sycl::ext::oneapi::experimental::this_nd_item<1>().get_group_range(0))
|
||||||
|
# define ccl_gpu_warp_size (sycl::ext::oneapi::experimental::this_sub_group().get_local_range()[0])
|
||||||
|
# define ccl_gpu_thread_mask(thread_warp) uint(0xFFFFFFFF >> (ccl_gpu_warp_size - thread_warp))
|
||||||
|
|
||||||
|
# define ccl_gpu_global_id_x() (sycl::ext::oneapi::experimental::this_nd_item<1>().get_global_id(0))
|
||||||
|
# define ccl_gpu_global_size_x() (sycl::ext::oneapi::experimental::this_nd_item<1>().get_global_range(0))
|
||||||
|
|
||||||
/* GPU warp synchronization */
|
/* GPU warp synchronization */
|
||||||
#define ccl_gpu_syncthreads() sycl::ext::oneapi::experimental::this_nd_item<1>().barrier()
|
# define ccl_gpu_syncthreads() sycl::ext::oneapi::experimental::this_nd_item<1>().barrier()
|
||||||
#define ccl_gpu_local_syncthreads() sycl::ext::oneapi::experimental::this_nd_item<1>().barrier(sycl::access::fence_space::local_space)
|
# define ccl_gpu_local_syncthreads() sycl::ext::oneapi::experimental::this_nd_item<1>().barrier(sycl::access::fence_space::local_space)
|
||||||
#ifdef __SYCL_DEVICE_ONLY__
|
# ifdef __SYCL_DEVICE_ONLY__
|
||||||
#define ccl_gpu_ballot(predicate) (sycl::ext::oneapi::group_ballot(sycl::ext::oneapi::experimental::this_sub_group(), predicate).count())
|
# define ccl_gpu_ballot(predicate) (sycl::ext::oneapi::group_ballot(sycl::ext::oneapi::experimental::this_sub_group(), predicate).count())
|
||||||
|
# else
|
||||||
|
# define ccl_gpu_ballot(predicate) (predicate ? 1 : 0)
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define ccl_gpu_ballot(predicate) (predicate ? 1 : 0)
|
# define ccl_gpu_thread_idx_x (kg->nd_item_local_id_0)
|
||||||
|
# define ccl_gpu_block_dim_x (kg->nd_item_local_range_0)
|
||||||
|
# define ccl_gpu_block_idx_x (kg->nd_item_group_id_0)
|
||||||
|
# define ccl_gpu_grid_dim_x (kg->nd_item_group_range_0)
|
||||||
|
# define ccl_gpu_warp_size (1)
|
||||||
|
# define ccl_gpu_thread_mask(thread_warp) uint(0xFFFFFFFF >> (ccl_gpu_warp_size - thread_warp))
|
||||||
|
|
||||||
|
# define ccl_gpu_global_id_x() (kg->nd_item_global_id_0)
|
||||||
|
# define ccl_gpu_global_size_x() (kg->nd_item_global_range_0)
|
||||||
|
|
||||||
|
# define ccl_gpu_syncthreads()
|
||||||
|
# define ccl_gpu_local_syncthreads()
|
||||||
|
# define ccl_gpu_ballot(predicate) (predicate ? 1 : 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug defines */
|
/* Debug defines */
|
||||||
|
@@ -23,6 +23,15 @@ typedef struct KernelGlobalsGPU {
|
|||||||
#undef KERNEL_DATA_ARRAY
|
#undef KERNEL_DATA_ARRAY
|
||||||
IntegratorStateGPU *integrator_state;
|
IntegratorStateGPU *integrator_state;
|
||||||
const KernelData *__data;
|
const KernelData *__data;
|
||||||
|
|
||||||
|
#ifdef WITH_ONEAPI_SYCL_HOST_TASK
|
||||||
|
size_t nd_item_local_id_0;
|
||||||
|
size_t nd_item_local_range_0;
|
||||||
|
size_t nd_item_group_id_0;
|
||||||
|
size_t nd_item_group_range_0;
|
||||||
|
size_t nd_item_global_id_0;
|
||||||
|
size_t nd_item_global_range_0;
|
||||||
|
#endif
|
||||||
} KernelGlobalsGPU;
|
} KernelGlobalsGPU;
|
||||||
|
|
||||||
typedef ccl_global KernelGlobalsGPU *ccl_restrict KernelGlobals;
|
typedef ccl_global KernelGlobalsGPU *ccl_restrict KernelGlobals;
|
||||||
|
@@ -24,6 +24,14 @@ ccl_device_inline int svm_image_texture_wrap_clamp(int x, int width)
|
|||||||
return clamp(x, 0, width - 1);
|
return clamp(x, 0, width - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ccl_device_inline int svm_image_texture_wrap_mirror(int x, int width)
|
||||||
|
{
|
||||||
|
const int m = abs(x + (x < 0)) % (2 * width);
|
||||||
|
if (m >= width)
|
||||||
|
return 2 * width - m - 1;
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
ccl_device_inline float4 svm_image_texture_read(const TextureInfo &info, int x, int y, int z)
|
ccl_device_inline float4 svm_image_texture_read(const TextureInfo &info, int x, int y, int z)
|
||||||
{
|
{
|
||||||
const int data_offset = x + info.width * y + info.width * info.height * z;
|
const int data_offset = x + info.width * y + info.width * info.height * z;
|
||||||
@@ -85,6 +93,10 @@ ccl_device_inline float4 svm_image_texture_read_2d(int id, int x, int y)
|
|||||||
x = svm_image_texture_wrap_clamp(x, info.width);
|
x = svm_image_texture_wrap_clamp(x, info.width);
|
||||||
y = svm_image_texture_wrap_clamp(y, info.height);
|
y = svm_image_texture_wrap_clamp(y, info.height);
|
||||||
}
|
}
|
||||||
|
else if (info.extension == EXTENSION_MIRROR) {
|
||||||
|
x = svm_image_texture_wrap_mirror(x, info.width);
|
||||||
|
y = svm_image_texture_wrap_mirror(y, info.height);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (x < 0 || x >= info.width || y < 0 || y >= info.height) {
|
if (x < 0 || x >= info.width || y < 0 || y >= info.height) {
|
||||||
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
@@ -109,6 +121,11 @@ ccl_device_inline float4 svm_image_texture_read_3d(int id, int x, int y, int z)
|
|||||||
y = svm_image_texture_wrap_clamp(y, info.height);
|
y = svm_image_texture_wrap_clamp(y, info.height);
|
||||||
z = svm_image_texture_wrap_clamp(z, info.depth);
|
z = svm_image_texture_wrap_clamp(z, info.depth);
|
||||||
}
|
}
|
||||||
|
else if (info.extension == EXTENSION_MIRROR) {
|
||||||
|
x = svm_image_texture_wrap_mirror(x, info.width);
|
||||||
|
y = svm_image_texture_wrap_mirror(y, info.height);
|
||||||
|
z = svm_image_texture_wrap_mirror(z, info.depth);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (x < 0 || x >= info.width || y < 0 || y >= info.height || z < 0 || z >= info.depth) {
|
if (x < 0 || x >= info.width || y < 0 || y >= info.height || z < 0 || z >= info.depth) {
|
||||||
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user