mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
1978 Commits
gs_wrchack
...
v1.7.5309
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a99a819e75 | ||
|
|
94664c24d8 | ||
|
|
466e96e79a | ||
|
|
fd2cd0b904 | ||
|
|
4afe14dff7 | ||
|
|
9436a823ba | ||
|
|
1346c98a58 | ||
|
|
93992ee1c1 | ||
|
|
e29bc933fe | ||
|
|
6df5cd8222 | ||
|
|
2dfc75c341 | ||
|
|
e75a1edea8 | ||
|
|
8c94efd61a | ||
|
|
20c3178dfe | ||
|
|
a7271697a2 | ||
|
|
c2bd21922f | ||
|
|
96831b0970 | ||
|
|
0fd5db9f78 | ||
|
|
918328e5b0 | ||
|
|
6bb6322bde | ||
|
|
00e255ee3c | ||
|
|
c662dd8b04 | ||
|
|
a85a246ab8 | ||
|
|
9132a7c8d4 | ||
|
|
44367f24f9 | ||
|
|
5d6a9a68fe | ||
|
|
476d15f0fc | ||
|
|
cce7f465f2 | ||
|
|
0e289d2d3b | ||
|
|
efc9321cec | ||
|
|
4154784f09 | ||
|
|
feb9d7b2a9 | ||
|
|
da22df5f5d | ||
|
|
78f751959d | ||
|
|
b0c3a1e23f | ||
|
|
cb703a6ce5 | ||
|
|
c1b26b87a8 | ||
|
|
15f752f002 | ||
|
|
af1a4ab07a | ||
|
|
5413765a23 | ||
|
|
da63afa758 | ||
|
|
1d86d674e5 | ||
|
|
5718c3d14d | ||
|
|
2bfefaf296 | ||
|
|
2c00ccca83 | ||
|
|
ade2cc8182 | ||
|
|
f546ea1f8a | ||
|
|
ff499d42a0 | ||
|
|
10e5af2ddf | ||
|
|
724f92562c | ||
|
|
2b68c5e383 | ||
|
|
47545e511d | ||
|
|
b7aea5b726 | ||
|
|
5338a4f17c | ||
|
|
e2dcabcbea | ||
|
|
971929777d | ||
|
|
0f4a95e31b | ||
|
|
b453787670 | ||
|
|
c555dbc3e8 | ||
|
|
1561e07ddf | ||
|
|
ec9bc59962 | ||
|
|
7fd82fffab | ||
|
|
0652b218db | ||
|
|
59217b9af3 | ||
|
|
46c9bcbc4f | ||
|
|
f6154032c7 | ||
|
|
6c2d2e8455 | ||
|
|
4d61f26dfa | ||
|
|
86c42a00a3 | ||
|
|
2443e06745 | ||
|
|
eb1d93d4e5 | ||
|
|
f0bf525cf4 | ||
|
|
45758add5d | ||
|
|
57465b2892 | ||
|
|
8a95eecf60 | ||
|
|
766b0ba9c8 | ||
|
|
a6796fe80a | ||
|
|
5e450388f9 | ||
|
|
cc62825081 | ||
|
|
7b5d640f35 | ||
|
|
96a9e8a090 | ||
|
|
d572765f09 | ||
|
|
ce539f30a5 | ||
|
|
103cf9c3bf | ||
|
|
e9fca78c13 | ||
|
|
19431ef675 | ||
|
|
8d6c5ea406 | ||
|
|
0dfc35ee5f | ||
|
|
b8a1d07cdc | ||
|
|
574f95a35b | ||
|
|
cefcd843fc | ||
|
|
279c84f8e1 | ||
|
|
b69cfad8ef | ||
|
|
0bdc4394aa | ||
|
|
9e720d1e2b | ||
|
|
9a932e7dd5 | ||
|
|
62c0148472 | ||
|
|
97cedb311a | ||
|
|
776cdd60fa | ||
|
|
234b3df332 | ||
|
|
fa0744fb8e | ||
|
|
376216a2c0 | ||
|
|
88989bfbfd | ||
|
|
acb45459f5 | ||
|
|
8a93c5696f | ||
|
|
33a6948e68 | ||
|
|
cdd5bd538a | ||
|
|
15082d7777 | ||
|
|
5d2177d929 | ||
|
|
31642ceca9 | ||
|
|
e84335742d | ||
|
|
6d31ef8849 | ||
|
|
2fd24277c1 | ||
|
|
a60c30155e | ||
|
|
041d26670f | ||
|
|
0891a27f75 | ||
|
|
d25246a212 | ||
|
|
7853843b0b | ||
|
|
7cc6af8f85 | ||
|
|
7fcc47dd86 | ||
|
|
bca4f15f9d | ||
|
|
b644957cee | ||
|
|
2806b3a3c3 | ||
|
|
b166615067 | ||
|
|
ae2860d03d | ||
|
|
21b3464212 | ||
|
|
5c1f280988 | ||
|
|
7ec57692b1 | ||
|
|
d096fed8db | ||
|
|
15091cea54 | ||
|
|
7715d122c7 | ||
|
|
f18964ad44 | ||
|
|
b79edf1cb5 | ||
|
|
67c5509524 | ||
|
|
0770249da1 | ||
|
|
0ebc1ce7b2 | ||
|
|
90e9b60287 | ||
|
|
9a6e5458c9 | ||
|
|
3333553b24 | ||
|
|
1565c59714 | ||
|
|
92a1eda82a | ||
|
|
84e24a0142 | ||
|
|
d235c2d899 | ||
|
|
a26d7f615b | ||
|
|
3411729ca5 | ||
|
|
62c35753aa | ||
|
|
6967e66f74 | ||
|
|
9d96e23cb3 | ||
|
|
91fa8426f1 | ||
|
|
4af89576aa | ||
|
|
b5f8ef0106 | ||
|
|
3ca7d2d626 | ||
|
|
d37cd2e26d | ||
|
|
46527cab53 | ||
|
|
09d15c4bce | ||
|
|
68f7df6a52 | ||
|
|
4714a2fccb | ||
|
|
72145f4914 | ||
|
|
7247a1e5a4 | ||
|
|
343315c587 | ||
|
|
c557ea1b6f | ||
|
|
e9a4d9702c | ||
|
|
5e48e0d8c0 | ||
|
|
fa5aedc906 | ||
|
|
a3eb1655c6 | ||
|
|
8e9fd91cee | ||
|
|
e3d4b0e56a | ||
|
|
8d7227b1f9 | ||
|
|
d07b190322 | ||
|
|
e2d8b9d06b | ||
|
|
fecee19e1a | ||
|
|
f04efead96 | ||
|
|
b13ecb7cfd | ||
|
|
0fc9fa541f | ||
|
|
b824c2d31a | ||
|
|
65d4baa944 | ||
|
|
cd5a916f99 | ||
|
|
66b779a77d | ||
|
|
c62bd4ce97 | ||
|
|
2f95dc20c6 | ||
|
|
a284d49692 | ||
|
|
68c73c5be1 | ||
|
|
4fcbee9594 | ||
|
|
e9afe396b0 | ||
|
|
927d8ce237 | ||
|
|
461f3bd89f | ||
|
|
ed1791ab02 | ||
|
|
8b9af2c21b | ||
|
|
50872438e9 | ||
|
|
9b9e70e7e8 | ||
|
|
f832a07755 | ||
|
|
c3a632e612 | ||
|
|
bad7a94b6d | ||
|
|
7e9fbabd83 | ||
|
|
f5750628bf | ||
|
|
692ca763a1 | ||
|
|
9eb1731516 | ||
|
|
93776707a9 | ||
|
|
ebe6d3cbee | ||
|
|
46a0c2d5b6 | ||
|
|
85539c7bb9 | ||
|
|
78bc0a52ea | ||
|
|
13784d3576 | ||
|
|
d0371b0ff7 | ||
|
|
ae490125e9 | ||
|
|
bb9e1c5dbc | ||
|
|
f350f9905a | ||
|
|
040cf41468 | ||
|
|
e016e3280d | ||
|
|
3850227605 | ||
|
|
06e80f0c31 | ||
|
|
bb7e08cdce | ||
|
|
3b3fb28412 | ||
|
|
ba27d3ff79 | ||
|
|
6ac8ac6ae6 | ||
|
|
802081c3f8 | ||
|
|
2a2cd0dbca | ||
|
|
75a824e164 | ||
|
|
27d71f530a | ||
|
|
b53ffb65af | ||
|
|
e9ead0d33d | ||
|
|
be405eb705 | ||
|
|
95d1dcc521 | ||
|
|
96895a80c1 | ||
|
|
132726bc45 | ||
|
|
593f977621 | ||
|
|
582c23bae8 | ||
|
|
e1bfd95f63 | ||
|
|
715bc94bd9 | ||
|
|
e19c9a967d | ||
|
|
83c18d0cb6 | ||
|
|
bfd1a4c341 | ||
|
|
3878e94253 | ||
|
|
af07ee9abb | ||
|
|
22590754fd | ||
|
|
7205f10ec2 | ||
|
|
f7750f04a6 | ||
|
|
d58d84dbcf | ||
|
|
f025261ddf | ||
|
|
dcf57093f8 | ||
|
|
3c8591d371 | ||
|
|
d27ad8e23a | ||
|
|
3ecfb5b073 | ||
|
|
e9777cf325 | ||
|
|
7aa46e7eeb | ||
|
|
775f1a042d | ||
|
|
82f09bdb81 | ||
|
|
489fdc5566 | ||
|
|
3e4be2c800 | ||
|
|
f61bb99d3a | ||
|
|
0a8f71e76e | ||
|
|
833cb48050 | ||
|
|
09574b3937 | ||
|
|
e2d4e384e3 | ||
|
|
6bff6016ff | ||
|
|
09cb84f617 | ||
|
|
d920fe6c5e | ||
|
|
676402854b | ||
|
|
5eacc7c327 | ||
|
|
f29346f0b7 | ||
|
|
facada5d04 | ||
|
|
d945477369 | ||
|
|
f96e7a9156 | ||
|
|
fc22268fc2 | ||
|
|
7dbb9931ec | ||
|
|
b14145f3dc | ||
|
|
5a414d5711 | ||
|
|
7cc6f635fc | ||
|
|
a90695ef1f | ||
|
|
0e99c9b9a4 | ||
|
|
93becd5629 | ||
|
|
b13b398204 | ||
|
|
f531c0a405 | ||
|
|
3e8e1ed596 | ||
|
|
b90c2ec385 | ||
|
|
9ad85288a9 | ||
|
|
54858dffdb | ||
|
|
86597ab2da | ||
|
|
92e246a574 | ||
|
|
2a596bc2cc | ||
|
|
b28c11cb54 | ||
|
|
4ed9ade4fc | ||
|
|
2d474b3d3a | ||
|
|
ee4d0bf4b5 | ||
|
|
f8e8bd03cd | ||
|
|
509613d2e5 | ||
|
|
cf3395b9ce | ||
|
|
16a11b75a8 | ||
|
|
07d4a65a45 | ||
|
|
7bf8f6115f | ||
|
|
43e700036d | ||
|
|
ad1f5fc18d | ||
|
|
51f9ab8498 | ||
|
|
592e356932 | ||
|
|
e6f1f6eeb1 | ||
|
|
86782e7f3e | ||
|
|
4136545b6b | ||
|
|
c9099f3a2f | ||
|
|
a28328dd96 | ||
|
|
485f8a6d3a | ||
|
|
3c05d000f5 | ||
|
|
4850615327 | ||
|
|
5702b525d1 | ||
|
|
b2e57e1bde | ||
|
|
c987c62819 | ||
|
|
4aa8c756c2 | ||
|
|
37aa481dd0 | ||
|
|
0b5c070ad1 | ||
|
|
7b1412004f | ||
|
|
3270a38d69 | ||
|
|
1bc77620d9 | ||
|
|
2ef5490297 | ||
|
|
19b3bd151e | ||
|
|
d8774d2f5a | ||
|
|
e5cb313d92 | ||
|
|
ac0138a7e1 | ||
|
|
6e5fbe8991 | ||
|
|
56ec842c00 | ||
|
|
c3420a0a6e | ||
|
|
8d13877002 | ||
|
|
065f7d6cc7 | ||
|
|
03a7c745c9 | ||
|
|
4269f16bcd | ||
|
|
55c9cb45ac | ||
|
|
4f825641ce | ||
|
|
ade2b4baea | ||
|
|
1e1091b365 | ||
|
|
93e1a7047c | ||
|
|
99554f5622 | ||
|
|
b09240702e | ||
|
|
fbf7f91e4f | ||
|
|
9a0d655788 | ||
|
|
aa77d156a9 | ||
|
|
493e95d9d6 | ||
|
|
4aaf6ba69e | ||
|
|
88f8ef0244 | ||
|
|
312a583092 | ||
|
|
c8e0390aaf | ||
|
|
8e2af39c06 | ||
|
|
606cbb3883 | ||
|
|
377746f155 | ||
|
|
5f11ba0445 | ||
|
|
be7d4c3c93 | ||
|
|
ec53e8949a | ||
|
|
f04cc7aa08 | ||
|
|
b994d0ad70 | ||
|
|
68b2fee9be | ||
|
|
82b9c9781c | ||
|
|
6d15eac2c6 | ||
|
|
faa740a8dd | ||
|
|
872faf2abe | ||
|
|
bc85d6518b | ||
|
|
15e7a94640 | ||
|
|
810295aafa | ||
|
|
ffd45d58fe | ||
|
|
852923ea34 | ||
|
|
979b34d717 | ||
|
|
34f92fe4e5 | ||
|
|
10b217e0c2 | ||
|
|
2b0593e5ff | ||
|
|
2b329e6899 | ||
|
|
5b0bf40508 | ||
|
|
210a936483 | ||
|
|
813e2d5b2c | ||
|
|
a18c940503 | ||
|
|
329d8acca7 | ||
|
|
bf2cdc3c9b | ||
|
|
61ce0d1117 | ||
|
|
e8201b115f | ||
|
|
5690742937 | ||
|
|
9f29f41288 | ||
|
|
828c0bcb99 | ||
|
|
fe0d31ae94 | ||
|
|
175d10c5d1 | ||
|
|
02b5349db2 | ||
|
|
a64d69560c | ||
|
|
e18205e6c7 | ||
|
|
0f542809a4 | ||
|
|
d171fb1570 | ||
|
|
b913523066 | ||
|
|
16588ab0bf | ||
|
|
5dc27ed275 | ||
|
|
63826f5567 | ||
|
|
0d3d115d67 | ||
|
|
a9959bcd62 | ||
|
|
93a4e67813 | ||
|
|
0e79db6cf7 | ||
|
|
7b1f6d7ce3 | ||
|
|
8c452288f4 | ||
|
|
bf5137ed6b | ||
|
|
c8e4f9160c | ||
|
|
fae4f7c8b4 | ||
|
|
2148d3d3ab | ||
|
|
8ccd442647 | ||
|
|
d44a7fc23a | ||
|
|
5c63d75c86 | ||
|
|
fef282fcd5 | ||
|
|
ec9e5402c0 | ||
|
|
a45378cadf | ||
|
|
a5127c7c07 | ||
|
|
0197aeeb4b | ||
|
|
8b84b0403b | ||
|
|
6a671a5cd1 | ||
|
|
1be4eee674 | ||
|
|
1eed8a2a86 | ||
|
|
e782ddc143 | ||
|
|
d91e3f568b | ||
|
|
98eb006cdd | ||
|
|
60154b7c26 | ||
|
|
dab9e7aaa2 | ||
|
|
0f8dceed89 | ||
|
|
affa091ccb | ||
|
|
8a022f877e | ||
|
|
579a542815 | ||
|
|
080d021fb3 | ||
|
|
10ec91065e | ||
|
|
25a3ea98bc | ||
|
|
5555e334af | ||
|
|
3c41c286c7 | ||
|
|
bf9fbc46fd | ||
|
|
824ef9a9d3 | ||
|
|
8a84d4812f | ||
|
|
ffe456ea7c | ||
|
|
a997845604 | ||
|
|
f887eae0f7 | ||
|
|
508c209270 | ||
|
|
4027304ece | ||
|
|
0ac59b4152 | ||
|
|
2272134442 | ||
|
|
1c828bd680 | ||
|
|
499867255b | ||
|
|
dc142a5531 | ||
|
|
2115e92520 | ||
|
|
c3d31f11e4 | ||
|
|
bf4d908eab | ||
|
|
2a3ba03226 | ||
|
|
5c6f72ac57 | ||
|
|
bfcf2d98b5 | ||
|
|
0b01e7edea | ||
|
|
84a4d114c4 | ||
|
|
44b47f4d88 | ||
|
|
1175a22d53 | ||
|
|
5aa8761c7e | ||
|
|
1668ec2fc6 | ||
|
|
eaf3b7943c | ||
|
|
1551b413fb | ||
|
|
05a1b0203b | ||
|
|
c83667e432 | ||
|
|
9203ae20cd | ||
|
|
43f658a82b | ||
|
|
3dcc6dc299 | ||
|
|
fe79c0d294 | ||
|
|
1f0a91c313 | ||
|
|
ae5cd7b3c3 | ||
|
|
2947e11b9b | ||
|
|
85670dd4a1 | ||
|
|
5d88c1a19e | ||
|
|
3004007f96 | ||
|
|
58244d5a3d | ||
|
|
ac97e0c6e9 | ||
|
|
d9bdb0d7e1 | ||
|
|
83da1773b5 | ||
|
|
44e4e0a2b3 | ||
|
|
9dad1d79d7 | ||
|
|
3a3a9af284 | ||
|
|
c2a7fbaadc | ||
|
|
b2789bea6b | ||
|
|
807e8642fa | ||
|
|
c9008bf78b | ||
|
|
a641d2a2de | ||
|
|
6186f39068 | ||
|
|
6bd1209146 | ||
|
|
2a9c379a1c | ||
|
|
1b983111f6 | ||
|
|
cf5dd8b822 | ||
|
|
069d2b275a | ||
|
|
368e35abb6 | ||
|
|
81a51d750c | ||
|
|
d93b137b85 | ||
|
|
d15f2a0cbe | ||
|
|
bd54729257 | ||
|
|
6123ef12bd | ||
|
|
14cf008a19 | ||
|
|
da8db72328 | ||
|
|
30e3a3a958 | ||
|
|
b384a2fff6 | ||
|
|
8dd866a35e | ||
|
|
b36e2eb5f4 | ||
|
|
9c4fdc18b8 | ||
|
|
357a90db71 | ||
|
|
8c65d4e131 | ||
|
|
07971d25a6 | ||
|
|
ce538a804d | ||
|
|
d480f19b24 | ||
|
|
5deb1d35e3 | ||
|
|
140514b408 | ||
|
|
34d40364a3 | ||
|
|
a4d7f5e7d1 | ||
|
|
b3aa3d3b83 | ||
|
|
3f9e4731b8 | ||
|
|
3e79a86008 | ||
|
|
126c6e1b6c | ||
|
|
90c6e4cd1b | ||
|
|
e1616af98c | ||
|
|
388e488bc1 | ||
|
|
b601c49f6c | ||
|
|
d9587e20c0 | ||
|
|
f5684c43dd | ||
|
|
d25700e241 | ||
|
|
9dde599e00 | ||
|
|
96f0d65f7d | ||
|
|
abe64ae8fb | ||
|
|
5df6fc4c1b | ||
|
|
a4a6929ca4 | ||
|
|
cc221f590c | ||
|
|
ec1b782f2c | ||
|
|
48549ff790 | ||
|
|
5633053655 | ||
|
|
92acbd006b | ||
|
|
8552a89838 | ||
|
|
ce90d81a2f | ||
|
|
f250b006b1 | ||
|
|
f46c3b36cc | ||
|
|
217999912a | ||
|
|
82e6192c05 | ||
|
|
03abfa9c59 | ||
|
|
97155c50c4 | ||
|
|
7b45e9296a | ||
|
|
c16836e7c0 | ||
|
|
1f88072eae | ||
|
|
858ea9c3de | ||
|
|
1248858303 | ||
|
|
a472a95945 | ||
|
|
c8af57c65d | ||
|
|
d00eb38bbc | ||
|
|
f8e1b9b11b | ||
|
|
bbb807d860 | ||
|
|
355c68f687 | ||
|
|
b74ae9fabf | ||
|
|
17d2fb1858 | ||
|
|
222fad315d | ||
|
|
124ba2a124 | ||
|
|
9b8dc448f6 | ||
|
|
0a44a81d18 | ||
|
|
c4ec841c0f | ||
|
|
6fe5d9a9e9 | ||
|
|
18c74a245d | ||
|
|
2fb311e090 | ||
|
|
d6822b85b3 | ||
|
|
d08461bd4c | ||
|
|
f4d63877e4 | ||
|
|
43335cd729 | ||
|
|
0678bb03d7 | ||
|
|
b15102d45a | ||
|
|
fb26842046 | ||
|
|
e703baf295 | ||
|
|
94670baa64 | ||
|
|
62c67435e6 | ||
|
|
1e492721ba | ||
|
|
2fe635a958 | ||
|
|
c1bdbffc87 | ||
|
|
a654f5bf13 | ||
|
|
7a8d99304a | ||
|
|
7e0ce1fa48 | ||
|
|
b84d3a5612 | ||
|
|
81b110feb6 | ||
|
|
4556f7b8a4 | ||
|
|
a9b6f8976e | ||
|
|
dfa6165662 | ||
|
|
ee3ee63ff5 | ||
|
|
3567d8913f | ||
|
|
8276054671 | ||
|
|
220117f07c | ||
|
|
728ca8aa9d | ||
|
|
e3a1125e84 | ||
|
|
02b64f4027 | ||
|
|
2ae44ca493 | ||
|
|
afdd63521f | ||
|
|
bced0b91a0 | ||
|
|
2a6f2939be | ||
|
|
13880354cf | ||
|
|
5df0c95e51 | ||
|
|
447054a14f | ||
|
|
5f348a8ea3 | ||
|
|
1d69411eba | ||
|
|
fb24a8fdb1 | ||
|
|
827fb7fa82 | ||
|
|
c6365bebac | ||
|
|
c7b94d0a42 | ||
|
|
86f82951d5 | ||
|
|
72b865b50e | ||
|
|
b2f7e4b16b | ||
|
|
2f01299472 | ||
|
|
5cc851e175 | ||
|
|
66986e66e3 | ||
|
|
9292bbcd1b | ||
|
|
dfba3c51fb | ||
|
|
da7e501e3a | ||
|
|
42ae23f279 | ||
|
|
c43775f7b2 | ||
|
|
86ee1270e2 | ||
|
|
b8cfd83d33 | ||
|
|
bfd56bf904 | ||
|
|
df2311cdaf | ||
|
|
d609c2b0ff | ||
|
|
70e1d2bf3d | ||
|
|
1697c2160c | ||
|
|
c28301bb7e | ||
|
|
b5eadb158c | ||
|
|
e94912cdb9 | ||
|
|
dfb967834f | ||
|
|
98f7c29683 | ||
|
|
0998c5539a | ||
|
|
1a79e23b12 | ||
|
|
d49323c7c4 | ||
|
|
98eb3cb7f0 | ||
|
|
c75ae73814 | ||
|
|
07519b7c28 | ||
|
|
4c62c82dab | ||
|
|
92a9554240 | ||
|
|
324a700fb7 | ||
|
|
a6b934758b | ||
|
|
cd5ec59f6a | ||
|
|
80fe813116 | ||
|
|
1262afef63 | ||
|
|
987489b34a | ||
|
|
9310861cc2 | ||
|
|
53f0db99ca | ||
|
|
2eb125f6e2 | ||
|
|
f805d9432e | ||
|
|
054cb9e9fa | ||
|
|
1f77e7d90a | ||
|
|
7ed33832b8 | ||
|
|
d19e9cc662 | ||
|
|
846c9cec6a | ||
|
|
460e4b8bb3 | ||
|
|
2e6bd23f22 | ||
|
|
7763948fe4 | ||
|
|
2a0f001902 | ||
|
|
14df69e180 | ||
|
|
28b6389b36 | ||
|
|
905c0b8c7a | ||
|
|
b674cc95ac | ||
|
|
bccb2509b5 | ||
|
|
cd980c6604 | ||
|
|
ddff4ec083 | ||
|
|
5bf97be8ef | ||
|
|
7fadb6ed05 | ||
|
|
89688d67dd | ||
|
|
279007544a | ||
|
|
1c0f0e1423 | ||
|
|
1ab909addc | ||
|
|
99dfd15469 | ||
|
|
be18ecf74e | ||
|
|
713bd132dc | ||
|
|
20f03e237e | ||
|
|
7d3c3911ea | ||
|
|
ccfee2be83 | ||
|
|
1193b0b990 | ||
|
|
5a3ba4e563 | ||
|
|
e9c342ef74 | ||
|
|
8927ffa035 | ||
|
|
fdb0312326 | ||
|
|
2f21caa41c | ||
|
|
51a35d40e5 | ||
|
|
6ec524adec | ||
|
|
7d4a7ec8c7 | ||
|
|
0256c4521d | ||
|
|
be3ed181c1 | ||
|
|
38cf7884fe | ||
|
|
25d426e8b2 | ||
|
|
edff9ae684 | ||
|
|
a622e3bda6 | ||
|
|
4d54e28e63 | ||
|
|
c89d023f91 | ||
|
|
c7cfea1daa | ||
|
|
beb07365a0 | ||
|
|
0787c65e51 | ||
|
|
d48dea7273 | ||
|
|
2432cc6ed2 | ||
|
|
cf523d4215 | ||
|
|
906d87c4b8 | ||
|
|
9c4a92c015 | ||
|
|
0c056ba691 | ||
|
|
424158b28d | ||
|
|
57f118a5b5 | ||
|
|
65e75f3da2 | ||
|
|
41174cde45 | ||
|
|
cb7d01fb36 | ||
|
|
3e78f8e87d | ||
|
|
f2c032ba07 | ||
|
|
2ef1589e76 | ||
|
|
5c394557e3 | ||
|
|
5c4a5b0a61 | ||
|
|
be22b7349d | ||
|
|
023e4774a1 | ||
|
|
56b706f25e | ||
|
|
9d07ee43eb | ||
|
|
147a6c81a1 | ||
|
|
5972f4947d | ||
|
|
9c99a624d7 | ||
|
|
d812d83dda | ||
|
|
f81c5c2455 | ||
|
|
dc8c5e6209 | ||
|
|
14833582b2 | ||
|
|
cca813fd1d | ||
|
|
d4102e75c5 | ||
|
|
76a04efc5c | ||
|
|
a34e139843 | ||
|
|
a1727a2ac7 | ||
|
|
7ac224adf3 | ||
|
|
d5e3d02a98 | ||
|
|
68ad3e8db4 | ||
|
|
31029b2fe4 | ||
|
|
8b0c101768 | ||
|
|
50b66f526b | ||
|
|
f3fcf010fb | ||
|
|
4da53bd00d | ||
|
|
c6cef45f0e | ||
|
|
e36cd7fe5c | ||
|
|
0c24f2db7b | ||
|
|
8866faa8d5 | ||
|
|
b2dc31ba80 | ||
|
|
061ea30199 | ||
|
|
0e9e94d090 | ||
|
|
3321cb37ef | ||
|
|
d60a818791 | ||
|
|
3937a52b4f | ||
|
|
2c3902b1a1 | ||
|
|
f43b5ee76f | ||
|
|
bab16a5251 | ||
|
|
08c734d7fd | ||
|
|
36126a3ad9 | ||
|
|
ce505d33bd | ||
|
|
de0d859502 | ||
|
|
ce96d4bcc5 | ||
|
|
fb242274d5 | ||
|
|
938bc7cdd7 | ||
|
|
36865f2930 | ||
|
|
12e79cccf6 | ||
|
|
6180f12ba3 | ||
|
|
c00b6c6237 | ||
|
|
dbdc74fdef | ||
|
|
5bb0a07164 | ||
|
|
543f09999f | ||
|
|
812f32efdd | ||
|
|
784264eba4 | ||
|
|
ff9ca059c7 | ||
|
|
d4b0c39485 | ||
|
|
87c42aeaf4 | ||
|
|
5ba6e57c71 | ||
|
|
6d2ba5c2d0 | ||
|
|
0d42b81285 | ||
|
|
9ce2ae613b | ||
|
|
13c9e0e666 | ||
|
|
784118e9c1 | ||
|
|
df32a32d99 | ||
|
|
655241aed3 | ||
|
|
60a2b246e2 | ||
|
|
ebd60d93f3 | ||
|
|
cc4ba935b5 | ||
|
|
824147fd7d | ||
|
|
c3446a16cc | ||
|
|
82135d1892 | ||
|
|
1cff63bc01 | ||
|
|
e488e74313 | ||
|
|
1a17c9da86 | ||
|
|
20e1f773fc | ||
|
|
56d80ff293 | ||
|
|
80e176136a | ||
|
|
0ae66d3e24 | ||
|
|
802ab8238e | ||
|
|
ec9c07a646 | ||
|
|
b75ad663f2 | ||
|
|
e4a017fc00 | ||
|
|
5b486ca6b8 | ||
|
|
1c39ed6130 | ||
|
|
a47563b12f | ||
|
|
84491ff655 | ||
|
|
e5991a4379 | ||
|
|
0b3d4615b8 | ||
|
|
a8f6336b47 | ||
|
|
0b33df3341 | ||
|
|
744cc4b705 | ||
|
|
9d3cd5784f | ||
|
|
06ea58198a | ||
|
|
3692d7d090 | ||
|
|
460a2dbbd3 | ||
|
|
228f4f1010 | ||
|
|
2703b91e41 | ||
|
|
24171787f8 | ||
|
|
49d3338d4a | ||
|
|
a9d693e1c3 | ||
|
|
4ef69248d0 | ||
|
|
247b3ed740 | ||
|
|
1edca6235c | ||
|
|
ab5c03b1d9 | ||
|
|
d4cb35469d | ||
|
|
fd1b1d0c24 | ||
|
|
bf96ceeacc | ||
|
|
2c08b385e5 | ||
|
|
051d13ec7a | ||
|
|
a2a9643123 | ||
|
|
1286bfe75b | ||
|
|
1f74f82796 | ||
|
|
876b576679 | ||
|
|
c927e4785b | ||
|
|
97672828e8 | ||
|
|
b96978494b | ||
|
|
2f105cbe15 | ||
|
|
2539a07b7d | ||
|
|
73f903f402 | ||
|
|
94c48a4c2d | ||
|
|
eb8d938c94 | ||
|
|
92b8316182 | ||
|
|
610cb2626b | ||
|
|
2033f813da | ||
|
|
a6fbd0fe69 | ||
|
|
abadb7f80f | ||
|
|
1c6be3f400 | ||
|
|
52111be20a | ||
|
|
eae29bb1f2 | ||
|
|
9191e8ce91 | ||
|
|
2b4c7d12b6 | ||
|
|
7dd1f7321a | ||
|
|
088630a999 | ||
|
|
d2a5cdcca7 | ||
|
|
4b50d016b5 | ||
|
|
7a073e0e8d | ||
|
|
b56958abe4 | ||
|
|
57d042ca4a | ||
|
|
3895f3c826 | ||
|
|
75aed7c44f | ||
|
|
041c0ce86c | ||
|
|
90aabdf499 | ||
|
|
40f7ec3ca1 | ||
|
|
1e32fcaebe | ||
|
|
9f23755a62 | ||
|
|
dad03478fd | ||
|
|
484b75f755 | ||
|
|
7138faa5cd | ||
|
|
fef1706fc8 | ||
|
|
1929b20a6c | ||
|
|
3991ff5d3a | ||
|
|
e4b1c89719 | ||
|
|
3d51eec89c | ||
|
|
f9016f3ea7 | ||
|
|
3dce969a5e | ||
|
|
542d257b8f | ||
|
|
2eb7c47572 | ||
|
|
32621a9369 | ||
|
|
7676a74f73 | ||
|
|
1fae35231b | ||
|
|
cd4daa115f | ||
|
|
ad0190d6ed | ||
|
|
296dcccd81 | ||
|
|
7ba7e04a13 | ||
|
|
3109c5ef67 | ||
|
|
d5776e8946 | ||
|
|
c59ea602c5 | ||
|
|
16bebbea50 | ||
|
|
0e21b6da3d | ||
|
|
b3403c40e1 | ||
|
|
863e8bb290 | ||
|
|
1a16a527b3 | ||
|
|
c72329d990 | ||
|
|
dffeb2b5dd | ||
|
|
fef06a1544 | ||
|
|
7d9ad6daab | ||
|
|
822b166753 | ||
|
|
8fad768d39 | ||
|
|
d46b8390f1 | ||
|
|
4262715590 | ||
|
|
9818446c7d | ||
|
|
22682e4150 | ||
|
|
1d63779b7d | ||
|
|
c82f800794 | ||
|
|
d96dea49bf | ||
|
|
c574c3e08c | ||
|
|
e7e6f765b5 | ||
|
|
240586875c | ||
|
|
d6c5903569 | ||
|
|
55da5cc397 | ||
|
|
943359e328 | ||
|
|
92c54cc1f8 | ||
|
|
6ec0b44487 | ||
|
|
85d2ca626f | ||
|
|
68865a2bca | ||
|
|
8362e6f435 | ||
|
|
3804a58729 | ||
|
|
fbb67a6ee9 | ||
|
|
19d8b59ca7 | ||
|
|
7ca726492f | ||
|
|
96a43ca254 | ||
|
|
bf34eb32ed | ||
|
|
433612cde0 | ||
|
|
807db91140 | ||
|
|
7791809224 | ||
|
|
9b3d31cd47 | ||
|
|
65a3a97ab2 | ||
|
|
e3593574b0 | ||
|
|
f81d391546 | ||
|
|
bd3b00793a | ||
|
|
757a72fb57 | ||
|
|
fbbec480af | ||
|
|
ba3b43c66c | ||
|
|
e040b83b2c | ||
|
|
76f4a5b2fe | ||
|
|
4f4b9956b3 | ||
|
|
ba37a0f3a9 | ||
|
|
d4acb95d7c | ||
|
|
2887baefb8 | ||
|
|
9678bf1e2f | ||
|
|
e2fc68ff2d | ||
|
|
4a7b641bc3 | ||
|
|
719b83bf42 | ||
|
|
f201a2e5dd | ||
|
|
fd6f47f5ca | ||
|
|
8524fbbaf9 | ||
|
|
a371c5b7d0 | ||
|
|
ef7ce4dfc8 | ||
|
|
189f6fa2a3 | ||
|
|
472f4922bd | ||
|
|
8ba2f342df | ||
|
|
5d6b9d25bd | ||
|
|
1231499aaa | ||
|
|
9c4788432d | ||
|
|
4ded2caa0b | ||
|
|
494afb9d43 | ||
|
|
c994e4828d | ||
|
|
e50f12a925 | ||
|
|
df75d70df4 | ||
|
|
c5aa04d4eb | ||
|
|
81ae1ce362 | ||
|
|
e1921e660d | ||
|
|
32aa24f6fd | ||
|
|
7fbc63b8e8 | ||
|
|
443adcdd5b | ||
|
|
05b064d513 | ||
|
|
b327033333 | ||
|
|
36c9b68b6c | ||
|
|
7d8d16091e | ||
|
|
c1c6bde429 | ||
|
|
8f0901e7a5 | ||
|
|
6edba3820b | ||
|
|
db1e1bcc1f | ||
|
|
51aeaeb508 | ||
|
|
dcd0a1f002 | ||
|
|
819b61937f | ||
|
|
9da7628083 | ||
|
|
c5f47a8db3 | ||
|
|
c2786b91ce | ||
|
|
4290c16997 | ||
|
|
475e90b654 | ||
|
|
ebb291e06d | ||
|
|
a2c9069dda | ||
|
|
48cfe9ca73 | ||
|
|
b53e9856b8 | ||
|
|
20420da326 | ||
|
|
9162f176a2 | ||
|
|
3c140c2ef4 | ||
|
|
511d37e7c3 | ||
|
|
10a5ea2a29 | ||
|
|
c049f6814b | ||
|
|
0716abdbf8 | ||
|
|
989f2bbbb0 | ||
|
|
45c564749c | ||
|
|
a62737b244 | ||
|
|
1fa3111e67 | ||
|
|
0e78f3f3bc | ||
|
|
6bf07086a0 | ||
|
|
b3f8f4e8ec | ||
|
|
65ee7e82aa | ||
|
|
c78f3b4e24 | ||
|
|
51aa7c8ecf | ||
|
|
64ab92ced6 | ||
|
|
8f9f351940 | ||
|
|
a9a1af7307 | ||
|
|
5057dfedba | ||
|
|
ecabadbf95 | ||
|
|
97630039d8 | ||
|
|
e7f1178469 | ||
|
|
87245ef978 | ||
|
|
455aa28724 | ||
|
|
92f70228c9 | ||
|
|
5fa862b346 | ||
|
|
d5c6c318ba | ||
|
|
02133a0290 | ||
|
|
92b6c1c08d | ||
|
|
08649b7aa8 | ||
|
|
9e19ef0d03 | ||
|
|
33af3392aa | ||
|
|
e5a5cf0ef0 | ||
|
|
c1ca3888ec | ||
|
|
1b76bf59a1 | ||
|
|
699c6bf13d | ||
|
|
d9dbf2c5e9 | ||
|
|
c22f794a20 | ||
|
|
972135e184 | ||
|
|
96fad124ac | ||
|
|
ce7c466041 | ||
|
|
db0c7ca907 | ||
|
|
9f62ecdb33 | ||
|
|
f91f257a7d | ||
|
|
28a197b8cd | ||
|
|
9d2d8c0713 | ||
|
|
b431f1dc0d | ||
|
|
67eb2975f6 | ||
|
|
4192de7dac | ||
|
|
82cecc89e2 | ||
|
|
113e264617 | ||
|
|
a705a69022 | ||
|
|
d757360f4e | ||
|
|
cc978daeef | ||
|
|
d38ad1df94 | ||
|
|
1fd7bcf9a9 | ||
|
|
06abb70624 | ||
|
|
78e20868df | ||
|
|
e52766d047 | ||
|
|
224460e62d | ||
|
|
3c408de5c9 | ||
|
|
ea803ff2d4 | ||
|
|
14a0786982 | ||
|
|
1dbccb5e3d | ||
|
|
adca796d94 | ||
|
|
732aa96656 | ||
|
|
6beaec8ba1 | ||
|
|
2ae78f6e2f | ||
|
|
a889acb332 | ||
|
|
81236209db | ||
|
|
52266d7ac0 | ||
|
|
ab4592b8e9 | ||
|
|
7cda571d72 | ||
|
|
d0ce4c52b0 | ||
|
|
64ed6f5572 | ||
|
|
987bebffc7 | ||
|
|
e9c3807509 | ||
|
|
db642b05c0 | ||
|
|
7da904aa00 | ||
|
|
8c09daa22d | ||
|
|
7ebc04bc34 | ||
|
|
9254403a51 | ||
|
|
b4250965e6 | ||
|
|
3fbe704e21 | ||
|
|
4bfbc355a2 | ||
|
|
4d22102fd1 | ||
|
|
129efbda40 | ||
|
|
828fb8972c | ||
|
|
29b97209fe | ||
|
|
9c71bec4a0 | ||
|
|
1bc24c8d7c | ||
|
|
76ae5f3b12 | ||
|
|
7a6c0c6b4b | ||
|
|
db42792abf | ||
|
|
131f16b731 | ||
|
|
16e47f1d6b | ||
|
|
79e1fd1ea4 | ||
|
|
0c3cc59228 | ||
|
|
15db9e1778 | ||
|
|
19cf29e5cf | ||
|
|
d51d51b3cc | ||
|
|
c40e132284 | ||
|
|
f8f54bd892 | ||
|
|
5302cdcf2b | ||
|
|
8fe9282bd9 | ||
|
|
07ed213b1f | ||
|
|
8a1b8d2091 | ||
|
|
034ef5692c | ||
|
|
b9b9405c35 | ||
|
|
ca8d4f9ff0 | ||
|
|
0dc39a66d7 | ||
|
|
55e73bb4b9 | ||
|
|
6f9164b986 | ||
|
|
8d27c32418 | ||
|
|
a17a7ad1ec | ||
|
|
585868f930 | ||
|
|
795d0a6682 | ||
|
|
3c0b7f7724 | ||
|
|
ff23f87010 | ||
|
|
989fca99c6 | ||
|
|
b44e10df3c | ||
|
|
c9e9f92c93 | ||
|
|
bb1a366989 | ||
|
|
1458511756 | ||
|
|
3ebfc81727 | ||
|
|
8d0d59175d | ||
|
|
a46b3f2ed9 | ||
|
|
cb224789e2 | ||
|
|
cd4d829f9f | ||
|
|
faa25f2a96 | ||
|
|
36e8f49b63 | ||
|
|
e2a4657777 | ||
|
|
261b3f7e5c | ||
|
|
d6ba2aa76a | ||
|
|
fb135a87ab | ||
|
|
286fabaddc | ||
|
|
a79ad44370 | ||
|
|
2046a9b414 | ||
|
|
c77d8b3709 | ||
|
|
7b428bb6b0 | ||
|
|
6986030cd9 | ||
|
|
cc9b9a1935 | ||
|
|
2b7eeba55c | ||
|
|
c87dd99824 | ||
|
|
fbd837eadb | ||
|
|
7c9c8e197c | ||
|
|
0366929231 | ||
|
|
10d5261153 | ||
|
|
3278856764 | ||
|
|
ff5a9e0ea1 | ||
|
|
59b0c09443 | ||
|
|
ae772e6a74 | ||
|
|
0a58783a86 | ||
|
|
6f6de13fd4 | ||
|
|
89dcb78efa | ||
|
|
703c02c32c | ||
|
|
adcfca4db3 | ||
|
|
c359223fd4 | ||
|
|
c4c7d26bb3 | ||
|
|
c06bc16b22 | ||
|
|
f7bc05c735 | ||
|
|
ff02d41992 | ||
|
|
ec180e2771 | ||
|
|
dffa9e0b8c | ||
|
|
497e06bcd9 | ||
|
|
4c67c165fa | ||
|
|
2c175c0c7e | ||
|
|
6babbc1ff9 | ||
|
|
8af9aace3c | ||
|
|
601b75b611 | ||
|
|
350037fc75 | ||
|
|
f6bcfc3abd | ||
|
|
a480c972f7 | ||
|
|
581ded2c93 | ||
|
|
06176e291a | ||
|
|
14ee1b40d0 | ||
|
|
9acb98a2c8 | ||
|
|
daf50df337 | ||
|
|
c4d136383c | ||
|
|
5b5016bfd4 | ||
|
|
02352ab231 | ||
|
|
a4909d3575 | ||
|
|
fbb50e2895 | ||
|
|
0e4bf501f1 | ||
|
|
89b97456b7 | ||
|
|
fc4112c459 | ||
|
|
b6923f49b1 | ||
|
|
b476ed9186 | ||
|
|
b6ba3f9059 | ||
|
|
4d921cc9f9 | ||
|
|
e5ac7d66ba | ||
|
|
d8173873c1 | ||
|
|
36c27188a4 | ||
|
|
0cf4cb6e4f | ||
|
|
29420c25e4 | ||
|
|
161cead2e4 | ||
|
|
03242a2953 | ||
|
|
9613b43d50 | ||
|
|
8a8e6c5d20 | ||
|
|
5d64a2b889 | ||
|
|
85b41e23f0 | ||
|
|
9d1c60239e | ||
|
|
de433cb896 | ||
|
|
683c8d0cc3 | ||
|
|
bca20c9e27 | ||
|
|
1de3e0986e | ||
|
|
8b2fa73b45 | ||
|
|
1b953c1dc7 | ||
|
|
c33960b411 | ||
|
|
8d5728097b | ||
|
|
9706045656 | ||
|
|
3a953eb5df | ||
|
|
35971b29bc | ||
|
|
76cbc64f99 | ||
|
|
8f8c85273c | ||
|
|
25b953b7ec | ||
|
|
c40f205bd3 | ||
|
|
be1b698af1 | ||
|
|
c9ec71eeba | ||
|
|
4df27e6efb | ||
|
|
02f3279dec | ||
|
|
21900555dc | ||
|
|
5a4e21287a | ||
|
|
3e8e5216eb | ||
|
|
c679de8e39 | ||
|
|
a979d2283f | ||
|
|
3254714b70 | ||
|
|
65374f50cf | ||
|
|
1a62cd064c | ||
|
|
40bd19ccbb | ||
|
|
642adffeb8 | ||
|
|
5b942f0508 | ||
|
|
b4b5b58e35 | ||
|
|
bf4672fb2b | ||
|
|
d6e2dcd25b | ||
|
|
3b7d22153f | ||
|
|
490a8d35cb | ||
|
|
260846e9e9 | ||
|
|
d1ed5aadc2 | ||
|
|
1067ed309a | ||
|
|
1ef9bc464d | ||
|
|
ba3a7fc11a | ||
|
|
c44b4c3d35 | ||
|
|
c79c79fe0e | ||
|
|
a7c70a3916 | ||
|
|
325a8cba58 | ||
|
|
35387eeabb | ||
|
|
9d3de8631c | ||
|
|
940e211bb6 | ||
|
|
5eb425bc4c | ||
|
|
bd6b529157 | ||
|
|
0d59e0a2e9 | ||
|
|
1826d122f5 | ||
|
|
ed6dd6f6cd | ||
|
|
81da9fb5a4 | ||
|
|
ec35330593 | ||
|
|
f741953ee4 | ||
|
|
c0343897cd | ||
|
|
d880f8cde5 | ||
|
|
1175bd822c | ||
|
|
63a141abe6 | ||
|
|
abce57ce9c | ||
|
|
c471f7cf6c | ||
|
|
656c2775ac | ||
|
|
a2c6e050d7 | ||
|
|
f3adb05b1c | ||
|
|
bfc3d2e1d4 | ||
|
|
680affd1fe | ||
|
|
ab1d2009a0 | ||
|
|
8196f46721 | ||
|
|
44460365c0 | ||
|
|
38d9aa5e73 | ||
|
|
830db2b326 | ||
|
|
51165f6061 | ||
|
|
2a9d38048e | ||
|
|
bba65b8a82 | ||
|
|
884086ba76 | ||
|
|
1fa6614cd5 | ||
|
|
57581724cd | ||
|
|
0ae6f7efc5 | ||
|
|
d0346436fb | ||
|
|
1b28980454 | ||
|
|
90a6088d61 | ||
|
|
338a2beaf0 | ||
|
|
ff9a910c1a | ||
|
|
d88921bb58 | ||
|
|
c1f3f0a247 | ||
|
|
df847835ad | ||
|
|
8aad1c78af | ||
|
|
7c97cf4799 | ||
|
|
fd11523cf4 | ||
|
|
a293a9bd4b | ||
|
|
8de0eb3c06 | ||
|
|
8bff172f0b | ||
|
|
7f26595804 | ||
|
|
68ec70f24f | ||
|
|
836591a44f | ||
|
|
dd4ded3d4b | ||
|
|
995e294856 | ||
|
|
c4e623eec2 | ||
|
|
61253d8201 | ||
|
|
0f05967190 | ||
|
|
ad0e469f87 | ||
|
|
512d24cea6 | ||
|
|
0850a3fab7 | ||
|
|
16db92526c | ||
|
|
30ad66e8f1 | ||
|
|
77f600a16c | ||
|
|
d96bf7f951 | ||
|
|
15948c2781 | ||
|
|
b0c744bd29 | ||
|
|
5eacfe1afb | ||
|
|
2f985b479e | ||
|
|
e61d8f2f8f | ||
|
|
f4e338f9fb | ||
|
|
9509745be9 | ||
|
|
91b47134ad | ||
|
|
6426f4432e | ||
|
|
191ea50663 | ||
|
|
7f5c0fca8f | ||
|
|
5f8798cf94 | ||
|
|
3aac709682 | ||
|
|
e3962aa794 | ||
|
|
1964bbc03a | ||
|
|
80675399aa | ||
|
|
6fb4c724bd | ||
|
|
b34606c9ce | ||
|
|
4e97381709 | ||
|
|
d4db49f969 | ||
|
|
4b54870da1 | ||
|
|
0ae91cbf64 | ||
|
|
041abd8abc | ||
|
|
43be6883df | ||
|
|
ad4e95cb78 | ||
|
|
38480d3aed | ||
|
|
3436bb3792 | ||
|
|
5bab8af38f | ||
|
|
61f344dd66 | ||
|
|
1811955fce | ||
|
|
449da42108 | ||
|
|
9493d3e9c9 | ||
|
|
e5c1052062 | ||
|
|
7edc4e2cb3 | ||
|
|
7ca28fc796 | ||
|
|
72f9bf83fd | ||
|
|
2695ddc9fc | ||
|
|
fbcc8671ac | ||
|
|
7e76230cf8 | ||
|
|
ba27221bf2 | ||
|
|
6cf1501050 | ||
|
|
a30ca0ce2a | ||
|
|
5e3e988846 | ||
|
|
bb42353c81 | ||
|
|
61740fc9ed | ||
|
|
ea30c90a6c | ||
|
|
3968a82775 | ||
|
|
6e40081dd9 | ||
|
|
2b8b43c94c | ||
|
|
3f0ecc2284 | ||
|
|
828e86bdf4 | ||
|
|
159d0c060f | ||
|
|
4a29fdb3f2 | ||
|
|
29da1bb9ef | ||
|
|
47636bb30f | ||
|
|
5fe64396b4 | ||
|
|
75b782f261 | ||
|
|
4a5cf0efb9 | ||
|
|
cfdae77331 | ||
|
|
ec0aaff8ac | ||
|
|
f651d8e26a | ||
|
|
0526769808 | ||
|
|
1866745936 | ||
|
|
920c5ab266 | ||
|
|
c57d8980a1 | ||
|
|
0ed418834a | ||
|
|
083969a3d2 | ||
|
|
6740fff179 | ||
|
|
25e24d1d09 | ||
|
|
76cc9c8b21 | ||
|
|
7dcf6b70d9 | ||
|
|
f26b26b73e | ||
|
|
055beaa27a | ||
|
|
a4623c3c63 | ||
|
|
4e3a94809d | ||
|
|
5ff64899e6 | ||
|
|
971f172c91 | ||
|
|
4671167a2c | ||
|
|
7aff4ee4cb | ||
|
|
30f7685435 | ||
|
|
341f377e6d | ||
|
|
fe4788ae3f | ||
|
|
e133e89b6b | ||
|
|
bf6a0a035a | ||
|
|
790447ecc9 | ||
|
|
47506d1433 | ||
|
|
933e6aa62e | ||
|
|
6736ef1d44 | ||
|
|
3e631e047f | ||
|
|
dd2d4edffc | ||
|
|
fd2960c9cb | ||
|
|
c2907ea58f | ||
|
|
41f62cf53d | ||
|
|
e462f1ff9c | ||
|
|
5b0b6191d8 | ||
|
|
ab9a1e4307 | ||
|
|
029c11c8d2 | ||
|
|
e221d31b45 | ||
|
|
dfbdaa651c | ||
|
|
9de152b8ee | ||
|
|
360f9afb70 | ||
|
|
1b81825218 | ||
|
|
b3e6e28827 | ||
|
|
eaceb27879 | ||
|
|
cd9b6c7ac3 | ||
|
|
d3e527f2a4 | ||
|
|
b47fdcdfab | ||
|
|
2550ad7fd1 | ||
|
|
1717f584a0 | ||
|
|
0822d3e3e5 | ||
|
|
ec41af760a | ||
|
|
a5ed24ca88 | ||
|
|
b3697579c0 | ||
|
|
388da2058b | ||
|
|
aa9a0dca4b | ||
|
|
2a892da0da | ||
|
|
9237bf9429 | ||
|
|
10533dce02 | ||
|
|
b5ebc19eff | ||
|
|
6535e7e43a | ||
|
|
5f9473ef02 | ||
|
|
fbb1c7cb8e | ||
|
|
2d97d85ca5 | ||
|
|
ecd7d0fc35 | ||
|
|
0c389789f3 | ||
|
|
d8239664a8 | ||
|
|
c06d4f477a | ||
|
|
cdd88a6e5c | ||
|
|
5a73fa2d23 | ||
|
|
0367851b8e | ||
|
|
33b2f6331c | ||
|
|
befbf57191 | ||
|
|
20d040d5d1 | ||
|
|
06fdc75945 | ||
|
|
ded971a3ec | ||
|
|
abc0f99ddd | ||
|
|
b3a88d6ea7 | ||
|
|
76014b7cb9 | ||
|
|
0ab6eb6587 | ||
|
|
a4e99366fb | ||
|
|
a32ab4cc97 | ||
|
|
e7f3c42f9d | ||
|
|
d76a0d7416 | ||
|
|
79f4af8ab5 | ||
|
|
a5f83329cb | ||
|
|
267479f31d | ||
|
|
164462e510 | ||
|
|
6331df306f | ||
|
|
027ceebcbd | ||
|
|
edb2c0080c | ||
|
|
caafc87b29 | ||
|
|
5d37cac4a0 | ||
|
|
8f68e096d4 | ||
|
|
430cad48e3 | ||
|
|
757a9532e6 | ||
|
|
f26f8cafa9 | ||
|
|
128a79e355 | ||
|
|
cc2d99db3a | ||
|
|
30a31d931a | ||
|
|
1c30d449bf | ||
|
|
dc4ce58248 | ||
|
|
dc93e861c7 | ||
|
|
960daf27e2 | ||
|
|
844f21344d | ||
|
|
535ad110e3 | ||
|
|
0e0d7a5441 | ||
|
|
ed63221c7e | ||
|
|
f9c2d7767d | ||
|
|
cb91478590 | ||
|
|
5dec7fe27d | ||
|
|
575d487c65 | ||
|
|
2b9289f402 | ||
|
|
9273683d3c | ||
|
|
88f8465e7e | ||
|
|
f26031cada | ||
|
|
3352d71515 | ||
|
|
999f9532ee | ||
|
|
d1f62ca9bf | ||
|
|
ef9f0cf635 | ||
|
|
d745564451 | ||
|
|
d37ac992fc | ||
|
|
e7fc3de90c | ||
|
|
bde81380c3 | ||
|
|
839b482cb5 | ||
|
|
72f70d4789 | ||
|
|
d646bbf5c1 | ||
|
|
e68aaf6540 | ||
|
|
20ab5ed0fa | ||
|
|
8590e390a2 | ||
|
|
ab1d558420 | ||
|
|
53c9021455 | ||
|
|
8bd00e2433 | ||
|
|
c045feae50 | ||
|
|
7531080e51 | ||
|
|
bf57ab3e39 | ||
|
|
dfcb96a4b6 | ||
|
|
5c4fad6725 | ||
|
|
988b1ad03b | ||
|
|
79705a2514 | ||
|
|
0919b15183 | ||
|
|
8162c87884 | ||
|
|
09394ee4b7 | ||
|
|
7f7dd60587 | ||
|
|
6877abb2ec | ||
|
|
ce5dd88790 | ||
|
|
5bc9d625e7 | ||
|
|
1d7a69ad40 | ||
|
|
f7d87076a3 | ||
|
|
9d20b4d6a6 | ||
|
|
128cf9b57d | ||
|
|
e5b7adb228 | ||
|
|
bd5ae66fbe | ||
|
|
a3af4155f8 | ||
|
|
1ec83dc790 | ||
|
|
f26cc38b80 | ||
|
|
d9f537e9dc | ||
|
|
94c75df0d0 | ||
|
|
423a8884e8 | ||
|
|
1f26502c64 | ||
|
|
f61f7bb711 | ||
|
|
971acd3fdb | ||
|
|
bba070bdbf | ||
|
|
6c4152a7e0 | ||
|
|
f569ad0970 | ||
|
|
f16a291412 | ||
|
|
e0cfa2dff3 | ||
|
|
bf9d087e74 | ||
|
|
b245dd55d6 | ||
|
|
1e3f429169 | ||
|
|
8d429c7e5a | ||
|
|
b9be3ad3b8 | ||
|
|
3099090e6a | ||
|
|
5e27c65615 | ||
|
|
8b32382e1b | ||
|
|
60047e8029 | ||
|
|
e37fff1213 | ||
|
|
64a6d8027b | ||
|
|
cd4434135e | ||
|
|
747e11d7dd | ||
|
|
3cae728aba | ||
|
|
7f24a5cf82 | ||
|
|
1b8f5f232a | ||
|
|
77d37de18c | ||
|
|
5ea3fb8e1e | ||
|
|
d683aa43d8 | ||
|
|
d4c3501bb8 | ||
|
|
f2229a0007 | ||
|
|
2a06bb6e2c | ||
|
|
a06f890ab9 | ||
|
|
bbe22f95d1 | ||
|
|
631f75a79c | ||
|
|
c121aae8f1 | ||
|
|
fed7629632 | ||
|
|
0825ca736f | ||
|
|
660974c9d1 | ||
|
|
4404b06d2a | ||
|
|
daef69099b | ||
|
|
6362994fd8 | ||
|
|
398cf43782 | ||
|
|
77f8a0f5f6 | ||
|
|
d7e54ccbed | ||
|
|
53a8855696 | ||
|
|
bd16ed1340 | ||
|
|
dd365fe334 | ||
|
|
2a6ba739bc | ||
|
|
a863466f70 | ||
|
|
32f07f4aae | ||
|
|
3ed0e010be | ||
|
|
fb3c0c8138 | ||
|
|
58ded2e0d0 | ||
|
|
369b9a4808 | ||
|
|
0bd57986a9 | ||
|
|
559b88438b | ||
|
|
5d140f7db3 | ||
|
|
7b512ce296 | ||
|
|
ada291c0f6 | ||
|
|
857cb36707 | ||
|
|
4a702e0585 | ||
|
|
eac420f205 | ||
|
|
23d4fa9d9e | ||
|
|
f6523f34d8 | ||
|
|
82971d3ef7 | ||
|
|
8d9a5111a1 | ||
|
|
e8dac0051c | ||
|
|
72802aa125 | ||
|
|
f77a5c23fc | ||
|
|
cf772fcdd6 | ||
|
|
4313c64d9d | ||
|
|
38bf916231 | ||
|
|
cf59c0b854 | ||
|
|
10e192deed | ||
|
|
b3fb6e7822 | ||
|
|
3f640ed7eb | ||
|
|
cc814585ee | ||
|
|
b0d26c8242 | ||
|
|
4133be28c6 | ||
|
|
6e81879436 | ||
|
|
5ea670ece4 | ||
|
|
e8e9702d7e | ||
|
|
4cbdbaabdb | ||
|
|
f332d4f880 | ||
|
|
5ce418cdaf | ||
|
|
81ab2b9cd1 | ||
|
|
c441d76b7b | ||
|
|
fcbc027abc | ||
|
|
8989b69ce8 | ||
|
|
e9a624ab54 | ||
|
|
8a9df89bf6 | ||
|
|
e95d75e01f | ||
|
|
bbe58b07a8 | ||
|
|
7886c9ea27 | ||
|
|
1c072f38bb | ||
|
|
6c2bbdef1f | ||
|
|
a5ebb388a0 | ||
|
|
9c91c700ac | ||
|
|
28b111b669 | ||
|
|
1be6e1f374 | ||
|
|
fff8592b4e | ||
|
|
4af3856d15 | ||
|
|
8a06fb1840 | ||
|
|
e2e2ab62f4 | ||
|
|
e7e3f30fce | ||
|
|
affc45e752 | ||
|
|
d70334ee57 | ||
|
|
1c600c7068 | ||
|
|
7a93f1fc23 | ||
|
|
9c2f7aeb6a | ||
|
|
8af2d17d1f | ||
|
|
65d78eff57 | ||
|
|
8be9e2dc71 | ||
|
|
faecc6913b | ||
|
|
ed90c8868f | ||
|
|
71edce43ca | ||
|
|
4e9ef34f58 | ||
|
|
de55596926 | ||
|
|
316bc422bc | ||
|
|
c73ae3dfb3 | ||
|
|
27b45276ae | ||
|
|
b00852fada | ||
|
|
663f61f4e1 | ||
|
|
110bc64ee4 | ||
|
|
3764e773b3 | ||
|
|
682f0c7984 | ||
|
|
93014bfede | ||
|
|
4dd946bc8a | ||
|
|
2222007516 | ||
|
|
b09e3b0613 | ||
|
|
3a193956ff | ||
|
|
786eedf2f2 | ||
|
|
f217519e97 | ||
|
|
4caaa70726 | ||
|
|
02a27a6974 | ||
|
|
6d7eceb4f1 | ||
|
|
f52e72b026 | ||
|
|
ebeb646e4d | ||
|
|
70c1620a87 | ||
|
|
d45964d0c7 | ||
|
|
e67aa73e75 | ||
|
|
cb2fe3792a | ||
|
|
2b94cfe782 | ||
|
|
a1c99f3e7a | ||
|
|
57fa3ac653 | ||
|
|
01b6e1b88d | ||
|
|
294aca82c4 | ||
|
|
d080e7e7bd | ||
|
|
66a13d4c3a | ||
|
|
87c76ad010 | ||
|
|
822d292e2f | ||
|
|
42155dd11b | ||
|
|
9b1a2d9eaf | ||
|
|
8d0307cedd | ||
|
|
72b38ce712 | ||
|
|
caf8eedd76 | ||
|
|
181b05daf0 | ||
|
|
92b21ac9c2 | ||
|
|
ad12a3f735 | ||
|
|
badca7c20b | ||
|
|
7cdcfd4b1a | ||
|
|
b02af117f8 | ||
|
|
87d269512e | ||
|
|
3346349bba | ||
|
|
280a41806f | ||
|
|
134937082d | ||
|
|
1499994143 | ||
|
|
5805142fd7 | ||
|
|
5fc855e519 | ||
|
|
8c8bf22892 | ||
|
|
ec927e5dd9 | ||
|
|
3a042d8c14 | ||
|
|
fc88d1de85 | ||
|
|
6cf48e9e2b | ||
|
|
db22377a0d | ||
|
|
443cc08229 | ||
|
|
6ad222117d | ||
|
|
b26acad721 | ||
|
|
76e8bfe42f | ||
|
|
1f6704dbda | ||
|
|
33ea4e6225 | ||
|
|
d9cecbde7d | ||
|
|
84fab9ccd3 | ||
|
|
137dfc20fa | ||
|
|
f39e856fee | ||
|
|
e91aabc843 | ||
|
|
f85a99b6f0 | ||
|
|
a59f95317a | ||
|
|
6923000b52 | ||
|
|
83471bdacd | ||
|
|
18045c195a | ||
|
|
b1edadfe3a | ||
|
|
ed5984aa3a | ||
|
|
bfca8b8461 | ||
|
|
63cb0f3577 | ||
|
|
2b49614df9 | ||
|
|
fa439a465d | ||
|
|
11a74c2c05 | ||
|
|
a693efad1e | ||
|
|
75357a2f0a | ||
|
|
a70f5ebc08 | ||
|
|
b161df69e1 | ||
|
|
85a0e75e28 | ||
|
|
56022a9af3 | ||
|
|
5cbcf706e9 | ||
|
|
500b449422 | ||
|
|
8b78388834 | ||
|
|
b44d40d919 | ||
|
|
f8310e0a35 | ||
|
|
59dc0e2cbf | ||
|
|
6a4a7b1a3b | ||
|
|
d62a7999fb | ||
|
|
0ba1a42867 | ||
|
|
68ef49aef5 | ||
|
|
d0a65153df | ||
|
|
ac113b48e7 | ||
|
|
6e14680ac7 | ||
|
|
ba03a533d8 | ||
|
|
9abbecb286 | ||
|
|
9a20ea5c21 | ||
|
|
8ac4b125d2 | ||
|
|
f9b682ad10 | ||
|
|
58959b6114 | ||
|
|
b90405a7d2 | ||
|
|
e0a1613ad9 | ||
|
|
11930ed7a2 | ||
|
|
f3ff1cec54 | ||
|
|
435e73d838 | ||
|
|
2fdea258fa | ||
|
|
b453a6a46d | ||
|
|
5b88e637d8 | ||
|
|
ac02bcbe33 | ||
|
|
9efdeae3ac | ||
|
|
54e59e2f7b | ||
|
|
2c4e02ff34 | ||
|
|
2a306cbd91 | ||
|
|
b244136179 | ||
|
|
b897f367ce | ||
|
|
6c46418f68 | ||
|
|
f0d5d21e64 | ||
|
|
93490876c9 | ||
|
|
74763d2156 | ||
|
|
b849d9862d | ||
|
|
cd575e0ed8 | ||
|
|
b5fbd88c34 | ||
|
|
6003673165 | ||
|
|
4555667554 | ||
|
|
c0db6d49f4 | ||
|
|
6630066f0b | ||
|
|
20e6a55dd1 | ||
|
|
d3f82c800f | ||
|
|
e0e525d9ae | ||
|
|
12f4d6f872 | ||
|
|
0668e9bad9 | ||
|
|
06aed8491c | ||
|
|
df2d11e70d | ||
|
|
2dde8a5e90 | ||
|
|
674b13fb3f | ||
|
|
ab17c3693f | ||
|
|
a6c372de46 | ||
|
|
62497b9300 | ||
|
|
1461a3f8d7 | ||
|
|
686b31765d | ||
|
|
05e4e98e64 | ||
|
|
e95b60d527 | ||
|
|
59aba9f757 | ||
|
|
248e94dc4c | ||
|
|
a7d574cff0 | ||
|
|
ad05193916 | ||
|
|
b24b353b2d | ||
|
|
18e4a04dba | ||
|
|
30989761e2 | ||
|
|
b219ee9049 | ||
|
|
98c611e404 | ||
|
|
7a4ef32210 | ||
|
|
c3359cea1f | ||
|
|
f73a2d571f | ||
|
|
6dfb02c826 | ||
|
|
6c093fc81e | ||
|
|
911d35e800 | ||
|
|
084fdc0a65 | ||
|
|
1382fe9c6c | ||
|
|
b33242830e | ||
|
|
8c0ee33c4c | ||
|
|
e8cf4822b1 | ||
|
|
3462f02ce2 | ||
|
|
1a67b2146a | ||
|
|
eb0d18f484 | ||
|
|
c783fc0f59 | ||
|
|
31d02c1278 | ||
|
|
85f96bb248 | ||
|
|
229cf908b7 | ||
|
|
89b18275c0 | ||
|
|
b8a86baec7 | ||
|
|
8505e9203a | ||
|
|
5d95a503bf | ||
|
|
36c7f96a1e | ||
|
|
b40b606608 | ||
|
|
03764a624f | ||
|
|
962cfa9441 | ||
|
|
b2f30ab080 | ||
|
|
24c42ae2d9 | ||
|
|
af9353298c | ||
|
|
a3ecf0b0bd | ||
|
|
58cb6ab728 | ||
|
|
f478b3959c | ||
|
|
35ce680859 | ||
|
|
7df189ced4 | ||
|
|
c35092504c | ||
|
|
0bff6f7ad9 | ||
|
|
805f985144 | ||
|
|
12e578b93c | ||
|
|
1312952305 | ||
|
|
6118b94f9e | ||
|
|
520320535e | ||
|
|
262b5f1dc0 | ||
|
|
ac36162ddc | ||
|
|
9b813f4ae3 | ||
|
|
35d05b8653 | ||
|
|
e4d6b87e5d | ||
|
|
64b38e5a4a | ||
|
|
75957c84e3 | ||
|
|
c33fb2adbd | ||
|
|
97d3baba35 | ||
|
|
e91f9925f8 | ||
|
|
b484f7aef0 | ||
|
|
9a3904103a | ||
|
|
2a2d39b392 | ||
|
|
3005ba629f | ||
|
|
795741a341 | ||
|
|
da98465d4b | ||
|
|
d28e46796f | ||
|
|
43c6e321f5 | ||
|
|
4595c2feec | ||
|
|
8b4402c517 | ||
|
|
e08ae7e8fa | ||
|
|
753efd8c4a | ||
|
|
cb786f0320 | ||
|
|
6ff64cc984 | ||
|
|
475b816280 | ||
|
|
229005942f | ||
|
|
4af25d20fe | ||
|
|
6bf5b9a8e3 | ||
|
|
be769c28fa | ||
|
|
3128c48d5b | ||
|
|
5c7161fd2f | ||
|
|
e85790b84b | ||
|
|
980e2f67fd | ||
|
|
7781907f0e | ||
|
|
1d145dd48a | ||
|
|
1a1eb30e60 | ||
|
|
a7e2b98dc7 | ||
|
|
2bf74622a5 | ||
|
|
6bcaef9325 | ||
|
|
0b3aac3d91 | ||
|
|
9a53f0f853 | ||
|
|
a97df14064 | ||
|
|
9a0cd1157f | ||
|
|
16c41255d0 | ||
|
|
c2d1e5bd18 | ||
|
|
3c85ba3eb8 | ||
|
|
f3b67b158c | ||
|
|
8dac10ae36 | ||
|
|
6b81050283 | ||
|
|
b4beacfc43 | ||
|
|
1b607a8c4d | ||
|
|
4583c64ff7 | ||
|
|
a06a07d961 | ||
|
|
520a369872 | ||
|
|
1eaec773e2 | ||
|
|
3433a42e42 | ||
|
|
e01eac615d | ||
|
|
8116646dee | ||
|
|
7f7950cd6b | ||
|
|
2eb11ded52 | ||
|
|
bd64ad510b | ||
|
|
4e9b7e61a7 | ||
|
|
37b19495a8 | ||
|
|
c12b412e87 | ||
|
|
17f137f8be | ||
|
|
fcc627c65c | ||
|
|
5bb3d8e60d | ||
|
|
264086e0aa | ||
|
|
6013d7172a | ||
|
|
a7714b2725 | ||
|
|
f9dcac8cd0 | ||
|
|
2487322e47 | ||
|
|
c7e9c9542e | ||
|
|
c1bc1af302 | ||
|
|
739f9ec758 | ||
|
|
f70a140f42 | ||
|
|
a716e69dc0 | ||
|
|
0c6e1a4d56 | ||
|
|
faf36ecba6 | ||
|
|
49f2900e1f | ||
|
|
8bd522d283 | ||
|
|
e9034a1ba1 | ||
|
|
03feacd69a | ||
|
|
0c9f44d8a4 | ||
|
|
39fb64cdcd | ||
|
|
d531a7f1af | ||
|
|
bb7ff414ae | ||
|
|
215f112521 | ||
|
|
644766d965 | ||
|
|
1e1a555d3b | ||
|
|
c64ae2684d | ||
|
|
50ed04436d | ||
|
|
2fb9beca52 | ||
|
|
cd4c1e920e | ||
|
|
e846ac367a | ||
|
|
ef31c733ee | ||
|
|
724aa657f3 | ||
|
|
0284c35f4c | ||
|
|
6ce33de287 | ||
|
|
6ccfa011d4 | ||
|
|
c9078af45e | ||
|
|
6745428d0c | ||
|
|
925e874ada | ||
|
|
03f0f2f803 | ||
|
|
857360d6b2 | ||
|
|
2dd76c3f12 | ||
|
|
666de3a874 | ||
|
|
e0e9b64db6 | ||
|
|
2f521348c6 | ||
|
|
8ac2949a1f | ||
|
|
d0d5d991ce | ||
|
|
1fc2d7de3c | ||
|
|
2598e8d9b9 | ||
|
|
01f65e98e6 | ||
|
|
c5330cf166 | ||
|
|
b78796d0c1 | ||
|
|
da1e9db2c0 | ||
|
|
6beb6aa05b | ||
|
|
6ea7777a3a | ||
|
|
f97191e241 | ||
|
|
51420dade4 | ||
|
|
cc55c01197 | ||
|
|
86ce464ee3 | ||
|
|
0fa52a75ad | ||
|
|
c91e7dc3b0 | ||
|
|
88034b176c | ||
|
|
efeaff488c | ||
|
|
5df30f5bdd | ||
|
|
cf179c42b8 | ||
|
|
a615f8bf17 | ||
|
|
b38964e814 | ||
|
|
013c9eec58 | ||
|
|
ddbd6eddf7 | ||
|
|
982fd42683 | ||
|
|
90e28e7957 | ||
|
|
f4201f3947 | ||
|
|
7844b40243 | ||
|
|
d0839a3d55 | ||
|
|
876fd9ba9e | ||
|
|
e12717c108 | ||
|
|
af0b17bb7a | ||
|
|
6f595b7d87 | ||
|
|
59cbdc79f5 | ||
|
|
50ff3649b1 | ||
|
|
9ca9db8770 | ||
|
|
fa70f0e764 | ||
|
|
3eb629f133 | ||
|
|
c9aba6bbe1 | ||
|
|
0a26adae76 | ||
|
|
f0798f6510 | ||
|
|
245b03e208 | ||
|
|
4e31e5fdc2 | ||
|
|
750a74206c | ||
|
|
7e64dc2576 | ||
|
|
8a08e2fd97 | ||
|
|
d0a933cda8 | ||
|
|
d00845f56b | ||
|
|
3350e5ebb1 | ||
|
|
aeb4445cad | ||
|
|
73abae8cb9 | ||
|
|
7ecc7b76ba | ||
|
|
71d0bbbc25 | ||
|
|
26e691ba93 | ||
|
|
c7352d9e10 | ||
|
|
7b8f9a54ec | ||
|
|
28980af858 | ||
|
|
80dce398e0 | ||
|
|
06db8eec48 | ||
|
|
9c720efe46 | ||
|
|
cbf91a8d19 | ||
|
|
f99414708d | ||
|
|
9549a6b16a | ||
|
|
3206094545 | ||
|
|
5cfae80701 | ||
|
|
b4d140c6bb | ||
|
|
c65eb3c3ee | ||
|
|
eec0984dbe |
10
.github/CONTRIBUTING.md
vendored
10
.github/CONTRIBUTING.md
vendored
@@ -10,9 +10,9 @@ As a first step, please review these links as they'll help you understand how th
|
||||
|
||||
## Just Starting Out
|
||||
|
||||
* If you're unfamilar with git, check out this [brief introduction to Git](https://github.com/PCSX2/pcsx2/wiki/Git-survival-guide)
|
||||
* [How to build PCSX2 for Windows](https://github.com/PCSX2/pcsx2/wiki/Setting-up-the-PCSX2-repository-on-Windows-\(WIP---maybe-more-useful-as-a-manpage-instead%3F\))
|
||||
* [How to build PCSX2 for Linux](https://github.com/PCSX2/pcsx2/wiki/Installing-on-Linux)
|
||||
* If you're unfamilar with git, check out this [brief introduction to Git](https://github.com/PCSX2/pcsx2/wiki/07-Git-survival-guide)
|
||||
* [How to build PCSX2 for Windows](https://github.com/PCSX2/pcsx2/wiki/12-Building-on-Windows)
|
||||
* [How to build PCSX2 for Linux](https://github.com/PCSX2/pcsx2/wiki/10-Building-on-Linux)
|
||||
|
||||
## Issue Reporting
|
||||
|
||||
@@ -44,13 +44,11 @@ The following is a list of *general* style recommendations that will make review
|
||||
|
||||
## General Documentation And Coding Strategies
|
||||
|
||||
* [Commenting Etiquette](https://github.com/PCSX2/pcsx2/wiki/Commenting-Etiquette)
|
||||
* [Commenting Etiquette](https://github.com/PCSX2/pcsx2/wiki/06-Commenting-Etiquette)
|
||||
|
||||
* [Coding style](https://github.com/PCSX2/pcsx2/wiki/Code-Formatting-Guidelines)
|
||||
* [More comprehensive style-guide (Currently in Draft)](https://github.com/tadanokojin/pcsx2/blob/coding-guide/pcsx2/Docs/Coding_Guidelines.md)
|
||||
|
||||
## Tasks
|
||||
|
||||
* [Todo List](https://github.com/PCSX2/pcsx2/wiki/Contributing-\(TODO-List\))
|
||||
* [Issues](https://github.com/PCSX2/pcsx2/issues)
|
||||
* [A collection of ideas to improve GS OGL](https://github.com/PCSX2/pcsx2/wiki/Todo-List)
|
||||
|
||||
32
.github/ISSUE_TEMPLATE/app_bug_report.yaml
vendored
32
.github/ISSUE_TEMPLATE/app_bug_report.yaml
vendored
@@ -12,19 +12,24 @@ body:
|
||||
## Important: Read First
|
||||
|
||||
Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only
|
||||
If you need help configuring the emulator please make a request on our forums or contact us on discord
|
||||
If you need help configuring the emulator please make a request on our forums or contact us on discord.
|
||||
|
||||
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php)
|
||||
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php).
|
||||
|
||||
Please make an effort to make sure your issue isn't already reported
|
||||
Please make an effort to make sure your issue isn't already reported.
|
||||
|
||||
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
|
||||
|
||||
### Please Avoid Issues Pertaining to the Following:
|
||||
- We are **not** accepting bug reports for **PSX mode** at this time
|
||||
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use a [proper PSX emulator](https://emulation.gametechwiki.com/index.php/PlayStation_emulators)
|
||||
- We do **not** accept issues relating to **upscaling** at this time
|
||||
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling
|
||||
- Please try your game at native resolution before creating an issue
|
||||
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues
|
||||
- We are **not** accepting bug reports for **PSX mode** at this time.
|
||||
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest).
|
||||
- We do **not** accept issues relating to **upscaling** at this time.
|
||||
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling.
|
||||
- Please try your game at native resolution before creating an issue.
|
||||
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues.
|
||||
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time.
|
||||
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
|
||||
|
||||
- type: textarea
|
||||
id: desc
|
||||
attributes:
|
||||
@@ -76,3 +81,12 @@ body:
|
||||
placeholder: "Example: Arch"
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: logsDumps
|
||||
attributes:
|
||||
label: "Logs & Dumps"
|
||||
description: |
|
||||
Please feel free to attach any logs here.
|
||||
If PCSX2 crashed, please post crash logs and the .dmp file (in a zip file) if appropriate.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
41
.github/ISSUE_TEMPLATE/emu_bug_report.yaml
vendored
41
.github/ISSUE_TEMPLATE/emu_bug_report.yaml
vendored
@@ -12,19 +12,24 @@ body:
|
||||
## Important: Read First
|
||||
|
||||
Please do not make support requests on GitHub. Our issue tracker is for tracking bugs and feature requests only
|
||||
If you need help configuring the emulator please make a request on our forums or contact us on discord
|
||||
If you need help configuring the emulator please make a request on our forums or contact us on discord.
|
||||
|
||||
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php)
|
||||
If you are unsure, start with [discord](https://discord.com/invite/TCz3t9k) or the [forums](https://forums.pcsx2.net/index.php).
|
||||
|
||||
Please make an effort to make sure your issue isn't already reported
|
||||
Please make an effort to make sure your issue isn't already reported.
|
||||
|
||||
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
|
||||
|
||||
### Please Avoid Issues Pertaining to the Following:
|
||||
- We are **not** accepting bug reports for **PSX mode** at this time
|
||||
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use a [proper PSX emulator](https://emulation.gametechwiki.com/index.php/PlayStation_emulators)
|
||||
- We do **not** accept issues relating to **upscaling** at this time
|
||||
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling
|
||||
- Please try your game at native resolution before creating an issue
|
||||
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues
|
||||
- We are **not** accepting bug reports for **PSX mode** at this time.
|
||||
- If you are interested in helping contribute to PSX mode please do so on the forums. Otherwise our recommendation is that you use [Duckstation](https://github.com/stenzek/duckstation/releases/tag/latest).
|
||||
- We do **not** accept issues relating to **upscaling** at this time.
|
||||
- We are aware of the various problems with upscaling. The issue spans many games and having hundreds of issues for the same fundamental issues isn't particularly helpful. There are several workarounds for graphical problems that come as a result of upscaling.
|
||||
- Please try your game at native resolution before creating an issue.
|
||||
- If your bug is the result of upscaling please use the forums or discord for assistance with various upscaling workarounds. Additionally, the unofficial PCSX2 [Wiki](https://wiki.pcsx2.net/Main_Page) often lists various fixes for upscaling issues.
|
||||
- We do **not** accept issues relating to Widescreen/no-interlace patches at this time.
|
||||
- Any issues pertaining to Widescreen/no-interlace patches please forward them to the [patches repository](https://github.com/PCSX2/pcsx2_patches).
|
||||
|
||||
- type: textarea
|
||||
id: desc
|
||||
attributes:
|
||||
@@ -52,13 +57,13 @@ body:
|
||||
## System Info
|
||||
|
||||
Please make sure your system meets our requirements for OS version, CPU and GPU
|
||||
- [System Requirements](https://github.com/PCSX2/pcsx2#system-requirements)
|
||||
- [System Requirements](https://github.com/PCSX2/pcsx2#system-requirements).
|
||||
|
||||
Performance issues as a result of not meeting our hardware requirements are not valid
|
||||
Performance issues as a result of not meeting our hardware requirements are not valid.
|
||||
|
||||
Please read our known issues pages for AMD and Intel drivers.
|
||||
- [Intel Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-Intel-GPUs-All-you-need-to-know)
|
||||
- [AMD Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-AMD-GPUs---All-you-need-to-know)
|
||||
- [Intel Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-Intel-GPUs-All-you-need-to-know).
|
||||
- [AMD Drivers](https://github.com/PCSX2/pcsx2/wiki/OpenGL-and-AMD-GPUs---All-you-need-to-know).
|
||||
|
||||
We are **not** accepting issues related to the **libretro** core. The libretro core is being maintained separately at this time
|
||||
- type: input
|
||||
@@ -117,11 +122,11 @@ body:
|
||||
attributes:
|
||||
label: Emulation Settings
|
||||
description: |
|
||||
Any non-default core settings. If you don't want to list them out, please provide screenshots of your configuration window
|
||||
Any non-default core settings. If you don't want to list them out, please provide screenshots of your configuration window.
|
||||
|
||||
Please note that the safe preset works for most games. MTVU can have some compatibility issues so please disable it before making a report
|
||||
Please note that the safe preset works for most games. MTVU can have some compatibility issues so please disable it before making a report.
|
||||
|
||||
If you need to modify the settings manually because a game requires you to do so to work, please state that explicitly
|
||||
If you need to modify the settings manually because a game requires you to do so to work, please state that explicitly.
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
@@ -136,8 +141,8 @@ body:
|
||||
attributes:
|
||||
label: "Logs & Dumps"
|
||||
description: |
|
||||
Please feel free to attach any logs, block dumps, GSdump, etc here
|
||||
|
||||
Please feel free to attach any logs, block dumps, GSdump, etc here.
|
||||
If PCSX2 crashed, please post crash logs and the .dmp file (in a zip file) if appropriate.
|
||||
If your problem is graphical in nature it is highly recommended that you provide a GSdump. [GSdump Guide](https://forums.pcsx2.net/Thread-How-to-create-a-proper-GS-dump)
|
||||
validations:
|
||||
required: false
|
||||
|
||||
9
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
9
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@@ -6,6 +6,15 @@ labels: ["Enhancement / Feature Request"]
|
||||
# assignees:
|
||||
# - octocat
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Important: Read First
|
||||
|
||||
Please make an effort to make sure your issue isn't already reported.
|
||||
|
||||
Do not create issues involving software piracy of BIOS or ISO files, our rules specifically prohibit this and your issue will be closed.
|
||||
|
||||
- type: textarea
|
||||
id: desc
|
||||
attributes:
|
||||
|
||||
12
.github/labeler.yml
vendored
12
.github/labeler.yml
vendored
@@ -39,8 +39,8 @@
|
||||
'Debugger':
|
||||
- 'pcsx2/DebugTools/*'
|
||||
- 'pcsx2/DebugTools/**/*'
|
||||
- 'pcsx2/gui/Debugger/*'
|
||||
- 'pcsx2/gui/Debugger/**/*'
|
||||
- 'pcsx2-qt/Debugger/*'
|
||||
- 'pcsx2-qt/Debugger/**/*'
|
||||
'IPC':
|
||||
- 'pcsx2/IPC*'
|
||||
- 'pcsx2/**/IPC*'
|
||||
@@ -115,11 +115,11 @@
|
||||
- 'pcsx2/IPU/*'
|
||||
- 'pcsx2/IPU/**/*'
|
||||
'Memory Card':
|
||||
- 'pcsx2/gui/MemoryCard*'
|
||||
- 'pcsx2/gui/**/MemoryCard*'
|
||||
- 'pcsx2/SIO/Memcard/*'
|
||||
- 'pcsx2/SIO/Memcard/**/*'
|
||||
'PAD':
|
||||
- 'pcsx2/PAD/*'
|
||||
- 'pcsx2/PAD/**/*'
|
||||
- 'pcsx2/SIO/Pad/*'
|
||||
- 'pcsx2/SIO/Pad/**/*'
|
||||
'SPU2':
|
||||
- 'pcsx2/SPU2/*'
|
||||
- 'pcsx2/SPU2/**/*'
|
||||
|
||||
42
.github/workflows/cron_publish_flatpak.yml
vendored
Normal file
42
.github/workflows/cron_publish_flatpak.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: 📦 Publish Flathub Release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Every day at 12am UTC.
|
||||
workflow_dispatch: # As well as manually.
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Check if release is needed"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
PCSX2_RELEASE: ${{ steps.getinfo.outputs.PCSX2_RELEASE }}
|
||||
FLATHUB_RELEASE: ${{ steps.getinfo.outputs.FLATHUB_RELEASE }}
|
||||
steps:
|
||||
- name: Get latest tag and Flathub release
|
||||
id: getinfo
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
PCSX2_RELEASE=$(gh api -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' /repos/PCSX2/pcsx2/releases | jq -r '.[0].tag_name')
|
||||
FLATHUB_RELEASE=$(curl -L -s https://flathub.org/api/v2/appstream/net.pcsx2.PCSX2 | jq -r '.releases | max_by(.version) | .version')
|
||||
echo "Latest PCSX2 release is: '${PCSX2_RELEASE}'"
|
||||
echo "Latest Flathub release is: '${FLATHUB_RELEASE}'"
|
||||
echo "PCSX2_RELEASE=${PCSX2_RELEASE}" >> "$GITHUB_OUTPUT"
|
||||
echo "FLATHUB_RELEASE=${FLATHUB_RELEASE}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
build:
|
||||
needs: check
|
||||
if: needs.check.outputs.FLATHUB_RELEASE < needs.check.outputs.PCSX2_RELEASE
|
||||
name: "Build and publish Flatpak"
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Qt"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
publish: true
|
||||
branch: stable
|
||||
fetchTags: true
|
||||
secrets: inherit
|
||||
|
||||
28
.github/workflows/cron_update_base_translation.yml
vendored
Normal file
28
.github/workflows/cron_update_base_translation.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: 🌎 Update Base Translation
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Every day at 12am UTC.
|
||||
workflow_dispatch: # As well as manually.
|
||||
|
||||
jobs:
|
||||
update:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Update Base Translation"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Update Base Translation
|
||||
run: ./.github/workflows/scripts/common/update_base_translation.sh
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
title: "Qt: Update Base Translation"
|
||||
commit-message: "Qt: Update Base Translation"
|
||||
committer: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
|
||||
author: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
|
||||
body: "Daily update of base translation sources."
|
||||
branch: update-base-translation
|
||||
delete-branch: true
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get Latest DB and Prepare DB File
|
||||
run: |
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
mv ./game_controller_db.txt ${{github.workspace}}/bin/resources/game_controller_db.txt
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
title: "PAD: Update to latest controller database"
|
||||
commit-message: "PAD: Update to latest controller database."
|
||||
|
||||
24
.github/workflows/lint_gamedb.yml
vendored
24
.github/workflows/lint_gamedb.yml
vendored
@@ -2,8 +2,8 @@ name: 📝 Validate GameDB
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
branches-ignore:
|
||||
- "l10n_master"
|
||||
paths:
|
||||
- '**/GameIndex.yaml'
|
||||
pull_request:
|
||||
@@ -18,14 +18,26 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Packages
|
||||
run: |
|
||||
npm install -g ajv-cli prettier
|
||||
sudo apt-get -y install yamllint
|
||||
|
||||
- name: Validate YAML
|
||||
run: |
|
||||
yamllint -sd "{extends: relaxed, rules: {line-length: disable}}" ./bin/resources/GameIndex.yaml
|
||||
|
||||
- name: Validate Contents
|
||||
run: |
|
||||
npm install -g ajv-cli
|
||||
ajv validate -s ./pcsx2/Docs/gamedb-schema.json --spec=draft2020 -d ./bin/resources/GameIndex.yaml
|
||||
|
||||
- name: Check Formatting
|
||||
run: |
|
||||
npm install -g prettier
|
||||
prettier --check ./bin/resources/GameIndex.yaml
|
||||
if ! prettier --check bin/resources/GameIndex.yaml; then
|
||||
prettier --write bin/resources/GameIndex.yaml
|
||||
echo "Prettier failed, diff:"
|
||||
git diff bin/resources/GameIndex.yaml
|
||||
exit 1
|
||||
fi
|
||||
|
||||
133
.github/workflows/linux_build_flatpak.yml
vendored
Normal file
133
.github/workflows/linux_build_flatpak.yml
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
name: Flatpak Build Steps
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
jobName:
|
||||
required: true
|
||||
type: string
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
default: ubuntu-22.04
|
||||
platform:
|
||||
required: false
|
||||
type: string
|
||||
default: x64
|
||||
compiler:
|
||||
required: true
|
||||
type: string
|
||||
cmakeflags:
|
||||
required: true
|
||||
type: string
|
||||
branch:
|
||||
required: false
|
||||
type: string
|
||||
default: "stable"
|
||||
publish:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
patchesUrl:
|
||||
required: false
|
||||
type: string
|
||||
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
|
||||
fetchTags:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
name: ${{ inputs.jobName }}
|
||||
runs-on: ${{ inputs.os }}
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Hackity hack. When running the workflow on a schedule, we don't have the tag,
|
||||
# it doesn't fetch tags, therefore we don't get a version. So grab them manually.
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch tags
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: linux
|
||||
BUILD_SYSTEM: flatpak
|
||||
ARCH: ${{ inputs.platform }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
PR_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
run: ./.github/workflows/scripts/common/name-artifacts.sh
|
||||
|
||||
- name: Install Packages
|
||||
env:
|
||||
COMPILER: ${{ inputs.compiler }}
|
||||
run: .github/workflows/scripts/linux/install-packages-flatpak.sh
|
||||
|
||||
- name: Download patches
|
||||
run: |
|
||||
cd bin/resources
|
||||
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
|
||||
|
||||
- name: Generate AppStream XML
|
||||
run: |
|
||||
./.github/workflows/scripts/linux/generate-metainfo.sh .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
|
||||
cat .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
|
||||
flatpak run org.freedesktop.appstream-glib validate .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml
|
||||
|
||||
- name: Validate manifest
|
||||
run: |
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
|
||||
|
||||
- name: Build Flatpak
|
||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6.3
|
||||
with:
|
||||
bundle: ${{ steps.artifact-metadata.outputs.artifact-name }}.flatpak
|
||||
manifest-path: .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
|
||||
arch: x86_64
|
||||
build-bundle: true
|
||||
verbose: true
|
||||
mirror-screenshots-url: https://dl.flathub.org/repo/screenshots
|
||||
branch: ${{ inputs.branch }}
|
||||
cache: true
|
||||
restore-cache: true
|
||||
cache-key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} flatpak ${{ hashFiles('.github/workflows/scripts/linux/flatpak/**/*.json') }}
|
||||
|
||||
- name: Commit screenshots to OSTree
|
||||
run: |
|
||||
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
|
||||
|
||||
#- name: Validate build directory
|
||||
# run: |
|
||||
# flatpak run --command=flatpak-builder-lint org.flatpak.Builder builddir flatpak_app
|
||||
#
|
||||
#- name: Validate repo
|
||||
# run: |
|
||||
# flatpak run --command=flatpak-builder-lint org.flatpak.Builder repo repo
|
||||
|
||||
- name: Push to Flathub beta
|
||||
if: inputs.publish == true && inputs.branch == 'beta'
|
||||
uses: flatpak/flatpak-github-actions/flat-manager@v6.3
|
||||
with:
|
||||
flat-manager-url: https://hub.flathub.org/
|
||||
repository: beta
|
||||
token: ${{ secrets.FLATHUB_BETA_TOKEN }}
|
||||
|
||||
- name: Push to Flathub stable
|
||||
if: inputs.publish == true && inputs.branch == 'stable'
|
||||
uses: flatpak/flatpak-github-actions/flat-manager@v6.3
|
||||
with:
|
||||
flat-manager-url: https://hub.flathub.org/
|
||||
repository: stable
|
||||
token: ${{ secrets.FLATHUB_TOKEN }}
|
||||
|
||||
17
.github/workflows/linux_build_matrix.yml
vendored
17
.github/workflows/linux_build_matrix.yml
vendored
@@ -2,8 +2,8 @@ name: 🐧 Linux Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
branches-ignore:
|
||||
- "l10n_master"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -11,10 +11,21 @@ on:
|
||||
jobs:
|
||||
build_linux_qt:
|
||||
name: "AppImage"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/linux_build_qt.yml
|
||||
with:
|
||||
jobName: "Qt"
|
||||
jobName: "AppImage Build"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
buildAppImage: true
|
||||
secrets: inherit
|
||||
build_linux_flatpak:
|
||||
name: "Flatpak"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Flatpak Build"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
publish: false
|
||||
secrets: inherit
|
||||
|
||||
43
.github/workflows/linux_build_qt.yml
vendored
43
.github/workflows/linux_build_qt.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
default: ubuntu-20.04
|
||||
default: ubuntu-22.04
|
||||
platform:
|
||||
required: false
|
||||
type: string
|
||||
@@ -28,17 +28,21 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
cheats_url:
|
||||
patchesUrl:
|
||||
required: false
|
||||
type: string
|
||||
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
|
||||
fetchTags:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
name: ${{ inputs.jobName }}
|
||||
runs-on: ${{ inputs.os }}
|
||||
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
@@ -47,17 +51,29 @@ jobs:
|
||||
CCACHE_MAXSIZE: 100M
|
||||
|
||||
steps:
|
||||
# Work around https://github.com/actions/runner-images/issues/8659
|
||||
- name: Remove GCC 13 from runner image
|
||||
shell: bash
|
||||
run: |
|
||||
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.5 libc6-dev=2.35-0ubuntu3.5 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch Tags
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: linux
|
||||
GUI_FRAMEWORK: QT
|
||||
ARCH: ${{ inputs.platform }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
@@ -87,22 +103,25 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/deps
|
||||
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh') }}
|
||||
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh') }}
|
||||
|
||||
- name: Build Dependencies
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
run: .github/workflows/scripts/linux/build-dependencies-qt.sh
|
||||
|
||||
- name: Download cheats
|
||||
- name: Download patches
|
||||
run: |
|
||||
cd bin/resources
|
||||
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
|
||||
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
|
||||
|
||||
- name: Generate CMake
|
||||
env:
|
||||
COMPILER: ${{ inputs.compiler }}
|
||||
ADDITIONAL_CMAKE_ARGS: ${{ inputs.cmakeflags }}
|
||||
run: .github/workflows/scripts/linux/generate-cmake-qt.sh
|
||||
CLANG_PATH: /usr/bin/clang-17
|
||||
CLANGXX_PATH: /usr/bin/clang++-17
|
||||
run: |
|
||||
DEPS_PREFIX="$HOME/deps" .github/workflows/scripts/linux/generate-cmake-qt.sh
|
||||
|
||||
- name: Build PCSX2
|
||||
working-directory: build
|
||||
@@ -117,9 +136,9 @@ jobs:
|
||||
env:
|
||||
NAME: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
||||
run: |
|
||||
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$(realpath ./build)" "$HOME/deps" "$NAME"
|
||||
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
|
||||
mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
|
||||
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$(realpath ./build)" "$HOME/deps" "$NAME"
|
||||
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
|
||||
mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
|
||||
|
||||
- name: Upload artifact
|
||||
if: inputs.buildAppImage == true
|
||||
|
||||
55
.github/workflows/macos_build.yml
vendored
55
.github/workflows/macos_build.yml
vendored
@@ -9,18 +9,15 @@ on:
|
||||
os:
|
||||
required: false
|
||||
type: string
|
||||
default: macos-11.0
|
||||
platform:
|
||||
required: false
|
||||
type: string
|
||||
default: x64
|
||||
gui:
|
||||
required: true
|
||||
type: string
|
||||
cheats_url:
|
||||
default: macos-13
|
||||
patchesUrl:
|
||||
required: false
|
||||
type: string
|
||||
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
|
||||
fetchTags:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_macos:
|
||||
@@ -38,17 +35,23 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch Tags
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Use Xcode 14.3.1
|
||||
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: macos
|
||||
GUI_FRAMEWORK: ${{ inputs.gui }}
|
||||
ARCH: ${{ inputs.platform }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
PR_NUM: ${{ github.event.pull_request.number }}
|
||||
@@ -57,16 +60,14 @@ jobs:
|
||||
|
||||
- name: Install Packages
|
||||
env:
|
||||
PLATFORM: ${{ inputs.platform }}
|
||||
PLATFORM: "x64"
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
HOMEBREW_NO_ANALYTICS: 1
|
||||
run: |
|
||||
brew unlink libjpeg || true # Conflicts with our self-built dependencies
|
||||
brew unlink libpng || true
|
||||
# Unlike other packages, brew's MoltenVK build uses MoltenVK's minimum macOS version of 10.13 so we can use it
|
||||
if ! brew install molten-vk ccache; then
|
||||
if ! brew install molten-vk ccache nasm; then
|
||||
brew update
|
||||
brew install molten-vk ccache
|
||||
brew install molten-vk ccache nasm
|
||||
fi
|
||||
|
||||
- name: Cache Dependencies
|
||||
@@ -74,18 +75,16 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/deps
|
||||
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
|
||||
key: ${{ inputs.os }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
|
||||
|
||||
- name: Build Dependencies
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
GUI: ${{ inputs.gui }}
|
||||
run: .github/workflows/scripts/macos/build-dependencies.sh
|
||||
|
||||
- name: Download cheats
|
||||
- name: Download patches
|
||||
run: |
|
||||
cd bin/resources
|
||||
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
|
||||
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
|
||||
|
||||
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
|
||||
- name: Prepare ccache timestamp
|
||||
@@ -96,8 +95,8 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .ccache
|
||||
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
|
||||
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} ccache
|
||||
key: ${{ inputs.os }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
|
||||
restore-keys: ${{ inputs.os }} ccache
|
||||
|
||||
- name: Generate CMake Files
|
||||
run: |
|
||||
@@ -108,6 +107,7 @@ jobs:
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
|
||||
-DUSE_SYSTEM_LIBS=OFF \
|
||||
-DUSE_SYSTEM_SDL2=ON \
|
||||
-DUSE_LINKED_FFMPEG=ON \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
|
||||
@@ -130,7 +130,6 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Run Tests
|
||||
if: inputs.gui == 'Qt'
|
||||
working-directory: build
|
||||
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
|
||||
|
||||
@@ -144,12 +143,12 @@ jobs:
|
||||
APPNAME="PCSX2-$TAG"
|
||||
fi
|
||||
mv build/pcsx2*/PCSX2.app "$APPNAME.app"
|
||||
tar cvzf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" "$APPNAME.app"
|
||||
tar --options xz:compression-level=9 -cvJf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" "$APPNAME.app"
|
||||
mkdir ci-artifacts
|
||||
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" ci-artifacts/macOS-${{ inputs.gui }}.tar.gz
|
||||
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.xz" ci-artifacts/macOS.tar.xz
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
|
||||
path: "*.tar.gz"
|
||||
path: "*.tar.xz"
|
||||
|
||||
8
.github/workflows/macos_build_matrix.yml
vendored
8
.github/workflows/macos_build_matrix.yml
vendored
@@ -2,8 +2,8 @@ name: 🍎 MacOS Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
branches-ignore:
|
||||
- "l10n_master"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -11,8 +11,8 @@ on:
|
||||
jobs:
|
||||
build_macos_qt:
|
||||
name: "Defaults"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/macos_build.yml
|
||||
with:
|
||||
jobName: "Qt"
|
||||
gui: "Qt"
|
||||
jobName: "MacOS Build"
|
||||
secrets: inherit
|
||||
|
||||
24
.github/workflows/release_announce.yml
vendored
24
.github/workflows/release_announce.yml
vendored
@@ -1,24 +0,0 @@
|
||||
name: 📢 Announce Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
announce:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Announce Release
|
||||
env:
|
||||
DISCORD_BUILD_WEBHOOK: ${{ secrets.DISCORD_BUILD_WEBHOOK }}
|
||||
run: |
|
||||
cd ./.github/workflows/scripts/releases/announce-release
|
||||
npm ci
|
||||
node index.js
|
||||
201
.github/workflows/release_cut_new.yml
vendored
Normal file
201
.github/workflows/release_cut_new.yml
vendored
Normal file
@@ -0,0 +1,201 @@
|
||||
# Whenever a commit is pushed to master (ideally via a pull-request!)
|
||||
# this action will create the next release, which means:
|
||||
# 1. tag master with the proper version
|
||||
# 2. create a new draft release (pre-released if a nightly build)
|
||||
# 3. add release notes
|
||||
|
||||
name: 🏭 Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# TODO - future work
|
||||
# workflow_dispatch:
|
||||
# inputs:
|
||||
# isStable:
|
||||
# description: 'Should it be a stable release?'
|
||||
# required: true
|
||||
# default: 'false'
|
||||
# versionTag:
|
||||
# description: 'The version to tag with'
|
||||
# required: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
cut-release:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Create Tag and Release"
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
new_tag: ${{ steps.tag_version.outputs.new_tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Docs - https://github.com/mathieudutour/github-tag-action
|
||||
- name: Bump Version and Push Tag
|
||||
id: tag_version
|
||||
uses: mathieudutour/github-tag-action@v6.1
|
||||
with:
|
||||
github_token: ${{ github.token }}
|
||||
tag_prefix: v
|
||||
default_bump: patch
|
||||
|
||||
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
|
||||
# with PRs -- not commits (determine how much we care).
|
||||
# - name: Create Draft Release
|
||||
# run: |
|
||||
# echo "Creating release with tag - ${{ steps.tag_version.outputs.new_tag }}"
|
||||
# gh release create ${{ steps.tag_version.outputs.new_tag }} --draft --generate-notes -title ${{ steps.tag_version.outputs.new_tag }}
|
||||
|
||||
- name: Generate Release Notes
|
||||
env:
|
||||
OWNER: PCSX2
|
||||
REPO: pcsx2
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
COMMIT_SHA: ${{ github.SHA }}
|
||||
run: |
|
||||
cd ./.github/workflows/scripts/releases/generate-release-notes
|
||||
npm ci
|
||||
node index.js
|
||||
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
|
||||
|
||||
- name: Create a GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: steps.tag_version.outputs.new_tag
|
||||
with:
|
||||
body_path: ./release-notes.md
|
||||
draft: true
|
||||
prerelease: true
|
||||
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
|
||||
# Build Everything
|
||||
# Linux
|
||||
build_linux_qt:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
needs:
|
||||
- cut-release
|
||||
name: "Linux"
|
||||
uses: ./.github/workflows/linux_build_qt.yml
|
||||
with:
|
||||
jobName: "AppImage Build"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
buildAppImage: true
|
||||
fetchTags: true
|
||||
secrets: inherit
|
||||
|
||||
build_linux_flatpak:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
needs:
|
||||
- cut-release
|
||||
name: "Linux"
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Flatpak Build"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
branch: "stable"
|
||||
publish: false
|
||||
fetchTags: true
|
||||
secrets: inherit
|
||||
|
||||
# Windows
|
||||
build_windows_qt:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
needs:
|
||||
- cut-release
|
||||
name: "Windows"
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "Windows Build"
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
|
||||
fetchTags: true
|
||||
secrets: inherit
|
||||
|
||||
# MacOS
|
||||
build_macos_qt:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
needs:
|
||||
- cut-release
|
||||
name: "MacOS"
|
||||
uses: ./.github/workflows/macos_build.yml
|
||||
with:
|
||||
jobName: "MacOS Build"
|
||||
fetchTags: true
|
||||
secrets: inherit
|
||||
|
||||
# Upload the Artifacts
|
||||
upload_artifacts:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
needs:
|
||||
- cut-release
|
||||
- build_linux_flatpak
|
||||
- build_linux_qt
|
||||
- build_windows_qt
|
||||
- build_macos_qt
|
||||
name: "Upload Artifacts"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare Artifact Folder
|
||||
run: mkdir ./ci-artifacts/
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
name: Download all Artifacts
|
||||
with:
|
||||
path: ./ci-artifacts/
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls ./ci-artifacts/
|
||||
|
||||
# Prepare artifacts, they are all zips from github!
|
||||
- name: Prepare Artifacts
|
||||
working-directory: ./ci-artifacts/
|
||||
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
|
||||
|
||||
# Artifact Naming:
|
||||
# MacOS: PCSX2-<tag>-macOS-[additional hyphen seperated tags]
|
||||
# Windows|Linux: PCSX2-<tag>-<windows|linux>-<32bit|64bit>--[additional hyphen seperated tags]
|
||||
- name: Name and Upload the Release Assets
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
SCAN_DIR: ${{ github.WORKSPACE }}/ci-artifacts
|
||||
OUT_DIR: ${{ github.WORKSPACE }}/ci-artifacts/out
|
||||
run: |
|
||||
TAG_VAL=${{needs.cut-release.outputs.new_tag}}
|
||||
echo "TAG_VAL=${TAG_VAL}"
|
||||
gh release list --repo PCSX2/pcsx2
|
||||
mkdir -p ${{ github.WORKSPACE }}/ci-artifacts/out
|
||||
TAG_VAL=${TAG_VAL} python ./.github/workflows/scripts/releases/rename-release-assets.py
|
||||
ls ${{ github.WORKSPACE }}/ci-artifacts/out
|
||||
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/out/* --repo PCSX2/pcsx2 --clobber
|
||||
|
||||
- name: Publish Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
TAG_VAL=${{needs.cut-release.outputs.new_tag}}
|
||||
echo "TAG_VAL=${TAG_VAL}"
|
||||
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: Announce Release
|
||||
env:
|
||||
OWNER: PCSX2
|
||||
REPO: pcsx2
|
||||
DISCORD_BUILD_WEBHOOK: ${{ secrets.DISCORD_BUILD_WEBHOOK }}
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
TAG_VAL=${{needs.cut-release.outputs.new_tag}}
|
||||
cd ./.github/workflows/scripts/releases/announce-release
|
||||
npm ci
|
||||
TAG_VAL=${TAG_VAL} node index.js
|
||||
71
.github/workflows/release_new_tag.yml
vendored
71
.github/workflows/release_new_tag.yml
vendored
@@ -1,71 +0,0 @@
|
||||
# Whenever a commit is pushed to master (ideally via a pull-request!)
|
||||
# this action will create the next release, which means:
|
||||
# 1. tag master with the proper version
|
||||
# 2. create a new draft release (pre-released if a nightly build)
|
||||
# 3. add release notes
|
||||
|
||||
name: 🏭 Create Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# TODO - future work
|
||||
# workflow_dispatch:
|
||||
# inputs:
|
||||
# isStable:
|
||||
# description: 'Should it be a stable release?'
|
||||
# required: true
|
||||
# default: 'false'
|
||||
# versionTag:
|
||||
# description: 'The version to tag with'
|
||||
# required: true
|
||||
|
||||
jobs:
|
||||
cut-release:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
name: "Create Tag and Release"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Docs - https://github.com/mathieudutour/github-tag-action
|
||||
- name: Bump Version and Push Tag
|
||||
id: tag_version
|
||||
uses: mathieudutour/github-tag-action@v6.1
|
||||
with:
|
||||
# Workflows cannot trigger other workflows implicitly
|
||||
# - https://github.community/t/github-actions-workflow-not-triggering-with-tag-push/17053/7
|
||||
github_token: ${{ secrets.BOT_PAT }}
|
||||
tag_prefix: v
|
||||
default_bump: patch
|
||||
|
||||
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
|
||||
# with PRs -- not commits (determine how much we care).
|
||||
# - name: Create Draft Release
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
|
||||
# run: |
|
||||
# echo "Creating release with tag - ${{ steps.tag_version.outputs.new_tag }}"
|
||||
# gh release create ${{ steps.tag_version.outputs.new_tag }} --draft --generate-notes -title ${{ steps.tag_version.outputs.new_tag }}
|
||||
|
||||
- name: Generate Release Notes
|
||||
env:
|
||||
OWNER: PCSX2
|
||||
REPO: pcsx2
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COMMIT_SHA: ${{ github.SHA }}
|
||||
run: |
|
||||
cd ./.github/workflows/scripts/releases/generate-release-notes
|
||||
npm ci
|
||||
node index.js
|
||||
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
|
||||
|
||||
- name: Create a GitHub Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: steps.tag_version.outputs.new_tag
|
||||
with:
|
||||
body_path: ./release-notes.md
|
||||
draft: true
|
||||
prerelease: true
|
||||
tag_name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
115
.github/workflows/release_pipeline.yml
vendored
115
.github/workflows/release_pipeline.yml
vendored
@@ -1,115 +0,0 @@
|
||||
name: 🏭 Release Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
|
||||
jobs:
|
||||
# Build Everything
|
||||
# Linux
|
||||
build_linux_qt:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Linux"
|
||||
uses: ./.github/workflows/linux_build_qt.yml
|
||||
with:
|
||||
jobName: "Qt"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
buildAppImage: true
|
||||
secrets: inherit
|
||||
|
||||
# Windows
|
||||
build_windows_qt:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Windows"
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
secrets: inherit
|
||||
|
||||
build_qt_sse4:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Windows - SSE4"
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt
|
||||
configuration: Release
|
||||
simd: "SSE4"
|
||||
secrets: inherit
|
||||
|
||||
build_qt_avx2:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "Windows - AVX2"
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt
|
||||
configuration: Release AVX2
|
||||
secrets: inherit
|
||||
|
||||
# MacOS
|
||||
build_macos_qt:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
name: "MacOS"
|
||||
uses: ./.github/workflows/macos_build.yml
|
||||
with:
|
||||
jobName: "Qt"
|
||||
gui: "Qt"
|
||||
secrets: inherit
|
||||
|
||||
# Upload the Artifacts
|
||||
upload_artifacts:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
needs:
|
||||
- build_linux_qt
|
||||
- build_windows_qt
|
||||
- build_qt_sse4
|
||||
- build_qt_avx2
|
||||
- build_macos_qt
|
||||
name: "Upload Artifacts"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare Artifact Folder
|
||||
run: mkdir ./ci-artifacts/
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
name: Download all Artifacts
|
||||
with:
|
||||
path: ./ci-artifacts/
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls ./ci-artifacts/
|
||||
|
||||
# Prepare artifacts, they are all zips from github!
|
||||
- name: Prepare Artifacts
|
||||
working-directory: ./ci-artifacts/
|
||||
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
|
||||
|
||||
# Artifact Naming:
|
||||
# MacOS: PCSX2-<tag>-macOS-[additional hyphen seperated tags]
|
||||
# Windows|Linux: PCSX2-<tag>-<windows|linux>-<32bit|64bit>--[additional hyphen seperated tags]
|
||||
- name: Name and Upload the Release Assets
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
TAG: ${{ github.REF }}
|
||||
SCAN_DIR: ${{ github.WORKSPACE }}/ci-artifacts
|
||||
OUT_DIR: ${{ github.WORKSPACE }}/ci-artifacts/out
|
||||
run: |
|
||||
gh release list --repo PCSX2/pcsx2
|
||||
mkdir -p ${{ github.WORKSPACE }}/ci-artifacts/out
|
||||
python ./.github/workflows/scripts/releases/rename-release-assets.py
|
||||
ls ${{ github.WORKSPACE }}/ci-artifacts/out
|
||||
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
|
||||
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/out/* --repo PCSX2/pcsx2 --clobber
|
||||
|
||||
- name: Publish Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
|
||||
run: |
|
||||
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
|
||||
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Artifact Naming Scheme:
|
||||
# PCSX2-<OS>-<GUI>-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
|
||||
# PCSX2-<OS>-Qt-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
|
||||
# -- limited to 200 chars
|
||||
# Outputs:
|
||||
# - artifact-name
|
||||
@@ -9,7 +9,6 @@
|
||||
# Inputs as env-vars
|
||||
# OS
|
||||
# BUILD_SYSTEM
|
||||
# GUI_FRAMEWORK
|
||||
# ARCH
|
||||
# SIMD
|
||||
# EVENT_NAME
|
||||
@@ -20,17 +19,18 @@
|
||||
NAME=""
|
||||
|
||||
if [ "${OS}" == "macos" ]; then
|
||||
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}"
|
||||
# MacOS has combined binaries for x64 and ARM64.
|
||||
NAME="PCSX2-${OS}-Qt"
|
||||
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then
|
||||
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}-${SIMD}"
|
||||
NAME="PCSX2-${OS}-Qt-${ARCH}-${SIMD}"
|
||||
else
|
||||
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}"
|
||||
NAME="PCSX2-${OS}-Qt-${ARCH}"
|
||||
fi
|
||||
|
||||
# Add cmake if used to differentate it from msbuild builds
|
||||
# Else the two artifacts will have the same name and the files will be merged
|
||||
if [[ ! -z "${BUILD_SYSTEM}" ]]; then
|
||||
if [ "${BUILD_SYSTEM}" == "cmake" ]; then
|
||||
if [[ "${BUILD_SYSTEM}" == "cmake" ]] || [[ "${BUILD_SYSTEM}" == "flatpak" ]]; then
|
||||
NAME="${NAME}-${BUILD_SYSTEM}"
|
||||
fi
|
||||
fi
|
||||
|
||||
12
.github/workflows/scripts/common/update_base_translation.sh
vendored
Executable file
12
.github/workflows/scripts/common/update_base_translation.sh
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
source "$SCRIPTDIR/../linux/functions.sh"
|
||||
|
||||
set -e
|
||||
|
||||
# While we use custom Qt builds for our releases, the Qt6 package will be good enough
|
||||
# for just updating translations. Saves building it for this action alone.
|
||||
retry_command sudo apt-get -y install qt6-l10n-tools
|
||||
|
||||
PATH=/usr/lib/qt6/bin:$PATH "$SCRIPTDIR/../../../../pcsx2-qt/Translations/update_en_translation.sh"
|
||||
4
.github/workflows/scripts/linux/AppRun-qt
vendored
4
.github/workflows/scripts/linux/AppRun-qt
vendored
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
APPDIR=$(dirname "$0")
|
||||
exec "$APPDIR/usr/bin/pcsx2-qt" "$@"
|
||||
324
.github/workflows/scripts/linux/appimage-qt.sh
vendored
324
.github/workflows/scripts/linux/appimage-qt.sh
vendored
@@ -40,251 +40,127 @@ NAME=$4
|
||||
|
||||
BINARY=pcsx2-qt
|
||||
APPDIRNAME=PCSX2.AppDir
|
||||
STRIP=llvm-strip-12
|
||||
STRIP=strip
|
||||
|
||||
declare -a SYSLIBS=(
|
||||
"libaio.so.1"
|
||||
"libz.so.1"
|
||||
"libuuid.so.1"
|
||||
"libapparmor.so.1"
|
||||
"libblkid.so.1"
|
||||
"libbsd.so.0"
|
||||
"libdbus-1.so.3"
|
||||
"libgcrypt.so.20"
|
||||
"liblzma.so.5"
|
||||
"libmount.so.1"
|
||||
"libnsl.so.1"
|
||||
"libpcre.so.3"
|
||||
"libselinux.so.1"
|
||||
"libsystemd.so.0"
|
||||
"libudev.so.1"
|
||||
"libwrap.so.0"
|
||||
"libharfbuzz.so.0"
|
||||
"libFLAC.so.8"
|
||||
"libSoundTouch.so.1"
|
||||
"libXau.so.6"
|
||||
"libXcomposite.so.1"
|
||||
"libXcursor.so.1"
|
||||
"libXdamage.so.1"
|
||||
"libXdmcp.so.6"
|
||||
"libXext.so.6"
|
||||
"libXfixes.so.3"
|
||||
"libXi.so.6"
|
||||
"libXinerama.so.1"
|
||||
"libXrandr.so.2"
|
||||
"libXrender.so.1"
|
||||
"libXxf86vm.so.1"
|
||||
"libasyncns.so.0"
|
||||
"libcrypto.so.1.1"
|
||||
"libjpeg.so.8"
|
||||
"liblz4.so.1"
|
||||
"libogg.so.0"
|
||||
"libpcap.so.0.8"
|
||||
"libpng16.so.16"
|
||||
"libpulse.so.0"
|
||||
"libsamplerate.so.0"
|
||||
"libsndfile.so.1"
|
||||
"libvorbis.so.0"
|
||||
"libvorbisenc.so.2"
|
||||
"libxcb.so.1"
|
||||
"libxcb-render.so.0"
|
||||
"libxcb-shm.so.0"
|
||||
"libxkbcommon.so.0"
|
||||
"libxkbcommon-x11.so.0"
|
||||
"pulseaudio/libpulsecommon-13.99.so"
|
||||
"libasound.so.2"
|
||||
"libfreetype.so.6"
|
||||
"libpcre2-16.so.0"
|
||||
"libexpat.so.1"
|
||||
"libffi.so.7"
|
||||
"libgraphite2.so.3"
|
||||
"libresolv.so.2"
|
||||
"libgpg-error.so.0"
|
||||
"libpcre2-16.so.0"
|
||||
"libpng16.so.16"
|
||||
"libxcb-icccm.so.4"
|
||||
"libxcb-image.so.0"
|
||||
"libxcb-keysyms.so.1"
|
||||
"libxcb-randr.so.0"
|
||||
"libxcb-render.so.0"
|
||||
"libxcb-render-util.so.0"
|
||||
"libxcb-shape.so.0"
|
||||
"libxcb-sync.so.1"
|
||||
"libxcb-util.so.1"
|
||||
"libxcb-xfixes.so.0"
|
||||
"libxcb-xkb.so.1"
|
||||
"libevdev.so.2"
|
||||
"libgudev-1.0.so.0"
|
||||
"libinput.so.10"
|
||||
"libjpeg.so.8"
|
||||
"libmtdev.so.1"
|
||||
"libpng16.so.16"
|
||||
"libudev.so.1"
|
||||
"libuuid.so.1"
|
||||
"libcurl.so.4"
|
||||
"libnghttp2.so.14"
|
||||
"libidn2.so.0"
|
||||
"librtmp.so.1"
|
||||
"libssh.so.4"
|
||||
"libpsl.so.5"
|
||||
"libssl.so.1.1"
|
||||
"libnettle.so.7"
|
||||
"libgnutls.so.30"
|
||||
"libgssapi_krb5.so.2"
|
||||
"libldap_r-2.4.so.2"
|
||||
"liblber-2.4.so.2"
|
||||
"libbrotlidec.so.1"
|
||||
"libunistring.so.2"
|
||||
"libhogweed.so.5"
|
||||
"libgmp.so.10"
|
||||
"libp11-kit.so.0"
|
||||
"libtasn1.so.6"
|
||||
"libkrb5.so.3"
|
||||
"libk5crypto.so.3"
|
||||
"libcom_err.so.2"
|
||||
"libkrb5support.so.0"
|
||||
"libsasl2.so.2"
|
||||
"libgssapi.so.3"
|
||||
"libbrotlicommon.so.1"
|
||||
"libkeyutils.so.1"
|
||||
"libheimntlm.so.0"
|
||||
"libkrb5.so.26"
|
||||
"libasn1.so.8"
|
||||
"libhcrypto.so.4"
|
||||
"libroken.so.18"
|
||||
"libwind.so.0"
|
||||
"libheimbase.so.1"
|
||||
"libhx509.so.5"
|
||||
"libsqlite3.so.0"
|
||||
"libcrypt.so.1"
|
||||
)
|
||||
|
||||
declare -a DEPLIBS=(
|
||||
"libSDL2-2.0.so.0"
|
||||
)
|
||||
|
||||
declare -a QTLIBS=(
|
||||
"libQt6Core.so.6"
|
||||
"libQt6Gui.so.6"
|
||||
"libQt6Network.so.6"
|
||||
"libQt6OpenGL.so.6"
|
||||
"libQt6Svg.so.6"
|
||||
"libQt6WaylandClient.so.6"
|
||||
"libQt6WaylandCompositor.so.6"
|
||||
declare -a MANUAL_QT_LIBS=(
|
||||
"libQt6WaylandEglClientHwIntegration.so.6"
|
||||
"libQt6WaylandEglCompositorHwIntegration.so.6"
|
||||
"libQt6Widgets.so.6"
|
||||
"libQt6XcbQpa.so.6"
|
||||
)
|
||||
|
||||
declare -a QTPLUGINS=(
|
||||
"plugins/iconengines"
|
||||
"plugins/imageformats"
|
||||
"plugins/platforms"
|
||||
#"plugins/platformthemes" # Enable this if we want to ship GTK+ themes at any point.
|
||||
"plugins/tls"
|
||||
"plugins/wayland-decoration-client"
|
||||
"plugins/wayland-graphics-integration-client"
|
||||
"plugins/wayland-graphics-integration-server"
|
||||
"plugins/wayland-shell-integration"
|
||||
"plugins/xcbglintegrations"
|
||||
declare -a MANUAL_QT_PLUGINS=(
|
||||
"wayland-decoration-client"
|
||||
"wayland-graphics-integration-client"
|
||||
"wayland-shell-integration"
|
||||
)
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -f appimagetool-x86_64.AppImage ]; then
|
||||
retry_command wget -O appimagetool-x86_64.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x appimagetool-x86_64.AppImage
|
||||
LINUXDEPLOY=./linuxdeploy-x86_64.AppImage
|
||||
LINUXDEPLOY_PLUGIN_QT=./linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
APPIMAGETOOL=./appimagetool-x86_64.AppImage
|
||||
PATCHELF=patchelf
|
||||
|
||||
if [ ! -f "$LINUXDEPLOY" ]; then
|
||||
retry_command wget -O "$LINUXDEPLOY" https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
|
||||
chmod +x "$LINUXDEPLOY"
|
||||
fi
|
||||
|
||||
if [ ! -f "$LINUXDEPLOY_PLUGIN_QT" ]; then
|
||||
retry_command wget -O "$LINUXDEPLOY_PLUGIN_QT" https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
|
||||
chmod +x "$LINUXDEPLOY_PLUGIN_QT"
|
||||
fi
|
||||
|
||||
if [ ! -f "$APPIMAGETOOL" ]; then
|
||||
retry_command wget -O "$APPIMAGETOOL" https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
|
||||
chmod +x "$APPIMAGETOOL"
|
||||
fi
|
||||
|
||||
OUTDIR=$(realpath "./$APPDIRNAME")
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
rm -fr "$OUTDIR"
|
||||
mkdir "$OUTDIR"
|
||||
mkdir "$OUTDIR/usr"
|
||||
|
||||
echo "Copying binary and resources..."
|
||||
cp -a "$BUILDDIR/bin" "$OUTDIR/usr"
|
||||
# Why the nastyness? linuxdeploy strips our main binary, and there's no option to turn it off.
|
||||
# It also doesn't strip the Qt libs. We can't strip them after running linuxdeploy, because
|
||||
# patchelf corrupts the libraries (but they still work), but patchelf+strip makes them crash
|
||||
# on load. So, make a backup copy, strip the original (since that's where linuxdeploy finds
|
||||
# the libs to copy), then swap them back after we're done.
|
||||
# Isn't Linux packaging amazing?
|
||||
|
||||
# Patch RPATH so the binary goes hunting for shared libraries in the AppDir instead of system.
|
||||
echo "Patching RPATH in ${BINARY}..."
|
||||
patchelf --set-rpath '$ORIGIN/../lib' "$OUTDIR/usr/bin/$BINARY"
|
||||
|
||||
# Currently we leave the main binary unstripped, uncomment if this is not desired.
|
||||
#$STRIP "$OUTDIR/usr/bin/$BINARY"
|
||||
|
||||
# Libraries we pull in from the system.
|
||||
echo "Copying system libraries..."
|
||||
mkdir -p "$OUTDIR/usr/lib" "$OUTDIR/usr/lib/pulseaudio"
|
||||
for lib in "${SYSLIBS[@]}"; do
|
||||
blib=$(basename "$lib")
|
||||
if [ -f "/lib/x86_64-linux-gnu/$lib" ]; then
|
||||
cp "/lib/x86_64-linux-gnu/$lib" "$OUTDIR/usr/lib/$blib"
|
||||
elif [ -f "$CHROOT/usr/lib/x86_64-linux-gnu/$lib" ]; then
|
||||
cp "$CHROOT/usr/lib/x86_64-linux-gnu/$lib" "$OUTDIR/usr/lib/$blib"
|
||||
elif [ -f "$CHROOT/lib/$lib" ]; then
|
||||
cp "$CHROOT/lib/$lib" "$OUTDIR/usr/lib/$blib"
|
||||
elif [ -f "$CHROOT/usr/lib/$lib" ]; then
|
||||
cp "$CHROOT/usr/lib/$lib" "$OUTDIR/usr/lib/$blib"
|
||||
else
|
||||
echo "*** Failed to find '$blib'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$STRIP "$OUTDIR/usr/lib/$blib"
|
||||
rm -fr "$DEPSDIR.bak"
|
||||
cp -a "$DEPSDIR" "$DEPSDIR.bak"
|
||||
IFS="
|
||||
"
|
||||
for i in $(find "$DEPSDIR" -iname '*.so'); do
|
||||
echo "Stripping deps library ${i}"
|
||||
strip "$i"
|
||||
done
|
||||
|
||||
# Dependencies we built, at this point it's just SDL.
|
||||
echo "Copying dependency libraries..."
|
||||
for lib in "${DEPLIBS[@]}"; do
|
||||
blib=$(basename "$lib")
|
||||
if [ -f "$DEPSDIR/lib/$lib" ]; then
|
||||
cp "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib/$blib"
|
||||
else
|
||||
echo "*** Failed to find '$blib'"
|
||||
exit 1
|
||||
fi
|
||||
echo "Copying desktop file..."
|
||||
cp "$PCSX2DIR/.github/workflows/scripts/linux/pcsx2-qt.desktop" "net.pcsx2.PCSX2.desktop"
|
||||
cp "$PCSX2DIR/bin/resources/icons/AppIconLarge.png" "PCSX2.png"
|
||||
|
||||
$STRIP "$OUTDIR/usr/lib/$blib"
|
||||
echo "Running linuxdeploy to create AppDir..."
|
||||
EXTRA_QT_PLUGINS="core;gui;network;svg;waylandclient;widgets;xcbqpa" \
|
||||
EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" \
|
||||
QMAKE="$DEPSDIR/bin/qmake" \
|
||||
NO_STRIP="1" \
|
||||
$LINUXDEPLOY --plugin qt --appdir="$OUTDIR" --executable="$BUILDDIR/bin/pcsx2-qt" \
|
||||
--desktop-file="net.pcsx2.PCSX2.desktop" --icon-file="PCSX2.png"
|
||||
|
||||
echo "Copying resources into AppDir..."
|
||||
cp -a "$BUILDDIR/bin/resources" "$OUTDIR/usr/bin"
|
||||
|
||||
# LinuxDeploy's Qt plugin doesn't include Wayland support. So manually copy in the additional Wayland libraries.
|
||||
echo "Copying Qt Wayland libraries..."
|
||||
for lib in "${MANUAL_QT_LIBS[@]}"; do
|
||||
srcpath="$DEPSDIR/lib/$lib"
|
||||
dstpath="$OUTDIR/usr/lib/$lib"
|
||||
echo " $srcpath -> $dstpath"
|
||||
cp "$srcpath" "$dstpath"
|
||||
$PATCHELF --set-rpath '$ORIGIN' "$dstpath"
|
||||
done
|
||||
|
||||
echo "Copying Qt libraries..."
|
||||
for lib in "${QTLIBS[@]}"; do
|
||||
cp -aL "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib"
|
||||
$STRIP "$OUTDIR/usr/lib/$lib"
|
||||
# .. and plugins.
|
||||
echo "Copying Qt Wayland plugins..."
|
||||
for GROUP in "${MANUAL_QT_PLUGINS[@]}"; do
|
||||
srcpath="$DEPSDIR/plugins/$GROUP"
|
||||
dstpath="$OUTDIR/usr/plugins/$GROUP"
|
||||
echo " $srcpath -> $dstpath"
|
||||
mkdir -p "$dstpath"
|
||||
|
||||
for srcsopath in $(find "$DEPSDIR/plugins/$GROUP" -iname '*.so'); do
|
||||
# This is ../../ because it's usually plugins/group/name.so
|
||||
soname=$(basename "$srcsopath")
|
||||
dstsopath="$dstpath/$soname"
|
||||
echo " $srcsopath -> $dstsopath"
|
||||
cp "$srcsopath" "$dstsopath"
|
||||
$PATCHELF --set-rpath '$ORIGIN/../../lib:$ORIGIN' "$dstsopath"
|
||||
done
|
||||
done
|
||||
|
||||
echo "Copying Qt plugins..."
|
||||
mkdir -p "$OUTDIR/usr/lib/plugins"
|
||||
for plugin in "${QTPLUGINS[@]}"; do
|
||||
mkdir -p "$OUTDIR/usr/lib/$plugin"
|
||||
cp -aL "$DEPSDIR/$plugin"/*.so "$OUTDIR/usr/lib/$plugin/"
|
||||
# Restore unstripped deps (for cache).
|
||||
rm -fr "$DEPSDIR"
|
||||
mv "$DEPSDIR.bak" "$DEPSDIR"
|
||||
|
||||
# Fix up translations.
|
||||
rm -fr "$OUTDIR/usr/bin/translations" "$OUTDIR/usr/translations"
|
||||
cp -a "$BUILDDIR/bin/translations" "$OUTDIR/usr/bin"
|
||||
|
||||
# Generate AppStream meta-info.
|
||||
echo "Generating AppStream metainfo..."
|
||||
mkdir -p "$OUTDIR/usr/share/metainfo"
|
||||
"$SCRIPTDIR/generate-metainfo.sh" "$OUTDIR/usr/share/metainfo/net.pcsx2.PCSX2.appdata.xml"
|
||||
|
||||
# Copy in AppRun hooks.
|
||||
# Unfortunately linuxdeploy is a bit lame and doesn't let us provide our own AppRun hooks, instead
|
||||
# they have to come from plugins.. and screw writing one of those just to disable Wayland.
|
||||
echo "Copying AppRun hooks..."
|
||||
mkdir -p "$OUTDIR/apprun-hooks"
|
||||
for hookpath in "$SCRIPTDIR/apprun-hooks"/*; do
|
||||
hookname=$(basename "$hookpath")
|
||||
cp -v "$hookpath" "$OUTDIR/apprun-hooks/$hookname"
|
||||
sed -i -e 's/exec /source "$this_dir"\/apprun-hooks\/"'"$hookname"'"\nexec /' "$OUTDIR/AppRun"
|
||||
done
|
||||
|
||||
for so in $(find "$OUTDIR/usr/lib/plugins" -iname '*.so'); do
|
||||
# This is ../../ because it's usually plugins/group/name.so
|
||||
echo "Patching RPATH in ${so}..."
|
||||
patchelf --set-rpath '$ORIGIN/../..' "$so"
|
||||
$STRIP "$so"
|
||||
done
|
||||
echo "Generating AppImage..."
|
||||
rm -f "$NAME.AppImage"
|
||||
$APPIMAGETOOL -v "$OUTDIR" "$NAME.AppImage"
|
||||
|
||||
for so in $(find "$OUTDIR/usr/lib" -maxdepth 1); do
|
||||
if [ -f "$so" ]; then
|
||||
echo "Patching RPATH in ${so}"
|
||||
patchelf --set-rpath '$ORIGIN' "$so"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Creating qt.conf..."
|
||||
cat > "$OUTDIR/usr/bin/qt.conf" << EOF
|
||||
[Paths]
|
||||
Plugins = ../lib/plugins
|
||||
EOF
|
||||
|
||||
echo "Copy desktop/icon..."
|
||||
cp "$PCSX2DIR/pcsx2/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
|
||||
cp "$SCRIPTDIR/pcsx2-qt.desktop" "$OUTDIR/PCSX2.desktop"
|
||||
cp "$SCRIPTDIR/AppRun-qt" "$OUTDIR/AppRun"
|
||||
|
||||
echo "Generate AppImage"
|
||||
./appimagetool-x86_64.AppImage -v "$OUTDIR" "$NAME.AppImage"
|
||||
|
||||
9
.github/workflows/scripts/linux/apprun-hooks/default-to-x11.sh
vendored
Normal file
9
.github/workflows/scripts/linux/apprun-hooks/default-to-x11.sh
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
if [[ -z "$I_WANT_A_BROKEN_WAYLAND_UI" ]]; then
|
||||
echo "Forcing X11 instead of Wayland, due to various protocol limitations"
|
||||
echo "and Qt issues. If you want to use Wayland, launch PCSX2 with"
|
||||
echo "I_WANT_A_BROKEN_WAYLAND_UI=YES set."
|
||||
export QT_QPA_PLATFORM=xcb
|
||||
else
|
||||
echo "Wayland is not being disabled. Do not complain when things break."
|
||||
fi
|
||||
|
||||
@@ -4,24 +4,29 @@ set -e
|
||||
|
||||
INSTALLDIR="$HOME/deps"
|
||||
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
||||
SDL=SDL2-2.26.0
|
||||
QT=6.3.1
|
||||
SDL=SDL2-2.28.5
|
||||
QT=6.6.1
|
||||
LIBBACKTRACE=ad106d5fdd5d960bd33fae1c48a351af567fd075
|
||||
|
||||
mkdir -p deps-build
|
||||
cd deps-build
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
|
||||
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
|
||||
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
|
||||
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
|
||||
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
|
||||
6f14fea2d172a5b4170be3efcb0e58535f6605b61bcd823f6d5c9d165bb8c0f0 qtwayland-everywhere-src-$QT.tar.xz
|
||||
332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4 $SDL.tar.gz
|
||||
fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.zip
|
||||
450c5b4677b2fe40ed07954d7f0f40690068e80a94c9df86c2c905ccd59d02f7 qtbase-everywhere-src-$QT.tar.xz
|
||||
ac4ed08950072e375be662cfa64fdb447dd6e935cf29c56a4128d1500492188f qtimageformats-everywhere-src-$QT.tar.xz
|
||||
248deb56d26a463cf3162f530358ccf90cfb654bbf518bb35ddf81b205e09228 qtsvg-everywhere-src-$QT.tar.xz
|
||||
4939105a7345ab4e19e7caee8654a836e65bd41910359623e0f233f3aff0914a qttools-everywhere-src-$QT.tar.xz
|
||||
668702e822ad7150b27e7caa2158595fd9b3b77ffbc8262e6509872a3920ee88 qttranslations-everywhere-src-$QT.tar.xz
|
||||
66cc2d632dc07fc6cc4e35247f48b7c1753276ccbf86e86d7b24d799725568b1 qtwayland-everywhere-src-$QT.tar.xz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
-O "https://libsdl.org/release/$SDL.tar.gz" \
|
||||
-O "https://github.com/ianlancetaylor/libbacktrace/archive/$LIBBACKTRACE.zip" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
||||
@@ -32,11 +37,19 @@ shasum -a 256 --check SHASUMS
|
||||
echo "Building SDL..."
|
||||
tar xf "$SDL.tar.gz"
|
||||
cd "$SDL"
|
||||
./configure --prefix "$INSTALLDIR" --disable-dbus --without-x --disable-video-opengl --disable-video-opengles --disable-video-vulkan --disable-wayland-shared --disable-ime --disable-oss --disable-alsa --disable-jack --disable-esd --disable-pipewire --disable-pulseaudio --disable-arts --disable-nas --disable-sndio --disable-fusionsound --disable-diskaudio
|
||||
./configure --prefix "$INSTALLDIR" --enable-dbus --without-x --disable-video-opengl --disable-video-opengles --disable-video-vulkan --disable-wayland-shared --disable-ime --disable-oss --disable-alsa --disable-jack --disable-esd --disable-pipewire --disable-pulseaudio --disable-arts --disable-nas --disable-sndio --disable-fusionsound --disable-diskaudio
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "Building libbacktrace..."
|
||||
unzip "$LIBBACKTRACE.zip"
|
||||
cd "libbacktrace-$LIBBACKTRACE"
|
||||
./configure --prefix="$HOME/deps"
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
# Couple notes:
|
||||
# -fontconfig is needed otherwise Qt Widgets render only boxes.
|
||||
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
|
||||
@@ -47,7 +60,7 @@ tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
mkdir build
|
||||
cd build
|
||||
../configure -prefix "$INSTALLDIR" -release -no-dbus -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -- -DFEATURE_dbus=OFF -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF
|
||||
../configure -prefix "$INSTALLDIR" -release -dbus-linked -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -- -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
cd ../../
|
||||
@@ -62,22 +75,19 @@ cmake --build . --parallel
|
||||
cmake --install .
|
||||
cd ../../
|
||||
|
||||
echo "Building Qt Image Formats..."
|
||||
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
||||
cd "qtimageformats-everywhere-src-$QT"
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
cd ../../
|
||||
|
||||
echo "Building Qt Wayland..."
|
||||
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
|
||||
cd "qtwayland-everywhere-src-$QT"
|
||||
# qtwayland does not build without qml/qtdeclarative in 6.3.1. Work around it.
|
||||
patch -u src/compositor/CMakeLists.txt <<EOF
|
||||
--- src/compositor/CMakeLists.txt 2022-06-08 13:44:30.000000000 +1000
|
||||
+++ src/compositor/CMakeLists.txt 2022-07-17 20:05:25.461881785 +1000
|
||||
@@ -46,7 +46,6 @@
|
||||
global/qtwaylandcompositorglobal.h
|
||||
global/qtwaylandqmlinclude.h
|
||||
global/qwaylandcompositorextension.cpp global/qwaylandcompositorextension.h global/qwaylandcompositorextension_p.h
|
||||
- global/qwaylandquickextension.cpp global/qwaylandquickextension.h
|
||||
global/qwaylandutils_p.h
|
||||
hardware_integration/qwlclientbufferintegration.cpp hardware_integration/qwlclientbufferintegration_p.h
|
||||
wayland_wrapper/qwlbuffermanager.cpp wayland_wrapper/qwlbuffermanager_p.h
|
||||
EOF
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
|
||||
@@ -103,6 +113,30 @@ patch -u src/linguist/CMakeLists.txt <<EOF
|
||||
add_subdirectory(linguist)
|
||||
endif()
|
||||
EOF
|
||||
|
||||
# Also force disable clang scanning, it gets very confused.
|
||||
patch -u configure.cmake <<EOF
|
||||
--- configure.cmake
|
||||
+++ configure.cmake
|
||||
@@ -14,12 +14,12 @@
|
||||
# Presumably because 6.0 ClangConfig.cmake files are not good enough?
|
||||
# In any case explicitly request a minimum version of 8.x for now, otherwise
|
||||
# building with CMake will fail at compilation time.
|
||||
-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
|
||||
+#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
|
||||
# special case end
|
||||
|
||||
-if(TARGET WrapLibClang::WrapLibClang)
|
||||
- set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
||||
-endif()
|
||||
+#if(TARGET WrapLibClang::WrapLibClang)
|
||||
+# set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
||||
+#endif()
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF ..
|
||||
|
||||
24
.github/workflows/scripts/linux/flatpak/modules/10-libpcap.json
vendored
Normal file
24
.github/workflows/scripts/linux/flatpak/modules/10-libpcap.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "libpcap",
|
||||
"buildsystem": "cmake-ninja",
|
||||
"build-options": {
|
||||
"strip": true
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/the-tcpdump-group/libpcap.git",
|
||||
"tag": "libpcap-1.10.4",
|
||||
"commit": "104271ba4a14de6743e43bcf87536786d8fddea4"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"/bin",
|
||||
"/include",
|
||||
"/lib/*.a",
|
||||
"/lib/*.la",
|
||||
"/lib/pkgconfig",
|
||||
"/share/man"
|
||||
]
|
||||
}
|
||||
|
||||
24
.github/workflows/scripts/linux/flatpak/modules/11-libaio.json
vendored
Normal file
24
.github/workflows/scripts/linux/flatpak/modules/11-libaio.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "libaio",
|
||||
"no-autogen": true,
|
||||
"make-install-args": [
|
||||
"prefix=/app"
|
||||
],
|
||||
"build-options": {
|
||||
"strip": true
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://pagure.io/libaio.git",
|
||||
"tag": "libaio-0.3.113",
|
||||
"commit": "1b18bfafc6a2f7b9fa2c6be77a95afed8b7be448"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
"/lib/*.a",
|
||||
"/lib/*.la"
|
||||
]
|
||||
}
|
||||
|
||||
45
.github/workflows/scripts/linux/flatpak/modules/20-sdl2.json
vendored
Normal file
45
.github/workflows/scripts/linux/flatpak/modules/20-sdl2.json
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "sdl2",
|
||||
"buildsystem": "autotools",
|
||||
"no-autogen": true,
|
||||
"config-opts": [
|
||||
"--disable-dbus",
|
||||
"--without-x",
|
||||
"--disable-video-opengl",
|
||||
"--disable-video-opengles",
|
||||
"--disable-video-vulkan",
|
||||
"--disable-wayland-shared",
|
||||
"--disable-ime",
|
||||
"--disable-oss",
|
||||
"--disable-alsa",
|
||||
"--disable-jack",
|
||||
"--disable-esd",
|
||||
"--disable-pipewire",
|
||||
"--disable-pulseaudio",
|
||||
"--disable-arts",
|
||||
"--disable-nas",
|
||||
"--disable-sndio",
|
||||
"--disable-fusionsound",
|
||||
"--disable-diskaudio"
|
||||
],
|
||||
"build-options": {
|
||||
"strip": true
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL2-2.28.5.tar.gz",
|
||||
"sha256": "332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"/bin",
|
||||
"/include",
|
||||
"/lib/*.a",
|
||||
"/lib/*.la",
|
||||
"/lib/cmake",
|
||||
"/lib/pkgconfig",
|
||||
"/share/aclocal"
|
||||
]
|
||||
}
|
||||
|
||||
22
.github/workflows/scripts/linux/flatpak/modules/21-libbacktrace.json
vendored
Normal file
22
.github/workflows/scripts/linux/flatpak/modules/21-libbacktrace.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "libbacktrace",
|
||||
"buildsystem": "autotools",
|
||||
"no-autogen": true,
|
||||
"build-options": {
|
||||
"strip": false,
|
||||
"no-debuginfo": true
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/ianlancetaylor/libbacktrace.git",
|
||||
"commit": "ad106d5fdd5d960bd33fae1c48a351af567fd075"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
"/include",
|
||||
"/lib/*.a",
|
||||
"/lib/*.la"
|
||||
]
|
||||
}
|
||||
|
||||
68
.github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
vendored
Normal file
68
.github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"app-id": "net.pcsx2.PCSX2",
|
||||
"runtime": "org.kde.Platform",
|
||||
"runtime-version": "6.6",
|
||||
"sdk": "org.kde.Sdk",
|
||||
"sdk-extensions": [
|
||||
"org.freedesktop.Sdk.Extension.llvm17"
|
||||
],
|
||||
"add-extensions": {
|
||||
"org.freedesktop.Platform.ffmpeg-full": {
|
||||
"directory": "lib/ffmpeg",
|
||||
"version": "22.08",
|
||||
"add-ld-path": ".",
|
||||
"autodownload": true
|
||||
}
|
||||
},
|
||||
"command": "pcsx2-qt",
|
||||
"finish-args": [
|
||||
"--device=all",
|
||||
"--share=network",
|
||||
"--share=ipc",
|
||||
"--socket=x11",
|
||||
"--socket=pulseaudio",
|
||||
"--talk-name=org.freedesktop.ScreenSaver",
|
||||
"--env=QT_QPA_PLATFORM=xcb"
|
||||
],
|
||||
"modules": [
|
||||
"modules/10-libpcap.json",
|
||||
"modules/11-libaio.json",
|
||||
"modules/20-sdl2.json",
|
||||
"modules/21-libbacktrace.json",
|
||||
{
|
||||
"name": "pcsx2",
|
||||
"buildsystem": "simple",
|
||||
"build-options": {
|
||||
"strip": false,
|
||||
"no-debuginfo": true,
|
||||
"env": {
|
||||
"DEPS_PREFIX": "/app",
|
||||
"COMPILER": "clang",
|
||||
"CLANG_PATH": "/usr/lib/sdk/llvm17/bin/clang",
|
||||
"CLANGXX_PATH": "/usr/lib/sdk/llvm17/bin/clang++",
|
||||
"ADDITIONAL_CMAKE_ARGS": "-DUSE_LINKED_FFMPEG=ON"
|
||||
}
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"type": "dir",
|
||||
"path": "../../../../.."
|
||||
}
|
||||
],
|
||||
"build-commands": [
|
||||
".github/workflows/scripts/linux/generate-cmake-qt.sh",
|
||||
"cd build && ../.github/workflows/scripts/linux/compile.sh && cd ..",
|
||||
"cp -a build/bin ${FLATPAK_DEST}",
|
||||
"cd build && ninja unittests && cd .."
|
||||
],
|
||||
"post-install": [
|
||||
"install -Dm644 bin/resources/icons/AppIconLarge.png ${FLATPAK_DEST}/share/icons/hicolor/512x512/apps/net.pcsx2.PCSX2.png",
|
||||
"install -Dm644 .github/workflows/scripts/linux/pcsx2-qt.desktop ${FLATPAK_DEST}/share/applications/net.pcsx2.PCSX2.desktop",
|
||||
"desktop-file-edit --set-key=Icon --set-value=net.pcsx2.PCSX2 ${FLATPAK_DEST}/share/applications/net.pcsx2.PCSX2.desktop",
|
||||
"install -Dm644 .github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.metainfo.xml ${FLATPAK_DEST}/share/metainfo/net.pcsx2.PCSX2.metainfo.xml",
|
||||
"mkdir -p ${FLATPAK_DEST}/lib/ffmpeg"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
BIN
.github/workflows/scripts/linux/flatpak/screenshots/screenshot1.png
vendored
Normal file
BIN
.github/workflows/scripts/linux/flatpak/screenshots/screenshot1.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
BIN
.github/workflows/scripts/linux/flatpak/screenshots/screenshot2.png
vendored
Normal file
BIN
.github/workflows/scripts/linux/flatpak/screenshots/screenshot2.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
@@ -2,16 +2,28 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z "${DEPS_PREFIX}" ]]; then
|
||||
echo "DEPS_PREFIX is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using build dependencies from: ${DEPS_PREFIX}"
|
||||
|
||||
if [ "${COMPILER}" = "clang" ]; then
|
||||
if [[ -z "${CLANG_PATH}" ]] || [[ -z "${CLANGXX_PATH}" ]]; then
|
||||
echo "CLANG_PATH or CLANGXX_PATH is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using clang toolchain"
|
||||
cat > "$HOME/clang-toolchain.cmake" << EOF
|
||||
set(CMAKE_C_COMPILER /usr/bin/clang-12)
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/clang++-12)
|
||||
cat > "clang-toolchain.cmake" << EOF
|
||||
set(CMAKE_C_COMPILER "${CLANG_PATH}")
|
||||
set(CMAKE_CXX_COMPILER "${CLANGXX_PATH}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
|
||||
EOF
|
||||
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=$HOME/clang-toolchain.cmake"
|
||||
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=clang-toolchain.cmake"
|
||||
fi
|
||||
|
||||
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
|
||||
@@ -31,7 +43,7 @@ cmake \
|
||||
-DX11_API=ON \
|
||||
-DWAYLAND_API=ON \
|
||||
-DENABLE_SETCAP=OFF \
|
||||
-DCMAKE_PREFIX_PATH="$HOME/deps" \
|
||||
-DCMAKE_PREFIX_PATH="${DEPS_PREFIX}" \
|
||||
-DUSE_SYSTEM_SDL2=ON \
|
||||
-DUSE_SYSTEM_ZSTD=OFF \
|
||||
-DDISABLE_ADVANCE_SIMD=TRUE
|
||||
|
||||
32
.github/workflows/scripts/linux/generate-metainfo.sh
vendored
Executable file
32
.github/workflows/scripts/linux/generate-metainfo.sh
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
echo "Output file must be provided as a parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OUTFILE=$1
|
||||
GIT_DATE=$(git log -1 --pretty=%cd --date=short)
|
||||
GIT_VERSION=$(git tag --points-at HEAD)
|
||||
GIT_HASH=$(git rev-parse HEAD)
|
||||
|
||||
if [[ "${GIT_VERSION}" == "" ]]; then
|
||||
# In the odd event that we run this script before the release gets tagged.
|
||||
GIT_VERSION=$(git describe --tags)
|
||||
if [[ "${GIT_VERSION}" == "" ]]; then
|
||||
GIT_VERSION=$(git rev-parse HEAD)
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "GIT_DATE: ${GIT_DATE}"
|
||||
echo "GIT_VERSION: ${GIT_VERSION}"
|
||||
echo "GIT_HASH: ${GIT_HASH}"
|
||||
|
||||
cp "${SCRIPTDIR}"/pcsx2-qt.metainfo.xml.in "${OUTFILE}"
|
||||
|
||||
sed -i -e "s/@GIT_VERSION@/${GIT_VERSION}/" "${OUTFILE}"
|
||||
sed -i -e "s/@GIT_DATE@/${GIT_DATE}/" "${OUTFILE}"
|
||||
sed -i -e "s/@GIT_HASH@/${GIT_HASH}/" "${OUTFILE}"
|
||||
|
||||
58
.github/workflows/scripts/linux/install-packages-flatpak.sh
vendored
Executable file
58
.github/workflows/scripts/linux/install-packages-flatpak.sh
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
source "$SCRIPTDIR/functions.sh"
|
||||
|
||||
set -e
|
||||
|
||||
ARCH=x86_64
|
||||
KDE_BRANCH=6.6
|
||||
BRANCH=23.08
|
||||
FLAT_MANAGER_CLIENT_DIR="$HOME/.local/bin"
|
||||
|
||||
# Build packages. Mostly needed for flat-manager-client.
|
||||
declare -a BUILD_PACKAGES=(
|
||||
"flatpak"
|
||||
"flatpak-builder"
|
||||
"appstream-util"
|
||||
"python3-aiohttp"
|
||||
"python3-tenacity"
|
||||
"python3-gi"
|
||||
"gobject-introspection"
|
||||
"libappstream-glib8"
|
||||
"libappstream-glib-dev"
|
||||
"libappstream-dev"
|
||||
"gir1.2-ostree-1.0"
|
||||
)
|
||||
|
||||
# Flatpak runtimes and SDKs.
|
||||
declare -a FLATPAK_PACKAGES=(
|
||||
"org.kde.Platform/${ARCH}/${KDE_BRANCH}"
|
||||
"org.kde.Sdk/${ARCH}/${KDE_BRANCH}"
|
||||
"org.freedesktop.Platform.ffmpeg-full/${ARCH}/${BRANCH}"
|
||||
"org.freedesktop.Sdk.Extension.llvm17/${ARCH}/${BRANCH}"
|
||||
"org.freedesktop.appstream-glib/${ARCH}/stable"
|
||||
)
|
||||
|
||||
retry_command sudo apt-get -qq update
|
||||
|
||||
# Install packages needed for building
|
||||
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
|
||||
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
|
||||
|
||||
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
|
||||
# Install packages needed for building
|
||||
echo "Will install the following packages for building - ${FLATPAK_PACKAGES[*]}"
|
||||
retry_command sudo flatpak -y install "${FLATPAK_PACKAGES[@]}"
|
||||
|
||||
echo "Installing Flatpak Builder"
|
||||
retry_command sudo flatpak -y install flathub org.flatpak.builder
|
||||
|
||||
echo "Downloading flat-manager-client"
|
||||
mkdir -p "$FLAT_MANAGER_CLIENT_DIR"
|
||||
pushd "$FLAT_MANAGER_CLIENT_DIR"
|
||||
aria2c -Z "https://raw.githubusercontent.com/flatpak/flat-manager/9401efbdc0d6bd489507d8401c567ba219d735d5/flat-manager-client"
|
||||
chmod +x flat-manager-client
|
||||
echo "$FLAT_MANAGER_CLIENT_DIR" >> $GITHUB_PATH
|
||||
popd
|
||||
@@ -8,14 +8,13 @@ set -e
|
||||
# Packages - Build and Qt
|
||||
declare -a BUILD_PACKAGES=(
|
||||
"build-essential"
|
||||
"g++"
|
||||
"git"
|
||||
"cmake"
|
||||
"ccache"
|
||||
"ninja-build"
|
||||
"libclang-dev" # Qt goes hunting for libclang-11 specifically.
|
||||
"libclang-11-dev"
|
||||
"libclang-12-dev"
|
||||
"patchelf"
|
||||
"libfuse2"
|
||||
"libglib2.0-dev"
|
||||
"libfontconfig1-dev"
|
||||
"libharfbuzz-dev"
|
||||
@@ -37,10 +36,12 @@ declare -a BUILD_PACKAGES=(
|
||||
|
||||
# Packages - PCSX2
|
||||
declare -a PCSX2_PACKAGES=(
|
||||
"extra-cmake-modules"
|
||||
"libaio-dev"
|
||||
"libasound2-dev"
|
||||
"libbz2-dev"
|
||||
"libcurl4-openssl-dev"
|
||||
"libdbus-1-dev"
|
||||
"libegl1-mesa-dev"
|
||||
"libgl1-mesa-dev"
|
||||
"libgtk-3-dev"
|
||||
@@ -52,17 +53,23 @@ declare -a PCSX2_PACKAGES=(
|
||||
"libpulse-dev"
|
||||
"librsvg2-dev"
|
||||
"libsamplerate0-dev"
|
||||
"libsoundtouch-dev"
|
||||
"libudev-dev"
|
||||
"libx11-xcb-dev"
|
||||
"libavcodec-dev"
|
||||
"libavformat-dev"
|
||||
"libavutil-dev"
|
||||
"libswresample-dev"
|
||||
"libswscale-dev"
|
||||
"pkg-config"
|
||||
"zlib1g-dev"
|
||||
)
|
||||
|
||||
if [ "${COMPILER}" = "gcc" ]; then
|
||||
BUILD_PACKAGES+=("g++-10")
|
||||
else
|
||||
BUILD_PACKAGES+=("llvm-12" "lld-12" "clang-12")
|
||||
if [ "${COMPILER}" = "clang" ]; then
|
||||
BUILD_PACKAGES+=("llvm-17" "lld-17" "clang-17")
|
||||
|
||||
# Ubuntu 22.04 doesn't ship with LLVM 16, so we need to pull it from the llvm.org repos.
|
||||
retry_command wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo apt-add-repository -n 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
|
||||
fi
|
||||
|
||||
retry_command sudo apt-get -qq update && break
|
||||
|
||||
37
.github/workflows/scripts/linux/pcsx2-qt.metainfo.xml.in
vendored
Normal file
37
.github/workflows/scripts/linux/pcsx2-qt.metainfo.xml.in
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>net.pcsx2.PCSX2</id>
|
||||
<launchable type="desktop-id">net.pcsx2.PCSX2.desktop</launchable>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-3.0</project_license>
|
||||
<name>PCSX2</name>
|
||||
<developer_name>PCSX2</developer_name>
|
||||
<summary>PlayStation 2 Emulator</summary>
|
||||
<description>
|
||||
<p>PCSX2 is a free and open-source PlayStation 2 (PS2) emulator. Its purpose is to emulate the PS2's hardware, using a combination of MIPS CPU Interpreters, Recompilers and a Virtual Machine which manages hardware states and PS2 system memory. This allows you to play PS2 games on your PC, with many additional features and benefits.</p>
|
||||
<p>PlayStation 2 and PS2 are registered trademarks of Sony Interactive Entertainment. This application is not affiliated in any way with Sony Interactive Entertainment.</p>
|
||||
</description>
|
||||
<url type="homepage">https://pcsx2.net/</url>
|
||||
<url type="bugtracker">https://github.com/PCSX2/pcsx2/issues</url>
|
||||
<url type="donation">https://github.com/sponsors/PCSX2</url>
|
||||
<url type="faq">https://pcsx2.net/docs/</url>
|
||||
<url type="help">https://discord.com/invite/TCz3t9k</url>
|
||||
<url type="translate">https://crowdin.com/project/pcsx2-emulator</url>
|
||||
<url type="vcs-browser">https://github.com/PCSX2/pcsx2</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot1.png</image>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://raw.githubusercontent.com/PCSX2/pcsx2/master/.github/workflows/scripts/linux/flatpak/screenshots/screenshot2.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<update_contact>stenzek_AT_gmail.com</update_contact>
|
||||
<releases>
|
||||
<release version="@GIT_VERSION@" date="@GIT_DATE@" />
|
||||
</releases>
|
||||
<custom>
|
||||
<value key="flathub::manifest">https://raw.githubusercontent.com/PCSX2/pcsx2/@GIT_HASH@/.github/workflows/scripts/linux/flatpak/net.pcsx2.PCSX2.json</value>
|
||||
</custom>
|
||||
</component>
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
set -e
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.14
|
||||
export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
|
||||
INSTALLDIR="$HOME/deps"
|
||||
NPROCS="$(getconf _NPROCESSORS_ONLN)"
|
||||
SDL=SDL2-2.26.0
|
||||
SDL=SDL2-2.28.5
|
||||
PNG=1.6.37
|
||||
JPG=9e
|
||||
SOUNDTOUCH=soundtouch-2.3.1
|
||||
QT=6.3.1
|
||||
FFMPEG=6.0
|
||||
QT=6.6.0
|
||||
|
||||
mkdir deps-build
|
||||
cd deps-build
|
||||
@@ -21,22 +21,22 @@ export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
|
||||
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
|
||||
|
||||
cat > SHASUMS <<EOF
|
||||
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
|
||||
332cb37d0be20cb9541739c61f79bae5a477427d79ae85e352089afdaf6666e4 $SDL.tar.gz
|
||||
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
|
||||
4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d jpegsrc.v$JPG.tar.gz
|
||||
6900996607258496ce126924a19fe9d598af9d892cf3f33d1e4daaa9b42ae0b1 $SOUNDTOUCH.tar.gz
|
||||
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
|
||||
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
|
||||
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
|
||||
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
|
||||
57be87c22d9b49c112b6d24bc67d42508660e6b718b3db89c44e47e289137082 ffmpeg-$FFMPEG.tar.xz
|
||||
039d53312acb5897a9054bd38c9ccbdab72500b71fdccdb3f4f0844b0dd39e0e qtbase-everywhere-src-$QT.tar.xz
|
||||
e1542cb50176e237809895c6549598c08587c63703d100be54ac2d806834e384 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
33da25fef51102f564624a7ea3e57cb4a0a31b7b44783d1af5749ac36d3c72de qtsvg-everywhere-src-$QT.tar.xz
|
||||
4e9feebc142bbb6e453e1dc3277e09ec45c8ef081b5ee2a029e6684b5905ba99 qttools-everywhere-src-$QT.tar.xz
|
||||
a0d89a236f64b810eb0fe4ae1e90db22b0e86263521b35f89e69f1392815078c qttranslations-everywhere-src-$QT.tar.xz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
-O "https://libsdl.org/release/$SDL.tar.gz" \
|
||||
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
|
||||
-O "https://www.ijg.org/files/jpegsrc.v$JPG.tar.gz" \
|
||||
-O "https://www.surina.net/soundtouch/$SOUNDTOUCH.tar.gz" \
|
||||
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
||||
@@ -46,9 +46,27 @@ shasum -a 256 --check SHASUMS
|
||||
echo "Installing SDL..."
|
||||
tar xf "$SDL.tar.gz"
|
||||
cd "$SDL"
|
||||
./configure --prefix "$INSTALLDIR" --without-x
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
|
||||
# MFI causes multiple joystick connection events, I'm guessing because both the HIDAPI and MFI interfaces
|
||||
# race each other, and sometimes both end up getting through. So, just force MFI off.
|
||||
patch -u CMakeLists.txt <<EOF
|
||||
--- CMakeLists.txt 2023-08-03 01:33:11
|
||||
+++ CMakeLists.txt 2023-08-26 12:58:53
|
||||
@@ -2105,7 +2105,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreHaptics/CoreHaptics.h>
|
||||
int main() { return 0; }" HAVE_FRAMEWORK_COREHAPTICS)
|
||||
- if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS)
|
||||
+ if(HAVE_FRAMEWORK_GAMECONTROLLER AND HAVE_FRAMEWORK_COREHAPTICS AND FALSE)
|
||||
# Only enable MFI if we also have CoreHaptics to ensure rumble works
|
||||
set(SDL_JOYSTICK_MFI 1)
|
||||
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
|
||||
|
||||
EOF
|
||||
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DSDL_X11=OFF
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
|
||||
echo "Installing libpng..."
|
||||
@@ -59,23 +77,19 @@ make "-j$NPROCS"
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "Installing libjpeg..."
|
||||
tar xf "jpegsrc.v$JPG.tar.gz"
|
||||
cd "jpeg-$JPG"
|
||||
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
|
||||
echo "Installing FFmpeg..."
|
||||
tar xf "ffmpeg-$FFMPEG.tar.xz"
|
||||
cd "ffmpeg-$FFMPEG"
|
||||
./configure --prefix="$INSTALLDIR" --disable-all --disable-autodetect --disable-static --enable-shared \
|
||||
--enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale \
|
||||
--enable-audiotoolbox --enable-videotoolbox \
|
||||
--enable-encoder=ffv1,qtrle,pcm_s16be,pcm_s16le,*_at,*_videotoolbox \
|
||||
--enable-muxer=avi,matroska,mov,mp3,mp4,wav \
|
||||
--enable-protocol=file
|
||||
make "-j$NPROCS"
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "Installing soundtouch..."
|
||||
tar xf "$SOUNDTOUCH.tar.gz"
|
||||
cd "$SOUNDTOUCH"
|
||||
cmake -B build -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
|
||||
|
||||
echo "Installing Qt Base..."
|
||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
@@ -90,6 +104,13 @@ cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTAL
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
echo "Installing Qt Image Formats..."
|
||||
tar xf "qtimageformats-everywhere-src-$QT.tar.xz"
|
||||
cd "qtimageformats-everywhere-src-$QT"
|
||||
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
|
||||
make -C build "-j$NPROCS"
|
||||
make -C build install
|
||||
cd ..
|
||||
echo "Installing Qt Tools..."
|
||||
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
||||
cd "qttools-everywhere-src-$QT"
|
||||
|
||||
@@ -1,7 +1,58 @@
|
||||
import { MessageEmbed, WebhookClient } from "discord.js";
|
||||
import * as github from '@actions/github';
|
||||
import { Octokit } from "@octokit/rest";
|
||||
import { throttling } from "@octokit/plugin-throttling";
|
||||
import { retry } from "@octokit/plugin-retry";
|
||||
|
||||
const releaseInfo = github.context.payload.release;
|
||||
let owner = process.env.OWNER;
|
||||
let repo = process.env.REPO;
|
||||
|
||||
Octokit.plugin(throttling);
|
||||
Octokit.plugin(retry);
|
||||
const octokit = new Octokit({
|
||||
auth: process.env.GITHUB_TOKEN,
|
||||
userAgent: `${owner}/${repo}`,
|
||||
log: {
|
||||
debug: () => { },
|
||||
info: () => { },
|
||||
warn: console.warn,
|
||||
error: console.error
|
||||
},
|
||||
throttle: {
|
||||
onRateLimit: (retryAfter, options) => {
|
||||
octokit.log.warn(
|
||||
`Request quota exhausted for request ${options.method} ${options.url}`
|
||||
);
|
||||
|
||||
// Retry twice after hitting a rate limit error, then give up
|
||||
if (options.request.retryCount <= 2) {
|
||||
console.log(`Retrying after ${retryAfter} seconds!`);
|
||||
return true;
|
||||
}
|
||||
},
|
||||
onAbuseLimit: (retryAfter, options) => {
|
||||
// does not retry, only logs a warning
|
||||
octokit.log.warn(
|
||||
`Abuse detected for request ${options.method} ${options.url}`
|
||||
);
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
if (process.env.TAG_VAL === undefined || process.env.TAG_VAL === "") {
|
||||
console.log(`Not announcing - TAG_VAL not defined`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const { data: releaseInfo } = await octokit.rest.repos.getReleaseByTag({
|
||||
owner: owner,
|
||||
repo: repo,
|
||||
tag: process.env.TAG_VAL,
|
||||
});
|
||||
|
||||
if (releaseInfo === undefined) {
|
||||
console.log(`Not announcing - could not locate release with tag ${process.env.TAG_VAL}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!releaseInfo.prerelease) {
|
||||
console.log("Not announcing - release was not a pre-release (aka a Nightly)");
|
||||
@@ -18,6 +69,7 @@ const embed = new MessageEmbed()
|
||||
{ name: 'Installation Steps', value: '[See Here](https://github.com/PCSX2/pcsx2/wiki/Nightly-Build-Usage-Guide)', inline: true },
|
||||
{ name: 'Included Changes', value: releaseInfo.body, inline: false }
|
||||
);
|
||||
console.log(embed);
|
||||
|
||||
// Get all webhooks, simple comma-sep string
|
||||
const webhookUrls = process.env.DISCORD_BUILD_WEBHOOK.split(",");
|
||||
|
||||
141
.github/workflows/scripts/releases/announce-release/package-lock.json
generated
vendored
141
.github/workflows/scripts/releases/announce-release/package-lock.json
generated
vendored
@@ -5,32 +5,16 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "announce-release",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@actions/github": "^5.0.0",
|
||||
"@octokit/plugin-retry": "^3.0.9",
|
||||
"@octokit/plugin-throttling": "^3.5.2",
|
||||
"@octokit/rest": "^18.12.0",
|
||||
"discord.js": "^13.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/github": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz",
|
||||
"integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==",
|
||||
"dependencies": {
|
||||
"@actions/http-client": "^1.0.11",
|
||||
"@octokit/core": "^3.4.0",
|
||||
"@octokit/plugin-paginate-rest": "^2.13.3",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^5.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
|
||||
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
|
||||
"dependencies": {
|
||||
"tunnel": "0.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@discordjs/builders": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.6.0.tgz",
|
||||
@@ -131,6 +115,14 @@
|
||||
"@octokit/types": "^6.33.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-request-log": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
|
||||
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
|
||||
"peerDependencies": {
|
||||
"@octokit/core": ">=3"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||
"version": "5.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz",
|
||||
@@ -140,6 +132,27 @@
|
||||
"deprecation": "^2.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-retry": {
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
|
||||
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"bottleneck": "^2.15.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/plugin-throttling": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.7.0.tgz",
|
||||
"integrity": "sha512-qrKT1Yl/KuwGSC6/oHpLBot3ooC9rq0/ryDYBCpkRtoj+R8T47xTMDT6Tk2CxWopFota/8Pi/2SqArqwC0JPow==",
|
||||
"dependencies": {
|
||||
"@octokit/types": "^6.0.1",
|
||||
"bottleneck": "^2.15.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@octokit/core": "^3.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/request": {
|
||||
"version": "5.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
|
||||
@@ -163,6 +176,17 @@
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/rest": {
|
||||
"version": "18.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
|
||||
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
|
||||
"dependencies": {
|
||||
"@octokit/core": "^3.5.1",
|
||||
"@octokit/plugin-paginate-rest": "^2.16.8",
|
||||
"@octokit/plugin-request-log": "^1.0.4",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^5.12.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@octokit/types": {
|
||||
"version": "6.33.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
|
||||
@@ -214,6 +238,11 @@
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
|
||||
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
|
||||
},
|
||||
"node_modules/bottleneck": {
|
||||
"version": "2.19.5",
|
||||
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
|
||||
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
|
||||
},
|
||||
"node_modules/callsites": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||
@@ -388,14 +417,6 @@
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/type-fest": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
|
||||
@@ -461,25 +482,6 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/github": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.0.tgz",
|
||||
"integrity": "sha512-QvE9eAAfEsS+yOOk0cylLBIO/d6WyWIOvsxxzdrPFaud39G6BOkUwScXZn1iBzQzHyu9SBkkLSWlohDWdsasAQ==",
|
||||
"requires": {
|
||||
"@actions/http-client": "^1.0.11",
|
||||
"@octokit/core": "^3.4.0",
|
||||
"@octokit/plugin-paginate-rest": "^2.13.3",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^5.1.1"
|
||||
}
|
||||
},
|
||||
"@actions/http-client": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
|
||||
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
|
||||
"requires": {
|
||||
"tunnel": "0.0.6"
|
||||
}
|
||||
},
|
||||
"@discordjs/builders": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.6.0.tgz",
|
||||
@@ -569,6 +571,12 @@
|
||||
"@octokit/types": "^6.33.0"
|
||||
}
|
||||
},
|
||||
"@octokit/plugin-request-log": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
|
||||
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
|
||||
"requires": {}
|
||||
},
|
||||
"@octokit/plugin-rest-endpoint-methods": {
|
||||
"version": "5.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz",
|
||||
@@ -578,6 +586,24 @@
|
||||
"deprecation": "^2.3.1"
|
||||
}
|
||||
},
|
||||
"@octokit/plugin-retry": {
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
|
||||
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"bottleneck": "^2.15.3"
|
||||
}
|
||||
},
|
||||
"@octokit/plugin-throttling": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.7.0.tgz",
|
||||
"integrity": "sha512-qrKT1Yl/KuwGSC6/oHpLBot3ooC9rq0/ryDYBCpkRtoj+R8T47xTMDT6Tk2CxWopFota/8Pi/2SqArqwC0JPow==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.1",
|
||||
"bottleneck": "^2.15.3"
|
||||
}
|
||||
},
|
||||
"@octokit/request": {
|
||||
"version": "5.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
|
||||
@@ -601,6 +627,17 @@
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"@octokit/rest": {
|
||||
"version": "18.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
|
||||
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
|
||||
"requires": {
|
||||
"@octokit/core": "^3.5.1",
|
||||
"@octokit/plugin-paginate-rest": "^2.16.8",
|
||||
"@octokit/plugin-request-log": "^1.0.4",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^5.12.0"
|
||||
}
|
||||
},
|
||||
"@octokit/types": {
|
||||
"version": "6.33.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
|
||||
@@ -642,6 +679,11 @@
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
|
||||
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
|
||||
},
|
||||
"bottleneck": {
|
||||
"version": "2.19.5",
|
||||
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
|
||||
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
|
||||
},
|
||||
"callsites": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||
@@ -765,11 +807,6 @@
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
|
||||
},
|
||||
"tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
|
||||
},
|
||||
"type-fest": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@actions/github": "^5.0.0",
|
||||
"@octokit/plugin-retry": "^3.0.9",
|
||||
"@octokit/plugin-throttling": "^3.5.2",
|
||||
"@octokit/rest": "^18.12.0",
|
||||
"discord.js": "^13.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
tag = os.environ['TAG'].split("refs/tags/")[1]
|
||||
tag = os.environ['TAG_VAL']
|
||||
scan_dir = os.environ['SCAN_DIR']
|
||||
output_dir = os.environ['OUT_DIR']
|
||||
accepted_exts = ["AppImage", "tar.gz", "7z"]
|
||||
accepted_exts = ["AppImage", "flatpak", "tar.xz", "7z"]
|
||||
|
||||
|
||||
for dir_name in os.listdir(scan_dir):
|
||||
@@ -12,9 +12,12 @@ for dir_name in os.listdir(scan_dir):
|
||||
if "macos" in dir_name.lower():
|
||||
asset_name += "-macos"
|
||||
elif "linux" in dir_name.lower():
|
||||
asset_name += "-linux-AppImage-64bit"
|
||||
if "flatpak" in dir_name.lower():
|
||||
asset_name += "-linux-flatpak-x64"
|
||||
else:
|
||||
asset_name += "-linux-appimage-x64"
|
||||
elif "windows" in dir_name.lower():
|
||||
asset_name += "-windows-64bit"
|
||||
asset_name += "-windows-x64"
|
||||
else:
|
||||
continue;
|
||||
|
||||
|
||||
162
.github/workflows/scripts/windows/build-dependencies.bat
vendored
Normal file
162
.github/workflows/scripts/windows/build-dependencies.bat
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo Setting environment...
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else (
|
||||
echo Visual Studio 2022 not found.
|
||||
goto error
|
||||
)
|
||||
|
||||
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
|
||||
|
||||
if defined DEBUG (
|
||||
echo DEBUG=%DEBUG%
|
||||
) else (
|
||||
set DEBUG=1
|
||||
)
|
||||
|
||||
pushd %~dp0
|
||||
set "SCRIPTDIR=%CD%"
|
||||
cd ..\..\..\..
|
||||
mkdir deps-build
|
||||
cd deps-build || goto error
|
||||
set "BUILDDIR=%CD%"
|
||||
cd ..
|
||||
mkdir deps
|
||||
cd deps || goto error
|
||||
set "INSTALLDIR=%CD%"
|
||||
popd
|
||||
|
||||
echo SCRIPTDIR=%SCRIPTDIR%
|
||||
echo BUILDDIR=%BUILDDIR%
|
||||
echo INSTALLDIR=%INSTALLDIR%
|
||||
|
||||
cd "%BUILDDIR%"
|
||||
|
||||
set QT=6.6.1
|
||||
set QTMINOR=6.6
|
||||
set SDL=SDL2-2.28.5
|
||||
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 97bd14ee0ec67494d2b93f1a4f7da2bf891103c57090d96fdcc2b019d885c76a || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 818f92518d1a89ee98ae818891a7d2f0e41aa45b933d55215da2df6d5459428e || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 03f01042f86b4dbf7329a179f20835817c660a183178c11570cc0535b3c3ba58 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" d44d5ead8d4682f54c91687b5e32f2735f086419e3889e05609feae1a7f02da9 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" a17eba4e1c00dbd62c13d708c2bc918c2954b2b25a94d3c05e891d62e8f187c8 || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" e5ccf0eefd6b1ef9604fdf57f6d16ad8484d07fb141ca3a2d9c3f1771296ae25 || goto error
|
||||
|
||||
if %DEBUG%==1 (
|
||||
echo Building debug and release libraries...
|
||||
) else (
|
||||
echo Building release libraries...
|
||||
)
|
||||
|
||||
echo Building SDL...
|
||||
rmdir /S /Q "%SDL%"
|
||||
%SEVENZIP% x "%SDL%.zip" || goto error
|
||||
cd "%SDL%" || goto error
|
||||
if %DEBUG%==1 (
|
||||
cmake -B build-debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja || goto error
|
||||
cmake --build build-debug --parallel || goto error
|
||||
ninja -C build-debug install || goto error
|
||||
)
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DBUILD_SHARED_LIBS=ON -DSDL_SHARED=ON -DSDL_STATIC=OFF -G Ninja || goto error
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
if %DEBUG%==1 (
|
||||
set QTBUILDSPEC=-DCMAKE_CONFIGURATION_TYPES="Release;Debug" -G "Ninja Multi-Config"
|
||||
) else (
|
||||
set QTBUILDSPEC=-DCMAKE_BUILD_TYPE=Release -G Ninja
|
||||
)
|
||||
|
||||
echo Building Qt base...
|
||||
rmdir /S /Q "qtbase-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qtbase-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qtbase-everywhere-src-%QT%" || goto error
|
||||
cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes %QTBUILDSPEC% || goto error
|
||||
cmake --build build --parallel || goto error
|
||||
ninja -C build install || goto error
|
||||
cd .. || goto error
|
||||
|
||||
echo Building Qt SVG...
|
||||
rmdir /S /Q "qtsvg-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qtsvg-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qtsvg-everywhere-src-%QT%" || goto error
|
||||
mkdir build || goto error
|
||||
cd build || goto error
|
||||
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. || goto error
|
||||
cmake --build . --parallel || goto error
|
||||
ninja install || goto error
|
||||
cd ..\.. || goto error
|
||||
|
||||
echo Building Qt Image Formats...
|
||||
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qtimageformats-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qtimageformats-everywhere-src-%QT%" || goto error
|
||||
mkdir build || goto error
|
||||
cd build || goto error
|
||||
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. || goto error
|
||||
cmake --build . --parallel || goto error
|
||||
ninja install || goto error
|
||||
cd ..\.. || goto error
|
||||
|
||||
echo Building Qt Tools...
|
||||
rmdir /S /Q "qtimageformats-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qttools-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qttools-everywhere-src-%QT%" || goto error
|
||||
mkdir build || goto error
|
||||
cd build || goto error
|
||||
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. -- -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF || goto error
|
||||
cmake --build . --parallel || goto error
|
||||
ninja install || goto error
|
||||
cd ..\.. || goto error
|
||||
|
||||
echo Building Qt Translations...
|
||||
rmdir /S /Q "qttranslations-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qttranslations-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qttranslations-everywhere-src-%QT%" || goto error
|
||||
mkdir build || goto error
|
||||
cd build || goto error
|
||||
call "%INSTALLDIR%\bin\qt-configure-module.bat" .. || goto error
|
||||
cmake --build . --parallel || goto error
|
||||
ninja install || goto error
|
||||
cd ..\.. || goto error
|
||||
|
||||
echo Cleaning up...
|
||||
cd ..
|
||||
rd /S /Q deps-build
|
||||
|
||||
echo Exiting with success.
|
||||
exit 0
|
||||
|
||||
:error
|
||||
echo Failed with error #%errorlevel%.
|
||||
pause
|
||||
exit %errorlevel%
|
||||
|
||||
:downloadfile
|
||||
if not exist "%~1" (
|
||||
echo Downloading %~1 from %~2...
|
||||
curl -L -o "%~1" "%~2" || goto error
|
||||
)
|
||||
|
||||
rem based on https://gist.github.com/gsscoder/e22daefaff9b5d8ac16afb070f1a7971
|
||||
set idx=0
|
||||
for /f %%F in ('certutil -hashfile "%~1" SHA256') do (
|
||||
set "out!idx!=%%F"
|
||||
set /a idx += 1
|
||||
)
|
||||
set filechecksum=%out1%
|
||||
|
||||
if /i %~3==%filechecksum% (
|
||||
echo Validated %~1.
|
||||
exit /B 0
|
||||
) else (
|
||||
echo Expected %~3 got %filechecksum%.
|
||||
exit /B 1
|
||||
)
|
||||
2
.github/workflows/triage_pr.yml
vendored
2
.github/workflows/triage_pr.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
if: github.repository == 'PCSX2/pcsx2'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@main
|
||||
- uses: actions/labeler@v4.3.0
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
37
.github/workflows/windows_build_matrix.yml
vendored
37
.github/workflows/windows_build_matrix.yml
vendored
@@ -2,8 +2,8 @@ name: 🖥️ Windows Builds
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
branches-ignore:
|
||||
- "l10n_master"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
@@ -12,19 +12,21 @@ jobs:
|
||||
# MSBUILD
|
||||
lint_vs_proj_files:
|
||||
name: Lint VS Project Files
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Verify VS Project Files
|
||||
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
|
||||
|
||||
build_qt_sse4:
|
||||
needs: lint_vs_proj_files
|
||||
name: "SSE4"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt
|
||||
jobName: "MSVC SSE4"
|
||||
configuration: Release
|
||||
simd: "SSE4"
|
||||
secrets: inherit
|
||||
@@ -32,17 +34,19 @@ jobs:
|
||||
build_qt_avx2:
|
||||
needs: lint_vs_proj_files
|
||||
name: "AVX2"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt
|
||||
jobName: "MSVC AVX2"
|
||||
configuration: Release AVX2
|
||||
secrets: inherit
|
||||
|
||||
build_qt_sse4_cmake:
|
||||
name: "CMake SSE4"
|
||||
build_qt_cmake:
|
||||
name: "CMake"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt
|
||||
jobName: "CMake MSVC"
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
secrets: inherit
|
||||
@@ -50,9 +54,10 @@ jobs:
|
||||
build_qt_clang_sse4:
|
||||
needs: lint_vs_proj_files
|
||||
name: "SSE4"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt Clang
|
||||
jobName: "Clang SSE4"
|
||||
configuration: Release Clang
|
||||
simd: "SSE4"
|
||||
secrets: inherit
|
||||
@@ -60,8 +65,20 @@ jobs:
|
||||
build_qt_clang_avx2:
|
||||
needs: lint_vs_proj_files
|
||||
name: "AVX2"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: Qt Clang
|
||||
jobName: "Clang AVX2"
|
||||
configuration: Release Clang AVX2
|
||||
secrets: inherit
|
||||
|
||||
build_qt_cmake_clang:
|
||||
name: "CMake"
|
||||
if: github.repository != 'PCSX2/pcsx2' || github.event_name == 'pull_request'
|
||||
uses: ./.github/workflows/windows_build_qt.yml
|
||||
with:
|
||||
jobName: "CMake Clang"
|
||||
configuration: CMake
|
||||
buildSystem: cmake
|
||||
cmakeFlags: -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DPCSX2_EXE_NAME=pcsx2-qt-clang
|
||||
secrets: inherit
|
||||
|
||||
51
.github/workflows/windows_build_qt.yml
vendored
51
.github/workflows/windows_build_qt.yml
vendored
@@ -25,41 +25,45 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: msbuild
|
||||
qt_binary_url:
|
||||
cmakeFlags:
|
||||
required: false
|
||||
type: string
|
||||
default: https://github.com/PCSX2/pcsx2-windows-dependencies/releases/download/2022-11-20/qt-6.4.0-x64.7z
|
||||
qt_dir:
|
||||
required: false
|
||||
type: string
|
||||
default: 3rdparty\qt\6.4.0\msvc2022_64
|
||||
cheats_url:
|
||||
default: ""
|
||||
patchesUrl:
|
||||
required: false
|
||||
type: string
|
||||
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
|
||||
fetchTags:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build_windows_qt:
|
||||
name: ${{ inputs.jobName }}
|
||||
runs-on: ${{ inputs.os }}
|
||||
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
|
||||
timeout-minutes: 60
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# actions/checkout elides tags, fetch them primarily for releases
|
||||
- name: Fetch Tags
|
||||
if: ${{ inputs.fetchTags }}
|
||||
run: git fetch --tags --no-recurse-submodules
|
||||
|
||||
- name: Prepare Artifact Metadata
|
||||
id: artifact-metadata
|
||||
shell: bash
|
||||
env:
|
||||
OS: windows
|
||||
BUILD_SYSTEM: ${{ inputs.buildSystem }}
|
||||
GUI_FRAMEWORK: Qt
|
||||
ARCH: ${{ inputs.platform }}
|
||||
SIMD: ${{ inputs.simd }}
|
||||
EVENT_NAME: ${{ github.event_name }}
|
||||
@@ -72,19 +76,24 @@ jobs:
|
||||
if: inputs.configuration != 'CMake'
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Download Qt build files
|
||||
shell: cmd
|
||||
run: |
|
||||
cd 3rdparty\qt
|
||||
aria2c ${{ inputs.qt_binary_url }}
|
||||
7z x qt-*-x64.7z
|
||||
del qt-*-x64.7z
|
||||
|
||||
- name: Download cheats
|
||||
- name: Download patches
|
||||
shell: cmd
|
||||
run: |
|
||||
cd bin/resources
|
||||
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
|
||||
aria2c -Z "${{ inputs.patchesUrl }}/patches.zip"
|
||||
|
||||
- name: Cache Dependencies
|
||||
id: cache-deps
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: deps
|
||||
key: ${{ inputs.os }} ${{ inputs.platform }} deps ${{ hashFiles('.github/workflows/scripts/windows/build-dependencies.bat') }}
|
||||
|
||||
- name: Build Dependencies
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
DEBUG: 0
|
||||
run: .github/workflows/scripts/windows/build-dependencies.bat
|
||||
|
||||
- name: Generate CMake
|
||||
if: inputs.configuration == 'CMake'
|
||||
@@ -92,7 +101,7 @@ jobs:
|
||||
shell: cmd
|
||||
run: |
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
cmake . -B build "-DCMAKE_PREFIX_PATH=%cd%\${{ inputs.qt_dir }}" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
|
||||
cmake . -B build ${{ inputs.cmakeFlags }} "-DCMAKE_PREFIX_PATH=%cd%\deps" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
|
||||
|
||||
- name: Build PCSX2
|
||||
shell: cmd
|
||||
|
||||
10
.gitignore
vendored
10
.gitignore
vendored
@@ -23,13 +23,6 @@
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
**/Win32/Release*
|
||||
**/Win32/Debug*
|
||||
**/Win32/Devel*
|
||||
**/x64/Release*
|
||||
**/x64/Debug*
|
||||
**/x64/Devel*
|
||||
|
||||
_ReSharper.*
|
||||
pcsx2.snapshot_*
|
||||
svnrev.h
|
||||
@@ -44,6 +37,7 @@ Thumbs.db
|
||||
Debug.txt
|
||||
install_log.txt
|
||||
bad_shader_*
|
||||
crash-*.txt
|
||||
|
||||
Debug
|
||||
Release
|
||||
@@ -90,8 +84,6 @@ oprofile_data/
|
||||
/ipch
|
||||
|
||||
!/3rdparty/libjpeg/change.log
|
||||
/pcsx2/gui/Resources/*.h
|
||||
!/pcsx2/gui/Resources/EmbeddedImage.h
|
||||
/tools/bin
|
||||
.vs
|
||||
|
||||
|
||||
21
.gitmodules
vendored
21
.gitmodules
vendored
@@ -1,15 +1,9 @@
|
||||
[submodule "3rdparty/xz/xz"]
|
||||
path = 3rdparty/xz/xz
|
||||
url = https://github.com/PCSX2/xz.git
|
||||
[submodule "3rdparty/gtest"]
|
||||
path = 3rdparty/gtest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "3rdparty/fmt/fmt"]
|
||||
path = 3rdparty/fmt/fmt
|
||||
url = https://github.com/fmtlib/fmt.git
|
||||
[submodule "3rdparty/libchdr/libchdr"]
|
||||
path = 3rdparty/libchdr/libchdr
|
||||
url = https://github.com/rtissera/libchdr.git
|
||||
[submodule "3rdparty/wil"]
|
||||
path = 3rdparty/wil
|
||||
url = https://github.com/microsoft/wil.git
|
||||
@@ -24,15 +18,18 @@
|
||||
[submodule "3rdparty/vulkan-headers"]
|
||||
path = 3rdparty/vulkan-headers
|
||||
url = https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
[submodule "3rdparty/sdl2/SDL"]
|
||||
path = 3rdparty/sdl2/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
[submodule "3rdparty/libzip/libzip"]
|
||||
path = 3rdparty/libzip/libzip
|
||||
url = https://github.com/nih-at/libzip.git
|
||||
[submodule "3rdparty/zstd/zstd"]
|
||||
path = 3rdparty/zstd/zstd
|
||||
url = https://github.com/facebook/zstd.git
|
||||
[submodule "3rdparty/rcheevos/rcheevos"]
|
||||
path = 3rdparty/rcheevos/rcheevos
|
||||
url = https://github.com/RetroAchievements/rcheevos.git
|
||||
[submodule "3rdparty/libwebp/libwebp"]
|
||||
path = 3rdparty/libwebp/libwebp
|
||||
url = https://github.com/webmproject/libwebp
|
||||
[submodule "3rdparty/xz/xz"]
|
||||
path = 3rdparty/xz/xz
|
||||
url = https://github.com/tukaani-project/xz.git
|
||||
[submodule "3rdparty/lz4/lz4"]
|
||||
path = 3rdparty/lz4/lz4
|
||||
url = https://github.com/lz4/lz4
|
||||
|
||||
7
3rdparty/3rdparty.props
vendored
7
3rdparty/3rdparty.props
vendored
@@ -2,16 +2,17 @@
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
||||
<OutDir>$(SolutionDir)deps\$(PlatformName)\$(Configuration)\</OutDir>
|
||||
<IntDir>$(PlatformName)\$(Configuration)\</IntDir>
|
||||
<OutDir>$(SolutionDir)build\3rdparty\lib-$(PlatformName)-$(Configuration)\</OutDir>
|
||||
<IntDir>$(SolutionDir)build\3rdparty\obj-$(ProjectName)-$(PlatformName)-$(Configuration)\</IntDir>
|
||||
<ExtensionsToDeleteOnClean>*.bsc;*.idb;*.sbr;*.res;*.pch;*.pdb;*.obj;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath);$(ExtensionsToDeleteOnClean)</ExtensionsToDeleteOnClean>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
|
||||
770
3rdparty/cpuinfo/CMakeLists.txt
vendored
770
3rdparty/cpuinfo/CMakeLists.txt
vendored
@@ -3,7 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)
|
||||
# ---[ Setup project
|
||||
PROJECT(
|
||||
cpuinfo
|
||||
LANGUAGES C CXX
|
||||
LANGUAGES C
|
||||
)
|
||||
|
||||
# ---[ Options.
|
||||
@@ -13,6 +13,26 @@ SET(CPUINFO_RUNTIME_TYPE "default" CACHE STRING "Type of runtime library (shared
|
||||
SET_PROPERTY(CACHE CPUINFO_RUNTIME_TYPE PROPERTY STRINGS default static shared)
|
||||
SET(CPUINFO_LOG_LEVEL "default" CACHE STRING "Minimum logging level (info with lower severity will be ignored)")
|
||||
SET_PROPERTY(CACHE CPUINFO_LOG_LEVEL PROPERTY STRINGS default debug info warning error fatal none)
|
||||
IF(ANDROID)
|
||||
OPTION(CPUINFO_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" OFF)
|
||||
ELSE()
|
||||
OPTION(CPUINFO_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" ON)
|
||||
ENDIF()
|
||||
OPTION(CPUINFO_BUILD_TOOLS "Build command-line tools" OFF)
|
||||
OPTION(CPUINFO_BUILD_UNIT_TESTS "Build cpuinfo unit tests" OFF)
|
||||
OPTION(CPUINFO_BUILD_MOCK_TESTS "Build cpuinfo mock tests" OFF)
|
||||
OPTION(CPUINFO_BUILD_BENCHMARKS "Build cpuinfo micro-benchmarks" OFF)
|
||||
OPTION(CPUINFO_BUILD_PKG_CONFIG "Build pkg-config manifest" OFF)
|
||||
OPTION(USE_SYSTEM_LIBS "Use system libraries instead of downloading and building them" OFF)
|
||||
OPTION(USE_SYSTEM_GOOGLEBENCHMARK "Use system Google Benchmark library instead of downloading and building it" ${USE_SYSTEM_LIBS})
|
||||
OPTION(USE_SYSTEM_GOOGLETEST "Use system Google Test library instead of downloading and building it" ${USE_SYSTEM_LIBS})
|
||||
|
||||
# ---[ CMake options
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
IF(CPUINFO_BUILD_UNIT_TESTS OR CPUINFO_BUILD_MOCK_TESTS)
|
||||
ENABLE_TESTING()
|
||||
ENDIF()
|
||||
|
||||
MACRO(CPUINFO_TARGET_ENABLE_C99 target)
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES
|
||||
@@ -22,7 +42,7 @@ ENDMACRO()
|
||||
|
||||
MACRO(CPUINFO_TARGET_ENABLE_CXX11 target)
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD 14
|
||||
CXX_EXTENSIONS NO)
|
||||
ENDMACRO()
|
||||
|
||||
@@ -38,10 +58,29 @@ MACRO(CPUINFO_TARGET_RUNTIME_LIBRARY target)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
# -- [ Determine whether building for Apple's desktop or mobile OSes
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "^(Darwin|iOS|tvOS|watchOS)$")
|
||||
SET(IS_APPLE_OS TRUE)
|
||||
ELSE()
|
||||
SET(IS_APPLE_OS FALSE)
|
||||
ENDIF()
|
||||
|
||||
# -- [ Determine target processor
|
||||
SET(CPUINFO_TARGET_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64)$")
|
||||
IF(IS_APPLE_OS AND CMAKE_OSX_ARCHITECTURES MATCHES "^(x86_64|arm64.*)$")
|
||||
SET(CPUINFO_TARGET_PROCESSOR "${CMAKE_OSX_ARCHITECTURES}")
|
||||
ELSEIF(CMAKE_GENERATOR MATCHES "^Visual Studio " AND CMAKE_VS_PLATFORM_NAME)
|
||||
IF(CMAKE_VS_PLATFORM_NAME STREQUAL "Win32")
|
||||
SET(CPUINFO_TARGET_PROCESSOR "x86")
|
||||
ELSEIF(CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
|
||||
SET(CPUINFO_TARGET_PROCESSOR "x86_64")
|
||||
ELSEIF(CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64")
|
||||
SET(CPUINFO_TARGET_PROCESSOR "arm64")
|
||||
ELSEIF(CMAKE_VS_PLATFORM_NAME MATCHES "^(ARM64EC|arm64ec|ARM64E|arm64e)")
|
||||
SET(CPUINFO_TARGET_PROCESSOR "arm64")
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Unsupported Visual Studio architecture \"${CMAKE_VS_PLATFORM_NAME}\"")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ Build flags
|
||||
@@ -53,20 +92,21 @@ IF(NOT CMAKE_SYSTEM_PROCESSOR)
|
||||
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
|
||||
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
|
||||
ENDIF()
|
||||
ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64)$")
|
||||
ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*|riscv(32|64))$")
|
||||
MESSAGE(WARNING
|
||||
"Target processor architecture \"${CPUINFO_TARGET_PROCESSOR}\" is not supported in cpuinfo. "
|
||||
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
|
||||
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(NOT CMAKE_SYSTEM_NAME)
|
||||
MESSAGE(WARNING
|
||||
"Target operating system is not specified. "
|
||||
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
|
||||
SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
|
||||
ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS|Darwin|Linux|Android)$")
|
||||
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android)$")
|
||||
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT IS_APPLE_OS)
|
||||
MESSAGE(WARNING
|
||||
"Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. "
|
||||
"cpuinfo will compile, but cpuinfo_initialize() will always fail.")
|
||||
@@ -74,11 +114,48 @@ ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS|Darwin|Linux|Android
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS OR CPUINFO_BUILD_BENCHMARKS)
|
||||
ENABLE_LANGUAGE(CXX)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ Download deps
|
||||
SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps
|
||||
CACHE PATH "Confu-style dependencies source directory")
|
||||
SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
|
||||
CACHE PATH "Confu-style dependencies binary directory")
|
||||
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM AND (CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS))
|
||||
IF(USE_SYSTEM_GOOGLETEST)
|
||||
FIND_PACKAGE(GTest REQUIRED)
|
||||
ELSEIF(NOT DEFINED GOOGLETEST_SOURCE_DIR)
|
||||
MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
|
||||
CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
|
||||
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
|
||||
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
|
||||
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
|
||||
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
|
||||
SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS)
|
||||
IF(USE_SYSTEM_GOOGLEBENCHMARK)
|
||||
FIND_PACKAGE(benchmark REQUIRED)
|
||||
ELSEIF(NOT DEFINED GOOGLEBENCHMARK_SOURCE_DIR)
|
||||
MESSAGE(STATUS "Downloading Google Benchmark to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark (define GOOGLEBENCHMARK_SOURCE_DIR to avoid it)")
|
||||
CONFIGURE_FILE(cmake/DownloadGoogleBenchmark.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download/CMakeLists.txt")
|
||||
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
|
||||
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download")
|
||||
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
|
||||
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark-download")
|
||||
SET(GOOGLEBENCHMARK_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark" CACHE STRING "Google Benchmark source directory")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ cpuinfo library
|
||||
SET(CPUINFO_SRCS
|
||||
src/init.c
|
||||
src/api.c
|
||||
src/cache.c)
|
||||
SET(CPUINFO_SRCS src/api.c src/cache.c src/init.c src/log.c)
|
||||
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND (CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$" OR IOS_ARCH MATCHES "^(i386|x86_64)$"))
|
||||
@@ -97,12 +174,16 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
LIST(APPEND CPUINFO_SRCS
|
||||
src/x86/linux/init.c
|
||||
src/x86/linux/cpuinfo.c)
|
||||
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
ELSEIF(IS_APPLE_OS)
|
||||
LIST(APPEND CPUINFO_SRCS src/x86/mach/init.c)
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$")
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS)$")
|
||||
LIST(APPEND CPUINFO_SRCS src/x86/windows/init.c)
|
||||
ENDIF()
|
||||
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(armv[5-8].*|aarch64|arm64)$" OR IOS_ARCH MATCHES "^(armv7.*|arm64.*)$")
|
||||
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "^Windows" AND CPUINFO_TARGET_PROCESSOR MATCHES "^(ARM64|arm64)$")
|
||||
LIST(APPEND CPUINFO_SRCS
|
||||
src/arm/windows/init-by-logical-sys-info.c
|
||||
src/arm/windows/init.c)
|
||||
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(armv[5-8].*|aarch64|arm64.*)$" OR IOS_ARCH MATCHES "^(armv7.*|arm64.*)$")
|
||||
LIST(APPEND CPUINFO_SRCS
|
||||
src/arm/uarch.c
|
||||
src/arm/cache.c)
|
||||
@@ -122,13 +203,22 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)$")
|
||||
LIST(APPEND CPUINFO_SRCS src/arm/linux/aarch64-isa.c)
|
||||
ENDIF()
|
||||
ELSEIF(IOS OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CPUINFO_TARGET_PROCESSOR STREQUAL "arm64"))
|
||||
ELSEIF(IS_APPLE_OS AND CPUINFO_TARGET_PROCESSOR MATCHES "arm64.*")
|
||||
LIST(APPEND CPUINFO_SRCS src/arm/mach/init.c)
|
||||
ENDIF()
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
LIST(APPEND CPUINFO_SRCS
|
||||
src/arm/android/properties.c)
|
||||
ENDIF()
|
||||
ELSEIF(CPUINFO_TARGET_PROCESSOR MATCHES "^(riscv(32|64))$")
|
||||
LIST(APPEND CPUINFO_SRCS
|
||||
src/riscv/uarch.c)
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
LIST(APPEND CPUINFO_SRCS
|
||||
src/riscv/linux/init.c
|
||||
src/riscv/linux/riscv-hw.c
|
||||
src/riscv/linux/riscv-isa.c)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
|
||||
@@ -142,7 +232,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
src/linux/multiline.c
|
||||
src/linux/cpulist.c
|
||||
src/linux/processors.c)
|
||||
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
ELSEIF(IS_APPLE_OS)
|
||||
LIST(APPEND CPUINFO_SRCS src/mach/topology.c)
|
||||
ENDIF()
|
||||
|
||||
@@ -166,34 +256,43 @@ ADD_LIBRARY(cpuinfo_internals STATIC ${CPUINFO_SRCS})
|
||||
CPUINFO_TARGET_ENABLE_C99(cpuinfo)
|
||||
CPUINFO_TARGET_ENABLE_C99(cpuinfo_internals)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo)
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|CYGWIN|MSYS)$")
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS)$")
|
||||
# Target Windows 7+ API
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE _WIN32_WINNT=0x0601)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE _WIN32_WINNT=0x0601 _CRT_SECURE_NO_WARNINGS)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE _WIN32_WINNT=0x0601 _CRT_SECURE_NO_WARNINGS)
|
||||
# Explicitly link Kernel32 for UWP build
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
TARGET_LINK_LIBRARIES(cpuinfo PUBLIC Kernel32)
|
||||
endif()
|
||||
ENDIF()
|
||||
IF(ANDROID AND NOT CPUINFO_LOG_TO_STDIO)
|
||||
TARGET_LINK_LIBRARIES(cpuinfo PRIVATE "log")
|
||||
ENDIF()
|
||||
SET_TARGET_PROPERTIES(cpuinfo PROPERTIES PUBLIC_HEADER include/cpuinfo.h)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC include)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo BEFORE PRIVATE src)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo_internals BEFORE PUBLIC include src)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_TO_STDIO=$<BOOL:${CPUINFO_LOG_TO_STDIO}>")
|
||||
IF(CPUINFO_LOG_LEVEL STREQUAL "default")
|
||||
# default logging level: error (subject to change)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=2)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=2")
|
||||
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "debug")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=5)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=5")
|
||||
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "info")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=4)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=4")
|
||||
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "warning")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=3)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=3")
|
||||
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "error")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=2)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=2")
|
||||
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "fatal")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=1)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=1")
|
||||
ELSEIF(CPUINFO_LOG_LEVEL STREQUAL "none")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE CPUINFO_LOG_LEVEL=0)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo PRIVATE "CPUINFO_LOG_LEVEL=0")
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "Unsupported logging level ${CPUINFO_LOG_LEVEL}")
|
||||
ENDIF()
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE CPUINFO_LOG_LEVEL=0)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE "CPUINFO_LOG_LEVEL=0")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_internals PRIVATE "CPUINFO_LOG_TO_STDIO=1")
|
||||
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo INTERFACE CPUINFO_SUPPORTED_PLATFORM=1)
|
||||
@@ -207,17 +306,610 @@ ELSE()
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo INTERFACE CPUINFO_SUPPORTED_PLATFORM=0)
|
||||
ENDIF()
|
||||
|
||||
# ---[ cpuinfo dependencies: clog
|
||||
IF(NOT DEFINED CLOG_SOURCE_DIR)
|
||||
SET(CLOG_SOURCE_DIR "${PROJECT_SOURCE_DIR}/deps/clog")
|
||||
ADD_LIBRARY(${PROJECT_NAME}::cpuinfo ALIAS cpuinfo)
|
||||
|
||||
# support find_package(cpuinfo CONFIG)
|
||||
INCLUDE(CMakePackageConfigHelpers)
|
||||
GET_FILENAME_COMPONENT(CONFIG_FILE_PATH ${CMAKE_CURRENT_BINARY_DIR}/cpuinfo-config.cmake ABSOLUTE)
|
||||
CONFIGURE_PACKAGE_CONFIG_FILE(
|
||||
cmake/cpuinfo-config.cmake.in ${CONFIG_FILE_PATH}
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME})
|
||||
INSTALL(FILES ${CONFIG_FILE_PATH}
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}) # cpuinfo_DIR ${prefix}/share/cpuinfo
|
||||
|
||||
INSTALL(TARGETS cpuinfo
|
||||
EXPORT cpuinfo-targets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
INSTALL(EXPORT cpuinfo-targets
|
||||
NAMESPACE ${PROJECT_NAME}:: # IMPORTED cpuinfo::cpuinfo
|
||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME})
|
||||
|
||||
# ---[ cpuinfo micro-benchmarks
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_BENCHMARKS)
|
||||
# ---[ Build google benchmark
|
||||
IF(NOT TARGET benchmark AND NOT USE_SYSTEM_GOOGLEBENCHMARK)
|
||||
SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "")
|
||||
ADD_SUBDIRECTORY(
|
||||
"${GOOGLEBENCHMARK_SOURCE_DIR}"
|
||||
"${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark")
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "^(Linux|Android)$")
|
||||
ADD_EXECUTABLE(get-current-bench bench/get-current.cc)
|
||||
TARGET_LINK_LIBRARIES(get-current-bench cpuinfo benchmark)
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(init-bench bench/init.cc)
|
||||
TARGET_LINK_LIBRARIES(init-bench cpuinfo benchmark)
|
||||
ENDIF()
|
||||
IF(NOT TARGET clog)
|
||||
SET(CLOG_BUILD_TESTS OFF CACHE BOOL "")
|
||||
SET(CLOG_RUNTIME_TYPE "${CPUINFO_RUNTIME_TYPE}" CACHE STRING "")
|
||||
ADD_SUBDIRECTORY(
|
||||
"${CLOG_SOURCE_DIR}")
|
||||
# We build static version of clog but a dynamic library may indirectly depend on it
|
||||
SET_PROPERTY(TARGET clog PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM)
|
||||
IF(CPUINFO_BUILD_MOCK_TESTS OR CPUINFO_BUILD_UNIT_TESTS)
|
||||
# ---[ Build google test
|
||||
IF(NOT TARGET gtest AND NOT USE_SYSTEM_GOOGLETEST)
|
||||
IF(MSVC AND NOT CPUINFO_RUNTIME_TYPE STREQUAL "static")
|
||||
SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(
|
||||
"${GOOGLETEST_SOURCE_DIR}"
|
||||
"${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ cpuinfo mock library and mock tests
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS)
|
||||
SET(CPUINFO_MOCK_SRCS "${CPUINFO_SRCS}")
|
||||
IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
|
||||
LIST(APPEND CPUINFO_MOCK_SRCS src/x86/mockcpuid.c)
|
||||
ENDIF()
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
LIST(APPEND CPUINFO_MOCK_SRCS src/linux/mockfile.c)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(cpuinfo_mock STATIC ${CPUINFO_MOCK_SRCS})
|
||||
CPUINFO_TARGET_ENABLE_C99(cpuinfo_mock)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo_mock)
|
||||
SET_TARGET_PROPERTIES(cpuinfo_mock PROPERTIES PUBLIC_HEADER include/cpuinfo.h)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo_mock BEFORE PUBLIC include)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuinfo_mock BEFORE PRIVATE src)
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PUBLIC "CPUINFO_MOCK=1")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE "CPUINFO_LOG_LEVEL=5")
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE "CPUINFO_LOG_TO_STDIO=1")
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
TARGET_LINK_LIBRARIES(cpuinfo_mock PUBLIC ${CMAKE_THREAD_LIBS_INIT})
|
||||
TARGET_COMPILE_DEFINITIONS(cpuinfo_mock PRIVATE _GNU_SOURCE=1)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a)$")
|
||||
ADD_EXECUTABLE(atm7029b-tablet-test test/mock/atm7029b-tablet.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(atm7029b-tablet-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(atm7029b-tablet-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME atm7029b-tablet-test COMMAND atm7029b-tablet-test)
|
||||
|
||||
ADD_EXECUTABLE(blu-r1-hd-test test/mock/blu-r1-hd.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(blu-r1-hd-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(blu-r1-hd-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME blu-r1-hd-test COMMAND blu-r1-hd-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-a3-2016-eu-test test/mock/galaxy-a3-2016-eu.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-a3-2016-eu-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-a3-2016-eu-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-a3-2016-eu-test COMMAND galaxy-a3-2016-eu-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-a8-2016-duos-test test/mock/galaxy-a8-2016-duos.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-a8-2016-duos-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-a8-2016-duos-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-a8-2016-duos-test COMMAND galaxy-a8-2016-duos-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-grand-prime-value-edition-test test/mock/galaxy-grand-prime-value-edition.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-grand-prime-value-edition-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-grand-prime-value-edition-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-grand-prime-value-edition-test COMMAND galaxy-grand-prime-value-edition-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-j1-2016-test test/mock/galaxy-j1-2016.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-j1-2016-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-j1-2016-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-j1-2016-test COMMAND galaxy-j1-2016-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-j5-test test/mock/galaxy-j5.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-j5-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-j5-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-j5-test COMMAND galaxy-j5-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-j7-prime-test test/mock/galaxy-j7-prime.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-j7-prime-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-j7-prime-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-j7-prime-test COMMAND galaxy-j7-prime-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-j7-tmobile-test test/mock/galaxy-j7-tmobile.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-j7-tmobile-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-j7-tmobile-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-j7-tmobile-test COMMAND galaxy-j7-tmobile-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-j7-uae-test test/mock/galaxy-j7-uae.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-j7-uae-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-j7-uae-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-j7-uae-test COMMAND galaxy-j7-uae-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s3-us-test test/mock/galaxy-s3-us.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s3-us-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s3-us-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s3-us-test COMMAND galaxy-s3-us-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s4-us-test test/mock/galaxy-s4-us.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s4-us-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s4-us-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s4-us-test COMMAND galaxy-s4-us-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s5-global-test test/mock/galaxy-s5-global.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s5-global-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s5-global-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s5-global-test COMMAND galaxy-s5-global-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s5-us-test test/mock/galaxy-s5-us.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s5-us-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s5-us-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s5-us-test COMMAND galaxy-s5-us-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-tab-3-7.0-test test/mock/galaxy-tab-3-7.0.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-tab-3-7.0-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-tab-3-7.0-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-tab-3-7.0-test COMMAND galaxy-tab-3-7.0-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-tab-3-lite-test test/mock/galaxy-tab-3-lite.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-tab-3-lite-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-tab-3-lite-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-tab-3-lite-test COMMAND galaxy-tab-3-lite-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-win-duos-test test/mock/galaxy-win-duos.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-win-duos-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-win-duos-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-win-duos-test COMMAND galaxy-win-duos-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-ascend-p7-test test/mock/huawei-ascend-p7.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-ascend-p7-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-ascend-p7-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-ascend-p7-test COMMAND huawei-ascend-p7-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-honor-6-test test/mock/huawei-honor-6.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-honor-6-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-honor-6-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-honor-6-test COMMAND huawei-honor-6-test)
|
||||
|
||||
ADD_EXECUTABLE(lenovo-a6600-plus-test test/mock/lenovo-a6600-plus.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(lenovo-a6600-plus-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(lenovo-a6600-plus-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME lenovo-a6600-plus-test COMMAND lenovo-a6600-plus-test)
|
||||
|
||||
ADD_EXECUTABLE(lenovo-vibe-x2-test test/mock/lenovo-vibe-x2.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(lenovo-vibe-x2-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(lenovo-vibe-x2-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME lenovo-vibe-x2-test COMMAND lenovo-vibe-x2-test)
|
||||
|
||||
ADD_EXECUTABLE(lg-k10-eu-test test/mock/lg-k10-eu.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(lg-k10-eu-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(lg-k10-eu-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME lg-k10-eu-test COMMAND lg-k10-eu-test)
|
||||
|
||||
ADD_EXECUTABLE(lg-optimus-g-pro-test test/mock/lg-optimus-g-pro.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(lg-optimus-g-pro-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(lg-optimus-g-pro-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME lg-optimus-g-pro-test COMMAND lg-optimus-g-pro-test)
|
||||
|
||||
ADD_EXECUTABLE(moto-e-gen1-test test/mock/moto-e-gen1.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(moto-e-gen1-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(moto-e-gen1-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME moto-e-gen1-test COMMAND moto-e-gen1-test)
|
||||
|
||||
ADD_EXECUTABLE(moto-g-gen1-test test/mock/moto-g-gen1.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(moto-g-gen1-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(moto-g-gen1-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME moto-g-gen1-test COMMAND moto-g-gen1-test)
|
||||
|
||||
ADD_EXECUTABLE(moto-g-gen2-test test/mock/moto-g-gen2.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(moto-g-gen2-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(moto-g-gen2-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME moto-g-gen2-test COMMAND moto-g-gen2-test)
|
||||
|
||||
ADD_EXECUTABLE(moto-g-gen3-test test/mock/moto-g-gen3.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(moto-g-gen3-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(moto-g-gen3-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME moto-g-gen3-test COMMAND moto-g-gen3-test)
|
||||
|
||||
ADD_EXECUTABLE(moto-g-gen4-test test/mock/moto-g-gen4.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(moto-g-gen4-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(moto-g-gen4-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME moto-g-gen4-test COMMAND moto-g-gen4-test)
|
||||
|
||||
ADD_EXECUTABLE(moto-g-gen5-test test/mock/moto-g-gen5.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(moto-g-gen5-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(moto-g-gen5-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME moto-g-gen5-test COMMAND moto-g-gen5-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus-s-test test/mock/nexus-s.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus-s-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus-s-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus-s-test COMMAND nexus-s-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus4-test test/mock/nexus4.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus4-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus4-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus4-test COMMAND nexus4-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus6-test test/mock/nexus6.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus6-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus6-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus6-test COMMAND nexus6-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus10-test test/mock/nexus10.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus10-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus10-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus10-test COMMAND nexus10-test)
|
||||
|
||||
ADD_EXECUTABLE(padcod-10.1-test test/mock/padcod-10.1.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(padcod-10.1-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(padcod-10.1-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME padcod-10.1-test COMMAND padcod-10.1-test)
|
||||
|
||||
ADD_EXECUTABLE(xiaomi-redmi-2a-test test/mock/xiaomi-redmi-2a.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-2a-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(xiaomi-redmi-2a-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME xiaomi-redmi-2a-test COMMAND xiaomi-redmi-2a-test)
|
||||
|
||||
ADD_EXECUTABLE(xperia-sl-test test/mock/xperia-sl.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(xperia-sl-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(xperia-sl-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME xperia-sl-test COMMAND xperia-sl-test)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv5te|armv7-a|aarch64)$")
|
||||
ADD_EXECUTABLE(alcatel-revvl-test test/mock/alcatel-revvl.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(alcatel-revvl-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(alcatel-revvl-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME alcatel-revvl-test COMMAND alcatel-revvl-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-a8-2018-test test/mock/galaxy-a8-2018.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-a8-2018-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-a8-2018-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-a8-2018-test COMMAND galaxy-a8-2018-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-c9-pro-test test/mock/galaxy-c9-pro.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-c9-pro-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-c9-pro-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-c9-pro-test COMMAND galaxy-c9-pro-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s6-test test/mock/galaxy-s6.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s6-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s6-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s6-test COMMAND galaxy-s6-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s7-us-test test/mock/galaxy-s7-us.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s7-us-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s7-us-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s7-us-test COMMAND galaxy-s7-us-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s7-global-test test/mock/galaxy-s7-global.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s7-global-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s7-global-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s7-global-test COMMAND galaxy-s7-global-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s8-us-test test/mock/galaxy-s8-us.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s8-us-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s8-us-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s8-us-test COMMAND galaxy-s8-us-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s8-global-test test/mock/galaxy-s8-global.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s8-global-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s8-global-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s8-global-test COMMAND galaxy-s8-global-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s9-us-test test/mock/galaxy-s9-us.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s9-us-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s9-us-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s9-us-test COMMAND galaxy-s9-us-test)
|
||||
|
||||
ADD_EXECUTABLE(galaxy-s9-global-test test/mock/galaxy-s9-global.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(galaxy-s9-global-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(galaxy-s9-global-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME galaxy-s9-global-test COMMAND galaxy-s9-global-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-mate-8-test test/mock/huawei-mate-8.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-mate-8-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-mate-8-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-mate-8-test COMMAND huawei-mate-8-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-mate-9-test test/mock/huawei-mate-9.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-mate-9-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-mate-9-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-mate-9-test COMMAND huawei-mate-9-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-mate-10-test test/mock/huawei-mate-10.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-mate-10-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-mate-10-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-mate-10-test COMMAND huawei-mate-10-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-mate-20-test test/mock/huawei-mate-20.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-mate-20-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-mate-20-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-mate-20-test COMMAND huawei-mate-20-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-p8-lite-test test/mock/huawei-p8-lite.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-p8-lite-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-p8-lite-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-p8-lite-test COMMAND huawei-p8-lite-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-p9-lite-test test/mock/huawei-p9-lite.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-p9-lite-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-p9-lite-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-p9-lite-test COMMAND huawei-p9-lite-test)
|
||||
|
||||
ADD_EXECUTABLE(huawei-p20-pro-test test/mock/huawei-p20-pro.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(huawei-p20-pro-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(huawei-p20-pro-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME huawei-p20-pro-test COMMAND huawei-p20-pro-test)
|
||||
|
||||
ADD_EXECUTABLE(iconia-one-10-test test/mock/iconia-one-10.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(iconia-one-10-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(iconia-one-10-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME iconia-one-10-test COMMAND iconia-one-10-test)
|
||||
|
||||
ADD_EXECUTABLE(meizu-pro-6-test test/mock/meizu-pro-6.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(meizu-pro-6-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(meizu-pro-6-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME meizu-pro-6-test COMMAND meizu-pro-6-test)
|
||||
|
||||
ADD_EXECUTABLE(meizu-pro-6s-test test/mock/meizu-pro-6s.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(meizu-pro-6s-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(meizu-pro-6s-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME meizu-pro-6s-test COMMAND meizu-pro-6s-test)
|
||||
|
||||
ADD_EXECUTABLE(meizu-pro-7-plus-test test/mock/meizu-pro-7-plus.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(meizu-pro-7-plus-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(meizu-pro-7-plus-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME meizu-pro-7-plus-test COMMAND meizu-pro-7-plus-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus5x-test test/mock/nexus5x.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus5x-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus5x-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus5x-test COMMAND nexus5x-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus6p-test test/mock/nexus6p.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus6p-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus6p-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus6p-test COMMAND nexus6p-test)
|
||||
|
||||
ADD_EXECUTABLE(nexus9-test test/mock/nexus9.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(nexus9-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(nexus9-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME nexus9-test COMMAND nexus9-test)
|
||||
|
||||
ADD_EXECUTABLE(oneplus-3t-test test/mock/oneplus-3t.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(oneplus-3t-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(oneplus-3t-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME oneplus-3t-test COMMAND oneplus-3t-test)
|
||||
|
||||
ADD_EXECUTABLE(oneplus-5-test test/mock/oneplus-5.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(oneplus-5-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(oneplus-5-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME oneplus-5-test COMMAND oneplus-5-test)
|
||||
|
||||
ADD_EXECUTABLE(oneplus-5t-test test/mock/oneplus-5t.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(oneplus-5t-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(oneplus-5t-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME oneplus-5t-test COMMAND oneplus-5t-test)
|
||||
|
||||
ADD_EXECUTABLE(oppo-a37-test test/mock/oppo-a37.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(oppo-a37-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(oppo-a37-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME oppo-a37-test COMMAND oppo-a37-test)
|
||||
|
||||
ADD_EXECUTABLE(oppo-r9-test test/mock/oppo-r9.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(oppo-r9-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(oppo-r9-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME oppo-r9-test COMMAND oppo-r9-test)
|
||||
|
||||
ADD_EXECUTABLE(oppo-r15-test test/mock/oppo-r15.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(oppo-r15-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(oppo-r15-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME oppo-r15-test COMMAND oppo-r15-test)
|
||||
|
||||
ADD_EXECUTABLE(pixel-test test/mock/pixel.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(pixel-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(pixel-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME pixel-test COMMAND pixel-test)
|
||||
|
||||
ADD_EXECUTABLE(pixel-c-test test/mock/pixel-c.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(pixel-c-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(pixel-c-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME pixel-c-test COMMAND pixel-c-test)
|
||||
|
||||
ADD_EXECUTABLE(pixel-xl-test test/mock/pixel-xl.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(pixel-xl-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(pixel-xl-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME pixel-xl-test COMMAND pixel-xl-test)
|
||||
|
||||
ADD_EXECUTABLE(pixel-2-xl-test test/mock/pixel-2-xl.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(pixel-2-xl-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(pixel-2-xl-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME pixel-2-xl-test COMMAND pixel-2-xl-test)
|
||||
|
||||
ADD_EXECUTABLE(xiaomi-mi-5c-test test/mock/xiaomi-mi-5c.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(xiaomi-mi-5c-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(xiaomi-mi-5c-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME xiaomi-mi-5c-test COMMAND xiaomi-mi-5c-test)
|
||||
|
||||
ADD_EXECUTABLE(xiaomi-redmi-note-3-test test/mock/xiaomi-redmi-note-3.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-note-3-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(xiaomi-redmi-note-3-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME xiaomi-redmi-note-3-test COMMAND xiaomi-redmi-note-3-test)
|
||||
|
||||
ADD_EXECUTABLE(xiaomi-redmi-note-4-test test/mock/xiaomi-redmi-note-4.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(xiaomi-redmi-note-4-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(xiaomi-redmi-note-4-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME xiaomi-redmi-note-4-test COMMAND xiaomi-redmi-note-4-test)
|
||||
|
||||
ADD_EXECUTABLE(xperia-c4-dual-test test/mock/xperia-c4-dual.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(xperia-c4-dual-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(xperia-c4-dual-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME xperia-c4-dual-test COMMAND xperia-c4-dual-test)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64)$")
|
||||
ADD_EXECUTABLE(alldocube-iwork8-test test/mock/alldocube-iwork8.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(alldocube-iwork8-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(alldocube-iwork8-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME alldocube-iwork8-test COMMAND alldocube-iwork8-test)
|
||||
|
||||
ADD_EXECUTABLE(leagoo-t5c-test test/mock/leagoo-t5c.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(leagoo-t5c-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(leagoo-t5c-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME leagoo-t5c-test COMMAND leagoo-t5c-test)
|
||||
|
||||
ADD_EXECUTABLE(memo-pad-7-test test/mock/memo-pad-7.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(memo-pad-7-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(memo-pad-7-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME memo-pad-7-test COMMAND memo-pad-7-test)
|
||||
|
||||
ADD_EXECUTABLE(zenfone-c-test test/mock/zenfone-c.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(zenfone-c-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(zenfone-c-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME zenfone-c-test COMMAND zenfone-c-test)
|
||||
|
||||
ADD_EXECUTABLE(zenfone-2-test test/mock/zenfone-2.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(zenfone-2-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(zenfone-2-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME zenfone-2-test COMMAND zenfone-2-test)
|
||||
|
||||
ADD_EXECUTABLE(zenfone-2e-test test/mock/zenfone-2e.cc)
|
||||
TARGET_INCLUDE_DIRECTORIES(zenfone-2e-test BEFORE PRIVATE test/mock)
|
||||
TARGET_LINK_LIBRARIES(zenfone-2e-test PRIVATE cpuinfo_mock gtest)
|
||||
ADD_TEST(NAME zenfone-2e-test COMMAND zenfone-2e-test)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ cpuinfo unit tests
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_TESTS)
|
||||
ADD_EXECUTABLE(init-test test/init.cc)
|
||||
CPUINFO_TARGET_ENABLE_CXX11(init-test)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(init-test)
|
||||
TARGET_LINK_LIBRARIES(init-test PRIVATE cpuinfo gtest gtest_main)
|
||||
ADD_TEST(NAME init-test COMMAND init-test)
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
ADD_EXECUTABLE(get-current-test test/get-current.cc)
|
||||
CPUINFO_TARGET_ENABLE_CXX11(get-current-test)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(get-current-test)
|
||||
TARGET_LINK_LIBRARIES(get-current-test PRIVATE cpuinfo gtest gtest_main)
|
||||
ADD_TEST(NAME get-current-test COMMAND get-current-test)
|
||||
ENDIF()
|
||||
|
||||
IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
|
||||
ADD_EXECUTABLE(brand-string-test test/name/brand-string.cc)
|
||||
CPUINFO_TARGET_ENABLE_CXX11(brand-string-test)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(brand-string-test)
|
||||
TARGET_LINK_LIBRARIES(brand-string-test PRIVATE cpuinfo_internals gtest gtest_main)
|
||||
ADD_TEST(NAME brand-string-test COMMAND brand-string-test)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$")
|
||||
ADD_LIBRARY(android_properties_interface STATIC test/name/android-properties-interface.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(android_properties_interface)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(android_properties_interface)
|
||||
TARGET_LINK_LIBRARIES(android_properties_interface PRIVATE cpuinfo_internals)
|
||||
|
||||
ADD_EXECUTABLE(chipset-test
|
||||
test/name/proc-cpuinfo-hardware.cc
|
||||
test/name/ro-product-board.cc
|
||||
test/name/ro-board-platform.cc
|
||||
test/name/ro-mediatek-platform.cc
|
||||
test/name/ro-arch.cc
|
||||
test/name/ro-chipname.cc
|
||||
test/name/android-properties.cc)
|
||||
CPUINFO_TARGET_ENABLE_CXX11(chipset-test)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(chipset-test)
|
||||
TARGET_LINK_LIBRARIES(chipset-test PRIVATE android_properties_interface gtest gtest_main)
|
||||
ADD_TEST(NAME chipset-test COMMAND chipset-test)
|
||||
|
||||
ADD_EXECUTABLE(cache-test test/arm-cache.cc)
|
||||
CPUINFO_TARGET_ENABLE_CXX11(cache-test)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cache-test)
|
||||
TARGET_COMPILE_DEFINITIONS(cache-test PRIVATE __STDC_LIMIT_MACROS=1 __STDC_CONSTANT_MACROS=1)
|
||||
TARGET_LINK_LIBRARIES(cache-test PRIVATE cpuinfo_internals gtest gtest_main)
|
||||
ADD_TEST(NAME cache-test COMMAND cache-test)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ Helper and debug tools
|
||||
IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS)
|
||||
ADD_EXECUTABLE(isa-info tools/isa-info.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(isa-info)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(isa-info)
|
||||
TARGET_LINK_LIBRARIES(isa-info PRIVATE cpuinfo)
|
||||
INSTALL(TARGETS isa-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
ADD_EXECUTABLE(cpu-info tools/cpu-info.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(cpu-info)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cpu-info)
|
||||
TARGET_LINK_LIBRARIES(cpu-info PRIVATE cpuinfo)
|
||||
INSTALL(TARGETS cpu-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
ADD_EXECUTABLE(cache-info tools/cache-info.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(cache-info)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cache-info)
|
||||
TARGET_LINK_LIBRARIES(cache-info PRIVATE cpuinfo)
|
||||
INSTALL(TARGETS cache-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$")
|
||||
ADD_EXECUTABLE(auxv-dump tools/auxv-dump.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(auxv-dump)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(auxv-dump)
|
||||
TARGET_LINK_LIBRARIES(auxv-dump PRIVATE ${CMAKE_DL_LIBS} cpuinfo)
|
||||
|
||||
ADD_EXECUTABLE(cpuinfo-dump tools/cpuinfo-dump.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(cpuinfo-dump)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo-dump)
|
||||
ENDIF()
|
||||
|
||||
IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
|
||||
ADD_EXECUTABLE(cpuid-dump tools/cpuid-dump.c)
|
||||
CPUINFO_TARGET_ENABLE_C99(cpuid-dump)
|
||||
CPUINFO_TARGET_RUNTIME_LIBRARY(cpuid-dump)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuid-dump BEFORE PRIVATE src)
|
||||
TARGET_INCLUDE_DIRECTORIES(cpuid-dump BEFORE PRIVATE include)
|
||||
INSTALL(TARGETS cpuid-dump RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ pkg-config manifest. This is mostly from JsonCpp...
|
||||
IF(CPUINFO_BUILD_PKG_CONFIG)
|
||||
|
||||
FUNCTION(JOIN_PATHS joined_path first_path_segment)
|
||||
SET(temp_path "${first_path_segment}")
|
||||
FOREACH(current_segment IN LISTS ARGN)
|
||||
IF(NOT ("${current_segment}" STREQUAL ""))
|
||||
IF(IS_ABSOLUTE "${current_segment}")
|
||||
SET(temp_path "${current_segment}")
|
||||
ELSE()
|
||||
SET(temp_path "${temp_path}/${current_segment}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
SET(${joined_path} "${temp_path}" PARENT_SCOPE)
|
||||
ENDFUNCTION()
|
||||
|
||||
JOIN_PATHS(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
|
||||
JOIN_PATHS(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
|
||||
CONFIGURE_FILE(
|
||||
"libcpuinfo.pc.in"
|
||||
"libcpuinfo.pc"
|
||||
@ONLY)
|
||||
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcpuinfo.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
||||
ENDIF()
|
||||
TARGET_LINK_LIBRARIES(cpuinfo PRIVATE clog)
|
||||
TARGET_LINK_LIBRARIES(cpuinfo_internals PRIVATE clog)
|
||||
41
3rdparty/cpuinfo/README.md
vendored
41
3rdparty/cpuinfo/README.md
vendored
@@ -48,7 +48,7 @@ Detect if target is a 32-bit or 64-bit ARM system:
|
||||
#endif
|
||||
```
|
||||
|
||||
Check if the host CPU support ARM NEON
|
||||
Check if the host CPU supports ARM NEON
|
||||
|
||||
```c
|
||||
cpuinfo_initialize();
|
||||
@@ -151,6 +151,36 @@ executable(
|
||||
)
|
||||
```
|
||||
|
||||
### Bazel
|
||||
|
||||
This project can be built using [Bazel](https://bazel.build/install).
|
||||
|
||||
You can also use this library as a dependency to your Bazel project. Add to the `WORKSPACE` file:
|
||||
|
||||
```python
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
|
||||
git_repository(
|
||||
name = "org_pytorch_cpuinfo",
|
||||
branch = "master",
|
||||
remote = "https://github.com/Vertexwahn/cpuinfo.git",
|
||||
)
|
||||
```
|
||||
|
||||
And to your `BUILD` file:
|
||||
|
||||
```python
|
||||
cc_binary(
|
||||
name = "cpuinfo_test",
|
||||
srcs = [
|
||||
# ...
|
||||
],
|
||||
deps = [
|
||||
"@org_pytorch_cpuinfo//:cpuinfo",
|
||||
],
|
||||
)
|
||||
```
|
||||
|
||||
### CMake
|
||||
|
||||
To use with CMake use the [FindPkgConfig](https://cmake.org/cmake/help/latest/module/FindPkgConfig.html) module. Here is an example:
|
||||
@@ -220,12 +250,14 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
|
||||
- [x] x86-64 (iPhone simulator)
|
||||
- [x] ARMv7
|
||||
- [x] ARM64
|
||||
- [x] OS X
|
||||
- [x] macOS
|
||||
- [x] x86
|
||||
- [x] x86-64
|
||||
- [x] ARM64 (Apple silicon)
|
||||
- [x] Windows
|
||||
- [x] x86
|
||||
- [x] x86-64
|
||||
- [x] arm64
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -234,12 +266,13 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
|
||||
- [x] Using `/proc/cpuinfo` on ARM
|
||||
- [x] Using `ro.chipname`, `ro.board.platform`, `ro.product.board`, `ro.mediatek.platform`, `ro.arch` properties (Android)
|
||||
- [ ] Using kernel log (`dmesg`) on ARM Linux
|
||||
- [x] Using Windows registry on ARM64 Windows
|
||||
- Vendor and microarchitecture detection
|
||||
- [x] Intel-designed x86/x86-64 cores (up to Sunny Cove, Goldmont Plus, and Knights Mill)
|
||||
- [x] AMD-designed x86/x86-64 cores (up to Puma/Jaguar and Zen 2)
|
||||
- [ ] VIA-designed x86/x86-64 cores
|
||||
- [ ] Other x86 cores (DM&P, RDC, Transmeta, Cyrix, Rise)
|
||||
- [x] ARM-designed ARM cores (up to Cortex-A55, Cortex-A77, and Neoverse E1/N1)
|
||||
- [x] ARM-designed ARM cores (up to Cortex-A55, Cortex-A77, and Neoverse E1/V1/N2/V2)
|
||||
- [x] Qualcomm-designed ARM cores (Scorpion, Krait, and Kryo)
|
||||
- [x] Nvidia-designed ARM cores (Denver and Carmel)
|
||||
- [x] Samsung-designed ARM cores (Exynos)
|
||||
@@ -256,6 +289,7 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
|
||||
- [x] Using `/proc/self/auxv` (Android/ARM)
|
||||
- [ ] Using instruction probing on ARM (Linux)
|
||||
- [ ] Using CPUID registers on ARM64 (Linux)
|
||||
- [x] Using IsProcessorFeaturePresent on ARM64 Windows
|
||||
- Cache detection
|
||||
- [x] Using CPUID leaf 0x00000002 (x86/x86-64)
|
||||
- [x] Using CPUID leaf 0x00000004 (non-AMD x86/x86-64)
|
||||
@@ -267,6 +301,7 @@ LDFLAGS+= $(pkg-config --libs libcpuinfo)
|
||||
- [x] Using `sysctlbyname` (Mach)
|
||||
- [x] Using sysfs `typology` directories (ARM/Linux)
|
||||
- [ ] Using sysfs `cache` directories (Linux)
|
||||
- [x] Using `GetLogicalProcessorInformationEx` on ARM64 Windows
|
||||
- TLB detection
|
||||
- [x] Using CPUID leaf 0x00000002 (x86/x86-64)
|
||||
- [ ] Using CPUID leaves 0x80000005-0x80000006 and 0x80000019 (AMD x86/x86-64)
|
||||
|
||||
15
3rdparty/cpuinfo/cmake/DownloadGoogleBenchmark.cmake
vendored
Normal file
15
3rdparty/cpuinfo/cmake/DownloadGoogleBenchmark.cmake
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
|
||||
|
||||
PROJECT(googlebenchmark-download NONE)
|
||||
|
||||
INCLUDE(ExternalProject)
|
||||
ExternalProject_Add(googlebenchmark
|
||||
URL https://github.com/google/benchmark/archive/v1.6.1.zip
|
||||
URL_HASH SHA256=367e963b8620080aff8c831e24751852cffd1f74ea40f25d9cc1b667a9dd5e45
|
||||
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googlebenchmark"
|
||||
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googlebenchmark"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
15
3rdparty/cpuinfo/cmake/DownloadGoogleTest.cmake
vendored
Normal file
15
3rdparty/cpuinfo/cmake/DownloadGoogleTest.cmake
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
|
||||
|
||||
PROJECT(googletest-download NONE)
|
||||
|
||||
INCLUDE(ExternalProject)
|
||||
ExternalProject_Add(googletest
|
||||
URL https://github.com/google/googletest/archive/release-1.11.0.zip
|
||||
URL_HASH SHA256=353571c2440176ded91c2de6d6cd88ddd41401d14692ec1f99e35d013feda55a
|
||||
SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest"
|
||||
BINARY_DIR "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
||||
12
3rdparty/cpuinfo/cmake/cpuinfo-config.cmake.in
vendored
Normal file
12
3rdparty/cpuinfo/cmake/cpuinfo-config.cmake.in
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
file(GLOB CONFIG_FILES "${_DIR}/cpuinfo-config-*.cmake")
|
||||
foreach(f ${CONFIG_FILES})
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
# ${_DIR}/cpuinfo-targets-*.cmake will be included here
|
||||
include("${_DIR}/cpuinfo-targets.cmake")
|
||||
|
||||
check_required_components(@PROJECT_NAME@)
|
||||
2
3rdparty/cpuinfo/cpuinfo.vcxproj
vendored
2
3rdparty/cpuinfo/cpuinfo.vcxproj
vendored
@@ -59,7 +59,7 @@
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>CPUINFO_LOG_LEVEL=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<WarningLevel>TurnOffAllWarnings</WarningLevel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)include;$(ProjectDir)src;$(ProjectDir)deps\clog\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<ObjectFileName>$(IntDir)%(RelativeDir)</ObjectFileName>
|
||||
|
||||
63
3rdparty/cpuinfo/deps/clog/CMakeLists.txt
vendored
63
3rdparty/cpuinfo/deps/clog/CMakeLists.txt
vendored
@@ -1,5 +1,7 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)
|
||||
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
# ---[ Project and semantic versioning.
|
||||
PROJECT(clog C CXX)
|
||||
|
||||
@@ -11,6 +13,14 @@ IF(ANDROID)
|
||||
ELSE()
|
||||
OPTION(CLOG_LOG_TO_STDIO "Log errors, warnings, and information to stdout/stderr" ON)
|
||||
ENDIF()
|
||||
OPTION(CLOG_BUILD_TESTS "Build clog tests" ON)
|
||||
OPTION(USE_SYSTEM_LIBS "Use system libraries instead of downloading and building them" OFF)
|
||||
OPTION(USE_SYSTEM_GOOGLETEST "Use system Google Test library instead of downloading and building it" ${USE_SYSTEM_LIBS})
|
||||
|
||||
# ---[ CMake options
|
||||
IF(CLOG_BUILD_TESTS)
|
||||
ENABLE_TESTING()
|
||||
ENDIF()
|
||||
|
||||
MACRO(CLOG_TARGET_RUNTIME_LIBRARY target)
|
||||
IF(MSVC AND NOT CLOG_RUNTIME_TYPE STREQUAL "default")
|
||||
@@ -24,6 +34,26 @@ MACRO(CLOG_TARGET_RUNTIME_LIBRARY target)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
# ---[ Download deps
|
||||
SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/deps
|
||||
CACHE PATH "Confu-style dependencies source directory")
|
||||
SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
|
||||
CACHE PATH "Confu-style dependencies binary directory")
|
||||
|
||||
IF(CLOG_BUILD_TESTS)
|
||||
IF(USE_SYSTEM_GOOGLETEST)
|
||||
FIND_PACKAGE(GTest REQUIRED)
|
||||
ELSEIF(NOT DEFINED GOOGLETEST_SOURCE_DIR)
|
||||
MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)")
|
||||
CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt")
|
||||
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
|
||||
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
|
||||
EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
|
||||
WORKING_DIRECTORY "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download")
|
||||
SET(GOOGLETEST_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest" CACHE STRING "Google Test source directory")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# ---[ clog library
|
||||
ADD_LIBRARY(clog STATIC src/clog.c)
|
||||
SET_TARGET_PROPERTIES(clog PROPERTIES
|
||||
@@ -31,7 +61,7 @@ SET_TARGET_PROPERTIES(clog PROPERTIES
|
||||
C_EXTENSIONS NO)
|
||||
CLOG_TARGET_RUNTIME_LIBRARY(clog)
|
||||
SET_TARGET_PROPERTIES(clog PROPERTIES PUBLIC_HEADER include/clog.h)
|
||||
TARGET_INCLUDE_DIRECTORIES(clog BEFORE PUBLIC include)
|
||||
TARGET_INCLUDE_DIRECTORIES(clog PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
|
||||
IF(CLOG_LOG_TO_STDIO)
|
||||
TARGET_COMPILE_DEFINITIONS(clog PRIVATE CLOG_LOG_TO_STDIO=1)
|
||||
ELSE()
|
||||
@@ -39,4 +69,33 @@ ELSE()
|
||||
ENDIF()
|
||||
IF(ANDROID AND NOT CLOG_LOG_TO_STDIO)
|
||||
TARGET_LINK_LIBRARIES(clog PRIVATE log)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(cpuinfo::clog ALIAS clog)
|
||||
|
||||
INSTALL(TARGETS clog
|
||||
EXPORT cpuinfo-targets
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
|
||||
# ---[ clog tests
|
||||
IF(CLOG_BUILD_TESTS)
|
||||
# ---[ Build google test
|
||||
IF(NOT TARGET gtest AND NOT USE_SYSTEM_GOOGLETEST)
|
||||
IF(MSVC AND NOT CLOG_RUNTIME_TYPE STREQUAL "static")
|
||||
SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(
|
||||
"${GOOGLETEST_SOURCE_DIR}"
|
||||
"${CONFU_DEPENDENCIES_BINARY_DIR}/googletest")
|
||||
ENDIF()
|
||||
|
||||
ADD_EXECUTABLE(clog-test test/clog.cc)
|
||||
SET_TARGET_PROPERTIES(clog-test PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_EXTENSIONS NO)
|
||||
CLOG_TARGET_RUNTIME_LIBRARY(clog-test)
|
||||
TARGET_LINK_LIBRARIES(clog-test PRIVATE clog gtest gtest_main)
|
||||
ADD_TEST(clog-test clog-test)
|
||||
ENDIF()
|
||||
|
||||
23
3rdparty/cpuinfo/deps/clog/src/clog.c
vendored
23
3rdparty/cpuinfo/deps/clog/src/clog.c
vendored
@@ -10,6 +10,9 @@
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
#ifdef __hexagon__
|
||||
#include <qurt_printf.h>
|
||||
#endif
|
||||
|
||||
#ifndef CLOG_LOG_TO_STDIO
|
||||
#ifdef __ANDROID__
|
||||
@@ -102,12 +105,14 @@ void clog_vlog_fatal(const char* module, const char* format, va_list args) {
|
||||
out_buffer = heap_buffer;
|
||||
}
|
||||
out_buffer[prefix_chars + format_chars] = '\n';
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
DWORD bytes_written;
|
||||
WriteFile(
|
||||
GetStdHandle(STD_ERROR_HANDLE),
|
||||
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
|
||||
&bytes_written, NULL);
|
||||
#elif defined(__hexagon__)
|
||||
qurt_printf("%s", out_buffer);
|
||||
#else
|
||||
write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
|
||||
#endif
|
||||
@@ -178,12 +183,14 @@ void clog_vlog_error(const char* module, const char* format, va_list args) {
|
||||
out_buffer = heap_buffer;
|
||||
}
|
||||
out_buffer[prefix_chars + format_chars] = '\n';
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
DWORD bytes_written;
|
||||
WriteFile(
|
||||
GetStdHandle(STD_ERROR_HANDLE),
|
||||
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
|
||||
&bytes_written, NULL);
|
||||
#elif defined(__hexagon__)
|
||||
qurt_printf("%s", out_buffer);
|
||||
#else
|
||||
write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
|
||||
#endif
|
||||
@@ -254,12 +261,14 @@ void clog_vlog_warning(const char* module, const char* format, va_list args) {
|
||||
out_buffer = heap_buffer;
|
||||
}
|
||||
out_buffer[prefix_chars + format_chars] = '\n';
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
DWORD bytes_written;
|
||||
WriteFile(
|
||||
GetStdHandle(STD_ERROR_HANDLE),
|
||||
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
|
||||
&bytes_written, NULL);
|
||||
#elif defined(__hexagon__)
|
||||
qurt_printf("%s", out_buffer);
|
||||
#else
|
||||
write(STDERR_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
|
||||
#endif
|
||||
@@ -330,12 +339,14 @@ void clog_vlog_info(const char* module, const char* format, va_list args) {
|
||||
out_buffer = heap_buffer;
|
||||
}
|
||||
out_buffer[prefix_chars + format_chars] = '\n';
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
DWORD bytes_written;
|
||||
WriteFile(
|
||||
GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
|
||||
&bytes_written, NULL);
|
||||
#elif defined(__hexagon__)
|
||||
qurt_printf("%s", out_buffer);
|
||||
#else
|
||||
write(STDOUT_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
|
||||
#endif
|
||||
@@ -406,12 +417,14 @@ void clog_vlog_debug(const char* module, const char* format, va_list args) {
|
||||
out_buffer = heap_buffer;
|
||||
}
|
||||
out_buffer[prefix_chars + format_chars] = '\n';
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32)
|
||||
DWORD bytes_written;
|
||||
WriteFile(
|
||||
GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH,
|
||||
&bytes_written, NULL);
|
||||
#elif defined(__hexagon__)
|
||||
qurt_printf("%s", out_buffer);
|
||||
#else
|
||||
write(STDOUT_FILENO, out_buffer, prefix_chars + format_chars + CLOG_SUFFIX_LENGTH);
|
||||
#endif
|
||||
|
||||
215
3rdparty/cpuinfo/include/cpuinfo.h
vendored
215
3rdparty/cpuinfo/include/cpuinfo.h
vendored
@@ -46,6 +46,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__riscv)
|
||||
#if (__riscv_xlen == 32)
|
||||
#define CPUINFO_ARCH_RISCV32 1
|
||||
#elif (__riscv_xlen == 64)
|
||||
#define CPUINFO_ARCH_RISCV64 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define other architecture-specific macros as 0 */
|
||||
|
||||
#ifndef CPUINFO_ARCH_X86
|
||||
@@ -80,6 +88,14 @@
|
||||
#define CPUINFO_ARCH_WASMSIMD 0
|
||||
#endif
|
||||
|
||||
#ifndef CPUINFO_ARCH_RISCV32
|
||||
#define CPUINFO_ARCH_RISCV32 0
|
||||
#endif
|
||||
|
||||
#ifndef CPUINFO_ARCH_RISCV64
|
||||
#define CPUINFO_ARCH_RISCV64 0
|
||||
#endif
|
||||
|
||||
#if CPUINFO_ARCH_X86 && defined(_MSC_VER)
|
||||
#define CPUINFO_ABI __cdecl
|
||||
#elif CPUINFO_ARCH_X86 && defined(__GNUC__)
|
||||
@@ -188,6 +204,8 @@ enum cpuinfo_vendor {
|
||||
* Processors are variants of AMD cores.
|
||||
*/
|
||||
cpuinfo_vendor_hygon = 16,
|
||||
/** SiFive, Inc. Vendor of RISC-V processor microarchitectures. */
|
||||
cpuinfo_vendor_sifive = 17,
|
||||
|
||||
/* Active vendors of embedded CPUs */
|
||||
|
||||
@@ -363,6 +381,8 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_zen2 = 0x0020010A,
|
||||
/** AMD Zen 3 microarchitecture. */
|
||||
cpuinfo_uarch_zen3 = 0x0020010B,
|
||||
/** AMD Zen 4 microarchitecture. */
|
||||
cpuinfo_uarch_zen4 = 0x0020010C,
|
||||
|
||||
/** NSC Geode and AMD Geode GX and LX. */
|
||||
cpuinfo_uarch_geode = 0x00200200,
|
||||
@@ -426,9 +446,26 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_neoverse_n1 = 0x00300400,
|
||||
/** ARM Neoverse E1. */
|
||||
cpuinfo_uarch_neoverse_e1 = 0x00300401,
|
||||
/** ARM Neoverse V1. */
|
||||
cpuinfo_uarch_neoverse_v1 = 0x00300402,
|
||||
/** ARM Neoverse N2. */
|
||||
cpuinfo_uarch_neoverse_n2 = 0x00300403,
|
||||
/** ARM Neoverse V2. */
|
||||
cpuinfo_uarch_neoverse_v2 = 0x00300404,
|
||||
|
||||
/** ARM Cortex-X1. */
|
||||
cpuinfo_uarch_cortex_x1 = 0x00300500,
|
||||
cpuinfo_uarch_cortex_x1 = 0x00300501,
|
||||
/** ARM Cortex-X2. */
|
||||
cpuinfo_uarch_cortex_x2 = 0x00300502,
|
||||
/** ARM Cortex-X3. */
|
||||
cpuinfo_uarch_cortex_x3 = 0x00300503,
|
||||
|
||||
/** ARM Cortex-A510. */
|
||||
cpuinfo_uarch_cortex_a510 = 0x00300551,
|
||||
/** ARM Cortex-A710. */
|
||||
cpuinfo_uarch_cortex_a710 = 0x00300571,
|
||||
/** ARM Cortex-A715. */
|
||||
cpuinfo_uarch_cortex_a715 = 0x00300572,
|
||||
|
||||
/** Qualcomm Scorpion. */
|
||||
cpuinfo_uarch_scorpion = 0x00400100,
|
||||
@@ -489,10 +526,14 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_lightning = 0x00700109,
|
||||
/** Apple A13 processor (little cores). */
|
||||
cpuinfo_uarch_thunder = 0x0070010A,
|
||||
/** Apple M1 processor (big cores). */
|
||||
/** Apple A14 / M1 processor (big cores). */
|
||||
cpuinfo_uarch_firestorm = 0x0070010B,
|
||||
/** Apple M1 processor (little cores). */
|
||||
/** Apple A14 / M1 processor (little cores). */
|
||||
cpuinfo_uarch_icestorm = 0x0070010C,
|
||||
/** Apple A15 / M2 processor (big cores). */
|
||||
cpuinfo_uarch_avalanche = 0x0070010D,
|
||||
/** Apple A15 / M2 processor (little cores). */
|
||||
cpuinfo_uarch_blizzard = 0x0070010E,
|
||||
|
||||
/** Cavium ThunderX. */
|
||||
cpuinfo_uarch_thunderx = 0x00800100,
|
||||
@@ -706,6 +747,7 @@ void CPUINFO_ABI cpuinfo_deinitialize(void);
|
||||
bool sse4a;
|
||||
bool misaligned_sse;
|
||||
bool avx;
|
||||
bool avxvnni;
|
||||
bool fma3;
|
||||
bool fma4;
|
||||
bool xop;
|
||||
@@ -725,6 +767,7 @@ void CPUINFO_ABI cpuinfo_deinitialize(void);
|
||||
bool avx512vpopcntdq;
|
||||
bool avx512vnni;
|
||||
bool avx512bf16;
|
||||
bool avx512fp16;
|
||||
bool avx512vp2intersect;
|
||||
bool avx512_4vnniw;
|
||||
bool avx512_4fmaps;
|
||||
@@ -1052,6 +1095,14 @@ static inline bool cpuinfo_has_x86_avx(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_avxvnni(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.avxvnni;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_fma3(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.fma3;
|
||||
@@ -1204,6 +1255,14 @@ static inline bool cpuinfo_has_x86_avx512bf16(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_avx512fp16(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.avx512fp16;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_avx512vp2intersect(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.avx512vp2intersect;
|
||||
@@ -1460,14 +1519,17 @@ static inline bool cpuinfo_has_x86_sha(void) {
|
||||
#endif
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
bool atomics;
|
||||
bool bf16;
|
||||
bool sve;
|
||||
bool sve2;
|
||||
bool i8mm;
|
||||
#endif
|
||||
bool rdm;
|
||||
bool fp16arith;
|
||||
bool dot;
|
||||
bool jscvt;
|
||||
bool fcma;
|
||||
bool fhm;
|
||||
|
||||
bool aes;
|
||||
bool sha1;
|
||||
@@ -1623,6 +1685,22 @@ static inline bool cpuinfo_has_arm_vfpv4_d32(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_fp16_arith(void) {
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.fp16arith;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_bf16(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.bf16;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_wmmx(void) {
|
||||
#if CPUINFO_ARCH_ARM
|
||||
return cpuinfo_isa.wmmx;
|
||||
@@ -1705,9 +1783,9 @@ static inline bool cpuinfo_has_arm_neon_fp16_arith(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_fp16_arith(void) {
|
||||
static inline bool cpuinfo_has_arm_fhm(void) {
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.fp16arith;
|
||||
return cpuinfo_isa.fhm;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
@@ -1721,6 +1799,14 @@ static inline bool cpuinfo_has_arm_neon_dot(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_neon_bf16(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.bf16;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_jscvt(void) {
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.jscvt;
|
||||
@@ -1737,6 +1823,14 @@ static inline bool cpuinfo_has_arm_fcma(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_i8mm(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.i8mm;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_aes(void) {
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.aes;
|
||||
@@ -1785,6 +1879,14 @@ static inline bool cpuinfo_has_arm_sve(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_sve_bf16(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.sve && cpuinfo_isa.bf16;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_arm_sve2(void) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
return cpuinfo_isa.sve2;
|
||||
@@ -1793,6 +1895,109 @@ static inline bool cpuinfo_has_arm_sve2(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
/* This structure is not a part of stable API. Use cpuinfo_has_riscv_* functions instead. */
|
||||
struct cpuinfo_riscv_isa {
|
||||
/**
|
||||
* Keep fields in line with the canonical order as defined by
|
||||
* Section 27.11 Subset Naming Convention.
|
||||
*/
|
||||
/* RV32I/64I/128I Base ISA. */
|
||||
bool i;
|
||||
#if CPUINFO_ARCH_RISCV32
|
||||
/* RV32E Base ISA. */
|
||||
bool e;
|
||||
#endif
|
||||
/* Integer Multiply/Divide Extension. */
|
||||
bool m;
|
||||
/* Atomic Extension. */
|
||||
bool a;
|
||||
/* Single-Precision Floating-Point Extension. */
|
||||
bool f;
|
||||
/* Double-Precision Floating-Point Extension. */
|
||||
bool d;
|
||||
/* Compressed Extension. */
|
||||
bool c;
|
||||
/* Vector Extension. */
|
||||
bool v;
|
||||
};
|
||||
|
||||
extern struct cpuinfo_riscv_isa cpuinfo_isa;
|
||||
#endif
|
||||
|
||||
static inline bool cpuinfo_has_riscv_i(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.i;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_e(void) {
|
||||
#if CPUINFO_ARCH_RISCV32
|
||||
return cpuinfo_isa.e;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_m(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.m;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_a(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.a;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_f(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.f;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_d(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.d;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_g(void) {
|
||||
// The 'G' extension is simply shorthand for 'IMAFD'.
|
||||
return cpuinfo_has_riscv_i()
|
||||
&& cpuinfo_has_riscv_m()
|
||||
&& cpuinfo_has_riscv_a()
|
||||
&& cpuinfo_has_riscv_f()
|
||||
&& cpuinfo_has_riscv_d();
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_c(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.c;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_riscv_v(void) {
|
||||
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_isa.v;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
const struct cpuinfo_processor* CPUINFO_ABI cpuinfo_get_processors(void);
|
||||
const struct cpuinfo_core* CPUINFO_ABI cpuinfo_get_cores(void);
|
||||
const struct cpuinfo_cluster* CPUINFO_ABI cpuinfo_get_clusters(void);
|
||||
|
||||
25
3rdparty/cpuinfo/src/api.c
vendored
25
3rdparty/cpuinfo/src/api.c
vendored
@@ -30,7 +30,8 @@ uint32_t cpuinfo_packages_count = 0;
|
||||
uint32_t cpuinfo_cache_count[cpuinfo_cache_level_max] = { 0 };
|
||||
uint32_t cpuinfo_max_cache_size = 0;
|
||||
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
struct cpuinfo_uarch_info* cpuinfo_uarchs = NULL;
|
||||
uint32_t cpuinfo_uarchs_count = 0;
|
||||
#else
|
||||
@@ -41,7 +42,8 @@ uint32_t cpuinfo_max_cache_size = 0;
|
||||
uint32_t cpuinfo_linux_cpu_max = 0;
|
||||
const struct cpuinfo_processor** cpuinfo_linux_cpu_to_processor_map = NULL;
|
||||
const struct cpuinfo_core** cpuinfo_linux_cpu_to_core_map = NULL;
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
const uint32_t* cpuinfo_linux_cpu_to_uarch_index_map = NULL;
|
||||
#endif
|
||||
#endif
|
||||
@@ -79,7 +81,8 @@ const struct cpuinfo_uarch_info* cpuinfo_get_uarchs() {
|
||||
if (!cpuinfo_is_initialized) {
|
||||
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "uarchs");
|
||||
}
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_uarchs;
|
||||
#else
|
||||
return &cpuinfo_global_uarch;
|
||||
@@ -130,7 +133,8 @@ const struct cpuinfo_uarch_info* cpuinfo_get_uarch(uint32_t index) {
|
||||
if (!cpuinfo_is_initialized) {
|
||||
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "uarch");
|
||||
}
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
if CPUINFO_UNLIKELY(index >= cpuinfo_uarchs_count) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -175,7 +179,8 @@ uint32_t cpuinfo_get_uarchs_count(void) {
|
||||
if (!cpuinfo_is_initialized) {
|
||||
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "uarchs_count");
|
||||
}
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
return cpuinfo_uarchs_count;
|
||||
#else
|
||||
return 1;
|
||||
@@ -351,7 +356,8 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index(void) {
|
||||
if CPUINFO_UNLIKELY(!cpuinfo_is_initialized) {
|
||||
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "current_uarch_index");
|
||||
}
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
#ifdef __linux__
|
||||
if (cpuinfo_linux_cpu_to_uarch_index_map == NULL) {
|
||||
/* Special case: avoid syscall on systems with only a single type of cores */
|
||||
@@ -373,7 +379,7 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index(void) {
|
||||
return 0;
|
||||
#endif
|
||||
#else
|
||||
/* Only ARM/ARM64 processors may include cores of different types in the same package. */
|
||||
/* Only ARM/ARM64/RISCV processors may include cores of different types in the same package. */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
@@ -382,7 +388,8 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index_with_default(uint32_t defau
|
||||
if CPUINFO_UNLIKELY(!cpuinfo_is_initialized) {
|
||||
cpuinfo_log_fatal("cpuinfo_get_%s called before cpuinfo is initialized", "current_uarch_index_with_default");
|
||||
}
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 \
|
||||
|| CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
#ifdef __linux__
|
||||
if (cpuinfo_linux_cpu_to_uarch_index_map == NULL) {
|
||||
/* Special case: avoid syscall on systems with only a single type of cores */
|
||||
@@ -404,7 +411,7 @@ uint32_t CPUINFO_ABI cpuinfo_get_current_uarch_index_with_default(uint32_t defau
|
||||
return default_uarch_index;
|
||||
#endif
|
||||
#else
|
||||
/* Only ARM/ARM64 processors may include cores of different types in the same package. */
|
||||
/* Only ARM/ARM64/RISCV processors may include cores of different types in the same package. */
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
2
3rdparty/cpuinfo/src/arm/api.h
vendored
2
3rdparty/cpuinfo/src/arm/api.h
vendored
@@ -28,6 +28,7 @@ enum cpuinfo_arm_chipset_vendor {
|
||||
cpuinfo_arm_chipset_vendor_spreadtrum,
|
||||
cpuinfo_arm_chipset_vendor_telechips,
|
||||
cpuinfo_arm_chipset_vendor_texas_instruments,
|
||||
cpuinfo_arm_chipset_vendor_unisoc,
|
||||
cpuinfo_arm_chipset_vendor_wondermedia,
|
||||
cpuinfo_arm_chipset_vendor_max,
|
||||
};
|
||||
@@ -62,6 +63,7 @@ enum cpuinfo_arm_chipset_series {
|
||||
cpuinfo_arm_chipset_series_spreadtrum_sc,
|
||||
cpuinfo_arm_chipset_series_telechips_tcc,
|
||||
cpuinfo_arm_chipset_series_texas_instruments_omap,
|
||||
cpuinfo_arm_chipset_series_unisoc_t,
|
||||
cpuinfo_arm_chipset_series_wondermedia_wm,
|
||||
cpuinfo_arm_chipset_series_max,
|
||||
};
|
||||
|
||||
55
3rdparty/cpuinfo/src/arm/cache.c
vendored
55
3rdparty/cpuinfo/src/arm/cache.c
vendored
@@ -1238,6 +1238,57 @@ void cpuinfo_arm_decode_cache(
|
||||
};
|
||||
break;
|
||||
}
|
||||
case cpuinfo_uarch_neoverse_n1:
|
||||
case cpuinfo_uarch_neoverse_v1:
|
||||
case cpuinfo_uarch_neoverse_n2:
|
||||
case cpuinfo_uarch_neoverse_v2:
|
||||
{
|
||||
/*
|
||||
* The specifications here below are taken from the
|
||||
* Arm Core Technical Reference Manuals for
|
||||
* - Neoverse N1: https://developer.arm.com/documentation/100616/0401/?lang=en
|
||||
* - Neoverse N2: https://developer.arm.com/documentation/102099/0003/?lang=en
|
||||
* - Neoverse V1: https://developer.arm.com/documentation/101427/0102/?lang=en
|
||||
* - Neoverse V2: https://developer.arm.com/documentation/102375/0002/?lang=en
|
||||
*
|
||||
* All four Arm architectures have L1 memory system with instruction and data caches,
|
||||
* both of fixed size of 64KB. The instruction side memory system is 4-way set associative
|
||||
* with a cache line length of 64 bytes. The data cache is also 4-way set associative with
|
||||
* a cache line length of 64 bytes.
|
||||
*
|
||||
* The L2 memory system differs across the four Architectures in the minimum
|
||||
* length of the L2 cache. Namely:
|
||||
* - Arm Neoverse N1/N2/V1 have a L2 cache of configurable size of 256KB, 512KB, or 1024KB
|
||||
* - Arm Neoverse V2 has a L2 cache of configurable size of 1MB or 2MB
|
||||
* For all four architectures, the L2 cache is 8-way set associative
|
||||
* For all other information, please refer to the technical manuals linked above
|
||||
*/
|
||||
const uint32_t min_l2_size_KB = uarch == cpuinfo_uarch_neoverse_v2 ? 1024 : 256;
|
||||
const uint32_t min_l3_size_KB = 0;
|
||||
|
||||
*l1i = (struct cpuinfo_cache) {
|
||||
.size = 64 * 1024,
|
||||
.associativity = 4,
|
||||
.line_size = 64,
|
||||
};
|
||||
*l1d = (struct cpuinfo_cache) {
|
||||
.size = 64 * 1024,
|
||||
.associativity = 4,
|
||||
.line_size = 64,
|
||||
};
|
||||
*l2 = (struct cpuinfo_cache) {
|
||||
.size = min_l2_size_KB * 1024,
|
||||
.associativity = 8,
|
||||
.line_size = 64,
|
||||
.flags = CPUINFO_CACHE_INCLUSIVE,
|
||||
};
|
||||
*l3 = (struct cpuinfo_cache) {
|
||||
.size = min_l3_size_KB * 1024,
|
||||
.associativity = 16,
|
||||
.line_size = 64,
|
||||
};
|
||||
break;
|
||||
}
|
||||
#if CPUINFO_ARCH_ARM && !defined(__ARM_ARCH_8A__)
|
||||
case cpuinfo_uarch_scorpion:
|
||||
/*
|
||||
@@ -1655,6 +1706,10 @@ uint32_t cpuinfo_arm_compute_max_cache_size(const struct cpuinfo_processor* proc
|
||||
*/
|
||||
return 8 * 1024 * 1024;
|
||||
case cpuinfo_uarch_cortex_a55:
|
||||
case cpuinfo_uarch_neoverse_n1:
|
||||
case cpuinfo_uarch_neoverse_v1:
|
||||
case cpuinfo_uarch_neoverse_n2:
|
||||
case cpuinfo_uarch_neoverse_v2:
|
||||
case cpuinfo_uarch_cortex_a75:
|
||||
case cpuinfo_uarch_cortex_a76:
|
||||
case cpuinfo_uarch_exynos_m4:
|
||||
|
||||
125
3rdparty/cpuinfo/src/arm/linux/aarch32-isa.c
vendored
125
3rdparty/cpuinfo/src/arm/linux/aarch32-isa.c
vendored
@@ -33,6 +33,13 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
|
||||
const struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
struct cpuinfo_arm_isa isa[restrict static 1])
|
||||
{
|
||||
if (architecture_version < 8) {
|
||||
const uint32_t armv8_features2_mask = CPUINFO_ARM_LINUX_FEATURE2_AES | CPUINFO_ARM_LINUX_FEATURE2_PMULL |
|
||||
CPUINFO_ARM_LINUX_FEATURE2_SHA1 | CPUINFO_ARM_LINUX_FEATURE2_SHA2 | CPUINFO_ARM_LINUX_FEATURE2_CRC32;
|
||||
if (features2 & armv8_features2_mask) {
|
||||
architecture_version = 8;
|
||||
}
|
||||
}
|
||||
if (architecture_version >= 8) {
|
||||
/*
|
||||
* ARMv7 code running on ARMv8: IDIV, VFP, NEON are always supported,
|
||||
@@ -57,13 +64,22 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
|
||||
* NEON FP16 compute extension and VQRDMLAH/VQRDMLSH instructions are not indicated in /proc/cpuinfo.
|
||||
* Use a MIDR-based heuristic to whitelist processors known to support it:
|
||||
* - Processors with Cortex-A55 cores
|
||||
* - Processors with Cortex-A65 cores
|
||||
* - Processors with Cortex-A75 cores
|
||||
* - Processors with Cortex-A76 cores
|
||||
* - Processors with Cortex-A77 cores
|
||||
* - Processors with Cortex-A78 cores
|
||||
* - Processors with Cortex-A510 cores
|
||||
* - Processors with Cortex-A710 cores
|
||||
* - Processors with Cortex-A715 cores
|
||||
* - Processors with Cortex-X1 cores
|
||||
* - Processors with Cortex-X2 cores
|
||||
* - Processors with Cortex-X3 cores
|
||||
* - Processors with Exynos M4 cores
|
||||
* - Processors with Exynos M5 cores
|
||||
* - Neoverse N1 cores
|
||||
* - Neoverse N2 cores
|
||||
* - Neoverse V1 cores
|
||||
* - Neoverse V2 cores
|
||||
*/
|
||||
if (chipset->series == cpuinfo_arm_chipset_series_samsung_exynos && chipset->model == 9810) {
|
||||
/* Only little cores of Exynos 9810 support FP16 & RDM */
|
||||
@@ -71,11 +87,21 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
|
||||
} else {
|
||||
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
|
||||
case UINT32_C(0x4100D050): /* Cortex-A55 */
|
||||
case UINT32_C(0x4100D060): /* Cortex-A65 */
|
||||
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
|
||||
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
|
||||
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
|
||||
case UINT32_C(0x4100D400): /* Neoverse V1 */
|
||||
case UINT32_C(0x4100D410): /* Cortex-A78 */
|
||||
case UINT32_C(0x4100D440): /* Cortex-X1 */
|
||||
case UINT32_C(0x4100D460): /* Cortex-A510 */
|
||||
case UINT32_C(0x4100D470): /* Cortex-A710 */
|
||||
case UINT32_C(0x4100D480): /* Cortex-X2 */
|
||||
case UINT32_C(0x4100D490): /* Neoverse N2 */
|
||||
case UINT32_C(0x4100D4D0): /* Cortex-A715 */
|
||||
case UINT32_C(0x4100D4E0): /* Cortex-X3 */
|
||||
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x51008020): /* Kryo 385 Gold (Cortex-A75) */
|
||||
case UINT32_C(0x51008030): /* Kryo 385 Silver (Cortex-A55) */
|
||||
@@ -91,25 +117,57 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
|
||||
|
||||
/*
|
||||
* NEON VDOT instructions are not indicated in /proc/cpuinfo.
|
||||
* Use a MIDR-based heuristic to whitelist processors known to support it.
|
||||
* Use a MIDR-based heuristic to whitelist processors known to support it:
|
||||
* - Processors with Cortex-A76 cores
|
||||
* - Processors with Cortex-A77 cores
|
||||
* - Processors with Cortex-A78 cores
|
||||
* - Processors with Cortex-A510 cores
|
||||
* - Processors with Cortex-A710 cores
|
||||
* - Processors with Cortex-A715 cores
|
||||
* - Processors with Cortex-X1 cores
|
||||
* - Processors with Cortex-X2 cores
|
||||
* - Processors with Cortex-X3 cores
|
||||
* - Processors with Exynos M4 cores
|
||||
* - Processors with Exynos M5 cores
|
||||
* - Neoverse N1 cores
|
||||
* - Neoverse N2 cores
|
||||
* - Neoverse V1 cores
|
||||
* - Neoverse V2 cores
|
||||
*/
|
||||
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
|
||||
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x51008040): /* Kryo 485 Gold (Cortex-A76) */
|
||||
case UINT32_C(0x51008050): /* Kryo 485 Silver (Cortex-A55) */
|
||||
case UINT32_C(0x53000030): /* Exynos-M4 */
|
||||
case UINT32_C(0x53000040): /* Exynos-M5 */
|
||||
isa->dot = true;
|
||||
break;
|
||||
case UINT32_C(0x4100D050): /* Cortex A55: revision 1 or later only */
|
||||
isa->dot = !!(midr_get_variant(midr) >= 1);
|
||||
break;
|
||||
case UINT32_C(0x4100D0A0): /* Cortex A75: revision 2 or later only */
|
||||
isa->dot = !!(midr_get_variant(midr) >= 2);
|
||||
break;
|
||||
if (chipset->series == cpuinfo_arm_chipset_series_spreadtrum_sc && chipset->model == 9863) {
|
||||
cpuinfo_log_warning("VDOT instructions disabled: cause occasional SIGILL on Spreadtrum SC9863A");
|
||||
} else if (chipset->series == cpuinfo_arm_chipset_series_unisoc_t && chipset->model == 310) {
|
||||
cpuinfo_log_warning("VDOT instructions disabled: cause occasional SIGILL on Unisoc T310");
|
||||
} else {
|
||||
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
|
||||
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
|
||||
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
|
||||
case UINT32_C(0x4100D400): /* Neoverse V1 */
|
||||
case UINT32_C(0x4100D410): /* Cortex-A78 */
|
||||
case UINT32_C(0x4100D440): /* Cortex-X1 */
|
||||
case UINT32_C(0x4100D460): /* Cortex-A510 */
|
||||
case UINT32_C(0x4100D470): /* Cortex-A710 */
|
||||
case UINT32_C(0x4100D480): /* Cortex-X2 */
|
||||
case UINT32_C(0x4100D490): /* Neoverse N2 */
|
||||
case UINT32_C(0x4100D4D0): /* Cortex-A715 */
|
||||
case UINT32_C(0x4100D4E0): /* Cortex-X3 */
|
||||
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x51008040): /* Kryo 485 Gold (Cortex-A76) */
|
||||
case UINT32_C(0x51008050): /* Kryo 485 Silver (Cortex-A55) */
|
||||
case UINT32_C(0x53000030): /* Exynos M4 */
|
||||
case UINT32_C(0x53000040): /* Exynos M5 */
|
||||
isa->dot = true;
|
||||
break;
|
||||
case UINT32_C(0x4100D050): /* Cortex A55: revision 1 or later only */
|
||||
isa->dot = !!(midr_get_variant(midr) >= 1);
|
||||
break;
|
||||
case UINT32_C(0x4100D0A0): /* Cortex A75: revision 2 or later only */
|
||||
isa->dot = !!(midr_get_variant(midr) >= 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* ARMv7 or lower: use feature flags to detect optional features */
|
||||
@@ -167,19 +225,24 @@ void cpuinfo_arm_linux_decode_isa_from_proc_cpuinfo(
|
||||
}
|
||||
|
||||
if (features & CPUINFO_ARM_LINUX_FEATURE_IWMMXT) {
|
||||
const uint32_t wcid = read_wcid();
|
||||
cpuinfo_log_debug("WCID = 0x%08"PRIx32, wcid);
|
||||
const uint32_t coprocessor_type = (wcid >> 8) & UINT32_C(0xFF);
|
||||
if (coprocessor_type >= 0x10) {
|
||||
isa->wmmx = true;
|
||||
if (coprocessor_type >= 0x20) {
|
||||
isa->wmmx2 = true;
|
||||
#if !defined(__ARM_ARCH_8A__) && !(defined(__ARM_ARCH) && (__ARM_ARCH >= 8))
|
||||
const uint32_t wcid = read_wcid();
|
||||
cpuinfo_log_debug("WCID = 0x%08"PRIx32, wcid);
|
||||
const uint32_t coprocessor_type = (wcid >> 8) & UINT32_C(0xFF);
|
||||
if (coprocessor_type >= 0x10) {
|
||||
isa->wmmx = true;
|
||||
if (coprocessor_type >= 0x20) {
|
||||
isa->wmmx2 = true;
|
||||
}
|
||||
} else {
|
||||
cpuinfo_log_warning("WMMX ISA disabled: OS reported iwmmxt feature, "
|
||||
"but WCID coprocessor type 0x%"PRIx32" indicates no WMMX support",
|
||||
coprocessor_type);
|
||||
}
|
||||
} else {
|
||||
#else
|
||||
cpuinfo_log_warning("WMMX ISA disabled: OS reported iwmmxt feature, "
|
||||
"but WCID coprocessor type 0x%"PRIx32" indicates no WMMX support",
|
||||
coprocessor_type);
|
||||
}
|
||||
"but there is no iWMMXt coprocessor");
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((features & CPUINFO_ARM_LINUX_FEATURE_THUMB) || (architecture_flags & CPUINFO_ARM_LINUX_ARCH_T)) {
|
||||
|
||||
22
3rdparty/cpuinfo/src/arm/linux/aarch64-isa.c
vendored
22
3rdparty/cpuinfo/src/arm/linux/aarch64-isa.c
vendored
@@ -41,6 +41,9 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
|
||||
* - Processors with Exynos M4 cores
|
||||
* - Processors with Exynos M5 cores
|
||||
* - Neoverse N1 cores
|
||||
* - Neoverse V1 cores
|
||||
* - Neoverse N2 cores
|
||||
* - Neoverse V2 cores
|
||||
*/
|
||||
if (chipset->series == cpuinfo_arm_chipset_series_samsung_exynos && chipset->model == 9810) {
|
||||
/* Exynos 9810 reports that it supports FP16 compute, but in fact only little cores do */
|
||||
@@ -50,10 +53,14 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
|
||||
switch (midr & (CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK)) {
|
||||
case UINT32_C(0x4100D050): /* Cortex-A55 */
|
||||
case UINT32_C(0x4100D060): /* Cortex-A65 */
|
||||
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
|
||||
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
|
||||
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
|
||||
case UINT32_C(0x4100D400): /* Neoverse V1 */
|
||||
case UINT32_C(0x4100D490): /* Neoverse N2 */
|
||||
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x51008020): /* Kryo 385 Gold (Cortex-A75) */
|
||||
case UINT32_C(0x51008030): /* Kryo 385 Silver (Cortex-A55) */
|
||||
@@ -78,6 +85,9 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (features2 & CPUINFO_ARM_LINUX_FEATURE2_I8MM) {
|
||||
isa->i8mm = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Many phones ship with an old kernel configuration that doesn't report UDOT/SDOT instructions.
|
||||
@@ -89,7 +99,10 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
|
||||
case UINT32_C(0x4100D0C0): /* Neoverse N1 */
|
||||
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
|
||||
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
|
||||
case UINT32_C(0x4100D400): /* Neoverse V1 */
|
||||
case UINT32_C(0x4100D490): /* Neoverse N2 */
|
||||
case UINT32_C(0x4100D4A0): /* Neoverse E1 */
|
||||
case UINT32_C(0x4100D4F0): /* Neoverse V2 */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x51008040): /* Kryo 485 Gold (Cortex-A76) */
|
||||
case UINT32_C(0x51008050): /* Kryo 485 Silver (Cortex-A55) */
|
||||
@@ -124,4 +137,13 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
|
||||
if (features2 & CPUINFO_ARM_LINUX_FEATURE2_SVE2) {
|
||||
isa->sve2 = true;
|
||||
}
|
||||
// SVEBF16 is set iff SVE and BF16 are both supported, but the SVEBF16 feature flag
|
||||
// was added in Linux kernel before the BF16 feature flag, so we check for either.
|
||||
if (features2 & (CPUINFO_ARM_LINUX_FEATURE2_BF16 | CPUINFO_ARM_LINUX_FEATURE2_SVEBF16)) {
|
||||
isa->bf16 = true;
|
||||
}
|
||||
if (features & CPUINFO_ARM_LINUX_FEATURE_ASIMDFHM) {
|
||||
isa->fhm = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
3rdparty/cpuinfo/src/arm/linux/api.h
vendored
2
3rdparty/cpuinfo/src/arm/linux/api.h
vendored
@@ -314,7 +314,7 @@ CPUINFO_INTERNAL bool cpuinfo_arm_linux_parse_proc_cpuinfo(
|
||||
struct cpuinfo_arm_isa isa[restrict static 1]);
|
||||
#endif
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#if defined(__ANDROID__)
|
||||
CPUINFO_INTERNAL struct cpuinfo_arm_chipset
|
||||
cpuinfo_arm_android_decode_chipset(
|
||||
const struct cpuinfo_android_properties properties[restrict static 1],
|
||||
|
||||
96
3rdparty/cpuinfo/src/arm/linux/chipset.c
vendored
96
3rdparty/cpuinfo/src/arm/linux/chipset.c
vendored
@@ -37,29 +37,17 @@ static inline bool is_ascii_numeric(char c) {
|
||||
}
|
||||
|
||||
static inline uint16_t load_u16le(const void* ptr) {
|
||||
#if defined(__ARM_ARCH_7A__) || defined(__aarch64__)
|
||||
return *((const uint16_t*) ptr);
|
||||
#else
|
||||
const uint8_t* byte_ptr = (const uint8_t*) ptr;
|
||||
return ((uint16_t) byte_ptr[1] << 8) | (uint16_t) byte_ptr[0];
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint32_t load_u24le(const void* ptr) {
|
||||
#if defined(__ARM_ARCH_7A__) || defined(__aarch64__)
|
||||
return ((uint32_t) ((const uint8_t*) ptr)[2] << 16) | ((uint32_t) *((const uint16_t*) ptr));
|
||||
#else
|
||||
const uint8_t* byte_ptr = (const uint8_t*) ptr;
|
||||
return ((uint32_t) byte_ptr[2] << 16) | ((uint32_t) byte_ptr[1] << 8) | (uint32_t) byte_ptr[0];
|
||||
#endif
|
||||
return ((uint32_t) ((const uint8_t*) ptr)[2] << 16) | (uint32_t) load_u16le(ptr);
|
||||
}
|
||||
|
||||
static inline uint32_t load_u32le(const void* ptr) {
|
||||
#if defined(__ARM_ARCH_7A__) || defined(__aarch64__)
|
||||
return *((const uint32_t*) ptr);
|
||||
#else
|
||||
return ((uint32_t) ((const uint8_t*) ptr)[3] << 24) | load_u24le(ptr);
|
||||
#endif
|
||||
const uint8_t* byte_ptr = (const uint8_t*) ptr;
|
||||
return ((uint32_t) byte_ptr[3] << 24) | ((uint32_t) byte_ptr[2] << 16) | ((uint32_t) byte_ptr[1] << 8) | (uint32_t) byte_ptr[0];
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -96,6 +84,7 @@ static enum cpuinfo_arm_chipset_vendor chipset_series_vendor[cpuinfo_arm_chipset
|
||||
[cpuinfo_arm_chipset_series_spreadtrum_sc] = cpuinfo_arm_chipset_vendor_spreadtrum,
|
||||
[cpuinfo_arm_chipset_series_telechips_tcc] = cpuinfo_arm_chipset_vendor_telechips,
|
||||
[cpuinfo_arm_chipset_series_texas_instruments_omap] = cpuinfo_arm_chipset_vendor_texas_instruments,
|
||||
[cpuinfo_arm_chipset_series_unisoc_t] = cpuinfo_arm_chipset_vendor_unisoc,
|
||||
[cpuinfo_arm_chipset_series_wondermedia_wm] = cpuinfo_arm_chipset_vendor_wondermedia,
|
||||
};
|
||||
|
||||
@@ -877,6 +866,63 @@ static bool match_sc(
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to match, case-sentitively, /Unisoc T\d{3,4}/ signature for Unisoc T chipset.
|
||||
* If match successful, extracts model information into \p chipset argument.
|
||||
*
|
||||
* @param start - start of the platform identifier (/proc/cpuinfo Hardware string, ro.product.board,
|
||||
* ro.board.platform, or ro.chipname) to match.
|
||||
* @param end - end of the platform identifier (/proc/cpuinfo Hardware string, ro.product.board,
|
||||
* ro.board.platform, or ro.chipname) to match.
|
||||
* @param[out] chipset - location where chipset information will be stored upon a successful match.
|
||||
*
|
||||
* @returns true if signature matched, false otherwise.
|
||||
*/
|
||||
static bool match_t(
|
||||
const char* start, const char* end,
|
||||
struct cpuinfo_arm_chipset chipset[restrict static 1])
|
||||
{
|
||||
/* Expect 11-12 symbols: "Unisoc T" (8 symbols) + 3-4-digit model number */
|
||||
const size_t length = end - start;
|
||||
switch (length) {
|
||||
case 11:
|
||||
case 12:
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Check that string starts with "Unisoc T". The first four characters are loaded as 32-bit little endian word */
|
||||
const uint32_t expected_unis = load_u32le(start);
|
||||
if (expected_unis != UINT32_C(0x73696E55) /* "sinU" = reverse("Unis") */) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The next four characters are loaded as 32-bit little endian word */
|
||||
const uint32_t expected_oc_t = load_u32le(start + 4);
|
||||
if (expected_oc_t != UINT32_C(0x5420636F) /* "T co" = reverse("oc T") */) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Validate and parse 3-4 digit model number */
|
||||
uint32_t model = 0;
|
||||
for (uint32_t i = 8; i < length; i++) {
|
||||
const uint32_t digit = (uint32_t) (uint8_t) start[i] - '0';
|
||||
if (digit >= 10) {
|
||||
/* Not really a digit */
|
||||
return false;
|
||||
}
|
||||
model = model * 10 + digit;
|
||||
}
|
||||
|
||||
*chipset = (struct cpuinfo_arm_chipset) {
|
||||
.vendor = cpuinfo_arm_chipset_vendor_unisoc,
|
||||
.series = cpuinfo_arm_chipset_series_unisoc_t,
|
||||
.model = model,
|
||||
};
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to match /lc\d{4}[a-z]?$/ signature for Leadcore LC chipsets.
|
||||
* If match successful, extracts model information into \p chipset argument.
|
||||
@@ -891,7 +937,7 @@ static bool match_lc(
|
||||
const char* start, const char* end,
|
||||
struct cpuinfo_arm_chipset chipset[restrict static 1])
|
||||
{
|
||||
/* Expect at 6-7 symbols: "lc" (2 symbols) + 4-digit model number + optional 1-letter suffix */
|
||||
/* Expect 6-7 symbols: "lc" (2 symbols) + 4-digit model number + optional 1-letter suffix */
|
||||
const size_t length = end - start;
|
||||
switch (length) {
|
||||
case 6:
|
||||
@@ -1351,7 +1397,7 @@ static bool match_and_parse_sunxi(
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Compare sunXi platform id and number of cores to tabluted values to decode chipset name */
|
||||
/* Compare sunXi platform id and number of cores to tabulated values to decode chipset name */
|
||||
uint32_t model = 0;
|
||||
char suffix = 0;
|
||||
for (size_t i = 0; i < CPUINFO_COUNT_OF(sunxi_map_entries); i++) {
|
||||
@@ -2354,6 +2400,16 @@ struct cpuinfo_arm_chipset cpuinfo_arm_linux_decode_chipset_from_proc_cpuinfo_ha
|
||||
cpuinfo_log_debug(
|
||||
"matched Spreadtrum SC signature in /proc/cpuinfo Hardware string \"%.*s\"",
|
||||
(int) hardware_length, hardware);
|
||||
|
||||
return chipset;
|
||||
}
|
||||
|
||||
/* Check Unisoc T signature */
|
||||
if (match_t(hardware, hardware_end, &chipset)) {
|
||||
cpuinfo_log_debug(
|
||||
"matched Unisoc T signature in /proc/cpuinfo Hardware string \"%.*s\"",
|
||||
(int) hardware_length, hardware);
|
||||
|
||||
return chipset;
|
||||
}
|
||||
|
||||
@@ -3417,6 +3473,7 @@ static const char* chipset_vendor_string[cpuinfo_arm_chipset_vendor_max] = {
|
||||
[cpuinfo_arm_chipset_vendor_spreadtrum] = "Spreadtrum",
|
||||
[cpuinfo_arm_chipset_vendor_telechips] = "Telechips",
|
||||
[cpuinfo_arm_chipset_vendor_texas_instruments] = "Texas Instruments",
|
||||
[cpuinfo_arm_chipset_vendor_unisoc] = "Unisoc",
|
||||
[cpuinfo_arm_chipset_vendor_wondermedia] = "WonderMedia",
|
||||
};
|
||||
|
||||
@@ -3451,6 +3508,7 @@ static const char* chipset_series_string[cpuinfo_arm_chipset_series_max] = {
|
||||
[cpuinfo_arm_chipset_series_spreadtrum_sc] = "SC",
|
||||
[cpuinfo_arm_chipset_series_telechips_tcc] = "TCC",
|
||||
[cpuinfo_arm_chipset_series_texas_instruments_omap] = "OMAP",
|
||||
[cpuinfo_arm_chipset_series_unisoc_t] = "T",
|
||||
[cpuinfo_arm_chipset_series_wondermedia_wm] = "WM",
|
||||
};
|
||||
|
||||
@@ -3484,7 +3542,7 @@ void cpuinfo_arm_chipset_to_string(
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#if defined(__ANDROID__)
|
||||
static inline struct cpuinfo_arm_chipset disambiguate_qualcomm_chipset(
|
||||
const struct cpuinfo_arm_chipset proc_cpuinfo_hardware_chipset[restrict static 1],
|
||||
const struct cpuinfo_arm_chipset ro_product_board_chipset[restrict static 1],
|
||||
@@ -3776,7 +3834,7 @@ void cpuinfo_arm_chipset_to_string(
|
||||
*/
|
||||
void cpuinfo_arm_fixup_raspberry_pi_chipset(
|
||||
struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
const char revision[restrict static CPUINFO_HARDWARE_VALUE_MAX])
|
||||
const char revision[restrict static CPUINFO_REVISION_VALUE_MAX])
|
||||
{
|
||||
const size_t revision_length = strnlen(revision, CPUINFO_REVISION_VALUE_MAX);
|
||||
|
||||
|
||||
20
3rdparty/cpuinfo/src/arm/linux/clusters.c
vendored
20
3rdparty/cpuinfo/src/arm/linux/clusters.c
vendored
@@ -48,7 +48,7 @@ static inline bool bitmask_all(uint32_t bitfield, uint32_t mask) {
|
||||
* @param usable_processors - number of processors in the @p processors array with CPUINFO_LINUX_FLAG_VALID flags.
|
||||
* @param max_processors - number of elements in the @p processors array.
|
||||
* @param[in,out] processors - processor descriptors with pre-parsed POSSIBLE and PRESENT flags, minimum/maximum
|
||||
* frequency, MIDR infromation, and core cluster (package siblings list) information.
|
||||
* frequency, MIDR information, and core cluster (package siblings list) information.
|
||||
*
|
||||
* @retval true if the heuristic successfully assigned all processors into clusters of cores.
|
||||
* @retval false if known details about processors contradict the heuristic configuration of core clusters.
|
||||
@@ -292,9 +292,9 @@ bool cpuinfo_arm_linux_detect_core_clusters_by_heuristic(
|
||||
* - Processors assigned to these clusters stay assigned to the same clusters
|
||||
* - No new processors are added to these clusters
|
||||
* - Processors without pre-assigned cluster are clustered in one sequential scan:
|
||||
* - If known details (min/max frequency, MIDR components) of a processor are compatible with a preceeding
|
||||
* processor, without pre-assigned cluster, the processor is assigned to the cluster of the preceeding processor.
|
||||
* - If known details (min/max frequency, MIDR components) of a processor are not compatible with a preceeding
|
||||
* - If known details (min/max frequency, MIDR components) of a processor are compatible with a preceding
|
||||
* processor, without pre-assigned cluster, the processor is assigned to the cluster of the preceding processor.
|
||||
* - If known details (min/max frequency, MIDR components) of a processor are not compatible with a preceding
|
||||
* processor, the processor is assigned to a newly created cluster.
|
||||
*
|
||||
* The function must be called after parsing OS-provided information on core clusters, and usually is called only
|
||||
@@ -309,7 +309,7 @@ bool cpuinfo_arm_linux_detect_core_clusters_by_heuristic(
|
||||
*
|
||||
* @param max_processors - number of elements in the @p processors array.
|
||||
* @param[in,out] processors - processor descriptors with pre-parsed POSSIBLE and PRESENT flags, minimum/maximum
|
||||
* frequency, MIDR infromation, and core cluster (package siblings list) information.
|
||||
* frequency, MIDR information, and core cluster (package siblings list) information.
|
||||
*
|
||||
* @retval true if the heuristic successfully assigned all processors into clusters of cores.
|
||||
* @retval false if known details about processors contradict the heuristic configuration of core clusters.
|
||||
@@ -331,7 +331,7 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
|
||||
if (cluster_flags & CPUINFO_LINUX_FLAG_MIN_FREQUENCY) {
|
||||
if (cluster_min_frequency != processors[i].min_frequency) {
|
||||
cpuinfo_log_info(
|
||||
"minimum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceeding cluster (%"PRIu32" KHz); "
|
||||
"minimum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceding cluster (%"PRIu32" KHz); "
|
||||
"processor %"PRIu32" starts to a new cluster",
|
||||
i, processors[i].min_frequency, cluster_min_frequency, i);
|
||||
goto new_cluster;
|
||||
@@ -346,7 +346,7 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
|
||||
if (cluster_flags & CPUINFO_LINUX_FLAG_MAX_FREQUENCY) {
|
||||
if (cluster_max_frequency != processors[i].max_frequency) {
|
||||
cpuinfo_log_debug(
|
||||
"maximum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceeding cluster (%"PRIu32" KHz); "
|
||||
"maximum frequency of processor %"PRIu32" (%"PRIu32" KHz) is different than of preceding cluster (%"PRIu32" KHz); "
|
||||
"processor %"PRIu32" starts a new cluster",
|
||||
i, processors[i].max_frequency, cluster_max_frequency, i);
|
||||
goto new_cluster;
|
||||
@@ -361,7 +361,7 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
|
||||
if (cluster_flags & CPUINFO_ARM_LINUX_VALID_IMPLEMENTER) {
|
||||
if ((cluster_midr & CPUINFO_ARM_MIDR_IMPLEMENTER_MASK) != (processors[i].midr & CPUINFO_ARM_MIDR_IMPLEMENTER_MASK)) {
|
||||
cpuinfo_log_debug(
|
||||
"CPU Implementer of processor %"PRIu32" (0x%02"PRIx32") is different than of preceeding cluster (0x%02"PRIx32"); "
|
||||
"CPU Implementer of processor %"PRIu32" (0x%02"PRIx32") is different than of preceding cluster (0x%02"PRIx32"); "
|
||||
"processor %"PRIu32" starts to a new cluster",
|
||||
i, midr_get_implementer(processors[i].midr), midr_get_implementer(cluster_midr), i);
|
||||
goto new_cluster;
|
||||
@@ -417,11 +417,11 @@ void cpuinfo_arm_linux_detect_core_clusters_by_sequential_scan(
|
||||
}
|
||||
}
|
||||
|
||||
/* All checks passed, attach processor to the preceeding cluster */
|
||||
/* All checks passed, attach processor to the preceding cluster */
|
||||
cluster_processors++;
|
||||
processors[i].package_leader_id = cluster_start;
|
||||
processors[i].flags |= CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER;
|
||||
cpuinfo_log_debug("assigned processor %"PRIu32" to preceeding cluster of processor %"PRIu32, i, cluster_start);
|
||||
cpuinfo_log_debug("assigned processor %"PRIu32" to preceding cluster of processor %"PRIu32, i, cluster_start);
|
||||
continue;
|
||||
|
||||
new_cluster:
|
||||
|
||||
18
3rdparty/cpuinfo/src/arm/linux/cp.h
vendored
18
3rdparty/cpuinfo/src/arm/linux/cp.h
vendored
@@ -35,10 +35,16 @@
|
||||
return mvfr0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline uint32_t read_wcid(void) {
|
||||
uint32_t wcid;
|
||||
__asm__ __volatile__("MRC p1, 0, %[wcid], c0, c0" : [wcid] "=r" (wcid));
|
||||
return wcid;
|
||||
}
|
||||
#if !defined(__ARM_ARCH_8A__) && !(defined(__ARM_ARCH) && (__ARM_ARCH >= 8))
|
||||
/*
|
||||
* In ARMv8, AArch32 state supports only conceptual coprocessors CP10, CP11, CP14, and CP15.
|
||||
* AArch64 does not support the concept of coprocessors.
|
||||
* and clang refuses to compile inline assembly when targeting ARMv8+
|
||||
*/
|
||||
static inline uint32_t read_wcid(void) {
|
||||
uint32_t wcid;
|
||||
__asm__ __volatile__("MRC p1, 0, %[wcid], c0, c0" : [wcid] "=r" (wcid));
|
||||
return wcid;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
9
3rdparty/cpuinfo/src/arm/linux/cpuinfo.c
vendored
9
3rdparty/cpuinfo/src/arm/linux/cpuinfo.c
vendored
@@ -177,6 +177,10 @@ static void parse_features(
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
processor->features |= CPUINFO_ARM_LINUX_FEATURE_FCMA;
|
||||
#endif
|
||||
} else if (memcmp(feature_start, "i8mm", feature_length) == 0) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
processor->features2 |= CPUINFO_ARM_LINUX_FEATURE2_I8MM;
|
||||
#endif
|
||||
#if CPUINFO_ARCH_ARM
|
||||
} else if (memcmp(feature_start, "half", feature_length) == 0) {
|
||||
processor->features |= CPUINFO_ARM_LINUX_FEATURE_HALF;
|
||||
@@ -283,6 +287,10 @@ static void parse_features(
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
processor->features |= CPUINFO_ARM_LINUX_FEATURE_ASIMDRDM;
|
||||
#endif
|
||||
} else if (memcmp(feature_start, "asimdfhm", feature_length) == 0) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
processor->features |= CPUINFO_ARM_LINUX_FEATURE_ASIMDFHM;
|
||||
#endif
|
||||
#if CPUINFO_ARCH_ARM
|
||||
} else if (memcmp(feature_start, "fastmult", feature_length) == 0) {
|
||||
processor->features |= CPUINFO_ARM_LINUX_FEATURE_FASTMULT;
|
||||
@@ -896,6 +904,7 @@ bool cpuinfo_arm_linux_parse_proc_cpuinfo(
|
||||
uint32_t max_processors_count,
|
||||
struct cpuinfo_arm_linux_processor processors[restrict static max_processors_count])
|
||||
{
|
||||
hardware[0] = '\0';
|
||||
struct proc_cpuinfo_parser_state state = {
|
||||
.hardware = hardware,
|
||||
.revision = revision,
|
||||
|
||||
10
3rdparty/cpuinfo/src/arm/linux/hwcap.c
vendored
10
3rdparty/cpuinfo/src/arm/linux/hwcap.c
vendored
@@ -1,3 +1,4 @@
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <unistd.h>
|
||||
@@ -15,7 +16,8 @@
|
||||
#include <arm/linux/api.h>
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
#if CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_ARM && !defined(__ANDROID__)
|
||||
#if CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_ARM && \
|
||||
defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)
|
||||
#include <sys/auxv.h>
|
||||
#else
|
||||
#define AT_HWCAP 16
|
||||
@@ -74,11 +76,13 @@
|
||||
libc = NULL;
|
||||
}
|
||||
return getauxval != NULL;
|
||||
#else
|
||||
/* GNU/Linux: getauxval is always supported */
|
||||
#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)
|
||||
/* GNU/Linux: getauxval is supported since glibc-2.16 */
|
||||
*hwcap = getauxval(AT_HWCAP);
|
||||
*hwcap2 = getauxval(AT_HWCAP2);
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
12
3rdparty/cpuinfo/src/arm/linux/init.c
vendored
12
3rdparty/cpuinfo/src/arm/linux/init.c
vendored
@@ -199,9 +199,13 @@ void cpuinfo_arm_linux_init(void) {
|
||||
for (uint32_t i = 0; i < arm_linux_processors_count; i++) {
|
||||
arm_linux_processors[i].system_processor_id = i;
|
||||
if (bitmask_all(arm_linux_processors[i].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
valid_processors += 1;
|
||||
|
||||
if (!(arm_linux_processors[i].flags & CPUINFO_ARM_LINUX_VALID_PROCESSOR)) {
|
||||
if (arm_linux_processors[i].flags & CPUINFO_ARM_LINUX_VALID_PROCESSOR) {
|
||||
/*
|
||||
* Processor is in possible and present lists, and also reported in /proc/cpuinfo.
|
||||
* This processor is availble for compute.
|
||||
*/
|
||||
valid_processors += 1;
|
||||
} else {
|
||||
/*
|
||||
* Processor is in possible and present lists, but not reported in /proc/cpuinfo.
|
||||
* This is fairly common: high-index processors can be not reported if they are offline.
|
||||
@@ -510,7 +514,7 @@ void cpuinfo_arm_linux_init(void) {
|
||||
uint32_t l2_count = 0, l3_count = 0, big_l3_size = 0, cluster_id = UINT32_MAX;
|
||||
/* Indication whether L3 (if it exists) is shared between all cores */
|
||||
bool shared_l3 = true;
|
||||
/* Populate cache infromation structures in l1i, l1d */
|
||||
/* Populate cache information structures in l1i, l1d */
|
||||
for (uint32_t i = 0; i < valid_processors; i++) {
|
||||
if (arm_linux_processors[i].package_leader_id == arm_linux_processors[i].system_processor_id) {
|
||||
cluster_id += 1;
|
||||
|
||||
6
3rdparty/cpuinfo/src/arm/linux/midr.c
vendored
6
3rdparty/cpuinfo/src/arm/linux/midr.c
vendored
@@ -675,10 +675,10 @@ static bool cpuinfo_arm_linux_detect_cluster_midr_by_big_little_heuristic(
|
||||
|
||||
/*
|
||||
* Initializes MIDR for leaders of core clusters in a single sequential scan:
|
||||
* - Clusters preceeding the first reported MIDR value are assumed to have default MIDR value.
|
||||
* - Clusters preceding the first reported MIDR value are assumed to have default MIDR value.
|
||||
* - Clusters following any reported MIDR value to have that MIDR value.
|
||||
*
|
||||
* @param default_midr - MIDR value that will be assigned to cluster leaders preceeding any reported MIDR value.
|
||||
* @param default_midr - MIDR value that will be assigned to cluster leaders preceding any reported MIDR value.
|
||||
* @param processors_count - number of logical processor descriptions in the @p processors array.
|
||||
* @param[in,out] processors - array of logical processor descriptions with pre-parsed MIDR, maximum frequency,
|
||||
* and decoded core cluster (package_leader_id) information.
|
||||
@@ -833,7 +833,7 @@ uint32_t cpuinfo_arm_linux_detect_cluster_midr(
|
||||
* 2. For systems with 2 clusters and MIDR known for one cluster, assume big.LITTLE configuration,
|
||||
* and estimate MIDR for the other cluster under assumption that MIDR for the big cluster is known.
|
||||
* 3. Initialize MIDRs for core clusters in a single sequential scan:
|
||||
* - Clusters preceeding the first reported MIDR value are assumed to have the last reported MIDR value.
|
||||
* - Clusters preceding the first reported MIDR value are assumed to have the last reported MIDR value.
|
||||
* - Clusters following any reported MIDR value to have that MIDR value.
|
||||
*/
|
||||
|
||||
|
||||
223
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
223
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
@@ -15,43 +15,25 @@
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
/* Polyfill recent CPUFAMILY_ARM_* values for older SDKs */
|
||||
#ifndef CPUFAMILY_ARM_MONSOON_MISTRAL
|
||||
#define CPUFAMILY_ARM_MONSOON_MISTRAL 0xE81E7EF6
|
||||
#endif
|
||||
#ifndef CPUFAMILY_ARM_VORTEX_TEMPEST
|
||||
#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07D34B9F
|
||||
#define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07D34B9F
|
||||
#endif
|
||||
#ifndef CPUFAMILY_ARM_LIGHTNING_THUNDER
|
||||
#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504D2
|
||||
#define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504D2
|
||||
#endif
|
||||
#ifndef CPUFAMILY_ARM_FIRESTORM_ICESTORM
|
||||
#define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1B588BB3
|
||||
#endif
|
||||
#ifndef CPUFAMILY_ARM_AVALANCHE_BLIZZARD
|
||||
#define CPUFAMILY_ARM_AVALANCHE_BLIZZARD 0xDA33D83D
|
||||
#endif
|
||||
|
||||
struct cpuinfo_arm_isa cpuinfo_isa = {
|
||||
#if CPUINFO_ARCH_ARM
|
||||
.thumb = true,
|
||||
.thumb2 = true,
|
||||
.thumbee = false,
|
||||
.jazelle = false,
|
||||
.armv5e = true,
|
||||
.armv6 = true,
|
||||
.armv6k = true,
|
||||
.armv7 = true,
|
||||
.vfpv2 = false,
|
||||
.vfpv3 = true,
|
||||
.d32 = true,
|
||||
.wmmx = false,
|
||||
.wmmx2 = false,
|
||||
.neon = true,
|
||||
#endif
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
.aes = true,
|
||||
.sha1 = true,
|
||||
.sha2 = true,
|
||||
.pmull = true,
|
||||
.crc32 = true,
|
||||
#endif
|
||||
};
|
||||
|
||||
static uint32_t get_sys_info(int type_specifier, const char* name) {
|
||||
@@ -83,10 +65,8 @@ static uint32_t get_sys_info_by_name(const char* type_specifier) {
|
||||
return result;
|
||||
}
|
||||
|
||||
static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t cpu_subtype, uint32_t core_index, uint32_t core_count) {
|
||||
static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t core_index, uint32_t core_count) {
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_SWIFT:
|
||||
return cpuinfo_uarch_swift;
|
||||
case CPUFAMILY_ARM_CYCLONE:
|
||||
return cpuinfo_uarch_cyclone;
|
||||
case CPUFAMILY_ARM_TYPHOON:
|
||||
@@ -107,25 +87,15 @@ static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t cpu_subtype
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
/* Hexa-core: 2x Firestorm + 4x Icestorm; Octa-core: 4x Firestorm + 4x Icestorm */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_firestorm : cpuinfo_uarch_icestorm;
|
||||
case CPUFAMILY_ARM_AVALANCHE_BLIZZARD:
|
||||
/* Hexa-core: 2x Avalanche + 4x Blizzard */
|
||||
return core_index + 4 < core_count ? cpuinfo_uarch_avalanche : cpuinfo_uarch_blizzard;
|
||||
default:
|
||||
/* Use hw.cpusubtype for detection */
|
||||
break;
|
||||
}
|
||||
|
||||
#if CPUINFO_ARCH_ARM
|
||||
switch (cpu_subtype) {
|
||||
case CPU_SUBTYPE_ARM_V7:
|
||||
return cpuinfo_uarch_cortex_a8;
|
||||
case CPU_SUBTYPE_ARM_V7F:
|
||||
return cpuinfo_uarch_cortex_a9;
|
||||
case CPU_SUBTYPE_ARM_V7K:
|
||||
return cpuinfo_uarch_cortex_a7;
|
||||
default:
|
||||
return cpuinfo_uarch_unknown;
|
||||
}
|
||||
#else
|
||||
return cpuinfo_uarch_unknown;
|
||||
#endif
|
||||
return cpuinfo_uarch_unknown;
|
||||
}
|
||||
|
||||
static void decode_package_name(char* package_name) {
|
||||
@@ -299,71 +269,118 @@ void cpuinfo_arm_mach_init(void) {
|
||||
|
||||
|
||||
const uint32_t cpu_family = get_sys_info_by_name("hw.cpufamily");
|
||||
const uint32_t cpu_type = get_sys_info_by_name("hw.cputype");
|
||||
const uint32_t cpu_subtype = get_sys_info_by_name("hw.cpusubtype");
|
||||
switch (cpu_type) {
|
||||
case CPU_TYPE_ARM64:
|
||||
cpuinfo_isa.aes = true;
|
||||
cpuinfo_isa.sha1 = true;
|
||||
cpuinfo_isa.sha2 = true;
|
||||
cpuinfo_isa.pmull = true;
|
||||
cpuinfo_isa.crc32 = true;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM
|
||||
case CPU_TYPE_ARM:
|
||||
switch (cpu_subtype) {
|
||||
case CPU_SUBTYPE_ARM_V8:
|
||||
cpuinfo_isa.armv8 = true;
|
||||
cpuinfo_isa.aes = true;
|
||||
cpuinfo_isa.sha1 = true;
|
||||
cpuinfo_isa.sha2 = true;
|
||||
cpuinfo_isa.pmull = true;
|
||||
cpuinfo_isa.crc32 = true;
|
||||
/* Fall-through to add ARMv7S features */
|
||||
case CPU_SUBTYPE_ARM_V7S:
|
||||
case CPU_SUBTYPE_ARM_V7K:
|
||||
cpuinfo_isa.fma = true;
|
||||
/* Fall-through to add ARMv7F features */
|
||||
case CPU_SUBTYPE_ARM_V7F:
|
||||
cpuinfo_isa.armv7mp = true;
|
||||
cpuinfo_isa.fp16 = true;
|
||||
/* Fall-through to add ARMv7 features */
|
||||
case CPU_SUBTYPE_ARM_V7:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
* Support for ARMv8.1 Atomics & FP16 arithmetic instructions is supposed to be detected via
|
||||
* sysctlbyname calls with "hw.optional.armv8_1_atomics" and "hw.optional.neon_fp16" arguments
|
||||
* (see https://devstreaming-cdn.apple.com/videos/wwdc/2018/409t8zw7rumablsh/409/409_whats_new_in_llvm.pdf),
|
||||
* but on new iOS versions these calls just fail with EPERM.
|
||||
*
|
||||
* Thus, we whitelist CPUs known to support these instructions.
|
||||
*/
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_MONSOON_MISTRAL:
|
||||
case CPUFAMILY_ARM_VORTEX_TEMPEST:
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
cpuinfo_isa.atomics = true;
|
||||
#endif
|
||||
cpuinfo_isa.fp16arith = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* There does not yet seem to exist an OS mechanism to detect support for
|
||||
* ARMv8.2 optional dot-product instructions, so we currently whitelist CPUs
|
||||
* known to support these instruction.
|
||||
* iOS 15 and macOS 12 added sysctls for ARM features, use them where possible.
|
||||
* Otherwise, fallback to hardcoded set of CPUs with known support.
|
||||
*/
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.dot = true;
|
||||
const uint32_t has_feat_lse = get_sys_info_by_name("hw.optional.arm.FEAT_LSE");
|
||||
if (has_feat_lse != 0) {
|
||||
cpuinfo_isa.atomics = true;
|
||||
} else {
|
||||
// Mandatory in ARMv8.1-A, list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_MONSOON_MISTRAL:
|
||||
case CPUFAMILY_ARM_VORTEX_TEMPEST:
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.atomics = true;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_rdm = get_sys_info_by_name("hw.optional.arm.FEAT_RDM");
|
||||
if (has_feat_rdm != 0) {
|
||||
cpuinfo_isa.rdm = true;
|
||||
} else {
|
||||
// Optional in ARMv8.2-A (implemented in Apple cores),
|
||||
// list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_MONSOON_MISTRAL:
|
||||
case CPUFAMILY_ARM_VORTEX_TEMPEST:
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.rdm = true;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_fp16 = get_sys_info_by_name("hw.optional.arm.FEAT_FP16");
|
||||
if (has_feat_fp16 != 0) {
|
||||
cpuinfo_isa.fp16arith = true;
|
||||
} else {
|
||||
// Optional in ARMv8.2-A (implemented in Apple cores),
|
||||
// list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_MONSOON_MISTRAL:
|
||||
case CPUFAMILY_ARM_VORTEX_TEMPEST:
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.fp16arith = true;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_fhm = get_sys_info_by_name("hw.optional.arm.FEAT_FHM");
|
||||
if (has_feat_fhm != 0) {
|
||||
cpuinfo_isa.fhm = true;
|
||||
} else {
|
||||
// Prior to iOS 15, use 'hw.optional.armv8_2_fhm'
|
||||
const uint32_t has_feat_fhm_legacy = get_sys_info_by_name("hw.optional.armv8_2_fhm");
|
||||
if (has_feat_fhm_legacy != 0) {
|
||||
cpuinfo_isa.fhm = true;
|
||||
} else {
|
||||
// Mandatory in ARMv8.4-A when FP16 arithmetics is implemented,
|
||||
// list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.fhm = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_bf16 = get_sys_info_by_name("hw.optional.arm.FEAT_BF16");
|
||||
if (has_feat_bf16 != 0) {
|
||||
cpuinfo_isa.bf16 = true;
|
||||
}
|
||||
|
||||
const uint32_t has_feat_fcma = get_sys_info_by_name("hw.optional.arm.FEAT_FCMA");
|
||||
if (has_feat_fcma != 0) {
|
||||
cpuinfo_isa.fcma = true;
|
||||
} else {
|
||||
// Mandatory in ARMv8.3-A, list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.fcma = true;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_jscvt = get_sys_info_by_name("hw.optional.arm.FEAT_JSCVT");
|
||||
if (has_feat_jscvt != 0) {
|
||||
cpuinfo_isa.jscvt = true;
|
||||
} else {
|
||||
// Mandatory in ARMv8.3-A, list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.jscvt = true;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_dotprod = get_sys_info_by_name("hw.optional.arm.FEAT_DotProd");
|
||||
if (has_feat_dotprod != 0) {
|
||||
cpuinfo_isa.dot = true;
|
||||
} else {
|
||||
// Mandatory in ARMv8.4-A, list only cores released before iOS 15 / macOS 12
|
||||
switch (cpu_family) {
|
||||
case CPUFAMILY_ARM_LIGHTNING_THUNDER:
|
||||
case CPUFAMILY_ARM_FIRESTORM_ICESTORM:
|
||||
cpuinfo_isa.dot = true;
|
||||
}
|
||||
}
|
||||
|
||||
const uint32_t has_feat_i8mm = get_sys_info_by_name("hw.optional.arm.FEAT_I8MM");
|
||||
if (has_feat_i8mm != 0) {
|
||||
cpuinfo_isa.i8mm = true;
|
||||
}
|
||||
|
||||
uint32_t num_clusters = 1;
|
||||
@@ -374,7 +391,7 @@ void cpuinfo_arm_mach_init(void) {
|
||||
.core_id = i % cores_per_package,
|
||||
.package = packages + i / cores_per_package,
|
||||
.vendor = cpuinfo_vendor_apple,
|
||||
.uarch = decode_uarch(cpu_family, cpu_subtype, i, mach_topology.cores),
|
||||
.uarch = decode_uarch(cpu_family, i, mach_topology.cores),
|
||||
};
|
||||
if (i != 0 && cores[i].uarch != cores[i - 1].uarch) {
|
||||
num_clusters++;
|
||||
|
||||
35
3rdparty/cpuinfo/src/arm/midr.h
vendored
35
3rdparty/cpuinfo/src/arm/midr.h
vendored
@@ -174,23 +174,27 @@ inline static uint32_t midr_score_core(uint32_t midr) {
|
||||
case UINT32_C(0x53000030): /* Exynos M4 */
|
||||
case UINT32_C(0x53000040): /* Exynos M5 */
|
||||
case UINT32_C(0x4100D440): /* Cortex-X1 */
|
||||
/* These cores are in big role w.r.t Cortex-A75/-A76/-A77/-A78 */
|
||||
case UINT32_C(0x4100D480): /* Cortex-X2 */
|
||||
case UINT32_C(0x4100D4E0): /* Cortex-X3 */
|
||||
/* These cores are in big role w.r.t Cortex-A75/-A76/-A77/-A78/-A710/-A715 */
|
||||
return 6;
|
||||
case UINT32_C(0x4E000030): /* Denver 2 */
|
||||
case UINT32_C(0x53000010): /* Exynos M1 and Exynos M2 */
|
||||
case UINT32_C(0x53000020): /* Exynos M3 */
|
||||
case UINT32_C(0x51008040): /* Kryo 485 Gold / Gold Prime */
|
||||
case UINT32_C(0x51008020): /* Kryo 385 Gold */
|
||||
case UINT32_C(0x51008000): /* Kryo 260 / 280 Gold */
|
||||
case UINT32_C(0x51002050): /* Kryo Gold */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x4100D410): /* Cortex-A78 */
|
||||
case UINT32_C(0x4100D080): /* Cortex-A72 */
|
||||
case UINT32_C(0x4100D090): /* Cortex-A73 */
|
||||
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
case UINT32_C(0x4100D0D0): /* Cortex-A77 */
|
||||
case UINT32_C(0x4100D0E0): /* Cortex-A76AE */
|
||||
case UINT32_C(0x4100D0B0): /* Cortex-A76 */
|
||||
case UINT32_C(0x4100D0A0): /* Cortex-A75 */
|
||||
case UINT32_C(0x4100D090): /* Cortex-A73 */
|
||||
case UINT32_C(0x4100D080): /* Cortex-A72 */
|
||||
case UINT32_C(0x4100D410): /* Cortex-A78 */
|
||||
case UINT32_C(0x4100D470): /* Cortex-A710 */
|
||||
case UINT32_C(0x4100D4D0): /* Cortex-A715 */
|
||||
case UINT32_C(0x4800D400): /* Cortex-A76 (HiSilicon) */
|
||||
case UINT32_C(0x4E000030): /* Denver 2 */
|
||||
case UINT32_C(0x51002050): /* Kryo Gold */
|
||||
case UINT32_C(0x51008000): /* Kryo 260 / 280 Gold */
|
||||
case UINT32_C(0x51008020): /* Kryo 385 Gold */
|
||||
case UINT32_C(0x51008040): /* Kryo 485 Gold / Gold Prime */
|
||||
case UINT32_C(0x53000010): /* Exynos M1 and Exynos M2 */
|
||||
case UINT32_C(0x53000020): /* Exynos M3 */
|
||||
#if CPUINFO_ARCH_ARM
|
||||
case UINT32_C(0x4100C0F0): /* Cortex-A15 */
|
||||
case UINT32_C(0x4100C0E0): /* Cortex-A17 */
|
||||
@@ -205,8 +209,9 @@ inline static uint32_t midr_score_core(uint32_t midr) {
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case UINT32_C(0x4100D060): /* Cortex-A65 */
|
||||
#endif /* CPUINFO_ARCH_ARM64 */
|
||||
case UINT32_C(0x4100D050): /* Cortex-A55 */
|
||||
case UINT32_C(0x4100D030): /* Cortex-A53 */
|
||||
case UINT32_C(0x4100D050): /* Cortex-A55 */
|
||||
case UINT32_C(0x4100D460): /* Cortex-A510 */
|
||||
/* Cortex-A53 is usually in LITTLE role, but can be in big role w.r.t. Cortex-A35 */
|
||||
return 2;
|
||||
case UINT32_C(0x4100D040): /* Cortex-A35 */
|
||||
|
||||
48
3rdparty/cpuinfo/src/arm/uarch.c
vendored
48
3rdparty/cpuinfo/src/arm/uarch.c
vendored
@@ -80,28 +80,50 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
case 0xD0B:
|
||||
*uarch = cpuinfo_uarch_cortex_a76;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
|
||||
case 0xD0C:
|
||||
*uarch = cpuinfo_uarch_neoverse_n1;
|
||||
break;
|
||||
#endif /* CPUINFO_ARCH_ARM64 && !defined(__ANDROID__) */
|
||||
case 0xD0D:
|
||||
*uarch = cpuinfo_uarch_cortex_a77;
|
||||
break;
|
||||
case 0xD0E: /* Cortex-A76AE */
|
||||
*uarch = cpuinfo_uarch_cortex_a76;
|
||||
break;
|
||||
case 0xD40: /* Neoverse V1 */
|
||||
*uarch = cpuinfo_uarch_neoverse_v1;
|
||||
break;
|
||||
case 0xD41: /* Cortex-A78 */
|
||||
*uarch = cpuinfo_uarch_cortex_a78;
|
||||
break;
|
||||
case 0xD44: /* Cortex-X1 */
|
||||
*uarch = cpuinfo_uarch_cortex_x1;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
|
||||
case 0xD46: /* Cortex-A510 */
|
||||
*uarch = cpuinfo_uarch_cortex_a510;
|
||||
break;
|
||||
case 0xD47: /* Cortex-A710 */
|
||||
*uarch = cpuinfo_uarch_cortex_a710;
|
||||
break;
|
||||
case 0xD48: /* Cortex-X2 */
|
||||
*uarch = cpuinfo_uarch_cortex_x2;
|
||||
break;
|
||||
case 0xD49: /* Neoverse N2 */
|
||||
*uarch = cpuinfo_uarch_neoverse_n2;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 0xD4A:
|
||||
*uarch = cpuinfo_uarch_neoverse_e1;
|
||||
break;
|
||||
#endif /* CPUINFO_ARCH_ARM64 && !defined(__ANDROID__) */
|
||||
#endif /* CPUINFO_ARCH_ARM64 */
|
||||
case 0xD4D: /* Cortex-A715 */
|
||||
*uarch = cpuinfo_uarch_cortex_a715;
|
||||
break;
|
||||
case 0xD4E: /* Cortex-X3 */
|
||||
*uarch = cpuinfo_uarch_cortex_x3;
|
||||
break;
|
||||
case 0xD4F: /* Neoverse V2 */
|
||||
*uarch = cpuinfo_uarch_neoverse_v2;
|
||||
break;
|
||||
default:
|
||||
switch (midr_get_part(midr) >> 8) {
|
||||
#if CPUINFO_ARCH_ARM
|
||||
@@ -129,18 +151,18 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
case 0x100:
|
||||
*uarch = cpuinfo_uarch_brahma_b53;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 0x516:
|
||||
/* Broadcom Vulkan was sold to Cavium before it reached the market, so we identify it as Cavium ThunderX2 */
|
||||
*vendor = cpuinfo_vendor_cavium;
|
||||
*uarch = cpuinfo_uarch_thunderx2;
|
||||
break;
|
||||
#endif
|
||||
#endif /* CPUINFO_ARCH_ARM64 */
|
||||
default:
|
||||
cpuinfo_log_warning("unknown Broadcom CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
|
||||
}
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 'C':
|
||||
*vendor = cpuinfo_vendor_cavium;
|
||||
switch (midr_get_part(midr)) {
|
||||
@@ -157,15 +179,15 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
cpuinfo_log_warning("unknown Cavium CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif /* CPUINFO_ARCH_ARM64 */
|
||||
case 'H':
|
||||
*vendor = cpuinfo_vendor_huawei;
|
||||
switch (midr_get_part(midr)) {
|
||||
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 0xD01: /* Kunpeng 920 series */
|
||||
*uarch = cpuinfo_uarch_taishan_v110;
|
||||
break;
|
||||
#endif
|
||||
#endif /* CPUINFO_ARCH_ARM64 */
|
||||
case 0xD40: /* Kirin 980 Big/Medium cores -> Cortex-A76 */
|
||||
*vendor = cpuinfo_vendor_arm;
|
||||
*uarch = cpuinfo_uarch_cortex_a76;
|
||||
@@ -204,7 +226,6 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
cpuinfo_log_warning("unknown Nvidia CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
|
||||
}
|
||||
break;
|
||||
#if !defined(__ANDROID__)
|
||||
case 'P':
|
||||
*vendor = cpuinfo_vendor_apm;
|
||||
switch (midr_get_part(midr)) {
|
||||
@@ -215,7 +236,6 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
cpuinfo_log_warning("unknown Applied Micro CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 'Q':
|
||||
*vendor = cpuinfo_vendor_qualcomm;
|
||||
switch (midr_get_part(midr)) {
|
||||
@@ -282,14 +302,14 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
*vendor = cpuinfo_vendor_arm;
|
||||
*uarch = cpuinfo_uarch_cortex_a55;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64 && !defined(__ANDROID__)
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 0xC00:
|
||||
*uarch = cpuinfo_uarch_falkor;
|
||||
break;
|
||||
case 0xC01:
|
||||
*uarch = cpuinfo_uarch_saphira;
|
||||
break;
|
||||
#endif /* CPUINFO_ARCH_ARM64 && !defined(__ANDROID__) */
|
||||
#endif /* CPUINFO_ARCH_ARM64 */
|
||||
default:
|
||||
cpuinfo_log_warning("unknown Qualcomm CPU part 0x%03"PRIx32" ignored", midr_get_part(midr));
|
||||
}
|
||||
|
||||
901
3rdparty/cpuinfo/src/arm/windows/init-by-logical-sys-info.c
vendored
Normal file
901
3rdparty/cpuinfo/src/arm/windows/init-by-logical-sys-info.c
vendored
Normal file
@@ -0,0 +1,901 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <cpuinfo.h>
|
||||
#include <cpuinfo/internal-api.h>
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
#include "windows-arm-init.h"
|
||||
|
||||
#define MAX_NR_OF_CACHES (cpuinfo_cache_level_max - 1)
|
||||
|
||||
/* Call chain:
|
||||
* cpu_info_init_by_logical_sys_info
|
||||
* read_packages_for_processors
|
||||
* read_cores_for_processors
|
||||
* read_caches_for_processors
|
||||
* read_all_logical_processor_info_of_relation
|
||||
* parse_relation_processor_info
|
||||
* store_package_info_per_processor
|
||||
* store_core_info_per_processor
|
||||
* parse_relation_cache_info
|
||||
* store_cache_info_per_processor
|
||||
*/
|
||||
|
||||
static uint32_t count_logical_processors(
|
||||
const uint32_t max_group_count,
|
||||
uint32_t* global_proc_index_per_group);
|
||||
|
||||
static uint32_t read_packages_for_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
const struct woa_chip_info *chip_info);
|
||||
|
||||
static uint32_t read_cores_for_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
struct cpuinfo_core* cores,
|
||||
const struct woa_chip_info *chip_info);
|
||||
|
||||
static uint32_t read_caches_for_processors(
|
||||
struct cpuinfo_processor *processors,
|
||||
const uint32_t number_of_processors,
|
||||
struct cpuinfo_cache *caches,
|
||||
uint32_t* numbers_of_caches,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
const struct woa_chip_info *chip_info);
|
||||
|
||||
static uint32_t read_all_logical_processor_info_of_relation(
|
||||
LOGICAL_PROCESSOR_RELATIONSHIP info_type,
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
struct cpuinfo_cache* caches,
|
||||
uint32_t* numbers_of_caches,
|
||||
struct cpuinfo_core* cores,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
const struct woa_chip_info *chip_info);
|
||||
|
||||
static bool parse_relation_processor_info(
|
||||
struct cpuinfo_processor* processors,
|
||||
uint32_t nr_of_processors,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
|
||||
const uint32_t info_id,
|
||||
struct cpuinfo_core* cores,
|
||||
const struct woa_chip_info *chip_info);
|
||||
|
||||
static bool parse_relation_cache_info(
|
||||
struct cpuinfo_processor* processors,
|
||||
struct cpuinfo_cache* caches,
|
||||
uint32_t* numbers_of_caches,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info);
|
||||
|
||||
static void store_package_info_per_processor(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t processor_global_index,
|
||||
const uint32_t package_id,
|
||||
const uint32_t group_id,
|
||||
const uint32_t processor_id_in_group);
|
||||
|
||||
static void store_core_info_per_processor(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t processor_global_index,
|
||||
const uint32_t core_id,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX core_info,
|
||||
struct cpuinfo_core* cores,
|
||||
const struct woa_chip_info *chip_info);
|
||||
|
||||
static void store_cache_info_per_processor(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t processor_global_index,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
|
||||
struct cpuinfo_cache* current_cache);
|
||||
|
||||
static bool connect_packages_cores_clusters_by_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t nr_of_processors,
|
||||
struct cpuinfo_package* packages,
|
||||
const uint32_t nr_of_packages,
|
||||
struct cpuinfo_cluster* clusters,
|
||||
struct cpuinfo_core* cores,
|
||||
const uint32_t nr_of_cores,
|
||||
const struct woa_chip_info* chip_info,
|
||||
enum cpuinfo_vendor vendor);
|
||||
|
||||
static inline uint32_t low_index_from_kaffinity(KAFFINITY kaffinity);
|
||||
|
||||
|
||||
bool cpu_info_init_by_logical_sys_info(
|
||||
const struct woa_chip_info *chip_info,
|
||||
const enum cpuinfo_vendor vendor)
|
||||
{
|
||||
struct cpuinfo_processor* processors = NULL;
|
||||
struct cpuinfo_package* packages = NULL;
|
||||
struct cpuinfo_cluster* clusters = NULL;
|
||||
struct cpuinfo_core* cores = NULL;
|
||||
struct cpuinfo_cache* caches = NULL;
|
||||
struct cpuinfo_uarch_info* uarchs = NULL;
|
||||
|
||||
uint32_t nr_of_packages = 0;
|
||||
uint32_t nr_of_cores = 0;
|
||||
uint32_t nr_of_all_caches = 0;
|
||||
uint32_t numbers_of_caches[MAX_NR_OF_CACHES] = {0};
|
||||
|
||||
uint32_t nr_of_uarchs = 0;
|
||||
bool result = false;
|
||||
|
||||
HANDLE heap = GetProcessHeap();
|
||||
|
||||
/* 1. Count available logical processor groups and processors */
|
||||
const uint32_t max_group_count = (uint32_t) GetMaximumProcessorGroupCount();
|
||||
cpuinfo_log_debug("detected %"PRIu32" processor group(s)", max_group_count);
|
||||
/* We need to store the absolute processor ID offsets for every groups, because
|
||||
* 1. We can't assume every processor groups include the same number of
|
||||
* logical processors.
|
||||
* 2. Every processor groups know its group number and processor IDs within
|
||||
* the group, but not the global processor IDs.
|
||||
* 3. We need to list every logical processors by global IDs.
|
||||
*/
|
||||
uint32_t* global_proc_index_per_group =
|
||||
(uint32_t*) HeapAlloc(heap, 0, max_group_count * sizeof(uint32_t));
|
||||
if (global_proc_index_per_group == NULL) {
|
||||
cpuinfo_log_error(
|
||||
"failed to allocate %zu bytes for descriptions of %"PRIu32" processor groups",
|
||||
max_group_count * sizeof(struct cpuinfo_processor), max_group_count);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
uint32_t nr_of_processors =
|
||||
count_logical_processors(max_group_count, global_proc_index_per_group);
|
||||
processors = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_processors * sizeof(struct cpuinfo_processor));
|
||||
if (processors == NULL) {
|
||||
cpuinfo_log_error(
|
||||
"failed to allocate %zu bytes for descriptions of %"PRIu32" logical processors",
|
||||
nr_of_processors * sizeof(struct cpuinfo_processor), nr_of_processors);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* 2. Read topology information via MSDN API: packages, cores and caches*/
|
||||
nr_of_packages = read_packages_for_processors(
|
||||
processors, nr_of_processors,
|
||||
global_proc_index_per_group,
|
||||
chip_info);
|
||||
if (!nr_of_packages) {
|
||||
cpuinfo_log_error("error in reading package information");
|
||||
goto clean_up;
|
||||
}
|
||||
cpuinfo_log_debug("detected %"PRIu32" processor package(s)", nr_of_packages);
|
||||
|
||||
/* We need the EfficiencyClass to parse uarch from the core information,
|
||||
* but we need to iterate first to count cores and allocate memory then
|
||||
* we will iterate again to read and store data to cpuinfo_core structures.
|
||||
*/
|
||||
nr_of_cores = read_cores_for_processors(
|
||||
processors, nr_of_processors,
|
||||
global_proc_index_per_group, NULL,
|
||||
chip_info);
|
||||
if (!nr_of_cores) {
|
||||
cpuinfo_log_error("error in reading core information");
|
||||
goto clean_up;
|
||||
}
|
||||
cpuinfo_log_debug("detected %"PRIu32" processor core(s)", nr_of_cores);
|
||||
|
||||
/* There is no API to read number of caches, so we need to iterate twice on caches:
|
||||
1. Count all type of caches -> allocate memory
|
||||
2. Read out cache data and store to allocated memory
|
||||
*/
|
||||
nr_of_all_caches = read_caches_for_processors(
|
||||
processors, nr_of_processors,
|
||||
caches, numbers_of_caches,
|
||||
global_proc_index_per_group, chip_info);
|
||||
if (!nr_of_all_caches) {
|
||||
cpuinfo_log_error("error in reading cache information");
|
||||
goto clean_up;
|
||||
}
|
||||
cpuinfo_log_debug("detected %"PRIu32" processor cache(s)", nr_of_all_caches);
|
||||
|
||||
/* 3. Allocate memory for package, cluster, core and cache structures */
|
||||
packages = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_packages * sizeof(struct cpuinfo_package));
|
||||
if (packages == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" physical packages",
|
||||
nr_of_packages * sizeof(struct cpuinfo_package), nr_of_packages);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* We don't have cluster information so we explicitly set clusters to equal to cores. */
|
||||
clusters = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_cores * sizeof(struct cpuinfo_cluster));
|
||||
if (clusters == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" core clusters",
|
||||
nr_of_cores * sizeof(struct cpuinfo_cluster), nr_of_cores);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
cores = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_cores * sizeof(struct cpuinfo_core));
|
||||
if (cores == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" cores",
|
||||
nr_of_cores * sizeof(struct cpuinfo_core), nr_of_cores);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* We allocate one contiguous cache array for all caches, then use offsets per cache type. */
|
||||
caches = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_all_caches * sizeof(struct cpuinfo_cache));
|
||||
if (caches == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" caches",
|
||||
nr_of_all_caches * sizeof(struct cpuinfo_cache), nr_of_all_caches);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* 4.Read missing topology information that can't be saved without counted
|
||||
* allocate structures in the first round.
|
||||
*/
|
||||
nr_of_all_caches = read_caches_for_processors(
|
||||
processors, nr_of_processors,
|
||||
caches, numbers_of_caches, global_proc_index_per_group, chip_info);
|
||||
if (!nr_of_all_caches) {
|
||||
cpuinfo_log_error("error in reading cache information");
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
nr_of_cores = read_cores_for_processors(
|
||||
processors, nr_of_processors,
|
||||
global_proc_index_per_group, cores,
|
||||
chip_info);
|
||||
if (!nr_of_cores) {
|
||||
cpuinfo_log_error("error in reading core information");
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* 5. Now that we read out everything from the system we can, fill the package, cluster
|
||||
* and core structures respectively.
|
||||
*/
|
||||
result = connect_packages_cores_clusters_by_processors(
|
||||
processors, nr_of_processors,
|
||||
packages, nr_of_packages,
|
||||
clusters,
|
||||
cores, nr_of_cores,
|
||||
chip_info,
|
||||
vendor);
|
||||
if(!result) {
|
||||
cpuinfo_log_error("error in connecting information");
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* 6. Count and store uarchs of cores, assuming same uarchs are neighbors */
|
||||
enum cpuinfo_uarch prev_uarch = cpuinfo_uarch_unknown;
|
||||
for (uint32_t i = 0; i < nr_of_cores; i++) {
|
||||
if (prev_uarch != cores[i].uarch) {
|
||||
nr_of_uarchs++;
|
||||
prev_uarch = cores[i].uarch;
|
||||
}
|
||||
}
|
||||
uarchs = HeapAlloc(heap, HEAP_ZERO_MEMORY, nr_of_uarchs * sizeof(struct cpuinfo_uarch_info));
|
||||
if (uarchs == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for descriptions of %"PRIu32" uarchs",
|
||||
nr_of_uarchs * sizeof(struct cpuinfo_uarch_info), nr_of_uarchs);
|
||||
goto clean_up;
|
||||
}
|
||||
prev_uarch = cpuinfo_uarch_unknown;
|
||||
for (uint32_t i = 0, uarch_index = 0; i < nr_of_cores; i++) {
|
||||
if (prev_uarch != cores[i].uarch) {
|
||||
if (i != 0) {
|
||||
uarch_index++;
|
||||
}
|
||||
if (uarch_index >= nr_of_uarchs) {
|
||||
cpuinfo_log_error("more uarchs detected than reported");
|
||||
}
|
||||
prev_uarch = cores[i].uarch;
|
||||
uarchs[uarch_index].uarch = cores[i].uarch;
|
||||
uarchs[uarch_index].core_count = 1;
|
||||
uarchs[uarch_index].processor_count = cores[i].processor_count;
|
||||
} else if (prev_uarch != cpuinfo_uarch_unknown) {
|
||||
uarchs[uarch_index].core_count++;
|
||||
uarchs[uarch_index].processor_count += cores[i].processor_count;
|
||||
}
|
||||
}
|
||||
|
||||
/* 7. Commit changes */
|
||||
cpuinfo_processors = processors;
|
||||
cpuinfo_packages = packages;
|
||||
cpuinfo_clusters = clusters;
|
||||
cpuinfo_cores = cores;
|
||||
cpuinfo_uarchs = uarchs;
|
||||
|
||||
cpuinfo_processors_count = nr_of_processors;
|
||||
cpuinfo_packages_count = nr_of_packages;
|
||||
cpuinfo_clusters_count = nr_of_cores;
|
||||
cpuinfo_cores_count = nr_of_cores;
|
||||
cpuinfo_uarchs_count = nr_of_uarchs;
|
||||
|
||||
for (uint32_t i = 0; i < MAX_NR_OF_CACHES; i++) {
|
||||
cpuinfo_cache_count[i] = numbers_of_caches[i];
|
||||
}
|
||||
cpuinfo_cache[cpuinfo_cache_level_1i] = caches;
|
||||
cpuinfo_cache[cpuinfo_cache_level_1d] = cpuinfo_cache[cpuinfo_cache_level_1i] + cpuinfo_cache_count[cpuinfo_cache_level_1i];
|
||||
cpuinfo_cache[cpuinfo_cache_level_2] = cpuinfo_cache[cpuinfo_cache_level_1d] + cpuinfo_cache_count[cpuinfo_cache_level_1d];
|
||||
cpuinfo_cache[cpuinfo_cache_level_3] = cpuinfo_cache[cpuinfo_cache_level_2] + cpuinfo_cache_count[cpuinfo_cache_level_2];
|
||||
cpuinfo_cache[cpuinfo_cache_level_4] = cpuinfo_cache[cpuinfo_cache_level_3] + cpuinfo_cache_count[cpuinfo_cache_level_3];
|
||||
cpuinfo_max_cache_size = cpuinfo_compute_max_cache_size(&processors[0]);
|
||||
|
||||
result = true;
|
||||
MemoryBarrier();
|
||||
|
||||
processors = NULL;
|
||||
packages = NULL;
|
||||
clusters = NULL;
|
||||
cores = NULL;
|
||||
caches = NULL;
|
||||
uarchs = NULL;
|
||||
|
||||
clean_up:
|
||||
/* The propagated pointers, shouldn't be freed, only in case of error
|
||||
* and unfinished init.
|
||||
*/
|
||||
if (processors != NULL) {
|
||||
HeapFree(heap, 0, processors);
|
||||
}
|
||||
if (packages != NULL) {
|
||||
HeapFree(heap, 0, packages);
|
||||
}
|
||||
if (clusters != NULL) {
|
||||
HeapFree(heap, 0, clusters);
|
||||
}
|
||||
if (cores != NULL) {
|
||||
HeapFree(heap, 0, cores);
|
||||
}
|
||||
if (caches != NULL) {
|
||||
HeapFree(heap, 0, caches);
|
||||
}
|
||||
if (uarchs != NULL) {
|
||||
HeapFree(heap, 0, uarchs);
|
||||
}
|
||||
|
||||
/* Free the locally used temporary pointers */
|
||||
HeapFree(heap, 0, global_proc_index_per_group);
|
||||
global_proc_index_per_group = NULL;
|
||||
return result;
|
||||
}
|
||||
|
||||
static uint32_t count_logical_processors(
|
||||
const uint32_t max_group_count,
|
||||
uint32_t* global_proc_index_per_group)
|
||||
{
|
||||
uint32_t nr_of_processors = 0;
|
||||
|
||||
for (uint32_t i = 0; i < max_group_count; i++) {
|
||||
uint32_t nr_of_processors_per_group = GetMaximumProcessorCount((WORD) i);
|
||||
cpuinfo_log_debug("detected %"PRIu32" processor(s) in group %"PRIu32"",
|
||||
nr_of_processors_per_group, i);
|
||||
global_proc_index_per_group[i] = nr_of_processors;
|
||||
nr_of_processors += nr_of_processors_per_group;
|
||||
}
|
||||
return nr_of_processors;
|
||||
}
|
||||
|
||||
static uint32_t read_packages_for_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
const struct woa_chip_info *chip_info)
|
||||
{
|
||||
return read_all_logical_processor_info_of_relation(
|
||||
RelationProcessorPackage,
|
||||
processors,
|
||||
number_of_processors,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
global_proc_index_per_group,
|
||||
chip_info);
|
||||
}
|
||||
|
||||
uint32_t read_cores_for_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
struct cpuinfo_core* cores,
|
||||
const struct woa_chip_info *chip_info)
|
||||
{
|
||||
return read_all_logical_processor_info_of_relation(
|
||||
RelationProcessorCore,
|
||||
processors,
|
||||
number_of_processors,
|
||||
NULL,
|
||||
NULL,
|
||||
cores,
|
||||
global_proc_index_per_group,
|
||||
chip_info);
|
||||
}
|
||||
|
||||
static uint32_t read_caches_for_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
struct cpuinfo_cache* caches,
|
||||
uint32_t* numbers_of_caches,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
const struct woa_chip_info *chip_info)
|
||||
{
|
||||
/* Reset processor start indexes */
|
||||
if (caches) {
|
||||
uint32_t cache_offset = 0;
|
||||
for (uint32_t i = 0; i < MAX_NR_OF_CACHES; i++) {
|
||||
for (uint32_t j = 0; j < numbers_of_caches[i]; j++) {
|
||||
caches[cache_offset + j].processor_start = UINT32_MAX;
|
||||
}
|
||||
cache_offset += numbers_of_caches[i];
|
||||
}
|
||||
}
|
||||
|
||||
return read_all_logical_processor_info_of_relation(
|
||||
RelationCache,
|
||||
processors,
|
||||
number_of_processors,
|
||||
caches,
|
||||
numbers_of_caches,
|
||||
NULL,
|
||||
global_proc_index_per_group,
|
||||
chip_info);
|
||||
}
|
||||
|
||||
static uint32_t read_all_logical_processor_info_of_relation(
|
||||
LOGICAL_PROCESSOR_RELATIONSHIP info_type,
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t number_of_processors,
|
||||
struct cpuinfo_cache* caches,
|
||||
uint32_t* numbers_of_caches,
|
||||
struct cpuinfo_core* cores,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
const struct woa_chip_info* chip_info)
|
||||
{
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX infos = NULL;
|
||||
uint32_t nr_of_structs = 0;
|
||||
DWORD info_size = 0;
|
||||
bool result = false;
|
||||
HANDLE heap = GetProcessHeap();
|
||||
|
||||
/* 1. Query the size of the information structure first */
|
||||
if (GetLogicalProcessorInformationEx(info_type, NULL, &info_size) == FALSE) {
|
||||
const DWORD last_error = GetLastError();
|
||||
if (last_error != ERROR_INSUFFICIENT_BUFFER) {
|
||||
cpuinfo_log_error(
|
||||
"failed to query size of processor %"PRIu32" information information: error %"PRIu32"",
|
||||
(uint32_t)info_type, (uint32_t) last_error);
|
||||
goto clean_up;
|
||||
}
|
||||
}
|
||||
/* 2. Allocate memory for the information structure */
|
||||
infos = HeapAlloc(heap, 0, info_size);
|
||||
if (infos == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %"PRIu32" bytes for logical processor information",
|
||||
(uint32_t) info_size);
|
||||
goto clean_up;
|
||||
}
|
||||
/* 3. Read the information structure */
|
||||
if (GetLogicalProcessorInformationEx(info_type, infos, &info_size) == FALSE) {
|
||||
cpuinfo_log_error("failed to query processor %"PRIu32" information: error %"PRIu32"",
|
||||
(uint32_t)info_type, (uint32_t) GetLastError());
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
/* 4. Parse the structure and store relevant data */
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info_end =
|
||||
(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) ((uintptr_t) infos + info_size);
|
||||
for (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info = infos;
|
||||
info < info_end;
|
||||
info = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) ((uintptr_t) info + info->Size))
|
||||
{
|
||||
if (info->Relationship != info_type) {
|
||||
cpuinfo_log_warning(
|
||||
"unexpected processor info type (%"PRIu32") for processor information",
|
||||
(uint32_t) info->Relationship);
|
||||
continue;
|
||||
}
|
||||
|
||||
const uint32_t info_id = nr_of_structs++;
|
||||
|
||||
switch(info_type) {
|
||||
case RelationProcessorPackage:
|
||||
result = parse_relation_processor_info(
|
||||
processors,
|
||||
number_of_processors,
|
||||
global_proc_index_per_group,
|
||||
info,
|
||||
info_id,
|
||||
cores,
|
||||
chip_info);
|
||||
break;
|
||||
case RelationProcessorCore:
|
||||
result = parse_relation_processor_info(
|
||||
processors,
|
||||
number_of_processors,
|
||||
global_proc_index_per_group,
|
||||
info,
|
||||
info_id,
|
||||
cores,
|
||||
chip_info);
|
||||
break;
|
||||
case RelationCache:
|
||||
result = parse_relation_cache_info(
|
||||
processors,
|
||||
caches,
|
||||
numbers_of_caches,
|
||||
global_proc_index_per_group,
|
||||
info);
|
||||
break;
|
||||
default:
|
||||
cpuinfo_log_error(
|
||||
"unexpected processor info type (%"PRIu32") for processor information",
|
||||
(uint32_t) info->Relationship);
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
if (!result) {
|
||||
nr_of_structs = 0;
|
||||
goto clean_up;
|
||||
}
|
||||
}
|
||||
clean_up:
|
||||
/* 5. Release dynamically allocated info structure. */
|
||||
HeapFree(heap, 0, infos);
|
||||
infos = NULL;
|
||||
return nr_of_structs;
|
||||
}
|
||||
|
||||
static bool parse_relation_processor_info(
|
||||
struct cpuinfo_processor* processors,
|
||||
uint32_t nr_of_processors,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
|
||||
const uint32_t info_id,
|
||||
struct cpuinfo_core* cores,
|
||||
const struct woa_chip_info *chip_info)
|
||||
{
|
||||
for (uint32_t i = 0; i < info->Processor.GroupCount; i++) {
|
||||
const uint32_t group_id = info->Processor.GroupMask[i].Group;
|
||||
/* Bitmask representing processors in this group belonging to this package */
|
||||
KAFFINITY group_processors_mask = info->Processor.GroupMask[i].Mask;
|
||||
while (group_processors_mask != 0) {
|
||||
const uint32_t processor_id_in_group =
|
||||
low_index_from_kaffinity(group_processors_mask);
|
||||
const uint32_t processor_global_index =
|
||||
global_proc_index_per_group[group_id] + processor_id_in_group;
|
||||
|
||||
if(processor_global_index >= nr_of_processors) {
|
||||
cpuinfo_log_error("unexpected processor index %"PRIu32"",
|
||||
processor_global_index);
|
||||
return false;
|
||||
}
|
||||
|
||||
switch(info->Relationship) {
|
||||
case RelationProcessorPackage:
|
||||
store_package_info_per_processor(
|
||||
processors, processor_global_index, info_id,
|
||||
group_id, processor_id_in_group);
|
||||
break;
|
||||
case RelationProcessorCore:
|
||||
store_core_info_per_processor(
|
||||
processors, processor_global_index,
|
||||
info_id, info,
|
||||
cores, chip_info);
|
||||
break;
|
||||
default:
|
||||
cpuinfo_log_error(
|
||||
"unexpected processor info type (%"PRIu32") for processor information",
|
||||
(uint32_t) info->Relationship);
|
||||
break;
|
||||
}
|
||||
/* Clear the bits in affinity mask, lower the least set bit. */
|
||||
group_processors_mask &= (group_processors_mask - 1);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool parse_relation_cache_info(
|
||||
struct cpuinfo_processor* processors,
|
||||
struct cpuinfo_cache* caches,
|
||||
uint32_t* numbers_of_caches,
|
||||
const uint32_t* global_proc_index_per_group,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info)
|
||||
{
|
||||
static uint32_t l1i_counter = 0;
|
||||
static uint32_t l1d_counter = 0;
|
||||
static uint32_t l2_counter = 0;
|
||||
static uint32_t l3_counter = 0;
|
||||
|
||||
/* Count cache types for allocation at first. */
|
||||
if (caches == NULL) {
|
||||
switch(info->Cache.Level) {
|
||||
case 1:
|
||||
switch (info->Cache.Type) {
|
||||
case CacheInstruction:
|
||||
numbers_of_caches[cpuinfo_cache_level_1i]++;
|
||||
break;
|
||||
case CacheData:
|
||||
numbers_of_caches[cpuinfo_cache_level_1d]++;
|
||||
break;
|
||||
case CacheUnified:
|
||||
break;
|
||||
case CacheTrace:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
numbers_of_caches[cpuinfo_cache_level_2]++;
|
||||
break;
|
||||
case 3:
|
||||
numbers_of_caches[cpuinfo_cache_level_3]++;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
struct cpuinfo_cache* l1i_base = caches;
|
||||
struct cpuinfo_cache* l1d_base = l1i_base + numbers_of_caches[cpuinfo_cache_level_1i];
|
||||
struct cpuinfo_cache* l2_base = l1d_base + numbers_of_caches[cpuinfo_cache_level_1d];
|
||||
struct cpuinfo_cache* l3_base = l2_base + numbers_of_caches[cpuinfo_cache_level_2];
|
||||
|
||||
cpuinfo_log_debug(
|
||||
"info->Cache.GroupCount:%"PRIu32", info->Cache.GroupMask:%"PRIu32","
|
||||
"info->Cache.Level:%"PRIu32", info->Cache.Associativity:%"PRIu32","
|
||||
"info->Cache.LineSize:%"PRIu32","
|
||||
"info->Cache.CacheSize:%"PRIu32", info->Cache.Type:%"PRIu32"",
|
||||
info->Cache.GroupCount, (unsigned int)info->Cache.GroupMask.Mask,
|
||||
info->Cache.Level, info->Cache.Associativity, info->Cache.LineSize,
|
||||
info->Cache.CacheSize, info->Cache.Type);
|
||||
|
||||
struct cpuinfo_cache* current_cache = NULL;
|
||||
switch (info->Cache.Level) {
|
||||
case 1:
|
||||
switch (info->Cache.Type) {
|
||||
case CacheInstruction:
|
||||
current_cache = l1i_base + l1i_counter;
|
||||
l1i_counter++;
|
||||
break;
|
||||
case CacheData:
|
||||
current_cache = l1d_base + l1d_counter;
|
||||
l1d_counter++;
|
||||
break;
|
||||
case CacheUnified:
|
||||
break;
|
||||
case CacheTrace:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
current_cache = l2_base + l2_counter;
|
||||
l2_counter++;
|
||||
break;
|
||||
case 3:
|
||||
current_cache = l3_base + l3_counter;
|
||||
l3_counter++;
|
||||
break;
|
||||
}
|
||||
current_cache->size = info->Cache.CacheSize;
|
||||
current_cache->line_size = info->Cache.LineSize;
|
||||
current_cache->associativity = info->Cache.Associativity;
|
||||
/* We don't have partition and set information of caches on Windows,
|
||||
* so we set partitions to 1 and calculate the expected sets.
|
||||
*/
|
||||
current_cache->partitions = 1;
|
||||
current_cache->sets =
|
||||
current_cache->size / current_cache->line_size / current_cache->associativity;
|
||||
if (info->Cache.Type == CacheUnified) {
|
||||
current_cache->flags = CPUINFO_CACHE_UNIFIED;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < info->Cache.GroupCount; i++) {
|
||||
/* Zero GroupCount is valid, GroupMask still can store bits set. */
|
||||
const uint32_t group_id = info->Cache.GroupMasks[i].Group;
|
||||
/* Bitmask representing processors in this group belonging to this package */
|
||||
KAFFINITY group_processors_mask = info->Cache.GroupMasks[i].Mask;
|
||||
while (group_processors_mask != 0) {
|
||||
const uint32_t processor_id_in_group =
|
||||
low_index_from_kaffinity(group_processors_mask);
|
||||
const uint32_t processor_global_index =
|
||||
global_proc_index_per_group[group_id] + processor_id_in_group;
|
||||
|
||||
store_cache_info_per_processor(
|
||||
processors, processor_global_index,
|
||||
info, current_cache);
|
||||
|
||||
/* Clear the bits in affinity mask, lower the least set bit. */
|
||||
group_processors_mask &= (group_processors_mask - 1);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static void store_package_info_per_processor(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t processor_global_index,
|
||||
const uint32_t package_id,
|
||||
const uint32_t group_id,
|
||||
const uint32_t processor_id_in_group)
|
||||
{
|
||||
processors[processor_global_index].windows_group_id =
|
||||
(uint16_t) group_id;
|
||||
processors[processor_global_index].windows_processor_id =
|
||||
(uint16_t) processor_id_in_group;
|
||||
|
||||
/* As we're counting the number of packages now, we haven't allocated memory for
|
||||
* cpuinfo_packages yet, so we only set the package pointer's offset now.
|
||||
*/
|
||||
processors[processor_global_index].package =
|
||||
(const struct cpuinfo_package*) NULL + package_id;
|
||||
}
|
||||
|
||||
void store_core_info_per_processor(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t processor_global_index,
|
||||
const uint32_t core_id,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX core_info,
|
||||
struct cpuinfo_core* cores,
|
||||
const struct woa_chip_info *chip_info)
|
||||
{
|
||||
if (cores) {
|
||||
processors[processor_global_index].core = cores + core_id;
|
||||
cores[core_id].core_id = core_id;
|
||||
get_core_uarch_for_efficiency(
|
||||
chip_info->chip_name, core_info->Processor.EfficiencyClass,
|
||||
&(cores[core_id].uarch), &(cores[core_id].frequency));
|
||||
|
||||
/* We don't have cluster information, so we handle it as
|
||||
* fixed 1 to (cluster / cores).
|
||||
* Set the cluster offset ID now, as soon as we have the
|
||||
* cluster base address, we'll set the absolute address.
|
||||
*/
|
||||
processors[processor_global_index].cluster =
|
||||
(const struct cpuinfo_cluster*) NULL + core_id;
|
||||
}
|
||||
}
|
||||
|
||||
static void store_cache_info_per_processor(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t processor_global_index,
|
||||
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX info,
|
||||
struct cpuinfo_cache* current_cache)
|
||||
{
|
||||
if (current_cache->processor_start > processor_global_index) {
|
||||
current_cache->processor_start = processor_global_index;
|
||||
}
|
||||
current_cache->processor_count++;
|
||||
|
||||
switch(info->Cache.Level) {
|
||||
case 1:
|
||||
switch (info->Cache.Type) {
|
||||
case CacheInstruction:
|
||||
processors[processor_global_index].cache.l1i = current_cache;
|
||||
break;
|
||||
case CacheData:
|
||||
processors[processor_global_index].cache.l1d = current_cache;
|
||||
break;
|
||||
case CacheUnified:
|
||||
break;
|
||||
case CacheTrace:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
processors[processor_global_index].cache.l2 = current_cache;
|
||||
break;
|
||||
case 3:
|
||||
processors[processor_global_index].cache.l3 = current_cache;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static bool connect_packages_cores_clusters_by_processors(
|
||||
struct cpuinfo_processor* processors,
|
||||
const uint32_t nr_of_processors,
|
||||
struct cpuinfo_package* packages,
|
||||
const uint32_t nr_of_packages,
|
||||
struct cpuinfo_cluster* clusters,
|
||||
struct cpuinfo_core* cores,
|
||||
const uint32_t nr_of_cores,
|
||||
const struct woa_chip_info* chip_info,
|
||||
enum cpuinfo_vendor vendor)
|
||||
{
|
||||
/* Adjust core and package pointers for all logical processors. */
|
||||
for (uint32_t i = nr_of_processors; i != 0; i--) {
|
||||
const uint32_t processor_id = i - 1;
|
||||
struct cpuinfo_processor* processor = processors + processor_id;
|
||||
|
||||
struct cpuinfo_core* core = (struct cpuinfo_core*)processor->core;
|
||||
|
||||
/* We stored the offset of pointers when we haven't allocated memory
|
||||
* for packages and clusters, so now add offsets to base addresses.
|
||||
*/
|
||||
struct cpuinfo_package* package =
|
||||
(struct cpuinfo_package*) ((uintptr_t) packages + (uintptr_t) processor->package);
|
||||
if (package < packages ||
|
||||
package >= (packages + nr_of_packages)) {
|
||||
cpuinfo_log_error("invalid package indexing");
|
||||
return false;
|
||||
}
|
||||
processor->package = package;
|
||||
|
||||
struct cpuinfo_cluster* cluster =
|
||||
(struct cpuinfo_cluster*) ((uintptr_t) clusters + (uintptr_t) processor->cluster);
|
||||
if (cluster < clusters ||
|
||||
cluster >= (clusters + nr_of_cores)) {
|
||||
cpuinfo_log_error("invalid cluster indexing");
|
||||
return false;
|
||||
}
|
||||
processor->cluster = cluster;
|
||||
|
||||
if (chip_info) {
|
||||
size_t converted_chars = 0;
|
||||
if (!WideCharToMultiByte(
|
||||
CP_UTF8,
|
||||
WC_ERR_INVALID_CHARS,
|
||||
chip_info->chip_name_string,
|
||||
-1,
|
||||
package->name,
|
||||
CPUINFO_PACKAGE_NAME_MAX,
|
||||
NULL,
|
||||
NULL)) {
|
||||
cpuinfo_log_error("cpu name character conversion error");
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
/* Set start indexes and counts per packages / clusters / cores - going backwards */
|
||||
|
||||
/* This can be overwritten by lower-index processors on the same package. */
|
||||
package->processor_start = processor_id;
|
||||
package->processor_count++;
|
||||
|
||||
/* This can be overwritten by lower-index processors on the same cluster. */
|
||||
cluster->processor_start = processor_id;
|
||||
cluster->processor_count++;
|
||||
|
||||
/* This can be overwritten by lower-index processors on the same core. */
|
||||
core->processor_start = processor_id;
|
||||
core->processor_count++;
|
||||
}
|
||||
/* Fill cores */
|
||||
for (uint32_t i = nr_of_cores; i != 0; i--) {
|
||||
const uint32_t global_core_id = i - 1;
|
||||
struct cpuinfo_core* core = cores + global_core_id;
|
||||
const struct cpuinfo_processor* processor = processors + core->processor_start;
|
||||
struct cpuinfo_package* package = (struct cpuinfo_package*) processor->package;
|
||||
struct cpuinfo_cluster* cluster = (struct cpuinfo_cluster*) processor->cluster;
|
||||
|
||||
core->package = package;
|
||||
core->cluster = cluster;
|
||||
core->vendor = vendor;
|
||||
|
||||
/* This can be overwritten by lower-index cores on the same cluster/package. */
|
||||
cluster->core_start = global_core_id;
|
||||
cluster->core_count++;
|
||||
package->core_start = global_core_id;
|
||||
package->core_count++;
|
||||
package->cluster_start = global_core_id;
|
||||
package->cluster_count = package->core_count;
|
||||
|
||||
cluster->package = package;
|
||||
cluster->vendor = cores[cluster->core_start].vendor;
|
||||
cluster->uarch = cores[cluster->core_start].uarch;
|
||||
cluster->frequency = cores[cluster->core_start].frequency;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline uint32_t low_index_from_kaffinity(KAFFINITY kaffinity) {
|
||||
unsigned long index;
|
||||
_BitScanForward64(&index, (unsigned __int64) kaffinity);
|
||||
return (uint32_t) index;
|
||||
}
|
||||
243
3rdparty/cpuinfo/src/arm/windows/init.c
vendored
Normal file
243
3rdparty/cpuinfo/src/arm/windows/init.c
vendored
Normal file
@@ -0,0 +1,243 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <cpuinfo.h>
|
||||
#include <cpuinfo/internal-api.h>
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
#include "windows-arm-init.h"
|
||||
|
||||
struct cpuinfo_arm_isa cpuinfo_isa;
|
||||
|
||||
static void set_cpuinfo_isa_fields(void);
|
||||
static struct woa_chip_info* get_system_info_from_registry(void);
|
||||
|
||||
static struct woa_chip_info woa_chip_unknown = {
|
||||
L"Unknown",
|
||||
woa_chip_name_unknown,
|
||||
{
|
||||
{
|
||||
cpuinfo_vendor_unknown,
|
||||
cpuinfo_uarch_unknown,
|
||||
0
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Please add new SoC/chip info here! */
|
||||
static struct woa_chip_info woa_chips[] = {
|
||||
/* Microsoft SQ1 Kryo 495 4 + 4 cores (3 GHz + 1.80 GHz) */
|
||||
{
|
||||
L"Microsoft SQ1",
|
||||
woa_chip_name_microsoft_sq_1,
|
||||
{
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a55,
|
||||
1800000000,
|
||||
},
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a76,
|
||||
3000000000,
|
||||
}
|
||||
}
|
||||
},
|
||||
/* Microsoft SQ2 Kryo 495 4 + 4 cores (3.15 GHz + 2.42 GHz) */
|
||||
{
|
||||
L"Microsoft SQ2",
|
||||
woa_chip_name_microsoft_sq_2,
|
||||
{
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a55,
|
||||
2420000000,
|
||||
},
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a76,
|
||||
3150000000
|
||||
}
|
||||
}
|
||||
},
|
||||
/* Microsoft Windows Dev Kit 2023 */
|
||||
{
|
||||
L"Snapdragon Compute Platform",
|
||||
woa_chip_name_microsoft_sq_3,
|
||||
{
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a78,
|
||||
2420000000,
|
||||
},
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_x1,
|
||||
3000000000
|
||||
}
|
||||
}
|
||||
},
|
||||
/* Ampere Altra */
|
||||
{
|
||||
L"Ampere(R) Altra(R) Processor",
|
||||
woa_chip_name_ampere_altra,
|
||||
{
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_neoverse_n1,
|
||||
3000000000
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
BOOL CALLBACK cpuinfo_arm_windows_init(
|
||||
PINIT_ONCE init_once, PVOID parameter, PVOID* context)
|
||||
{
|
||||
struct woa_chip_info *chip_info = NULL;
|
||||
enum cpuinfo_vendor vendor = cpuinfo_vendor_unknown;
|
||||
|
||||
set_cpuinfo_isa_fields();
|
||||
|
||||
chip_info = get_system_info_from_registry();
|
||||
if (chip_info == NULL) {
|
||||
chip_info = &woa_chip_unknown;
|
||||
}
|
||||
|
||||
cpuinfo_is_initialized = cpu_info_init_by_logical_sys_info(chip_info, chip_info->uarchs[0].vendor);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool get_core_uarch_for_efficiency(
|
||||
enum woa_chip_name chip, BYTE EfficiencyClass,
|
||||
enum cpuinfo_uarch* uarch, uint64_t* frequency)
|
||||
{
|
||||
/* For currently supported WoA chips, the Efficiency class selects
|
||||
* the pre-defined little and big core.
|
||||
* Any further supported SoC's logic should be implemented here.
|
||||
*/
|
||||
if (uarch && frequency && chip < woa_chip_name_last &&
|
||||
EfficiencyClass < MAX_WOA_VALID_EFFICIENCY_CLASSES) {
|
||||
*uarch = woa_chips[chip].uarchs[EfficiencyClass].uarch;
|
||||
*frequency = woa_chips[chip].uarchs[EfficiencyClass].frequency;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Static helper functions */
|
||||
|
||||
static wchar_t* read_registry(
|
||||
LPCWSTR subkey,
|
||||
LPCWSTR value)
|
||||
{
|
||||
DWORD key_type = 0;
|
||||
DWORD data_size = 0;
|
||||
const DWORD flags = RRF_RT_REG_SZ; /* Only read strings (REG_SZ) */
|
||||
wchar_t *text_buffer = NULL;
|
||||
LSTATUS result = 0;
|
||||
HANDLE heap = GetProcessHeap();
|
||||
|
||||
result = RegGetValueW(
|
||||
HKEY_LOCAL_MACHINE,
|
||||
subkey,
|
||||
value,
|
||||
flags,
|
||||
&key_type,
|
||||
NULL, /* Request buffer size */
|
||||
&data_size);
|
||||
if (result != 0 || data_size == 0) {
|
||||
cpuinfo_log_error("Registry entry size read error");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
text_buffer = HeapAlloc(heap, HEAP_ZERO_MEMORY, data_size);
|
||||
if (text_buffer == NULL) {
|
||||
cpuinfo_log_error("Registry textbuffer allocation error");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
result = RegGetValueW(
|
||||
HKEY_LOCAL_MACHINE,
|
||||
subkey,
|
||||
value,
|
||||
flags,
|
||||
NULL,
|
||||
text_buffer, /* Write string in this destination buffer */
|
||||
&data_size);
|
||||
if (result != 0) {
|
||||
cpuinfo_log_error("Registry read error");
|
||||
HeapFree(heap, 0, text_buffer);
|
||||
return NULL;
|
||||
}
|
||||
return text_buffer;
|
||||
}
|
||||
|
||||
static struct woa_chip_info* get_system_info_from_registry(void)
|
||||
{
|
||||
wchar_t* text_buffer = NULL;
|
||||
LPCWSTR cpu0_subkey = L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
|
||||
LPCWSTR chip_name_value = L"ProcessorNameString";
|
||||
struct woa_chip_info* chip_info = NULL;
|
||||
|
||||
HANDLE heap = GetProcessHeap();
|
||||
|
||||
/* Read processor model name from registry and find in the hard-coded list. */
|
||||
text_buffer = read_registry(cpu0_subkey, chip_name_value);
|
||||
if (text_buffer == NULL) {
|
||||
cpuinfo_log_error("Registry read error");
|
||||
return NULL;
|
||||
}
|
||||
for (uint32_t i = 0; i < (uint32_t) woa_chip_name_last; i++) {
|
||||
size_t compare_length = wcsnlen(woa_chips[i].chip_name_string, CPUINFO_PACKAGE_NAME_MAX);
|
||||
int compare_result = wcsncmp(text_buffer, woa_chips[i].chip_name_string, compare_length);
|
||||
if (compare_result == 0) {
|
||||
chip_info = woa_chips+i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (chip_info == NULL) {
|
||||
/* No match was found, so print a warning and assign the unknown case. */
|
||||
cpuinfo_log_error("Unknown chip model name '%ls'.\nPlease add new Windows on Arm SoC/chip support to arm/windows/init.c!", text_buffer);
|
||||
} else {
|
||||
cpuinfo_log_debug("detected chip model name: %s", chip_info->chip_name_string);
|
||||
}
|
||||
|
||||
HeapFree(heap, 0, text_buffer);
|
||||
return chip_info;
|
||||
}
|
||||
|
||||
static void set_cpuinfo_isa_fields(void)
|
||||
{
|
||||
cpuinfo_isa.atomics = IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE) != 0;
|
||||
|
||||
const bool dotprod = IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) != 0;
|
||||
cpuinfo_isa.dot = dotprod;
|
||||
|
||||
SYSTEM_INFO system_info;
|
||||
GetSystemInfo(&system_info);
|
||||
switch (system_info.wProcessorLevel) {
|
||||
case 0x803: // Kryo 385 Silver (Snapdragon 850)
|
||||
cpuinfo_isa.fp16arith = dotprod;
|
||||
cpuinfo_isa.rdm = dotprod;
|
||||
break;
|
||||
default:
|
||||
// Assume that Dot Product support implies FP16 arithmetics and RDM support.
|
||||
// ARM manuals don't guarantee that, but it holds in practice.
|
||||
cpuinfo_isa.fp16arith = dotprod;
|
||||
cpuinfo_isa.rdm = dotprod;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Windows API reports all or nothing for cryptographic instructions. */
|
||||
const bool crypto = IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) != 0;
|
||||
cpuinfo_isa.aes = crypto;
|
||||
cpuinfo_isa.sha1 = crypto;
|
||||
cpuinfo_isa.sha2 = crypto;
|
||||
cpuinfo_isa.pmull = crypto;
|
||||
|
||||
cpuinfo_isa.crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) != 0;
|
||||
}
|
||||
38
3rdparty/cpuinfo/src/arm/windows/windows-arm-init.h
vendored
Normal file
38
3rdparty/cpuinfo/src/arm/windows/windows-arm-init.h
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
/* Efficiency class = 0 means little core, while 1 means big core for now. */
|
||||
#define MAX_WOA_VALID_EFFICIENCY_CLASSES 2
|
||||
|
||||
/* List of known and supported Windows on Arm SoCs/chips. */
|
||||
enum woa_chip_name {
|
||||
woa_chip_name_microsoft_sq_1 = 0,
|
||||
woa_chip_name_microsoft_sq_2 = 1,
|
||||
woa_chip_name_microsoft_sq_3 = 2,
|
||||
woa_chip_name_ampere_altra = 3,
|
||||
woa_chip_name_unknown = 4,
|
||||
woa_chip_name_last = woa_chip_name_unknown
|
||||
};
|
||||
|
||||
/* Topology information hard-coded by SoC/chip name */
|
||||
struct core_info_by_chip_name {
|
||||
enum cpuinfo_vendor vendor;
|
||||
enum cpuinfo_uarch uarch;
|
||||
uint64_t frequency; /* Hz */
|
||||
};
|
||||
|
||||
/* SoC/chip info that's currently not readable by logical system information,
|
||||
* but can be read from registry.
|
||||
*/
|
||||
struct woa_chip_info {
|
||||
wchar_t* chip_name_string;
|
||||
enum woa_chip_name chip_name;
|
||||
struct core_info_by_chip_name uarchs[MAX_WOA_VALID_EFFICIENCY_CLASSES];
|
||||
};
|
||||
|
||||
bool get_core_uarch_for_efficiency(
|
||||
enum woa_chip_name chip, BYTE EfficiencyClass,
|
||||
enum cpuinfo_uarch* uarch, uint64_t* frequency);
|
||||
|
||||
bool cpu_info_init_by_logical_sys_info(
|
||||
const struct woa_chip_info *chip_info,
|
||||
enum cpuinfo_vendor vendor);
|
||||
9
3rdparty/cpuinfo/src/cpuinfo/internal-api.h
vendored
9
3rdparty/cpuinfo/src/cpuinfo/internal-api.h
vendored
@@ -35,7 +35,7 @@ extern CPUINFO_INTERNAL uint32_t cpuinfo_packages_count;
|
||||
extern CPUINFO_INTERNAL uint32_t cpuinfo_cache_count[cpuinfo_cache_level_max];
|
||||
extern CPUINFO_INTERNAL uint32_t cpuinfo_max_cache_size;
|
||||
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64
|
||||
#if CPUINFO_ARCH_ARM || CPUINFO_ARCH_ARM64 || CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
extern CPUINFO_INTERNAL struct cpuinfo_uarch_info* cpuinfo_uarchs;
|
||||
extern CPUINFO_INTERNAL uint32_t cpuinfo_uarchs_count;
|
||||
#else
|
||||
@@ -51,10 +51,15 @@ extern CPUINFO_INTERNAL uint32_t cpuinfo_max_cache_size;
|
||||
CPUINFO_PRIVATE void cpuinfo_x86_mach_init(void);
|
||||
CPUINFO_PRIVATE void cpuinfo_x86_linux_init(void);
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
CPUINFO_PRIVATE BOOL CALLBACK cpuinfo_x86_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context);
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
CPUINFO_PRIVATE BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context);
|
||||
#else
|
||||
CPUINFO_PRIVATE BOOL CALLBACK cpuinfo_x86_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context);
|
||||
#endif
|
||||
#endif
|
||||
CPUINFO_PRIVATE void cpuinfo_arm_mach_init(void);
|
||||
CPUINFO_PRIVATE void cpuinfo_arm_linux_init(void);
|
||||
CPUINFO_PRIVATE void cpuinfo_riscv_linux_init(void);
|
||||
CPUINFO_PRIVATE void cpuinfo_emscripten_init(void);
|
||||
|
||||
CPUINFO_PRIVATE uint32_t cpuinfo_compute_max_cache_size(const struct cpuinfo_processor* processor);
|
||||
|
||||
106
3rdparty/cpuinfo/src/cpuinfo/log.h
vendored
106
3rdparty/cpuinfo/src/cpuinfo/log.h
vendored
@@ -1,17 +1,103 @@
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <clog.h>
|
||||
|
||||
#define CPUINFO_LOG_DEBUG_PARSERS 0
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef CPUINFO_LOG_LEVEL
|
||||
#define CPUINFO_LOG_LEVEL CLOG_ERROR
|
||||
#error "Undefined CPUINFO_LOG_LEVEL"
|
||||
#endif
|
||||
|
||||
CLOG_DEFINE_LOG_DEBUG(cpuinfo_log_debug, "cpuinfo", CPUINFO_LOG_LEVEL);
|
||||
CLOG_DEFINE_LOG_INFO(cpuinfo_log_info, "cpuinfo", CPUINFO_LOG_LEVEL);
|
||||
CLOG_DEFINE_LOG_WARNING(cpuinfo_log_warning, "cpuinfo", CPUINFO_LOG_LEVEL);
|
||||
CLOG_DEFINE_LOG_ERROR(cpuinfo_log_error, "cpuinfo", CPUINFO_LOG_LEVEL);
|
||||
CLOG_DEFINE_LOG_FATAL(cpuinfo_log_fatal, "cpuinfo", CPUINFO_LOG_LEVEL);
|
||||
#define CPUINFO_LOG_NONE 0
|
||||
#define CPUINFO_LOG_FATAL 1
|
||||
#define CPUINFO_LOG_ERROR 2
|
||||
#define CPUINFO_LOG_WARNING 3
|
||||
#define CPUINFO_LOG_INFO 4
|
||||
#define CPUINFO_LOG_DEBUG 5
|
||||
|
||||
#ifndef CPUINFO_LOG_DEBUG_PARSERS
|
||||
#define CPUINFO_LOG_DEBUG_PARSERS 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
|
||||
void cpuinfo_vlog_debug(const char* format, va_list args);
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
|
||||
void cpuinfo_vlog_info(const char* format, va_list args);
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
|
||||
void cpuinfo_vlog_warning(const char* format, va_list args);
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
|
||||
void cpuinfo_vlog_error(const char* format, va_list args);
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
|
||||
void cpuinfo_vlog_fatal(const char* format, va_list args);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#ifndef CPUINFO_LOG_ARGUMENTS_FORMAT
|
||||
#ifdef __GNUC__
|
||||
#define CPUINFO_LOG_ARGUMENTS_FORMAT __attribute__((__format__(__printf__, 1, 2)))
|
||||
#else
|
||||
#define CPUINFO_LOG_ARGUMENTS_FORMAT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_debug(const char* format, ...) {
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
cpuinfo_vlog_debug(format, args);
|
||||
va_end(args);
|
||||
#endif
|
||||
}
|
||||
|
||||
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_info(const char* format, ...) {
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
cpuinfo_vlog_info(format, args);
|
||||
va_end(args);
|
||||
#endif
|
||||
}
|
||||
|
||||
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_warning(const char* format, ...) {
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
cpuinfo_vlog_warning(format, args);
|
||||
va_end(args);
|
||||
#endif
|
||||
}
|
||||
|
||||
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_error(const char* format, ...) {
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
cpuinfo_vlog_error(format, args);
|
||||
va_end(args);
|
||||
#endif
|
||||
}
|
||||
|
||||
CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_fatal(const char* format, ...) {
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
cpuinfo_vlog_fatal(format, args);
|
||||
va_end(args);
|
||||
#endif
|
||||
abort();
|
||||
}
|
||||
3
3rdparty/cpuinfo/src/cpuinfo/utils.h
vendored
3
3rdparty/cpuinfo/src/cpuinfo/utils.h
vendored
@@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
8
3rdparty/cpuinfo/src/init.c
vendored
8
3rdparty/cpuinfo/src/init.c
vendored
@@ -37,6 +37,14 @@ bool CPUINFO_ABI cpuinfo_initialize(void) {
|
||||
pthread_once(&init_guard, &cpuinfo_arm_linux_init);
|
||||
#elif defined(__MACH__) && defined(__APPLE__)
|
||||
pthread_once(&init_guard, &cpuinfo_arm_mach_init);
|
||||
#elif defined(_WIN32)
|
||||
InitOnceExecuteOnce(&init_guard, &cpuinfo_arm_windows_init, NULL, NULL);
|
||||
#else
|
||||
cpuinfo_log_error("operating system is not supported in cpuinfo");
|
||||
#endif
|
||||
#elif CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
|
||||
#if defined(__linux__)
|
||||
pthread_once(&init_guard, &cpuinfo_riscv_linux_init);
|
||||
#else
|
||||
cpuinfo_log_error("operating system is not supported in cpuinfo");
|
||||
#endif
|
||||
|
||||
19
3rdparty/cpuinfo/src/linux/api.h
vendored
19
3rdparty/cpuinfo/src/linux/api.h
vendored
@@ -21,7 +21,8 @@
|
||||
#define CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER UINT32_C(0x00000400)
|
||||
#define CPUINFO_LINUX_FLAG_PROC_CPUINFO UINT32_C(0x00000800)
|
||||
#define CPUINFO_LINUX_FLAG_VALID UINT32_C(0x00001000)
|
||||
|
||||
#define CPUINFO_LINUX_FLAG_CUR_FREQUENCY UINT32_C(0x00002000)
|
||||
#define CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER UINT32_C(0x00004000)
|
||||
|
||||
typedef bool (*cpuinfo_cpulist_callback)(uint32_t, uint32_t, void*);
|
||||
CPUINFO_INTERNAL bool cpuinfo_linux_parse_cpulist(const char* filename, cpuinfo_cpulist_callback callback, void* context);
|
||||
@@ -33,6 +34,7 @@ CPUINFO_INTERNAL bool cpuinfo_linux_parse_multiline_file(const char* filename, s
|
||||
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_max_processors_count(void);
|
||||
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_max_possible_processor(uint32_t max_processors_count);
|
||||
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_max_present_processor(uint32_t max_processors_count);
|
||||
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_processor_cur_frequency(uint32_t processor);
|
||||
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_processor_min_frequency(uint32_t processor);
|
||||
CPUINFO_INTERNAL uint32_t cpuinfo_linux_get_processor_max_frequency(uint32_t processor);
|
||||
CPUINFO_INTERNAL bool cpuinfo_linux_get_processor_package_id(uint32_t processor, uint32_t package_id[restrict static 1]);
|
||||
@@ -54,6 +56,21 @@ CPUINFO_INTERNAL bool cpuinfo_linux_detect_thread_siblings(
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context);
|
||||
CPUINFO_INTERNAL bool cpuinfo_linux_detect_cluster_cpus(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context);
|
||||
CPUINFO_INTERNAL bool cpuinfo_linux_detect_core_cpus(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context);
|
||||
CPUINFO_INTERNAL bool cpuinfo_linux_detect_package_cpus(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context);
|
||||
|
||||
extern CPUINFO_INTERNAL const struct cpuinfo_processor** cpuinfo_linux_cpu_to_processor_map;
|
||||
extern CPUINFO_INTERNAL const struct cpuinfo_core** cpuinfo_linux_cpu_to_core_map;
|
||||
|
||||
135
3rdparty/cpuinfo/src/linux/processors.c
vendored
135
3rdparty/cpuinfo/src/linux/processors.c
vendored
@@ -21,6 +21,7 @@
|
||||
#define KERNEL_MAX_FILENAME "/sys/devices/system/cpu/kernel_max"
|
||||
#define KERNEL_MAX_FILESIZE 32
|
||||
#define FREQUENCY_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/cpufreq/cpuinfo_max_freq"))
|
||||
#define CUR_FREQUENCY_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/cpufreq/cpuinfo_cur_freq"
|
||||
#define MAX_FREQUENCY_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/cpufreq/cpuinfo_max_freq"
|
||||
#define MIN_FREQUENCY_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/cpufreq/cpuinfo_min_freq"
|
||||
#define FREQUENCY_FILESIZE 32
|
||||
@@ -31,8 +32,14 @@
|
||||
#define CORE_ID_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/core_id"
|
||||
#define CORE_ID_FILESIZE 32
|
||||
|
||||
#define CORE_CPUS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/core_cpus_list"))
|
||||
#define CORE_CPUS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/core_cpus_list"
|
||||
#define CORE_SIBLINGS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/core_siblings_list"))
|
||||
#define CORE_SIBLINGS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/core_siblings_list"
|
||||
#define CLUSTER_CPUS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/cluster_cpus_list"))
|
||||
#define CLUSTER_CPUS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/cluster_cpus_list"
|
||||
#define PACKAGE_CPUS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/package_cpus_list"))
|
||||
#define PACKAGE_CPUS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/package_cpus_list"
|
||||
#define THREAD_SIBLINGS_FILENAME_SIZE (sizeof("/sys/devices/system/cpu/cpu" STRINGIFY(UINT32_MAX) "/topology/thread_siblings_list"))
|
||||
#define THREAD_SIBLINGS_FILENAME_FORMAT "/sys/devices/system/cpu/cpu%" PRIu32 "/topology/thread_siblings_list"
|
||||
|
||||
@@ -125,6 +132,27 @@ uint32_t cpuinfo_linux_get_max_processors_count(void) {
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t cpuinfo_linux_get_processor_cur_frequency(uint32_t processor) {
|
||||
char cur_frequency_filename[FREQUENCY_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
cur_frequency_filename, FREQUENCY_FILENAME_SIZE, CUR_FREQUENCY_FILENAME_FORMAT, processor);
|
||||
if ((unsigned int) chars_formatted >= FREQUENCY_FILENAME_SIZE) {
|
||||
cpuinfo_log_warning("failed to format filename for current frequency of processor %"PRIu32, processor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t cur_frequency;
|
||||
if (cpuinfo_linux_parse_small_file(cur_frequency_filename, FREQUENCY_FILESIZE, uint32_parser, &cur_frequency)) {
|
||||
cpuinfo_log_debug("parsed currrent frequency value of %"PRIu32" KHz for logical processor %"PRIu32" from %s",
|
||||
cur_frequency, processor, cur_frequency_filename);
|
||||
return cur_frequency;
|
||||
} else {
|
||||
cpuinfo_log_warning("failed to parse current frequency for processor %"PRIu32" from %s",
|
||||
processor, cur_frequency_filename);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t cpuinfo_linux_get_processor_max_frequency(uint32_t processor) {
|
||||
char max_frequency_filename[FREQUENCY_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
@@ -285,8 +313,7 @@ static bool detect_processor_parser(uint32_t processor_list_start, uint32_t proc
|
||||
}
|
||||
|
||||
bool cpuinfo_linux_detect_possible_processors(uint32_t max_processors_count,
|
||||
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t possible_flag)
|
||||
{
|
||||
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t possible_flag) {
|
||||
struct detect_processors_context context = {
|
||||
.max_processors_count = max_processors_count,
|
||||
.processor0_flags = processor0_flags,
|
||||
@@ -302,8 +329,7 @@ bool cpuinfo_linux_detect_possible_processors(uint32_t max_processors_count,
|
||||
}
|
||||
|
||||
bool cpuinfo_linux_detect_present_processors(uint32_t max_processors_count,
|
||||
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t present_flag)
|
||||
{
|
||||
uint32_t* processor0_flags, uint32_t processor_struct_size, uint32_t present_flag) {
|
||||
struct detect_processors_context context = {
|
||||
.max_processors_count = max_processors_count,
|
||||
.processor0_flags = processor0_flags,
|
||||
@@ -340,12 +366,41 @@ static bool siblings_parser(uint32_t sibling_list_start, uint32_t sibling_list_e
|
||||
return context->callback(processor, sibling_list_start, sibling_list_end, context->callback_context);
|
||||
}
|
||||
|
||||
bool cpuinfo_linux_detect_core_cpus(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context) {
|
||||
char core_cpus_filename[CORE_CPUS_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
core_cpus_filename, CORE_CPUS_FILENAME_SIZE, CORE_CPUS_FILENAME_FORMAT, processor);
|
||||
if ((unsigned int) chars_formatted >= CORE_CPUS_FILENAME_SIZE) {
|
||||
cpuinfo_log_warning("failed to format filename for core cpus of processor %"PRIu32, processor);
|
||||
return false;
|
||||
}
|
||||
|
||||
struct siblings_context siblings_context = {
|
||||
.group_name = "cpus",
|
||||
.max_processors_count = max_processors_count,
|
||||
.processor = processor,
|
||||
.callback = callback,
|
||||
.callback_context = context,
|
||||
};
|
||||
if (cpuinfo_linux_parse_cpulist(core_cpus_filename,
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
|
||||
return true;
|
||||
} else {
|
||||
cpuinfo_log_info("failed to parse the list of core cpus for processor %"PRIu32" from %s",
|
||||
processor, core_cpus_filename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool cpuinfo_linux_detect_core_siblings(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context)
|
||||
{
|
||||
void* context) {
|
||||
char core_siblings_filename[CORE_SIBLINGS_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
core_siblings_filename, CORE_SIBLINGS_FILENAME_SIZE, CORE_SIBLINGS_FILENAME_FORMAT, processor);
|
||||
@@ -362,8 +417,7 @@ bool cpuinfo_linux_detect_core_siblings(
|
||||
.callback_context = context,
|
||||
};
|
||||
if (cpuinfo_linux_parse_cpulist(core_siblings_filename,
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context))
|
||||
{
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
|
||||
return true;
|
||||
} else {
|
||||
cpuinfo_log_info("failed to parse the list of core siblings for processor %"PRIu32" from %s",
|
||||
@@ -376,8 +430,7 @@ bool cpuinfo_linux_detect_thread_siblings(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context)
|
||||
{
|
||||
void* context) {
|
||||
char thread_siblings_filename[THREAD_SIBLINGS_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
thread_siblings_filename, THREAD_SIBLINGS_FILENAME_SIZE, THREAD_SIBLINGS_FILENAME_FORMAT, processor);
|
||||
@@ -394,8 +447,7 @@ bool cpuinfo_linux_detect_thread_siblings(
|
||||
.callback_context = context,
|
||||
};
|
||||
if (cpuinfo_linux_parse_cpulist(thread_siblings_filename,
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context))
|
||||
{
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
|
||||
return true;
|
||||
} else {
|
||||
cpuinfo_log_info("failed to parse the list of thread siblings for processor %"PRIu32" from %s",
|
||||
@@ -404,3 +456,62 @@ bool cpuinfo_linux_detect_thread_siblings(
|
||||
}
|
||||
}
|
||||
|
||||
bool cpuinfo_linux_detect_cluster_cpus(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context) {
|
||||
char cluster_cpus_filename[CLUSTER_CPUS_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
cluster_cpus_filename, CLUSTER_CPUS_FILENAME_SIZE, CLUSTER_CPUS_FILENAME_FORMAT, processor);
|
||||
if ((unsigned int) chars_formatted >= CLUSTER_CPUS_FILENAME_SIZE) {
|
||||
cpuinfo_log_warning("failed to format filename for cluster cpus of processor %"PRIu32, processor);
|
||||
return false;
|
||||
}
|
||||
|
||||
struct siblings_context siblings_context = {
|
||||
.group_name = "cluster",
|
||||
.max_processors_count = max_processors_count,
|
||||
.processor = processor,
|
||||
.callback = callback,
|
||||
.callback_context = context,
|
||||
};
|
||||
if (cpuinfo_linux_parse_cpulist(cluster_cpus_filename,
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
|
||||
return true;
|
||||
} else {
|
||||
cpuinfo_log_info("failed to parse the list of cluster cpus for processor %"PRIu32" from %s",
|
||||
processor, cluster_cpus_filename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool cpuinfo_linux_detect_package_cpus(
|
||||
uint32_t max_processors_count,
|
||||
uint32_t processor,
|
||||
cpuinfo_siblings_callback callback,
|
||||
void* context) {
|
||||
char package_cpus_filename[PACKAGE_CPUS_FILENAME_SIZE];
|
||||
const int chars_formatted = snprintf(
|
||||
package_cpus_filename, PACKAGE_CPUS_FILENAME_SIZE, PACKAGE_CPUS_FILENAME_FORMAT, processor);
|
||||
if ((unsigned int) chars_formatted >= PACKAGE_CPUS_FILENAME_SIZE) {
|
||||
cpuinfo_log_warning("failed to format filename for package cpus of processor %"PRIu32, processor);
|
||||
return false;
|
||||
}
|
||||
|
||||
struct siblings_context siblings_context = {
|
||||
.group_name = "package",
|
||||
.max_processors_count = max_processors_count,
|
||||
.processor = processor,
|
||||
.callback = callback,
|
||||
.callback_context = context,
|
||||
};
|
||||
if (cpuinfo_linux_parse_cpulist(package_cpus_filename,
|
||||
(cpuinfo_cpulist_callback) siblings_parser, &siblings_context)) {
|
||||
return true;
|
||||
} else {
|
||||
cpuinfo_log_info("failed to parse the list of package cpus for processor %"PRIu32" from %s",
|
||||
processor, package_cpus_filename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
192
3rdparty/cpuinfo/src/log.c
vendored
Normal file
192
3rdparty/cpuinfo/src/log.c
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#if defined(__ANDROID__)
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
#if defined(__hexagon__)
|
||||
#include <qurt_printf.h>
|
||||
#endif
|
||||
|
||||
#ifndef CPUINFO_LOG_TO_STDIO
|
||||
#if defined(__ANDROID__)
|
||||
#define CPUINFO_LOG_TO_STDIO 0
|
||||
#else
|
||||
#define CPUINFO_LOG_TO_STDIO 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
|
||||
/* Messages up to this size are formatted entirely on-stack, and don't allocate heap memory */
|
||||
#define CPUINFO_LOG_STACK_BUFFER_SIZE 1024
|
||||
|
||||
#ifdef _WIN32
|
||||
#define CPUINFO_LOG_NEWLINE_LENGTH 2
|
||||
|
||||
#define CPUINFO_LOG_STDERR STD_ERROR_HANDLE
|
||||
#define CPUINFO_LOG_STDOUT STD_OUTPUT_HANDLE
|
||||
#elif defined(__hexagon__)
|
||||
#define CPUINFO_LOG_NEWLINE_LENGTH 1
|
||||
|
||||
#define CPUINFO_LOG_STDERR 0
|
||||
#define CPUINFO_LOG_STDOUT 0
|
||||
#else
|
||||
#define CPUINFO_LOG_NEWLINE_LENGTH 1
|
||||
|
||||
#define CPUINFO_LOG_STDERR STDERR_FILENO
|
||||
#define CPUINFO_LOG_STDOUT STDOUT_FILENO
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_TO_STDIO
|
||||
static void cpuinfo_vlog(int output_handle, const char* prefix, size_t prefix_length, const char* format, va_list args) {
|
||||
char stack_buffer[CPUINFO_LOG_STACK_BUFFER_SIZE];
|
||||
char* heap_buffer = NULL;
|
||||
char* out_buffer = &stack_buffer[0];
|
||||
|
||||
/* The first call to vsnprintf will clobber args, thus need a copy in case a second vsnprintf call is needed */
|
||||
va_list args_copy;
|
||||
va_copy(args_copy, args);
|
||||
|
||||
memcpy(stack_buffer, prefix, prefix_length * sizeof(char));
|
||||
assert((prefix_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char) <= CPUINFO_LOG_STACK_BUFFER_SIZE);
|
||||
|
||||
const int format_chars = vsnprintf(
|
||||
&stack_buffer[prefix_length],
|
||||
CPUINFO_LOG_STACK_BUFFER_SIZE - (prefix_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char),
|
||||
format,
|
||||
args);
|
||||
if (format_chars < 0) {
|
||||
/* Format error in the message: silently ignore this particular message. */
|
||||
goto cleanup;
|
||||
}
|
||||
const size_t format_length = (size_t) format_chars;
|
||||
if ((prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char) > CPUINFO_LOG_STACK_BUFFER_SIZE) {
|
||||
/* Allocate a buffer on heap, and vsnprintf to this buffer */
|
||||
const size_t heap_buffer_size = (prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char);
|
||||
#if _WIN32
|
||||
heap_buffer = HeapAlloc(GetProcessHeap(), 0, heap_buffer_size);
|
||||
#else
|
||||
heap_buffer = malloc(heap_buffer_size);
|
||||
#endif
|
||||
if (heap_buffer == NULL) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Copy pre-formatted prefix into the on-heap buffer */
|
||||
memcpy(heap_buffer, prefix, prefix_length * sizeof(char));
|
||||
vsnprintf(&heap_buffer[prefix_length], (format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char), format, args_copy);
|
||||
out_buffer = heap_buffer;
|
||||
}
|
||||
#ifdef _WIN32
|
||||
out_buffer[prefix_length + format_length] = '\r';
|
||||
out_buffer[prefix_length + format_length + 1] = '\n';
|
||||
|
||||
DWORD bytes_written;
|
||||
WriteFile(
|
||||
GetStdHandle((DWORD) output_handle),
|
||||
out_buffer, (prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char),
|
||||
&bytes_written, NULL);
|
||||
#elif defined(__hexagon__)
|
||||
qurt_printf("%s", out_buffer);
|
||||
#else
|
||||
out_buffer[prefix_length + format_length] = '\n';
|
||||
|
||||
ssize_t bytes_written = write(output_handle, out_buffer, (prefix_length + format_length + CPUINFO_LOG_NEWLINE_LENGTH) * sizeof(char));
|
||||
(void) bytes_written;
|
||||
#endif
|
||||
|
||||
cleanup:
|
||||
#ifdef _WIN32
|
||||
HeapFree(GetProcessHeap(), 0, heap_buffer);
|
||||
#else
|
||||
free(heap_buffer);
|
||||
#endif
|
||||
va_end(args_copy);
|
||||
}
|
||||
#elif defined(__ANDROID__) && CPUINFO_LOG_LEVEL > CPUINFO_LOG_NONE
|
||||
static const char cpuinfo_module[] = "XNNPACK";
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
|
||||
void cpuinfo_vlog_debug(const char* format, va_list args) {
|
||||
#if CPUINFO_LOG_TO_STDIO
|
||||
static const char debug_prefix[17] = {
|
||||
'D', 'e', 'b', 'u', 'g', ' ', '(', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ')', ':', ' '
|
||||
};
|
||||
cpuinfo_vlog(CPUINFO_LOG_STDOUT, debug_prefix, 17, format, args);
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_vprint(ANDROID_LOG_DEBUG, cpuinfo_module, format, args);
|
||||
#else
|
||||
#error "Platform-specific implementation required"
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
|
||||
void cpuinfo_vlog_info(const char* format, va_list args) {
|
||||
#if CPUINFO_LOG_TO_STDIO
|
||||
static const char info_prefix[16] = {
|
||||
'N', 'o', 't', 'e', ' ', '(', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ')', ':', ' '
|
||||
};
|
||||
cpuinfo_vlog(CPUINFO_LOG_STDOUT, info_prefix, 16, format, args);
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_vprint(ANDROID_LOG_INFO, cpuinfo_module, format, args);
|
||||
#else
|
||||
#error "Platform-specific implementation required"
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
|
||||
void cpuinfo_vlog_warning(const char* format, va_list args) {
|
||||
#if CPUINFO_LOG_TO_STDIO
|
||||
static const char warning_prefix[20] = {
|
||||
'W', 'a', 'r', 'n', 'i', 'n', 'g', ' ', 'i', 'n', ' ', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ':', ' '
|
||||
};
|
||||
cpuinfo_vlog(CPUINFO_LOG_STDERR, warning_prefix, 20, format, args);
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_vprint(ANDROID_LOG_WARN, cpuinfo_module, format, args);
|
||||
#else
|
||||
#error "Platform-specific implementation required"
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
|
||||
void cpuinfo_vlog_error(const char* format, va_list args) {
|
||||
#if CPUINFO_LOG_TO_STDIO
|
||||
static const char error_prefix[18] = {
|
||||
'E', 'r', 'r', 'o', 'r', ' ', 'i', 'n', ' ', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ':', ' '
|
||||
};
|
||||
cpuinfo_vlog(CPUINFO_LOG_STDERR, error_prefix, 18, format, args);
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_vprint(ANDROID_LOG_ERROR, cpuinfo_module, format, args);
|
||||
#else
|
||||
#error "Platform-specific implementation required"
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
|
||||
void cpuinfo_vlog_fatal(const char* format, va_list args) {
|
||||
#if CPUINFO_LOG_TO_STDIO
|
||||
static const char fatal_prefix[24] = {
|
||||
'F', 'a', 't', 'a', 'l', ' ', 'e', 'r', 'r', 'o', 'r', ' ', 'i', 'n', ' ', 'c', 'p', 'u', 'i', 'n', 'f', 'o', ':', ' '
|
||||
};
|
||||
cpuinfo_vlog(CPUINFO_LOG_STDERR, fatal_prefix, 24, format, args);
|
||||
#elif defined(__ANDROID__)
|
||||
__android_log_vprint(ANDROID_LOG_FATAL, cpuinfo_module, format, args);
|
||||
#else
|
||||
#error "Platform-specific implementation required"
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
42
3rdparty/cpuinfo/src/riscv/api.h
vendored
Normal file
42
3rdparty/cpuinfo/src/riscv/api.h
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cpuinfo.h>
|
||||
#include <cpuinfo/common.h>
|
||||
|
||||
/* RISC-V Vendor IDs. */
|
||||
enum cpuinfo_riscv_chipset_vendor {
|
||||
cpuinfo_riscv_chipset_vendor_unknown = 0,
|
||||
cpuinfo_riscv_chipset_sifive = 0x489,
|
||||
cpuinfo_riscv_chipset_vendor_max,
|
||||
};
|
||||
|
||||
/* RISC-V Architecture IDs. */
|
||||
enum cpuinfo_riscv_chipset_arch {
|
||||
cpuinfo_riscv_chipset_arch_unknown = 0,
|
||||
cpuinfo_riscv_chipset_arch_max,
|
||||
};
|
||||
|
||||
/* RISC-V Implementation IDs. */
|
||||
enum cpuinfo_riscv_chipset_impl {
|
||||
cpuinfo_riscv_chipset_impl_unknown = 0,
|
||||
cpuinfo_riscv_chipset_impl_max,
|
||||
};
|
||||
|
||||
/**
|
||||
* Decodes the vendor and micro-architecture based on the provided input
|
||||
* parameters, regardless of underlying operating system.
|
||||
*
|
||||
* @param[vendor_id]: The 'mvendorid' as described by the RISC-V Manual.
|
||||
* @param[arch_id]: The 'marchid' as described by the RISC-V Manual.
|
||||
* @param[imp_id]: The 'mimplid' as described by the RISC-V Manual.
|
||||
* @param[vendor] - Reference to the cpuinfo_vendor to populate.
|
||||
* @param[uarch] - Reference to the cpuinfo_uarch to populate.
|
||||
*/
|
||||
CPUINFO_INTERNAL void cpuinfo_riscv_decode_vendor_uarch(
|
||||
uint32_t vendor_id,
|
||||
uint32_t arch_id,
|
||||
uint32_t imp_id,
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]);
|
||||
69
3rdparty/cpuinfo/src/riscv/linux/api.h
vendored
Normal file
69
3rdparty/cpuinfo/src/riscv/linux/api.h
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
#pragma once
|
||||
|
||||
#include <cpuinfo.h>
|
||||
#include <cpuinfo/common.h>
|
||||
|
||||
/**
|
||||
* Definition of a RISC-V Linux processor. It is composed of the base processor
|
||||
* definition in "include/cpuinfo.h" and flags specific to RISC-V Linux
|
||||
* implementations.
|
||||
*/
|
||||
struct cpuinfo_riscv_linux_processor {
|
||||
/* Public ABI cpuinfo structures. */
|
||||
struct cpuinfo_processor processor;
|
||||
struct cpuinfo_core core;
|
||||
struct cpuinfo_cluster cluster;
|
||||
struct cpuinfo_package package;
|
||||
|
||||
/**
|
||||
* Linux-specific flags for the logical processor:
|
||||
* - Bit field that can be masked with CPUINFO_LINUX_FLAG_*.
|
||||
*/
|
||||
uint32_t flags;
|
||||
|
||||
/**
|
||||
* Minimum processor ID on the cluster which includes this logical processor.
|
||||
* This value can serve as an ID for the cluster of logical processors: it is the
|
||||
* same for all logical processors on the same package.
|
||||
*/
|
||||
uint32_t cluster_leader_id;
|
||||
|
||||
/**
|
||||
* Minimum processor ID on the core which includes this logical processor.
|
||||
* This value can serve as an ID for the core of logical processors: it
|
||||
* is the same for all logical processors on the same core.
|
||||
*/
|
||||
uint32_t core_leader_id;
|
||||
|
||||
/**
|
||||
* Minimum processor ID on the package which includes this logical processor.
|
||||
* This value can serve as an ID for the package of logical processors: it
|
||||
* is the same for all logical processors on the same package.
|
||||
*/
|
||||
uint32_t package_leader_id;
|
||||
};
|
||||
|
||||
/**
|
||||
* Reads AT_HWCAP from `getauxval` and populates the cpuinfo_riscv_isa
|
||||
* structure.
|
||||
*
|
||||
* @param[isa] - Reference to cpuinfo_riscv_isa structure to populate.
|
||||
*/
|
||||
CPUINFO_INTERNAL void cpuinfo_riscv_linux_decode_isa_from_hwcap(
|
||||
struct cpuinfo_riscv_isa isa[restrict static 1]);
|
||||
|
||||
/**
|
||||
* Reads `sys_riscv_hwprobe` and determines the processor vendor and
|
||||
* micro-architecture.
|
||||
*
|
||||
* @param[processor] - The Linux ID of the target processor.
|
||||
* @param[vendor] - Reference to the cpuinfo_vendor to populate.
|
||||
* @param[uarch] - Reference to the cpuinfo_uarch to populate.
|
||||
*/
|
||||
CPUINFO_INTERNAL void cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
|
||||
uint32_t processor,
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]);
|
||||
|
||||
/* Used to determine which uarch is associated with the current thread. */
|
||||
extern CPUINFO_INTERNAL const uint32_t* cpuinfo_linux_cpu_to_uarch_index_map;
|
||||
620
3rdparty/cpuinfo/src/riscv/linux/init.c
vendored
Normal file
620
3rdparty/cpuinfo/src/riscv/linux/init.c
vendored
Normal file
@@ -0,0 +1,620 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <cpuinfo/internal-api.h>
|
||||
#include <cpuinfo/log.h>
|
||||
#include <linux/api.h>
|
||||
#include <riscv/linux/api.h>
|
||||
|
||||
/* ISA structure to hold supported extensions. */
|
||||
struct cpuinfo_riscv_isa cpuinfo_isa;
|
||||
|
||||
/* Helper function to bitmask flags and ensure operator precedence. */
|
||||
static inline bool bitmask_all(uint32_t flags, uint32_t mask) {
|
||||
return (flags & mask) == mask;
|
||||
}
|
||||
|
||||
static int compare_riscv_linux_processors(const void* a, const void* b) {
|
||||
/**
|
||||
* For our purposes, it is only relevant that the list is sorted by
|
||||
* micro-architecture, so the nature of ordering is irrelevant.
|
||||
*/
|
||||
return ((const struct cpuinfo_riscv_linux_processor*)a)->core.uarch
|
||||
- ((const struct cpuinfo_riscv_linux_processor*)b)->core.uarch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the core cpus list for each processor. This function is called once
|
||||
* per-processor, with the IDs of all other processors in the core list.
|
||||
*
|
||||
* The 'processor_[start|count]' are populated in the processor's 'core'
|
||||
* attribute, with 'start' being the smallest ID in the core list.
|
||||
*
|
||||
* The 'core_leader_id' of each processor is set to the smallest ID in it's
|
||||
* cluster CPU list.
|
||||
*
|
||||
* Precondition: The element in the 'processors' list must be initialized with
|
||||
* their 'core_leader_id' to their index in the list.
|
||||
|
||||
* E.g. processors[0].core_leader_id = 0.
|
||||
*/
|
||||
static bool core_cpus_parser(uint32_t processor,
|
||||
uint32_t core_cpus_start,
|
||||
uint32_t core_cpus_end,
|
||||
struct cpuinfo_riscv_linux_processor* processors) {
|
||||
uint32_t processor_start = UINT32_MAX;
|
||||
uint32_t processor_count = 0;
|
||||
|
||||
/* If the processor already has a leader, use it. */
|
||||
if (bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CORE_CLUSTER)) {
|
||||
processor_start = processors[processor].core_leader_id;
|
||||
}
|
||||
|
||||
for (size_t core_cpu = core_cpus_start; core_cpu < core_cpus_end; core_cpu++) {
|
||||
if (!bitmask_all(processors[core_cpu].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
/**
|
||||
* The first valid processor observed is the smallest ID in the
|
||||
* list that attaches to this core.
|
||||
*/
|
||||
if (processor_start == UINT32_MAX) {
|
||||
processor_start = core_cpu;
|
||||
}
|
||||
processors[core_cpu].core_leader_id = processor_start;
|
||||
processor_count++;
|
||||
}
|
||||
/**
|
||||
* If the cluster flag has not been set, assign the processor start. If
|
||||
* it has been set, only apply the processor start if it's less than the
|
||||
* held value. This can happen if the callback is invoked twice:
|
||||
*
|
||||
* e.g. core_cpu_list=1,10-12
|
||||
*/
|
||||
if (!bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CORE_CLUSTER)
|
||||
|| processors[processor].core.processor_start > processor_start) {
|
||||
processors[processor].core.processor_start = processor_start;
|
||||
processors[processor].core_leader_id = processor_start;
|
||||
}
|
||||
processors[processor].core.processor_count += processor_count;
|
||||
processors[processor].flags |= CPUINFO_LINUX_FLAG_CORE_CLUSTER;
|
||||
/* The parser has failed only if no processors were found. */
|
||||
return processor_count != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the cluster cpu list for each processor. This function is called once
|
||||
* per-processor, with the IDs of all other processors in the cluster.
|
||||
*
|
||||
* The 'cluster_leader_id' of each processor is set to the smallest ID in it's
|
||||
* cluster CPU list.
|
||||
*
|
||||
* Precondition: The element in the 'processors' list must be initialized with
|
||||
* their 'cluster_leader_id' to their index in the list.
|
||||
* E.g. processors[0].cluster_leader_id = 0.
|
||||
*/
|
||||
static bool cluster_cpus_parser(uint32_t processor,
|
||||
uint32_t cluster_cpus_start,
|
||||
uint32_t cluster_cpus_end,
|
||||
struct cpuinfo_riscv_linux_processor* processors) {
|
||||
uint32_t processor_start = UINT32_MAX;
|
||||
uint32_t processor_count = 0;
|
||||
uint32_t core_count = 0;
|
||||
|
||||
/* If the processor already has a leader, use it. */
|
||||
if (bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER)) {
|
||||
processor_start = processors[processor].cluster_leader_id;
|
||||
}
|
||||
|
||||
for (size_t cluster_cpu = cluster_cpus_start; cluster_cpu < cluster_cpus_end; cluster_cpu++) {
|
||||
if (!bitmask_all(processors[cluster_cpu].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
/**
|
||||
* The first valid processor observed is the smallest ID in the
|
||||
* list that attaches to this core.
|
||||
*/
|
||||
if (processor_start == UINT32_MAX) {
|
||||
processor_start = cluster_cpu;
|
||||
}
|
||||
processors[cluster_cpu].cluster_leader_id = processor_start;
|
||||
processor_count++;
|
||||
/**
|
||||
* A processor should only represent it's core if it is the
|
||||
* assigned leader of that core.
|
||||
*/
|
||||
if (processors[cluster_cpu].core_leader_id == cluster_cpu) {
|
||||
core_count++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* If the cluster flag has not been set, assign the processor start. If
|
||||
* it has been set, only apply the processor start if it's less than the
|
||||
* held value. This can happen if the callback is invoked twice:
|
||||
*
|
||||
* e.g. cluster_cpus_list=1,10-12
|
||||
*/
|
||||
if (!bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER)
|
||||
|| processors[processor].cluster.processor_start > processor_start) {
|
||||
processors[processor].cluster.processor_start = processor_start;
|
||||
processors[processor].cluster.core_start = processor_start;
|
||||
processors[processor].cluster.cluster_id = processor_start;
|
||||
processors[processor].cluster_leader_id = processor_start;
|
||||
}
|
||||
processors[processor].cluster.processor_count += processor_count;
|
||||
processors[processor].cluster.core_count += core_count;
|
||||
processors[processor].flags |= CPUINFO_LINUX_FLAG_CLUSTER_CLUSTER;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the package cpus list for each processor. This function is called once
|
||||
* per-processor, with the IDs of all other processors in the package list.
|
||||
*
|
||||
* The 'processor_[start|count]' are populated in the processor's 'package'
|
||||
* attribute, with 'start' being the smallest ID in the package list.
|
||||
*
|
||||
* The 'package_leader_id' of each processor is set to the smallest ID in it's
|
||||
* cluster CPU list.
|
||||
*
|
||||
* Precondition: The element in the 'processors' list must be initialized with
|
||||
* their 'package_leader_id' to their index in the list.
|
||||
* E.g. processors[0].package_leader_id = 0.
|
||||
*/
|
||||
static bool package_cpus_parser(uint32_t processor,
|
||||
uint32_t package_cpus_start,
|
||||
uint32_t package_cpus_end,
|
||||
struct cpuinfo_riscv_linux_processor* processors) {
|
||||
uint32_t processor_start = UINT32_MAX;
|
||||
uint32_t processor_count = 0;
|
||||
uint32_t cluster_count = 0;
|
||||
uint32_t core_count = 0;
|
||||
|
||||
/* If the processor already has a leader, use it. */
|
||||
if (bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER)) {
|
||||
processor_start = processors[processor].package_leader_id;
|
||||
}
|
||||
|
||||
for (size_t package_cpu = package_cpus_start; package_cpu < package_cpus_end; package_cpu++) {
|
||||
if (!bitmask_all(processors[package_cpu].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
/**
|
||||
* The first valid processor observed is the smallest ID in the
|
||||
* list that attaches to this package.
|
||||
*/
|
||||
if (processor_start == UINT32_MAX) {
|
||||
processor_start = package_cpu;
|
||||
}
|
||||
processors[package_cpu].package_leader_id = processor_start;
|
||||
processor_count++;
|
||||
/**
|
||||
* A processor should only represent it's core if it is the
|
||||
* assigned leader of that core, and similarly for it's cluster.
|
||||
*/
|
||||
if (processors[package_cpu].cluster_leader_id == package_cpu) {
|
||||
cluster_count++;
|
||||
}
|
||||
if (processors[package_cpu].core_leader_id == package_cpu) {
|
||||
core_count++;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* If the cluster flag has not been set, assign the processor start. If
|
||||
* it has been set, only apply the processor start if it's less than the
|
||||
* held value. This can happen if the callback is invoked twice:
|
||||
*
|
||||
* e.g. package_cpus_list=1,10-12
|
||||
*/
|
||||
if (!bitmask_all(processors[processor].flags, CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER)
|
||||
|| processors[processor].package.processor_start > processor_start) {
|
||||
processors[processor].package.processor_start = processor_start;
|
||||
processors[processor].package.cluster_start = processor_start;
|
||||
processors[processor].package.core_start = processor_start;
|
||||
processors[processor].package_leader_id = processor_start;
|
||||
}
|
||||
processors[processor].package.processor_count += processor_count;
|
||||
processors[processor].package.cluster_count += cluster_count;
|
||||
processors[processor].package.core_count += core_count;
|
||||
processors[processor].flags |= CPUINFO_LINUX_FLAG_PACKAGE_CLUSTER;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Initialization for the RISC-V Linux system. */
|
||||
void cpuinfo_riscv_linux_init(void) {
|
||||
struct cpuinfo_riscv_linux_processor* riscv_linux_processors = NULL;
|
||||
struct cpuinfo_processor* processors = NULL;
|
||||
struct cpuinfo_package* packages = NULL;
|
||||
struct cpuinfo_cluster* clusters = NULL;
|
||||
struct cpuinfo_core* cores = NULL;
|
||||
struct cpuinfo_uarch_info* uarchs = NULL;
|
||||
const struct cpuinfo_processor** linux_cpu_to_processor_map = NULL;
|
||||
const struct cpuinfo_core** linux_cpu_to_core_map = NULL;
|
||||
uint32_t* linux_cpu_to_uarch_index_map = NULL;
|
||||
|
||||
/**
|
||||
* The interesting set of processors are the number of 'present'
|
||||
* processors on the system. There may be more 'possible' processors, but
|
||||
* processor information cannot be gathered on non-present processors.
|
||||
*
|
||||
* Note: For SoCs, it is largely the case that all processors are known
|
||||
* at boot and no processors are hotplugged at runtime, so the
|
||||
* 'present' and 'possible' list is often the same.
|
||||
*
|
||||
* Note: This computes the maximum processor ID of the 'present'
|
||||
* processors. It is not a count of the number of processors on the
|
||||
* system.
|
||||
*/
|
||||
const uint32_t max_processor_id = 1 +
|
||||
cpuinfo_linux_get_max_present_processor(
|
||||
cpuinfo_linux_get_max_processors_count());
|
||||
if (max_processor_id == 0) {
|
||||
cpuinfo_log_error("failed to discover any processors");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocate space to store all processor information. This array is
|
||||
* sized to the max processor ID as opposed to the number of 'present'
|
||||
* processors, to leverage pointer math in the common utility functions.
|
||||
*/
|
||||
riscv_linux_processors = calloc(max_processor_id,
|
||||
sizeof(struct cpuinfo_riscv_linux_processor));
|
||||
if (riscv_linux_processors == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" processors.",
|
||||
max_processor_id * sizeof(struct cpuinfo_riscv_linux_processor),
|
||||
max_processor_id);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempt to detect all processors and apply the corresponding flag to
|
||||
* each processor struct that we find.
|
||||
*/
|
||||
if (!cpuinfo_linux_detect_present_processors(max_processor_id,
|
||||
&riscv_linux_processors->flags,
|
||||
sizeof(struct cpuinfo_riscv_linux_processor),
|
||||
CPUINFO_LINUX_FLAG_PRESENT | CPUINFO_LINUX_FLAG_VALID)) {
|
||||
cpuinfo_log_error("failed to detect present processors");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Populate processor information. */
|
||||
for (size_t processor = 0; processor < max_processor_id; processor++) {
|
||||
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
/* TODO: Determine if an 'smt_id' is available. */
|
||||
riscv_linux_processors[processor].processor.linux_id = processor;
|
||||
}
|
||||
|
||||
/* Populate core information. */
|
||||
for (size_t processor = 0; processor < max_processor_id; processor++) {
|
||||
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Populate processor start and count information. */
|
||||
if (!cpuinfo_linux_detect_core_cpus(
|
||||
max_processor_id,
|
||||
processor,
|
||||
(cpuinfo_siblings_callback) core_cpus_parser,
|
||||
riscv_linux_processors)) {
|
||||
cpuinfo_log_error("failed to detect core cpus for processor %zu.", processor);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Populate core ID information. */
|
||||
if (cpuinfo_linux_get_processor_core_id(
|
||||
processor,
|
||||
&riscv_linux_processors[processor].core.core_id)) {
|
||||
riscv_linux_processors[processor].flags |= CPUINFO_LINUX_FLAG_CORE_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the vendor and uarch of this core from this
|
||||
* processor. When the final 'cores' list is constructed, only
|
||||
* the values from the core leader will be honored.
|
||||
*/
|
||||
cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
|
||||
processor,
|
||||
&riscv_linux_processors[processor].core.vendor,
|
||||
&riscv_linux_processors[processor].core.uarch);
|
||||
|
||||
/* Populate frequency information of this core. */
|
||||
uint32_t frequency = cpuinfo_linux_get_processor_cur_frequency(processor);
|
||||
if (frequency != 0) {
|
||||
riscv_linux_processors[processor].core.frequency = frequency;
|
||||
riscv_linux_processors[processor].flags |= CPUINFO_LINUX_FLAG_CUR_FREQUENCY;
|
||||
}
|
||||
}
|
||||
|
||||
/* Populate cluster information. */
|
||||
for (size_t processor = 0; processor < max_processor_id; processor++) {
|
||||
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
if (!cpuinfo_linux_detect_cluster_cpus(
|
||||
max_processor_id,
|
||||
processor,
|
||||
(cpuinfo_siblings_callback) cluster_cpus_parser,
|
||||
riscv_linux_processors)) {
|
||||
cpuinfo_log_warning("failed to detect cluster cpus for processor %zu.", processor);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the vendor, uarch and frequency of this cluster from
|
||||
* this logical processor. When the 'clusters' list is constructed,
|
||||
* only the values from the cluster leader will be honored.
|
||||
*/
|
||||
riscv_linux_processors[processor].cluster.vendor =
|
||||
riscv_linux_processors[processor].core.vendor;
|
||||
riscv_linux_processors[processor].cluster.uarch =
|
||||
riscv_linux_processors[processor].core.uarch;
|
||||
riscv_linux_processors[processor].cluster.frequency =
|
||||
riscv_linux_processors[processor].core.frequency;
|
||||
}
|
||||
|
||||
/* Populate package information. */
|
||||
for (size_t processor = 0; processor < max_processor_id; processor++) {
|
||||
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
if (!cpuinfo_linux_detect_package_cpus(
|
||||
max_processor_id,
|
||||
processor,
|
||||
(cpuinfo_siblings_callback) package_cpus_parser,
|
||||
riscv_linux_processors)) {
|
||||
cpuinfo_log_warning("failed to detect package cpus for processor %zu.", processor);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
/* Populate ISA structure with hwcap information. */
|
||||
cpuinfo_riscv_linux_decode_isa_from_hwcap(&cpuinfo_isa);
|
||||
|
||||
/**
|
||||
* To efficiently compute the number of unique micro-architectures
|
||||
* present on the system, sort the processor list by micro-architecture
|
||||
* and then scan through the list to count the differences.
|
||||
*
|
||||
* Ensure this is done at the end of composing the processor list - the
|
||||
* parsing functions assume that the position of the processor in the
|
||||
* list matches it's Linux ID, which this sorting operation breaks.
|
||||
*/
|
||||
qsort(riscv_linux_processors,
|
||||
max_processor_id,
|
||||
sizeof(struct cpuinfo_riscv_linux_processor),
|
||||
compare_riscv_linux_processors);
|
||||
|
||||
/**
|
||||
* Determine the number of *valid* detected processors, cores,
|
||||
* clusters, packages and uarchs in the list.
|
||||
*/
|
||||
size_t valid_processors_count = 0;
|
||||
size_t valid_cores_count = 0;
|
||||
size_t valid_clusters_count = 0;
|
||||
size_t valid_packages_count = 0;
|
||||
size_t valid_uarchs_count = 0;
|
||||
enum cpuinfo_uarch last_uarch = cpuinfo_uarch_unknown;
|
||||
for (size_t processor = 0; processor < max_processor_id; processor++) {
|
||||
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* All comparisons to the leader id values MUST be done against
|
||||
* the 'linux_id' as opposed to 'processor'. The sort function
|
||||
* above no longer allows us to make the assumption that these
|
||||
* two values are the same.
|
||||
*/
|
||||
uint32_t linux_id = riscv_linux_processors[processor].processor.linux_id;
|
||||
|
||||
valid_processors_count++;
|
||||
if (riscv_linux_processors[processor].core_leader_id == linux_id) {
|
||||
valid_cores_count++;
|
||||
}
|
||||
if (riscv_linux_processors[processor].cluster_leader_id == linux_id) {
|
||||
valid_clusters_count++;
|
||||
}
|
||||
if (riscv_linux_processors[processor].package_leader_id == linux_id) {
|
||||
valid_packages_count++;
|
||||
}
|
||||
/**
|
||||
* As we've sorted by micro-architecture, when the uarch differs
|
||||
* between two entries, a unique uarch has been observed.
|
||||
*/
|
||||
if (last_uarch != riscv_linux_processors[processor].core.uarch
|
||||
|| valid_uarchs_count == 0) {
|
||||
valid_uarchs_count++;
|
||||
last_uarch = riscv_linux_processors[processor].core.uarch;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allocate and populate final public ABI structures. */
|
||||
processors = calloc(valid_processors_count,
|
||||
sizeof(struct cpuinfo_processor));
|
||||
if (processors == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %zu processors.",
|
||||
valid_processors_count * sizeof(struct cpuinfo_processor),
|
||||
valid_processors_count);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
cores = calloc(valid_cores_count,
|
||||
sizeof(struct cpuinfo_core));
|
||||
if (cores == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %zu cores.",
|
||||
valid_cores_count * sizeof(struct cpuinfo_core),
|
||||
valid_cores_count);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
clusters = calloc(valid_clusters_count,
|
||||
sizeof(struct cpuinfo_cluster));
|
||||
if (clusters == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %zu clusters.",
|
||||
valid_clusters_count * sizeof(struct cpuinfo_cluster),
|
||||
valid_clusters_count);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
packages = calloc(valid_packages_count,
|
||||
sizeof(struct cpuinfo_package));
|
||||
if (packages == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %zu packages.",
|
||||
valid_packages_count * sizeof(struct cpuinfo_package),
|
||||
valid_packages_count);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
uarchs = calloc(valid_uarchs_count, sizeof(struct cpuinfo_uarch_info));
|
||||
if (uarchs == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %zu packages.",
|
||||
valid_uarchs_count * sizeof(struct cpuinfo_uarch_info),
|
||||
valid_uarchs_count);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
linux_cpu_to_processor_map = calloc(max_processor_id,
|
||||
sizeof(struct cpuinfo_processor*));
|
||||
if (linux_cpu_to_processor_map == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" processor map.",
|
||||
max_processor_id * sizeof(struct cpuinfo_processor*),
|
||||
max_processor_id);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
linux_cpu_to_core_map = calloc(max_processor_id,
|
||||
sizeof(struct cpuinfo_core*));
|
||||
if (linux_cpu_to_core_map == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" core map.",
|
||||
max_processor_id * sizeof(struct cpuinfo_core*),
|
||||
max_processor_id);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
linux_cpu_to_uarch_index_map = calloc(max_processor_id,
|
||||
sizeof(struct cpuinfo_uarch_info*));
|
||||
if (linux_cpu_to_uarch_index_map == NULL) {
|
||||
cpuinfo_log_error("failed to allocate %zu bytes for %"PRIu32" uarch map.",
|
||||
max_processor_id * sizeof(struct cpuinfo_uarch_info*),
|
||||
max_processor_id);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Transfer contents of processor list to ABI structures. */
|
||||
size_t valid_processors_index = 0;
|
||||
size_t valid_cores_index = 0;
|
||||
size_t valid_clusters_index = 0;
|
||||
size_t valid_packages_index = 0;
|
||||
size_t valid_uarchs_index = 0;
|
||||
last_uarch = cpuinfo_uarch_unknown;
|
||||
for (size_t processor = 0; processor < max_processor_id; processor++) {
|
||||
if (!bitmask_all(riscv_linux_processors[processor].flags, CPUINFO_LINUX_FLAG_VALID)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/**
|
||||
* All comparisons to the leader id values MUST be done against
|
||||
* the 'linux_id' as opposed to 'processor'. The sort function
|
||||
* above no longer allows us to make the assumption that these
|
||||
* two values are the same.
|
||||
*/
|
||||
uint32_t linux_id = riscv_linux_processors[processor].processor.linux_id;
|
||||
|
||||
/* Create uarch entry if this uarch has not been seen before. */
|
||||
if (last_uarch != riscv_linux_processors[processor].core.uarch
|
||||
|| valid_uarchs_index == 0) {
|
||||
uarchs[valid_uarchs_index++].uarch =
|
||||
riscv_linux_processors[processor].core.uarch;
|
||||
last_uarch = riscv_linux_processors[processor].core.uarch;
|
||||
}
|
||||
|
||||
/* Copy cpuinfo_processor information. */
|
||||
memcpy(&processors[valid_processors_index++],
|
||||
&riscv_linux_processors[processor].processor,
|
||||
sizeof(struct cpuinfo_processor));
|
||||
|
||||
/* Update uarch processor count. */
|
||||
uarchs[valid_uarchs_index - 1].processor_count++;
|
||||
|
||||
/* Copy cpuinfo_core information, if this is the leader. */
|
||||
if (riscv_linux_processors[processor].core_leader_id == linux_id) {
|
||||
memcpy(&cores[valid_cores_index++],
|
||||
&riscv_linux_processors[processor].core,
|
||||
sizeof(struct cpuinfo_core));
|
||||
/* Update uarch core count. */
|
||||
uarchs[valid_uarchs_index - 1].core_count++;
|
||||
}
|
||||
|
||||
/* Copy cpuinfo_cluster information, if this is the leader. */
|
||||
if (riscv_linux_processors[processor].cluster_leader_id == linux_id) {
|
||||
memcpy(&clusters[valid_clusters_index++],
|
||||
&riscv_linux_processors[processor].cluster,
|
||||
sizeof(struct cpuinfo_cluster));
|
||||
}
|
||||
|
||||
/* Copy cpuinfo_package information, if this is the leader. */
|
||||
if (riscv_linux_processors[processor].package_leader_id == linux_id) {
|
||||
memcpy(&packages[valid_packages_index++],
|
||||
&riscv_linux_processors[processor].package,
|
||||
sizeof(struct cpuinfo_package));
|
||||
}
|
||||
|
||||
/* Commit pointers on the final structures. */
|
||||
processors[valid_processors_index - 1].core = &cores[valid_cores_index - 1];
|
||||
processors[valid_processors_index - 1].cluster = &clusters[valid_clusters_index - 1];
|
||||
processors[valid_processors_index - 1].package = &packages[valid_packages_index - 1];
|
||||
|
||||
cores[valid_cores_index - 1].cluster = &clusters[valid_clusters_index - 1];
|
||||
cores[valid_cores_index - 1].package = &packages[valid_packages_index - 1];
|
||||
|
||||
clusters[valid_clusters_index - 1].package = &packages[valid_packages_index - 1];
|
||||
|
||||
linux_cpu_to_processor_map[linux_id] = &processors[valid_processors_index - 1];
|
||||
linux_cpu_to_core_map[linux_id] = &cores[valid_cores_index - 1];
|
||||
linux_cpu_to_uarch_index_map[linux_id] = valid_uarchs_index - 1;
|
||||
}
|
||||
|
||||
/* Commit */
|
||||
cpuinfo_processors = processors;
|
||||
cpuinfo_processors_count = valid_processors_count;
|
||||
cpuinfo_cores = cores;
|
||||
cpuinfo_cores_count = valid_cores_count;
|
||||
cpuinfo_clusters = clusters;
|
||||
cpuinfo_clusters_count = valid_clusters_count;
|
||||
cpuinfo_packages = packages;
|
||||
cpuinfo_packages_count = valid_packages_count;
|
||||
cpuinfo_uarchs = uarchs;
|
||||
cpuinfo_uarchs_count = valid_uarchs_count;
|
||||
|
||||
cpuinfo_linux_cpu_max = max_processor_id;
|
||||
cpuinfo_linux_cpu_to_processor_map = linux_cpu_to_processor_map;
|
||||
cpuinfo_linux_cpu_to_core_map = linux_cpu_to_core_map;
|
||||
cpuinfo_linux_cpu_to_uarch_index_map = linux_cpu_to_uarch_index_map;
|
||||
|
||||
__sync_synchronize();
|
||||
|
||||
cpuinfo_is_initialized = true;
|
||||
|
||||
/* Mark all public structures NULL to prevent cleanup from erasing them. */
|
||||
processors = NULL;
|
||||
cores = NULL;
|
||||
clusters = NULL;
|
||||
packages = NULL;
|
||||
uarchs = NULL;
|
||||
linux_cpu_to_processor_map = NULL;
|
||||
linux_cpu_to_core_map = NULL;
|
||||
linux_cpu_to_uarch_index_map = NULL;
|
||||
cleanup:
|
||||
free(riscv_linux_processors);
|
||||
free(processors);
|
||||
free(cores);
|
||||
free(clusters);
|
||||
free(packages);
|
||||
free(uarchs);
|
||||
free(linux_cpu_to_processor_map);
|
||||
free(linux_cpu_to_core_map);
|
||||
free(linux_cpu_to_uarch_index_map);
|
||||
}
|
||||
62
3rdparty/cpuinfo/src/riscv/linux/riscv-hw.c
vendored
Normal file
62
3rdparty/cpuinfo/src/riscv/linux/riscv-hw.c
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
#include <sys/hwprobe.h>
|
||||
#include <sched.h>
|
||||
|
||||
#include <cpuinfo/log.h>
|
||||
#include <riscv/api.h>
|
||||
#include <riscv/linux/api.h>
|
||||
|
||||
void cpuinfo_riscv_linux_decode_vendor_uarch_from_hwprobe(
|
||||
uint32_t processor,
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]) {
|
||||
struct riscv_hwprobe pairs[] = {
|
||||
{ .key = RISCV_HWPROBE_KEY_MVENDORID, },
|
||||
{ .key = RISCV_HWPROBE_KEY_MARCHID, },
|
||||
{ .key = RISCV_HWPROBE_KEY_MIMPID, },
|
||||
};
|
||||
const size_t pairs_count = sizeof(pairs) / sizeof(struct riscv_hwprobe);
|
||||
|
||||
/* In case of failure, report unknown. */
|
||||
*vendor = cpuinfo_vendor_unknown;
|
||||
*uarch = cpuinfo_uarch_unknown;
|
||||
|
||||
/* Create a CPU set with this processor flagged. */
|
||||
const size_t cpu_set_size = processor + 1;
|
||||
cpu_set_t* cpu_set = CPU_ALLOC(cpu_set_size);
|
||||
CPU_SET(processor, cpu_set);
|
||||
|
||||
/* Request all available information from hwprobe. */
|
||||
int ret = __riscv_hwprobe(pairs, pairs_count,
|
||||
cpu_set_size, (unsigned long*)cpu_set,
|
||||
0 /* flags */);
|
||||
if (ret < 0) {
|
||||
cpuinfo_log_warning("failed to get hwprobe information, err: %d", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* The syscall may not have populated all requested keys, loop through
|
||||
* the list and store the values that were discovered.
|
||||
*/
|
||||
uint32_t vendor_id = 0;
|
||||
uint32_t arch_id = 0;
|
||||
uint32_t imp_id = 0;
|
||||
for (size_t pair = 0; pair < pairs_count; pair++) {
|
||||
switch (pairs[pair].key) {
|
||||
case RISCV_HWPROBE_KEY_MVENDORID:
|
||||
vendor_id = pairs[pair].value;
|
||||
break;
|
||||
case RISCV_HWPROBE_KEY_MARCHID:
|
||||
arch_id = pairs[pair].value;
|
||||
break;
|
||||
case RISCV_HWPROBE_KEY_MIMPID:
|
||||
imp_id = pairs[pair].value;
|
||||
break;
|
||||
default:
|
||||
/* The key value may be -1 if unsupported. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
cpuinfo_riscv_decode_vendor_uarch(vendor_id, arch_id, imp_id,
|
||||
vendor, uarch);
|
||||
}
|
||||
44
3rdparty/cpuinfo/src/riscv/linux/riscv-isa.c
vendored
Normal file
44
3rdparty/cpuinfo/src/riscv/linux/riscv-isa.c
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
#include <string.h>
|
||||
#include <sys/auxv.h>
|
||||
|
||||
#include <riscv/linux/api.h>
|
||||
|
||||
/**
|
||||
* arch/riscv/include/uapi/asm/hwcap.h
|
||||
*
|
||||
* This must be kept in sync with the upstream kernel header.
|
||||
*/
|
||||
#define COMPAT_HWCAP_ISA_I (1 << ('I' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_M (1 << ('M' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_A (1 << ('A' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_F (1 << ('F' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_D (1 << ('D' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_C (1 << ('C' - 'A'))
|
||||
#define COMPAT_HWCAP_ISA_V (1 << ('V' - 'A'))
|
||||
|
||||
void cpuinfo_riscv_linux_decode_isa_from_hwcap(
|
||||
struct cpuinfo_riscv_isa isa[restrict static 1]) {
|
||||
const unsigned long hwcap = getauxval(AT_HWCAP);
|
||||
|
||||
if (hwcap & COMPAT_HWCAP_ISA_I) {
|
||||
isa->i = true;
|
||||
}
|
||||
if (hwcap & COMPAT_HWCAP_ISA_M) {
|
||||
isa->m = true;
|
||||
}
|
||||
if (hwcap & COMPAT_HWCAP_ISA_A) {
|
||||
isa->a = true;
|
||||
}
|
||||
if (hwcap & COMPAT_HWCAP_ISA_F) {
|
||||
isa->f = true;
|
||||
}
|
||||
if (hwcap & COMPAT_HWCAP_ISA_D) {
|
||||
isa->d = true;
|
||||
}
|
||||
if (hwcap & COMPAT_HWCAP_ISA_C) {
|
||||
isa->c = true;
|
||||
}
|
||||
if (hwcap & COMPAT_HWCAP_ISA_V) {
|
||||
isa->v = true;
|
||||
}
|
||||
}
|
||||
27
3rdparty/cpuinfo/src/riscv/uarch.c
vendored
Normal file
27
3rdparty/cpuinfo/src/riscv/uarch.c
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cpuinfo/log.h>
|
||||
#include <riscv/api.h>
|
||||
|
||||
void cpuinfo_riscv_decode_vendor_uarch(
|
||||
uint32_t vendor_id,
|
||||
uint32_t arch_id,
|
||||
uint32_t imp_id,
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]) {
|
||||
/* The vendor ID is sufficient to determine the cpuinfo_vendor. */
|
||||
switch(vendor_id) {
|
||||
case cpuinfo_riscv_chipset_sifive:
|
||||
*vendor = cpuinfo_vendor_sifive;
|
||||
break;
|
||||
default:
|
||||
*vendor = cpuinfo_vendor_unknown;
|
||||
cpuinfo_log_warning("unknown vendor ID: %"PRIu32, vendor_id);
|
||||
break;
|
||||
}
|
||||
/**
|
||||
* TODO: Add support for parsing chipset architecture and implementation
|
||||
* IDs here, when a chipset of interest comes along.
|
||||
*/
|
||||
*uarch = cpuinfo_uarch_unknown;
|
||||
}
|
||||
12
3rdparty/cpuinfo/src/x86/isa.c
vendored
12
3rdparty/cpuinfo/src/x86/isa.c
vendored
@@ -490,6 +490,18 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
|
||||
*/
|
||||
isa.avx512vp2intersect = avx512_regs && !!(structured_feature_info0.edx & UINT32_C(0x00000100));
|
||||
|
||||
/*
|
||||
* AVX512_FP16 instructions:
|
||||
* - Intel: edx[bit 23] in structured feature info (ecx = 0).
|
||||
*/
|
||||
isa.avx512fp16 = avx512_regs && !!(structured_feature_info0.edx & UINT32_C(0x00800000));
|
||||
|
||||
/*
|
||||
* AVX_VNNI instructions:
|
||||
* - Intel: eax[bit 4] in structured feature info (ecx = 1).
|
||||
*/
|
||||
isa.avxvnni = avx_regs && !!(structured_feature_info1.eax & UINT32_C(0x00000010));
|
||||
|
||||
/*
|
||||
* AVX512_BF16 instructions:
|
||||
* - Intel: eax[bit 5] in structured feature info (ecx = 1).
|
||||
|
||||
6
3rdparty/cpuinfo/src/x86/name.c
vendored
6
3rdparty/cpuinfo/src/x86/name.c
vendored
@@ -234,7 +234,7 @@ static bool transform_token(char* token_start, char* token_end, struct parser_st
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* Erase everywhing after "SOC" on AMD System-on-Chips, e.g.
|
||||
* Erase everything after "SOC" on AMD System-on-Chips, e.g.
|
||||
* "AMD GX-212JC SOC with Radeon(TM) R2E Graphics \0"
|
||||
*/
|
||||
if (erase_matching(token_start, token_length, "SOC")) {
|
||||
@@ -581,7 +581,7 @@ uint32_t cpuinfo_x86_normalize_brand_string(
|
||||
/* Iterate through all tokens and erase redundant parts */
|
||||
{
|
||||
bool is_token = false;
|
||||
char* token_start;
|
||||
char* token_start = NULL;
|
||||
for (char* char_ptr = name; char_ptr != name_end; char_ptr++) {
|
||||
if (*char_ptr == ' ') {
|
||||
if (is_token) {
|
||||
@@ -619,7 +619,7 @@ uint32_t cpuinfo_x86_normalize_brand_string(
|
||||
/* Compact tokens: collapse multiple spacing into one */
|
||||
{
|
||||
char* output_ptr = normalized_name;
|
||||
char* token_start;
|
||||
char* token_start = NULL;
|
||||
bool is_token = false;
|
||||
bool previous_token_ends_with_dash = true;
|
||||
bool current_token_starts_with_dash = false;
|
||||
|
||||
38
3rdparty/cpuinfo/src/x86/uarch.c
vendored
38
3rdparty/cpuinfo/src/x86/uarch.c
vendored
@@ -195,35 +195,37 @@ enum cpuinfo_uarch cpuinfo_x86_decode_uarch(
|
||||
}
|
||||
break;
|
||||
case 0x16:
|
||||
if (model_info->model >= 0x03) {
|
||||
if (model_info->extended_model >= 0x03) {
|
||||
return cpuinfo_uarch_puma;
|
||||
} else {
|
||||
return cpuinfo_uarch_jaguar;
|
||||
}
|
||||
case 0x17:
|
||||
switch (model_info->model) {
|
||||
case 0x01: // 14 nm Naples, Whitehaven, Summit Ridge, Snowy Owl
|
||||
case 0x08: // 12 nm Pinnacle Ridge
|
||||
case 0x11: // 14 nm Raven Ridge, Great Horned Owl
|
||||
case 0x18: // 12 nm Picasso
|
||||
switch (model_info->extended_model) {
|
||||
case 0x0: // model 01h -> 14 nm Naples/Whitehaven/Summit Ridge/Snowy Owl, model 08h -> 12 nm Colfax/Pinnacle Ridge
|
||||
case 0x1: // model 11h -> 14 nm Raven Ridge/Great Horned Owl, model 18h -> 14 nm Banded Kestrel / 12 nm Picasso
|
||||
return cpuinfo_uarch_zen;
|
||||
case 0x31: // Rome, Castle Peak
|
||||
case 0x60: // Renoir
|
||||
case 0x68: // Lucienne
|
||||
case 0x71: // Matisse
|
||||
case 0x90: // Van Gogh
|
||||
case 0x98: // Mero
|
||||
case 0x3: // model 31h -> Rome/Castle Peak
|
||||
case 0x4: // model 47h -> Xbox Series X
|
||||
case 0x6: // model 60h -> Renoir/Grey Hawk, model 68h -> Lucienne
|
||||
case 0x7: // model 71h -> Matisse
|
||||
case 0x9: // model 90h -> Van Gogh, model 98h -> Mero
|
||||
return cpuinfo_uarch_zen2;
|
||||
}
|
||||
break;
|
||||
case 0x19:
|
||||
switch (model_info->model) {
|
||||
case 0x01: // Genesis
|
||||
case 0x21: // Vermeer
|
||||
case 0x30: // Badami, Trento
|
||||
case 0x40: // Rembrandt
|
||||
case 0x50: // Cezanne
|
||||
switch (model_info->extended_model) {
|
||||
case 0x0: // model 00h -> Genesis, model 01h -> Milan, model 08h -> Chagall
|
||||
case 0x2: // model 21h -> Vermeer
|
||||
case 0x3: // model 30h -> Badami, Trento
|
||||
case 0x4: // model 40h -> Rembrandt
|
||||
case 0x5: // model 50h -> Cezanne
|
||||
return cpuinfo_uarch_zen3;
|
||||
case 0x1: // model 10h..1Fh -> Stones
|
||||
case 0x6: // model 60h..6Fh -> Raphael
|
||||
case 0x7: // model 70h..77h -> Phoenix/Hawkpoint1, model 78h..7Fh -> Phoenix 2/Hawkpoint2
|
||||
case 0xA: // model A0h..AFh -> Stones-Dense
|
||||
return cpuinfo_uarch_zen4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
257
3rdparty/cubeb/CMakeLists.txt
vendored
257
3rdparty/cubeb/CMakeLists.txt
vendored
@@ -2,10 +2,8 @@
|
||||
# - backend selection via command line, rather than simply detecting headers.
|
||||
|
||||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
|
||||
project(cubeb
|
||||
VERSION 0.0.0)
|
||||
project(cubeb C CXX)
|
||||
|
||||
option(BUILD_RUST_LIBS "Build rust backends" OFF)
|
||||
option(LAZY_LOAD_LIBS "Lazily load shared libraries" ON)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
@@ -14,25 +12,17 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if (BUILD_RUST_LIBS)
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs")
|
||||
set(USE_PULSE_RUST 1)
|
||||
endif()
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs")
|
||||
set(USE_AUDIOUNIT_RUST 1)
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
set(CMAKE_CXX_WARNING_LEVEL 4)
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -fno-exceptions -fno-rtti")
|
||||
else()
|
||||
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
|
||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable Exceptions
|
||||
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Disable RTTI
|
||||
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Disable Exceptions
|
||||
endif()
|
||||
|
||||
add_library(cubeb
|
||||
@@ -46,43 +36,15 @@ add_library(cubeb
|
||||
target_include_directories(cubeb
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
|
||||
)
|
||||
set_target_properties(cubeb PROPERTIES
|
||||
VERSION ${cubeb_VERSION}
|
||||
SOVERSION ${cubeb_VERSION_MAJOR}
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
COMPATIBILITY SameMajorVersion
|
||||
)
|
||||
|
||||
configure_package_config_file(
|
||||
"Config.cmake.in"
|
||||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
install(TARGETS cubeb EXPORT "${PROJECT_NAME}Targets")
|
||||
install(
|
||||
EXPORT "${PROJECT_NAME}Targets"
|
||||
NAMESPACE "${PROJECT_NAME}::"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
|
||||
)
|
||||
|
||||
add_library(speex OBJECT subprojects/speex/resample.c)
|
||||
set_target_properties(speex PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||
target_include_directories(speex INTERFACE subprojects)
|
||||
target_compile_definitions(speex PUBLIC
|
||||
OUTSIDE_SPEEX
|
||||
FLOATING_POINT
|
||||
EXPORT=
|
||||
RANDOM_PREFIX=speex
|
||||
OUTSIDE_SPEEX
|
||||
FLOATING_POINT
|
||||
EXPORT=
|
||||
RANDOM_PREFIX=speex
|
||||
)
|
||||
|
||||
# $<BUILD_INTERFACE:> required because of https://gitlab.kitware.com/cmake/cmake/-/issues/15415
|
||||
@@ -96,17 +58,19 @@ find_package(Threads)
|
||||
target_link_libraries(cubeb PRIVATE Threads::Threads)
|
||||
|
||||
if(LAZY_LOAD_LIBS)
|
||||
check_include_files(pulse/pulseaudio.h USE_PULSE)
|
||||
check_include_files(alsa/asoundlib.h USE_ALSA)
|
||||
check_include_files(jack/jack.h USE_JACK)
|
||||
check_include_files(sndio.h USE_SNDIO)
|
||||
check_include_files(aaudio/AAudio.h USE_AAUDIO)
|
||||
if(NOT APPLE AND NOT WIN32)
|
||||
# Skip checks on MacOS because it takes ages in XCode.
|
||||
check_include_files(pulse/pulseaudio.h USE_PULSE)
|
||||
check_include_files(alsa/asoundlib.h USE_ALSA)
|
||||
check_include_files(jack/jack.h USE_JACK)
|
||||
check_include_files(sndio.h USE_SNDIO)
|
||||
|
||||
if(USE_PULSE OR USE_ALSA OR USE_JACK OR USE_SNDIO OR USE_AAUDIO)
|
||||
target_link_libraries(cubeb PRIVATE ${CMAKE_DL_LIBS})
|
||||
if(USE_PULSE OR USE_ALSA OR USE_JACK OR USE_SNDIO)
|
||||
target_link_libraries(cubeb PRIVATE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
elseif(NOT APPLE AND NOT WIN32)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
@@ -136,12 +100,6 @@ else()
|
||||
target_compile_definitions(cubeb PRIVATE DISABLE_LIBSNDIO_DLOPEN)
|
||||
target_link_libraries(cubeb PRIVATE sndio)
|
||||
endif()
|
||||
|
||||
check_include_files(aaudio/AAudio.h USE_AAUDIO)
|
||||
if(USE_AAUDIO)
|
||||
target_compile_definitions(cubeb PRIVATE DISABLE_LIBAAUDIO_DLOPEN)
|
||||
target_link_libraries(cubeb PRIVATE aaudio)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(USE_PULSE)
|
||||
@@ -164,138 +122,57 @@ if(USE_SNDIO)
|
||||
target_compile_definitions(cubeb PRIVATE USE_SNDIO)
|
||||
endif()
|
||||
|
||||
if(USE_AAUDIO)
|
||||
target_sources(cubeb PRIVATE src/cubeb_aaudio.cpp)
|
||||
target_compile_definitions(cubeb PRIVATE USE_AAUDIO)
|
||||
|
||||
# set this definition to enable low latency mode. Possibly bad for battery
|
||||
target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_LOW_LATENCY)
|
||||
|
||||
# set this definition to enable power saving mode. Possibly resulting
|
||||
# in high latency
|
||||
# target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_LOW_POWER_SAVING)
|
||||
|
||||
# set this mode to make the backend use an exclusive stream.
|
||||
# will decrease latency.
|
||||
# target_compile_definitions(cubeb PRIVATE CUBEB_AAUDIO_EXCLUSIVE_STREAM)
|
||||
endif()
|
||||
|
||||
check_include_files(AudioUnit/AudioUnit.h USE_AUDIOUNIT)
|
||||
if(USE_AUDIOUNIT)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_audiounit.cpp
|
||||
src/cubeb_osx_run_loop.cpp)
|
||||
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT)
|
||||
target_link_libraries(cubeb PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework CoreServices")
|
||||
endif()
|
||||
|
||||
check_include_files(audioclient.h USE_WASAPI)
|
||||
if(USE_WASAPI)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_wasapi.cpp)
|
||||
target_compile_definitions(cubeb PRIVATE USE_WASAPI)
|
||||
target_link_libraries(cubeb PRIVATE avrt ole32 ksuser)
|
||||
endif()
|
||||
|
||||
check_include_files("windows.h;mmsystem.h" USE_WINMM)
|
||||
if(USE_WINMM)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_winmm.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_WINMM)
|
||||
target_link_libraries(cubeb PRIVATE winmm)
|
||||
endif()
|
||||
|
||||
check_include_files(SLES/OpenSLES.h USE_OPENSL)
|
||||
if(USE_OPENSL)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_opensl.c
|
||||
src/cubeb-jni.cpp)
|
||||
target_compile_definitions(cubeb PRIVATE USE_OPENSL)
|
||||
target_link_libraries(cubeb PRIVATE OpenSLES)
|
||||
endif()
|
||||
|
||||
check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
|
||||
if(HAVE_SYS_SOUNDCARD_H)
|
||||
try_compile(USE_OSS "${PROJECT_BINARY_DIR}/compile_tests"
|
||||
${PROJECT_SOURCE_DIR}/cmake/compile_tests/oss_is_v4.c)
|
||||
if(USE_OSS)
|
||||
# strlcpy is not available on BSD systems that use glibc,
|
||||
# like Debian kfreebsd, so try using libbsd if available
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
|
||||
if(NOT HAVE_STRLCPY)
|
||||
pkg_check_modules(libbsd-overlay IMPORTED_TARGET libbsd-overlay)
|
||||
if(libbsd-overlay_FOUND)
|
||||
target_link_libraries(cubeb PRIVATE PkgConfig::libbsd-overlay)
|
||||
set(HAVE_STRLCPY true)
|
||||
endif()
|
||||
endif()
|
||||
if (HAVE_STRLCPY)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_oss.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_OSS)
|
||||
endif()
|
||||
if(APPLE)
|
||||
check_include_files(AudioUnit/AudioUnit.h USE_AUDIOUNIT)
|
||||
if(USE_AUDIOUNIT)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_audiounit.cpp
|
||||
src/cubeb_osx_run_loop.cpp)
|
||||
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT)
|
||||
target_link_libraries(cubeb PRIVATE "-framework AudioUnit" "-framework CoreAudio" "-framework CoreServices")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_files(android/log.h USE_AUDIOTRACK)
|
||||
if(USE_AUDIOTRACK)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_audiotrack.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_AUDIOTRACK)
|
||||
target_link_libraries(cubeb PRIVATE log)
|
||||
if(WIN32)
|
||||
check_include_files(audioclient.h USE_WASAPI)
|
||||
if(USE_WASAPI)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_wasapi.cpp)
|
||||
target_compile_definitions(cubeb PRIVATE USE_WASAPI)
|
||||
target_link_libraries(cubeb PRIVATE avrt ole32 ksuser)
|
||||
endif()
|
||||
|
||||
check_include_files("windows.h;mmsystem.h" USE_WINMM)
|
||||
if(USE_WINMM)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_winmm.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_WINMM)
|
||||
target_link_libraries(cubeb PRIVATE winmm)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_files(sys/audioio.h USE_SUN)
|
||||
if(USE_SUN)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_sun.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_SUN)
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
|
||||
if(HAVE_SYS_SOUNDCARD_H)
|
||||
try_compile(USE_OSS "${PROJECT_BINARY_DIR}/compile_tests"
|
||||
${PROJECT_SOURCE_DIR}/cmake/compile_tests/oss_is_v4.c)
|
||||
if(USE_OSS)
|
||||
# strlcpy is not available on BSD systems that use glibc,
|
||||
# like Debian kfreebsd, so try using libbsd if available
|
||||
include(CheckSymbolExists)
|
||||
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
|
||||
if(NOT HAVE_STRLCPY)
|
||||
pkg_check_modules(libbsd-overlay IMPORTED_TARGET libbsd-overlay)
|
||||
if(libbsd-overlay_FOUND)
|
||||
target_link_libraries(cubeb PRIVATE PkgConfig::libbsd-overlay)
|
||||
set(HAVE_STRLCPY true)
|
||||
endif()
|
||||
endif()
|
||||
if (HAVE_STRLCPY)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_oss.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_OSS)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_include_files(kai.h USE_KAI)
|
||||
if(USE_KAI)
|
||||
target_sources(cubeb PRIVATE
|
||||
src/cubeb_kai.c)
|
||||
target_compile_definitions(cubeb PRIVATE USE_KAI)
|
||||
target_link_libraries(cubeb PRIVATE kai)
|
||||
endif()
|
||||
|
||||
if(USE_PULSE AND USE_PULSE_RUST)
|
||||
include(ExternalProject)
|
||||
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust)
|
||||
ExternalProject_Add(
|
||||
cubeb_pulse_rs
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cargo build COMMAND cargo build --release
|
||||
BUILD_ALWAYS ON
|
||||
BINARY_DIR "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs"
|
||||
INSTALL_COMMAND ""
|
||||
LOG_BUILD ON)
|
||||
add_dependencies(cubeb cubeb_pulse_rs)
|
||||
target_compile_definitions(cubeb PRIVATE USE_PULSE_RUST)
|
||||
target_link_libraries(cubeb PRIVATE
|
||||
debug "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs/target/debug/libcubeb_pulse.a"
|
||||
optimized "${PROJECT_SOURCE_DIR}/src/cubeb-pulse-rs/target/release/libcubeb_pulse.a" pulse)
|
||||
endif()
|
||||
|
||||
if(USE_AUDIOUNIT AND USE_AUDIOUNIT_RUST)
|
||||
include(ExternalProject)
|
||||
set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/rust)
|
||||
ExternalProject_Add(
|
||||
cubeb_coreaudio_rs
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND cargo build COMMAND cargo build --release
|
||||
BUILD_ALWAYS ON
|
||||
BINARY_DIR "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs"
|
||||
INSTALL_COMMAND ""
|
||||
LOG_BUILD ON)
|
||||
add_dependencies(cubeb cubeb_coreaudio_rs)
|
||||
target_compile_definitions(cubeb PRIVATE USE_AUDIOUNIT_RUST)
|
||||
target_link_libraries(cubeb PRIVATE
|
||||
debug "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs/target/debug/libcubeb_coreaudio.a"
|
||||
optimized "${PROJECT_SOURCE_DIR}/src/cubeb-coreaudio-rs/target/release/libcubeb_coreaudio.a")
|
||||
endif()
|
||||
|
||||
|
||||
4
3rdparty/cubeb/Config.cmake.in
vendored
4
3rdparty/cubeb/Config.cmake.in
vendored
@@ -1,4 +0,0 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/cubebTargets.cmake")
|
||||
check_required_components(cubeb)
|
||||
14
3rdparty/cubeb/cmake/toolchain-cross-mingw.cmake
vendored
14
3rdparty/cubeb/cmake/toolchain-cross-mingw.cmake
vendored
@@ -1,14 +0,0 @@
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
set(COMPILER_PREFIX "i686-w64-mingw32")
|
||||
|
||||
find_program(CMAKE_RC_COMPILER NAMES ${COMPILER_PREFIX}-windres)
|
||||
find_program(CMAKE_C_COMPILER NAMES ${COMPILER_PREFIX}-gcc-posix)
|
||||
find_program(CMAKE_CXX_COMPILER NAMES ${COMPILER_PREFIX}-g++-posix)
|
||||
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX})
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
36
3rdparty/cubeb/cubeb.supp
vendored
36
3rdparty/cubeb/cubeb.supp
vendored
@@ -1,36 +0,0 @@
|
||||
{
|
||||
snd_config_update-malloc
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
fun:snd_config_update_r
|
||||
}
|
||||
{
|
||||
snd1_dlobj_cache_get-malloc
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
fun:snd1_dlobj_cache_get
|
||||
}
|
||||
{
|
||||
parse_defs-malloc
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
fun:parse_defs
|
||||
}
|
||||
{
|
||||
parse_defs-calloc
|
||||
Memcheck:Leak
|
||||
fun:calloc
|
||||
...
|
||||
fun:parse_defs
|
||||
}
|
||||
{
|
||||
pa_client_conf_from_x11-malloc
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
fun:pa_client_conf_from_x11
|
||||
}
|
||||
|
||||
6
3rdparty/cubeb/cubeb.vcxproj
vendored
6
3rdparty/cubeb/cubeb.vcxproj
vendored
@@ -49,7 +49,6 @@
|
||||
<ClInclude Include="subprojects\speex\stack_alloc.h" />
|
||||
<ClInclude Include="src\cubeb-internal.h" />
|
||||
<ClInclude Include="src\cubeb-speex-resampler.h" />
|
||||
<ClInclude Include="src\cubeb_array_queue.h" />
|
||||
<ClInclude Include="src\cubeb_assert.h" />
|
||||
<ClInclude Include="src\cubeb_log.h" />
|
||||
<ClInclude Include="src\cubeb_mixer.h" />
|
||||
@@ -73,6 +72,11 @@
|
||||
<ClCompile Include="src\cubeb_winmm.c" />
|
||||
<ClCompile Include="subprojects\speex\resample.c" />
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Lib>
|
||||
<AdditionalDependencies Condition="'$(Platform)'!='ARM64'">ksuser.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets" />
|
||||
</Project>
|
||||
1
3rdparty/cubeb/cubeb.vcxproj.filters
vendored
1
3rdparty/cubeb/cubeb.vcxproj.filters
vendored
@@ -3,7 +3,6 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src\cubeb-internal.h" />
|
||||
<ClInclude Include="src\cubeb-speex-resampler.h" />
|
||||
<ClInclude Include="src\cubeb_array_queue.h" />
|
||||
<ClInclude Include="src\cubeb_assert.h" />
|
||||
<ClInclude Include="src\cubeb_log.h" />
|
||||
<ClInclude Include="src\cubeb_mixer.h" />
|
||||
|
||||
70
3rdparty/cubeb/include/cubeb/cubeb.h
vendored
70
3rdparty/cubeb/include/cubeb/cubeb.h
vendored
@@ -163,6 +163,7 @@ typedef enum {
|
||||
implications. */
|
||||
} cubeb_log_level;
|
||||
|
||||
/// A single channel position, to be used in a bitmask.
|
||||
typedef enum {
|
||||
CHANNEL_UNKNOWN = 0,
|
||||
CHANNEL_FRONT_LEFT = 1 << 0,
|
||||
@@ -185,43 +186,46 @@ typedef enum {
|
||||
CHANNEL_TOP_BACK_RIGHT = 1 << 17
|
||||
} cubeb_channel;
|
||||
|
||||
/// A bitmask representing the channel layout of a cubeb stream. This is
|
||||
/// bit-compatible with WAVEFORMATEXENSIBLE and in the same order as the SMPTE
|
||||
/// ordering.
|
||||
typedef uint32_t cubeb_channel_layout;
|
||||
// Some common layout definitions.
|
||||
enum {
|
||||
CUBEB_LAYOUT_UNDEFINED = 0, // Indicate the speaker's layout is undefined.
|
||||
CUBEB_LAYOUT_MONO = CHANNEL_FRONT_CENTER,
|
||||
CUBEB_LAYOUT_MONO_LFE = CUBEB_LAYOUT_MONO | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_STEREO = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT,
|
||||
CUBEB_LAYOUT_STEREO_LFE = CUBEB_LAYOUT_STEREO | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_MONO = (uint32_t)CHANNEL_FRONT_CENTER,
|
||||
CUBEB_LAYOUT_MONO_LFE = (uint32_t)CUBEB_LAYOUT_MONO | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_STEREO = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT,
|
||||
CUBEB_LAYOUT_STEREO_LFE = (uint32_t)CUBEB_LAYOUT_STEREO | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F =
|
||||
CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_FRONT_CENTER,
|
||||
CUBEB_LAYOUT_3F_LFE = CUBEB_LAYOUT_3F | CHANNEL_LOW_FREQUENCY,
|
||||
(uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT | (uint32_t)CHANNEL_FRONT_CENTER,
|
||||
CUBEB_LAYOUT_3F_LFE = (uint32_t)CUBEB_LAYOUT_3F | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_2F1 =
|
||||
CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_BACK_CENTER,
|
||||
CUBEB_LAYOUT_2F1_LFE = CUBEB_LAYOUT_2F1 | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F1 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
|
||||
CHANNEL_FRONT_CENTER | CHANNEL_BACK_CENTER,
|
||||
CUBEB_LAYOUT_3F1_LFE = CUBEB_LAYOUT_3F1 | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_2F2 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
|
||||
CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT,
|
||||
CUBEB_LAYOUT_2F2_LFE = CUBEB_LAYOUT_2F2 | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_QUAD = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
|
||||
CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT,
|
||||
CUBEB_LAYOUT_QUAD_LFE = CUBEB_LAYOUT_QUAD | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F2 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
|
||||
CHANNEL_FRONT_CENTER | CHANNEL_SIDE_LEFT |
|
||||
CHANNEL_SIDE_RIGHT,
|
||||
CUBEB_LAYOUT_3F2_LFE = CUBEB_LAYOUT_3F2 | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F2_BACK = CUBEB_LAYOUT_QUAD | CHANNEL_FRONT_CENTER,
|
||||
CUBEB_LAYOUT_3F2_LFE_BACK = CUBEB_LAYOUT_3F2_BACK | CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F3R_LFE = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
|
||||
CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY |
|
||||
CHANNEL_BACK_CENTER | CHANNEL_SIDE_LEFT |
|
||||
CHANNEL_SIDE_RIGHT,
|
||||
CUBEB_LAYOUT_3F4_LFE = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT |
|
||||
CHANNEL_FRONT_CENTER | CHANNEL_LOW_FREQUENCY |
|
||||
CHANNEL_BACK_LEFT | CHANNEL_BACK_RIGHT |
|
||||
CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT,
|
||||
(uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT | (uint32_t)CHANNEL_BACK_CENTER,
|
||||
CUBEB_LAYOUT_2F1_LFE = (uint32_t)CUBEB_LAYOUT_2F1 | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F1 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
|
||||
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_BACK_CENTER,
|
||||
CUBEB_LAYOUT_3F1_LFE = (uint32_t)CUBEB_LAYOUT_3F1 | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_2F2 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
|
||||
(uint32_t)CHANNEL_SIDE_LEFT | (uint32_t)CHANNEL_SIDE_RIGHT,
|
||||
CUBEB_LAYOUT_2F2_LFE = (uint32_t)CUBEB_LAYOUT_2F2 | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_QUAD = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
|
||||
(uint32_t)CHANNEL_BACK_LEFT | (uint32_t)CHANNEL_BACK_RIGHT,
|
||||
CUBEB_LAYOUT_QUAD_LFE = (uint32_t)CUBEB_LAYOUT_QUAD | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F2 = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
|
||||
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_SIDE_LEFT |
|
||||
(uint32_t)CHANNEL_SIDE_RIGHT,
|
||||
CUBEB_LAYOUT_3F2_LFE = (uint32_t)CUBEB_LAYOUT_3F2 | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F2_BACK = (uint32_t)CUBEB_LAYOUT_QUAD | (uint32_t)CHANNEL_FRONT_CENTER,
|
||||
CUBEB_LAYOUT_3F2_LFE_BACK = (uint32_t)CUBEB_LAYOUT_3F2_BACK | (uint32_t)CHANNEL_LOW_FREQUENCY,
|
||||
CUBEB_LAYOUT_3F3R_LFE = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
|
||||
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_LOW_FREQUENCY |
|
||||
(uint32_t)CHANNEL_BACK_CENTER | (uint32_t)CHANNEL_SIDE_LEFT |
|
||||
(uint32_t)CHANNEL_SIDE_RIGHT,
|
||||
CUBEB_LAYOUT_3F4_LFE = (uint32_t)CHANNEL_FRONT_LEFT | (uint32_t)CHANNEL_FRONT_RIGHT |
|
||||
(uint32_t)CHANNEL_FRONT_CENTER | (uint32_t)CHANNEL_LOW_FREQUENCY |
|
||||
(uint32_t)CHANNEL_BACK_LEFT | (uint32_t)CHANNEL_BACK_RIGHT |
|
||||
(uint32_t)CHANNEL_SIDE_LEFT | (uint32_t)CHANNEL_SIDE_RIGHT,
|
||||
};
|
||||
|
||||
/** Miscellaneous stream preferences. */
|
||||
@@ -433,7 +437,7 @@ typedef void (*cubeb_state_callback)(cubeb_stream * stream, void * user_ptr,
|
||||
|
||||
/**
|
||||
* User supplied callback called when the underlying device changed.
|
||||
* @param user The pointer passed to cubeb_stream_init. */
|
||||
* @param user_ptr The pointer passed to cubeb_stream_init. */
|
||||
typedef void (*cubeb_device_changed_callback)(void * user_ptr);
|
||||
|
||||
/**
|
||||
@@ -471,7 +475,7 @@ cubeb_init(cubeb ** context, char const * context_name,
|
||||
|
||||
/** Returns a list of backend names which can be supplid to cubeb_init().
|
||||
Array is null-terminated. */
|
||||
CUBEB_EXPORT const char* const*
|
||||
CUBEB_EXPORT const char**
|
||||
cubeb_get_backend_names();
|
||||
|
||||
/** Get a read-only string identifying this context's current backend.
|
||||
|
||||
12
3rdparty/cubeb/include/cubeb/cubeb_export.h
vendored
Normal file
12
3rdparty/cubeb/include/cubeb/cubeb_export.h
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef CUBEB_EXPORT_H
|
||||
#define CUBEB_EXPORT_H
|
||||
|
||||
#define CUBEB_EXPORT
|
||||
#define CUBEB_NO_EXPORT
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma comment(lib, "winmm.lib")
|
||||
#pragma comment(lib, "avrt.lib")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user