mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Compare commits
973 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a03c7580b9 | ||
|
132a4ba320 | ||
|
6b03d1dd9e | ||
|
7474127bbb | ||
|
a277453acb | ||
|
cc0c53496d | ||
|
a150fdfc35 | ||
|
753305a797 | ||
|
0039895398 | ||
|
1fc7c9f160 | ||
|
f02c6fe4d5 | ||
|
0d1d28415c | ||
|
54d6dd9662 | ||
|
195d79fc67 | ||
|
f41c4672cb | ||
|
e656d49f53 | ||
|
85a9d5e284 | ||
|
3f9c4736f3 | ||
|
49d8a2c082 | ||
|
2d9169e3d1 | ||
|
bb474a12c7 | ||
|
684400b45c | ||
|
e5482580cd | ||
|
9074461ffb | ||
|
eb47afe1f0 | ||
|
873c6ecac8 | ||
|
ae2e6d0a7b | ||
|
1530884256 | ||
|
7455e5890e | ||
|
2183962ef7 | ||
|
bc7ec5b89b | ||
|
9b3c46dd5e | ||
|
54dcbc87ad | ||
|
b8c2e25c3d | ||
|
b04dfcd43d | ||
|
48efd98df7 | ||
|
c5dc5f4455 | ||
|
8ad05c66ae | ||
|
6566d6a8d8 | ||
|
ad61037925 | ||
|
2d53818e55 | ||
|
d966ecf9f7 | ||
|
d71fc39577 | ||
|
40d12b6a53 | ||
|
4a5a21cdb0 | ||
|
50ff279aad | ||
|
367ed69501 | ||
|
8b3638e8e2 | ||
|
5c069f9d8d | ||
|
9b7d53a979 | ||
|
ad5615cda2 | ||
|
b8a64190dc | ||
|
3b48252bb3 | ||
|
526e41b5dc | ||
|
cfc67727a0 | ||
|
015a27bb4e | ||
|
f1128f825d | ||
|
c38764db3c | ||
|
408939862b | ||
|
3ac95e6902 | ||
|
0c228533f2 | ||
|
55d7df3782 | ||
|
16405715a6 | ||
|
5479a42ef9 | ||
|
4662be3aac | ||
|
e19a823c37 | ||
|
2020ef6c6e | ||
|
f583d1c855 | ||
|
7272f9cac1 | ||
|
da60684b9f | ||
|
be3aa5ac21 | ||
|
b87a935c58 | ||
|
9d03627a17 | ||
|
7c48baf132 | ||
|
2608c6bbc9 | ||
|
e49c25f2f5 | ||
|
b68f63c6d5 | ||
|
27689bcf43 | ||
|
277555af2a | ||
|
802bdbbecc | ||
|
a42ea071a0 | ||
|
fd33d1c839 | ||
|
21c8d7615d | ||
|
092e91d058 | ||
|
f01973a78c | ||
|
4273d34ca4 | ||
|
fb9686fb28 | ||
|
9b14656c8a | ||
|
38e7024277 | ||
|
7730ac595f | ||
|
82460b0316 | ||
|
caabfc6379 | ||
|
49cc094869 | ||
|
fbc40e8b9e | ||
|
4d5cd252a4 | ||
|
59116feb55 | ||
|
4fd6d5317b | ||
|
07cd1d8ee1 | ||
|
ead67c06d9 | ||
|
1d627c86be | ||
|
66a50a8c76 | ||
|
3488e08aa7 | ||
|
d16986dfa7 | ||
|
a30fff8b4c | ||
|
e981a5ba6f | ||
|
3e88544d1f | ||
|
7093eb0b08 | ||
|
7e128f3bce | ||
|
6e220fee91 | ||
|
94403bde4b | ||
|
cd8e2a5d8a | ||
|
a8f844b970 | ||
|
78bca3f0e1 | ||
|
4929ac6487 | ||
|
39d382b033 | ||
|
8baa50b2f5 | ||
|
7f516e2fed | ||
|
8b0b2343e1 | ||
|
b9c7cd1738 | ||
|
31eeb843c7 | ||
|
d30a2d6854 | ||
|
38636648d3 | ||
|
23bfabc6c2 | ||
|
57f1a63b3f | ||
|
3f700c93a6 | ||
|
a2fce55aee | ||
|
9aba23bbb0 | ||
|
96ba28e761 | ||
|
39137d809e | ||
|
117ab107c1 | ||
|
4591dfa208 | ||
|
e9eecbb2c6 | ||
|
cf912bbb19 | ||
|
1c63239a78 | ||
|
e9664a1c87 | ||
|
caf0047367 | ||
|
5051db201e | ||
|
6452690e57 | ||
|
aa28504c60 | ||
|
96e1cb17c6 | ||
|
07d38d608e | ||
|
01a7f62650 | ||
|
7fc3366086 | ||
|
99d39e6eee | ||
|
9d839c52d1 | ||
|
70fc28506f | ||
|
1e796064bc | ||
|
bb02d0b0af | ||
|
87c54f92cf | ||
|
b48ab72cf0 | ||
|
45c4dc5124 | ||
|
f703cc33cf | ||
|
8f25eaf54e | ||
|
c214804aa1 | ||
|
c5797e4e36 | ||
|
a9e8f9a5f8 | ||
|
f0ee324399 | ||
|
759b4c3bfe | ||
|
b9ee0d3b4c | ||
|
e756fa75cf | ||
|
e6ee311392 | ||
|
b9b808ca12 | ||
|
cc0f158c16 | ||
|
5120ad8311 | ||
|
339a92a7b2 | ||
|
0cac843ad7 | ||
|
3c0db7e3c3 | ||
|
7ef690bd5a | ||
|
16ef91c238 | ||
|
ee06542f1f | ||
|
caa61de540 | ||
|
55ea2a20e7 | ||
|
2097e3c836 | ||
|
84718101fe | ||
|
ecf3b30baf | ||
|
ceeea7712d | ||
|
9d2f874b02 | ||
|
92241fc0a4 | ||
|
869d75f53e | ||
|
a916050724 | ||
|
872367f068 | ||
|
cacd71c401 | ||
|
f4df9013bb | ||
|
3dc68bcb76 | ||
|
d0a7ee1692 | ||
|
60f461d94d | ||
|
f7e26acfb9 | ||
|
9baf5f403c | ||
|
44bb5d474b | ||
|
c2b4e81493 | ||
|
27d7939cc1 | ||
|
1ab0b5abd2 | ||
|
8a7f540d7c | ||
|
697ea8b3b3 | ||
|
1bd56a93f0 | ||
|
1bd84419c0 | ||
|
90c072b66c | ||
|
096eec1b84 | ||
|
9839e4aea7 | ||
|
1499da51b8 | ||
|
3e41052853 | ||
|
384646b03b | ||
|
471ed0ef65 | ||
|
8d418760c0 | ||
|
9ab2f35c08 | ||
|
a8c6c5f50e | ||
|
5454b3202d | ||
|
fd5ee53251 | ||
|
b46d8db565 | ||
|
4497201928 | ||
|
e0c3efee6c | ||
|
f45dc88bf8 | ||
|
4490f9cb41 | ||
|
13d9ed7e87 | ||
|
66edfaec42 | ||
|
e1554a13e0 | ||
|
9dfb1e98b9 | ||
|
97a6a3dde7 | ||
|
cc860fe56a | ||
|
201dcb6a8a | ||
|
5213c53bb0 | ||
|
9378718231 | ||
|
fe6b79082f | ||
|
34879d6dd3 | ||
|
defb91abc1 | ||
|
e6eb9899bb | ||
|
28a229c594 | ||
|
9f4d7fa5ad | ||
|
346d8a45c6 | ||
|
02d60a3dde | ||
|
d0b6869e9e | ||
|
20c4822c98 | ||
|
da1e92956f | ||
|
21721dd814 | ||
|
98a064efa9 | ||
|
5caeffa19a | ||
|
e8a9d228c5 | ||
|
2ac51fb597 | ||
|
7465b4ffaf | ||
|
8819ea745d | ||
|
2435a76caa | ||
|
9f682c6015 | ||
|
44ae59f363 | ||
|
04b921e200 | ||
|
290e546f47 | ||
|
0e6ba23800 | ||
|
429de331d6 | ||
|
796f09ef23 | ||
|
219da446f4 | ||
|
7cb82b9894 | ||
|
293c76625c | ||
|
05d00388ed | ||
|
39ee307409 | ||
|
d734aaa357 | ||
|
a34b058701 | ||
|
52e0cf38b7 | ||
|
dfcc5ae37e | ||
|
8740ea710a | ||
|
6721db8600 | ||
|
157bf05c50 | ||
|
2de14f4e38 | ||
|
616e7c2eec | ||
|
1769c2f457 | ||
|
0e47224578 | ||
|
be53a82e78 | ||
|
bc60621d61 | ||
|
8f8871454c | ||
|
1c1faeff2d | ||
|
d400183483 | ||
|
717605065a | ||
|
5b1f3f67c3 | ||
|
721cf57b28 | ||
|
9c5c082d83 | ||
|
684c34dc21 | ||
|
bbbe6ce894 | ||
|
fbd359099b | ||
|
315864e434 | ||
|
b676406878 | ||
|
aca0f3cad7 | ||
|
2d6bcff3a6 | ||
|
ae2a7c60b8 | ||
|
9b9a883d07 | ||
|
f6882e2a5d | ||
|
7792b95443 | ||
|
19960c0287 | ||
|
07a561176c | ||
|
82a0476ad5 | ||
|
86270dac6d | ||
|
8b9da2efba | ||
|
207605f93b | ||
|
650e1b9739 | ||
|
c3cf13fc64 | ||
|
87285cfcaa | ||
|
821f2f907b | ||
|
a68ef3c27b | ||
|
aa451b48bb | ||
|
39497ab77b | ||
|
a47a51453c | ||
|
fc303d9594 | ||
|
0b5b674e1f | ||
|
e793f927fc | ||
|
4795011b12 | ||
|
f971faab58 | ||
|
07995f0222 | ||
|
25899fef73 | ||
|
de2a9fd18f | ||
|
1109e3ce2d | ||
|
0b72fd8a97 | ||
|
00f7beee43 | ||
|
20905406da | ||
|
6ff9869120 | ||
|
0f0f2c6b9b | ||
|
3bb6f1bb68 | ||
|
3bea3b7725 | ||
|
758080e579 | ||
|
0f6002822c | ||
|
44d1502474 | ||
|
5a67246426 | ||
|
0d17d5eaaa | ||
|
f387929653 | ||
|
d8f4c8bc7e | ||
|
8a6e525ea9 | ||
|
b359936c04 | ||
|
8724400884 | ||
|
7bb59b6784 | ||
|
26bf9b60cd | ||
|
55da9d1084 | ||
|
d71754298c | ||
|
8fc0dcfd48 | ||
|
46ec677702 | ||
|
b687831394 | ||
|
5632021003 | ||
|
1478e74963 | ||
|
9a3a6ba3ef | ||
|
e8ff26e173 | ||
|
c168ff6c3c | ||
|
bd061d1d1b | ||
|
19f376a6c9 | ||
|
49f0ca5339 | ||
|
d46eebf794 | ||
|
5795bc5766 | ||
|
323778e96f | ||
|
48763ef836 | ||
|
504b9d215e | ||
|
ce39032bc5 | ||
|
88f0f6680b | ||
|
25ff997548 | ||
|
59092bef72 | ||
|
bec8973265 | ||
|
d4f6537b95 | ||
|
f1bfbb9821 | ||
|
45b9aff761 | ||
|
8b8ff9363d | ||
|
0c0e4f554f | ||
|
d67598f0fe | ||
|
0d8b2b6252 | ||
|
97cf0bd11f | ||
|
c783a48bae | ||
|
1950040461 | ||
|
5934f5da9a | ||
|
959f0de7e5 | ||
|
6080b8742a | ||
|
4afc0960fb | ||
|
d8849af800 | ||
|
e4ec798762 | ||
|
5b75954c5b | ||
|
692fcc225f | ||
|
11777e8136 | ||
|
ea4de3be36 | ||
|
64f2008cc1 | ||
|
e393ade59d | ||
|
0ffa0be4fd | ||
|
8e3d250654 | ||
|
fe51f02a25 | ||
|
aa85824455 | ||
|
799360dfb8 | ||
|
ea65b145c6 | ||
|
06b23cc293 | ||
|
5ec7565852 | ||
|
638fa1f06c | ||
|
cef49c2269 | ||
|
5f09d454be | ||
|
91ca0f2f89 | ||
|
04cf494d9c | ||
|
b11e66594d | ||
|
ad2c2efacd | ||
|
a9538799da | ||
|
c374440379 | ||
|
c6cc424991 | ||
|
6d04913b4a | ||
|
3d69c485be | ||
|
94407dbd1f | ||
|
fd1e60e2fd | ||
|
4b695cc3dd | ||
|
47180dbf7f | ||
|
1dfc926eb8 | ||
|
e26c34346b | ||
|
0d0e56dca3 | ||
|
12c8592325 | ||
|
ef21f5867e | ||
|
ba79deddf6 | ||
|
8f3b312b7c | ||
|
f7b810a3d1 | ||
|
be92ae787c | ||
|
50bb383667 | ||
|
844bc1e416 | ||
|
46e979e185 | ||
|
2716311f51 | ||
|
357b557684 | ||
|
e947aeb72d | ||
|
5d542dc09f | ||
|
8893c2bc0f | ||
|
353545a1e9 | ||
|
fb617fe998 | ||
|
dc4aa7a126 | ||
|
c8dbace72e | ||
|
f5bc9a9ae8 | ||
|
b6eb08befe | ||
|
5c1cc80897 | ||
|
0c6803e5c6 | ||
|
81d7e9d765 | ||
|
a51f0d0657 | ||
|
b2ee226fd7 | ||
|
ee65a45bef | ||
|
b18796c1c0 | ||
|
30cbc77e23 | ||
|
60042d1944 | ||
|
f7730659f8 | ||
|
835ba9fddf | ||
|
37bfde5106 | ||
|
46852a7066 | ||
|
ecb05f787e | ||
|
0b74b14f88 | ||
|
a1064a3d26 | ||
|
1390c8c9e3 | ||
|
dbf6274bff | ||
|
bdacfe7c37 | ||
|
28a9750f8a | ||
|
9a9f1c2ab9 | ||
|
8cea63cbca | ||
|
beb42a3d29 | ||
|
70a468e160 | ||
|
5e224101c4 | ||
|
3658c0c90f | ||
|
fb18a81d79 | ||
|
ffb98a9724 | ||
|
0aa025c0d9 | ||
|
684cee59ab | ||
|
d9a182b450 | ||
|
751545ebbd | ||
|
c9063fbdbe | ||
|
20d67a1bc8 | ||
|
f81e089260 | ||
|
90adf00dc1 | ||
|
93b4ea2ace | ||
|
5098fc2a70 | ||
|
68357bd9fb | ||
|
893754638c | ||
|
5634c1520e | ||
|
7a74d38198 | ||
|
a636950eb5 | ||
|
82fd4075f9 | ||
|
c9e57901ed | ||
|
34d40a5ecf | ||
|
22a0898a54 | ||
|
a8704b4a07 | ||
|
c0f93b1c9c | ||
|
3274fd4c5e | ||
|
075395620a | ||
|
9a88b8ff4b | ||
|
521e371c60 | ||
|
1458a6ab23 | ||
|
ec455c8ee6 | ||
|
69c50cb6cb | ||
|
e4cda51bf6 | ||
|
1a7eefc6af | ||
|
6f17cf1869 | ||
|
5b7b4a6889 | ||
|
c383e7ae25 | ||
|
6d1deb5640 | ||
|
bad4a4eda0 | ||
|
9cf61d6597 | ||
|
9688152505 | ||
|
f8023ba698 | ||
|
3c34d9d096 | ||
|
938ab3b8ea | ||
|
4a933d0174 | ||
|
dfbf0652f2 | ||
|
d4a4b62396 | ||
|
4bbe973e3a | ||
|
be40c1e38e | ||
|
9f0f3a7218 | ||
|
50f5345ea5 | ||
|
959ab53529 | ||
|
915a138150 | ||
|
c5c0fceda4 | ||
|
f04d844515 | ||
|
3589b46fab | ||
|
2edd23f5a0 | ||
|
72cf230228 | ||
|
3cb7fd8a5e | ||
|
65576a294e | ||
|
739b6260d6 | ||
|
fc08f09b94 | ||
|
51ee66323b | ||
|
b38ac8bfef | ||
|
7dbb3c592f | ||
|
03e9c89dd8 | ||
|
e09379bd16 | ||
|
ef1c8e8512 | ||
|
16bc01551e | ||
|
a6b9369430 | ||
|
7401a72ccf | ||
|
fde874eedf | ||
|
9d7222eb4a | ||
|
6cc772e71e | ||
|
1247f365d0 | ||
|
a8e427fc7f | ||
|
d9fe3ed9a6 | ||
|
a3b63bb468 | ||
|
3f2d28407b | ||
|
ba154e02db | ||
|
139dc44a00 | ||
|
d474f21576 | ||
|
efdd28f7bb | ||
|
6aa9401b95 | ||
|
aff60a6a36 | ||
|
cddab58b0d | ||
|
d2e995478e | ||
|
b5fda4f456 | ||
|
02ad97ff3f | ||
|
2e2e6257d7 | ||
|
bf0226fb64 | ||
|
3886111e70 | ||
|
8051ceaa43 | ||
|
f6f8fb3d27 | ||
|
2cea5706d5 | ||
|
5e211fb581 | ||
|
5d52427f4a | ||
|
a17c218351 | ||
|
5454f7564c | ||
|
8d67c79431 | ||
|
abf12f79c5 | ||
|
0a187a65f6 | ||
|
870959e93f | ||
|
3a186887ed | ||
|
455738a266 | ||
|
277ec25a8d | ||
|
ce240ddfc1 | ||
|
bb1e717026 | ||
|
048ff8213a | ||
|
eb1cbb454a | ||
|
095df5f416 | ||
|
3bf4a674bc | ||
|
9c3a4e5762 | ||
|
9dea830f98 | ||
|
07c6e12dbf | ||
|
0d5bd53be3 | ||
|
982d6ddcdc | ||
|
4db02dd041 | ||
|
eba17d0fd8 | ||
|
026a34a0fc | ||
|
0c7cbd1d03 | ||
|
15145aa74c | ||
|
207e065ffe | ||
|
608ff35c8c | ||
|
da9b9f8e79 | ||
|
cbea6d7852 | ||
|
aae58fbc3a | ||
|
1ff73edd20 | ||
|
f8524f8bcd | ||
|
7fa2c6cfd2 | ||
|
82aecbdb31 | ||
|
64aad9e751 | ||
|
d5064aa8ea | ||
|
56b4424399 | ||
|
0333b9f591 | ||
|
071d440955 | ||
|
f0d3eb1dfe | ||
|
17b4e83ed0 | ||
|
55b29ff20b | ||
|
6e14d1ff45 | ||
|
535a2c8504 | ||
|
d3da7dcecd | ||
|
005d092903 | ||
|
c5e64a182c | ||
|
b405370af9 | ||
|
afe5c8dfbe | ||
|
216a4b7663 | ||
|
cf23441116 | ||
|
60ae46a373 | ||
|
bd00c6a4ee | ||
|
abdbaed737 | ||
|
86717de6e1 | ||
|
ec7fc9ffb6 | ||
|
717e545158 | ||
|
f704c57f98 | ||
|
73f09de29d | ||
|
8983e14e18 | ||
|
63da2886d1 | ||
|
813f4243db | ||
|
1a971d867d | ||
|
4b14d961f0 | ||
|
11eee619fb | ||
|
b879f5b519 | ||
|
da8c2340b3 | ||
|
dcb383701a | ||
|
f4d27a4ea4 | ||
|
839cf6ef91 | ||
|
d6b059f0cc | ||
|
e8c3cb1909 | ||
|
4f1c4c98ac | ||
|
5730884678 | ||
|
c31bf6f7f8 | ||
|
ee56e1fcd5 | ||
|
6748d11a2f | ||
|
68473381b9 | ||
|
89f1fb4825 | ||
|
b64389ba15 | ||
|
5f0cac546b | ||
|
2663ce1a4a | ||
|
56c52b8d8f | ||
|
66a32de0f7 | ||
|
fee5982abd | ||
|
377e41fe61 | ||
|
6199b2f883 | ||
|
4420f5863f | ||
|
6a6caae2ea | ||
|
4a7f6e0cc1 | ||
|
061b5c77ce | ||
|
328ecc339c | ||
|
c45683506c | ||
|
4bf9a8cecc | ||
|
a1a7e63d93 | ||
|
b357d08da3 | ||
|
0a94a7e3ba | ||
|
d1300c491c | ||
|
596c498e1f | ||
|
44be569f4a | ||
|
805cc6385a | ||
|
411b218896 | ||
|
2530dceac4 | ||
|
a577a86b5c | ||
|
b5b985d1d0 | ||
|
651c6c5350 | ||
|
30f1b901a9 | ||
|
e85457815e | ||
|
c21170cc01 | ||
|
547325f270 | ||
|
767f7e4fd4 | ||
|
2f8fe4180d | ||
|
565656b021 | ||
|
aa66d0c286 | ||
|
30d656070d | ||
|
7a779ba03c | ||
|
e77224975d | ||
|
e071b9043f | ||
|
5b2cce0a02 | ||
|
9f9cd04761 | ||
|
630effe8fa | ||
|
87dcfbd84b | ||
|
3805727ee5 | ||
|
6349d1ef0b | ||
|
cdfad41d68 | ||
|
bf86eba59c | ||
|
16554ed2ed | ||
|
aa4878bb8e | ||
|
475b022ed8 | ||
|
0e458447ff | ||
|
2bfa540656 | ||
|
3342254a0e | ||
|
e10fc58bf5 | ||
|
93be1d9343 | ||
|
55be66cdf8 | ||
|
4c1b06034b | ||
|
ef9f2d247d | ||
|
adbee2f820 | ||
|
828e52f5c4 | ||
|
505afc8f77 | ||
|
059f1487af | ||
|
d65d96191a | ||
|
e38d9fa7ce | ||
|
8a411a72b8 | ||
|
3d70a61436 | ||
|
9e6be031c1 | ||
|
afceec59aa | ||
|
18352366f7 | ||
|
278330af5b | ||
|
aac38a7deb | ||
|
8b8cd7d28b | ||
|
434d73c7bd | ||
|
8ee866e840 | ||
|
fec5e6bb9c | ||
|
a2fdd3638c | ||
|
7f8a2e2c9a | ||
|
1df45c00c0 | ||
|
bde0c63006 | ||
|
71bde8d11a | ||
|
4c6f6332b0 | ||
|
1a3131178d | ||
|
148eac2c24 | ||
|
06244c0def | ||
|
f523521831 | ||
|
25898a9c7a | ||
|
4bfd6f42bc | ||
|
46718851da | ||
|
375f4526df | ||
|
776b08f2e0 | ||
|
cc4ed68271 | ||
|
35246b4191 | ||
|
269c75103e | ||
|
2c4abf5f9f | ||
|
58115b35c5 | ||
|
970250fc85 | ||
|
1bada6a6fd | ||
|
699d93c7ae | ||
|
ee81795f26 | ||
|
a5f256ca2d | ||
|
061b990875 | ||
|
1c43f6efa7 | ||
|
96d44cc847 | ||
|
b73a0ff54e | ||
|
c9b4248d35 | ||
|
0081f1bda0 | ||
|
9ca27bf7cc | ||
|
ac031e64d6 | ||
|
c5a68c2d8e | ||
|
8df02e0bff | ||
|
83305115c2 | ||
|
578759384d | ||
|
c673056dd4 | ||
|
4fbef01729 | ||
|
8ebe62ed85 | ||
|
55f9341aec | ||
|
f5f82a2bd5 | ||
|
dec5b851af | ||
|
37e3c60433 | ||
|
390b3d9c50 | ||
|
6c34e02dc2 | ||
|
6235343286 | ||
|
e155702e0a | ||
|
3af5c7b331 | ||
|
f04cdb7782 | ||
|
f264d0736a | ||
|
18f2631e6e | ||
|
14206b5b4f | ||
|
605cdcb5d5 | ||
|
f1998292a4 | ||
|
f5459c4d2c | ||
|
00e24e2b8c | ||
|
3b9e7a1838 | ||
|
2df972d586 | ||
|
49478ec3b3 | ||
|
1f90cd473b | ||
|
a9feb75bdf | ||
|
a4eecd508d | ||
|
11bf33c32c | ||
|
4e349dd283 | ||
|
f39a2fd3ee | ||
|
db6128afe2 | ||
|
218d90fb3f | ||
|
14438be242 | ||
|
4fa5d23fa4 | ||
|
d29421727c | ||
|
51c99ba3c2 | ||
|
2e7081e52a | ||
|
92511c9742 | ||
|
1ddecd4b99 | ||
|
a26f076a0e | ||
|
082c13ac8e | ||
|
c0789c20cb | ||
|
7d813ec2c1 | ||
|
9ccc754143 | ||
|
746b6c6246 | ||
|
b329eb1fcc | ||
|
bdfcc5b814 | ||
|
ec549c4831 | ||
|
ea0471f9d0 | ||
|
0295ef2b3c | ||
|
0ca5e25c13 | ||
|
03c98a8d4c | ||
|
77f8ec0b2f | ||
|
a1aa87df87 | ||
|
4226f7888e | ||
|
133d52a6dd | ||
|
408ef4c06e | ||
|
c514a5caca | ||
|
b6562f1784 | ||
|
cef21ef035 | ||
|
a2dd51ae4c | ||
|
7d8432bbec | ||
|
5ce238e9b4 | ||
|
255e3d2829 | ||
|
3c4b06dff5 | ||
|
793d1d08c8 | ||
|
3c313e9e73 | ||
|
7f04c66ef1 | ||
|
8731f3bc73 | ||
|
783bc7c939 | ||
|
0762d4bbd1 | ||
|
5f661bf767 | ||
|
bf76f57716 | ||
|
c03884d20c | ||
|
5e4eae5c2e | ||
|
5037742ab0 | ||
|
312713b83c | ||
|
d46ffb4e9f | ||
|
5461427493 | ||
|
1354205db8 | ||
|
4ebbd15894 | ||
|
9515a824fd | ||
|
fcdc96748e | ||
|
16434f116c | ||
|
bf3bd28bfa | ||
|
c4863d4324 | ||
|
a9288cd759 | ||
|
dff6ea5821 | ||
|
747a3cdea2 | ||
|
ef55ad6c8d | ||
|
0fd1840523 | ||
|
fc8fc80900 | ||
|
90c7a43e8a | ||
|
2ac0173c91 | ||
|
f74ade31f4 | ||
|
680174685b | ||
|
4757d101fc | ||
|
9a5fb0bb51 | ||
|
cf412bfb2e | ||
|
38dc0d83d7 | ||
|
426c8cef39 | ||
|
bafc86326a | ||
|
d2bdcc2e2c | ||
|
dfe126a7f3 | ||
|
762582357b | ||
|
b262cb2428 | ||
|
5062bef69a | ||
|
d64307be91 | ||
|
586c6bf166 | ||
|
54ee77026f | ||
|
cb7ce1c3aa | ||
|
737759bc43 | ||
|
b558f65004 | ||
|
c6efbf6cb7 | ||
|
7769f23c76 | ||
|
c4b644ecf8 | ||
|
a275f1a2e0 | ||
|
90b2c986ee | ||
|
7f40e6cda9 | ||
|
5ecd3a5e83 | ||
|
bf75b9fab0 | ||
|
77d091bdc8 | ||
|
d62428c482 | ||
|
1557a9ac52 | ||
|
90c5ad04e7 | ||
|
28636b076b | ||
|
e7b9bffbbd | ||
|
04aa19a3f3 | ||
|
58c630473a | ||
|
e44db26492 | ||
|
ef9b079ecc | ||
|
56fa051bea | ||
|
8187519775 | ||
|
d01113150d | ||
|
e9911ab127 | ||
|
0f794ed3b4 | ||
|
c39b7af4b3 | ||
|
cc3cbfe6f2 | ||
|
5decb91cd0 | ||
|
7fc7935359 | ||
|
073e04e967 | ||
|
71628f4b1c | ||
|
ea53a9220b | ||
|
4e23b1125a | ||
|
b110b10b35 | ||
|
2b0be68b4a | ||
|
c0e4652edf | ||
|
6cb0fa0901 | ||
|
9921b74e6d | ||
|
1e6f877777 | ||
|
9bc014b183 | ||
|
ab1ec3f01c | ||
|
15f1b6b0b4 | ||
|
8503f32b36 | ||
|
e80e1d2484 | ||
|
8dfc5fe41f | ||
|
38559172bb | ||
|
24b6c649d3 | ||
|
b835d73590 | ||
|
55f53b9979 | ||
|
a618b6e6f8 | ||
|
a9d039e081 | ||
|
132419dba3 | ||
|
af73dba73e | ||
|
2509a4b962 | ||
|
87f3d20a9e | ||
|
d2325e49e7 | ||
|
bed5f9b16e | ||
|
69b9707bc5 | ||
|
de6e7d2fc3 | ||
|
a1ca8dd06a | ||
|
e5e84424f6 | ||
|
116e82de9e | ||
|
ad39a01de1 | ||
|
6c0bb0a56a | ||
|
e04e595eec | ||
|
301c9fb720 | ||
|
79618c5a1a | ||
|
b3f68801bb | ||
|
5c0513931a | ||
|
687d681764 | ||
|
c302b509fe | ||
|
3fdd1e1863 | ||
|
0491cad49a | ||
|
fe0e5f3358 | ||
|
94e7da11ec | ||
|
a887d558f1 | ||
|
5c3e303f6f | ||
|
a24fec91bd | ||
|
f4f75eac64 | ||
|
906f73cab3 | ||
|
7c6e093213 | ||
|
9ccf02a4c8 | ||
|
67b454286f | ||
|
cf1e91b853 | ||
|
aa5cc655a9 | ||
|
69b82903cd | ||
|
c79f6128bc | ||
|
37f886dba4 | ||
|
a3774039f6 | ||
|
9342df020d | ||
|
2f2f9939db | ||
|
c373647dae | ||
|
5f60ac7ad2 | ||
|
0339ed3c9c | ||
|
e4b5395ae8 | ||
|
b95fb270cb | ||
|
2988d0a136 | ||
|
95cb3e1f5a | ||
|
790d28911d | ||
|
4c94b3eff7 | ||
|
96411e5d10 | ||
|
46ba3bf1c9 | ||
|
348be05605 | ||
|
95be71e974 | ||
|
d0a4abeef5 | ||
|
0b21b2f3b4 | ||
|
d7d062b20b | ||
|
dcf088562b | ||
|
8202502a2f | ||
|
852a1a5f14 | ||
|
8263bfb829 | ||
|
daba5ae1d8 | ||
|
18054b4f34 | ||
|
c2fb6f62fb | ||
|
4c8944b174 | ||
|
721a39a9ea | ||
|
f99d1a2b61 | ||
|
41fc293043 | ||
|
3601576b3f | ||
|
5994629ccd | ||
|
6819c28bcb | ||
|
52caae3a51 | ||
|
7f5cfdfa10 | ||
|
ed486bf3c7 | ||
|
7a2ce93998 | ||
|
170a07c46b | ||
|
e93cf6d08a | ||
|
6796c6fd91 | ||
|
8ae29c0329 | ||
|
aae4d25f7b | ||
|
69ba216245 | ||
|
5c15866771 | ||
|
470b0934a6 |
18
.clang-format
Normal file
18
.clang-format
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Empirical format config, based on observed style guide
|
||||||
|
# Use this only as an help to fit the surrounding code style - don't reformat whole files at once
|
||||||
|
---
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
AllowShortIfStatementsOnASingleLine: WithoutElse
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
BreakConstructorInitializers: BeforeComma
|
||||||
|
BreakStringLiterals: false
|
||||||
|
ColumnLimit: 120
|
||||||
|
FixNamespaceComments: false
|
||||||
|
IndentPPDirectives: AfterHash
|
||||||
|
IndentWidth: 4
|
||||||
|
PointerAlignment: Left
|
||||||
|
SpaceBeforeParens: Never
|
||||||
|
SpacesInParentheses: true
|
||||||
|
TabWidth: 4
|
@ -37,7 +37,6 @@ Checks:
|
|||||||
'
|
'
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: ''
|
HeaderFilterRegex: ''
|
||||||
AnalyzeTemporaryDtors: false
|
|
||||||
FormatStyle: none
|
FormatStyle: none
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
llvm-else-after-return.WarnOnConditionVariables: 'false'
|
llvm-else-after-return.WarnOnConditionVariables: 'false'
|
||||||
|
83
.github/workflows/build.yml
vendored
Normal file
83
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
name: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm-cache
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ windows-latest, macos-15 ]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- if: startsWith(matrix.os, 'windows')
|
||||||
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
- if: startsWith(matrix.os, 'windows')
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
- if: startsWith(matrix.os, 'windows')
|
||||||
|
run: pip install meson ninja
|
||||||
|
- if: startsWith(matrix.os, 'macos')
|
||||||
|
name: Install macos dependencies
|
||||||
|
run: brew install pkg-config glfw meson
|
||||||
|
- name: Trust git repo
|
||||||
|
run: git config --global --add safe.directory '*'
|
||||||
|
- name: Profiler GUI
|
||||||
|
run: |
|
||||||
|
cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }}
|
||||||
|
cmake --build profiler/build --parallel --config Release
|
||||||
|
- name: Update utility
|
||||||
|
run: |
|
||||||
|
cmake -B update/build -S update -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build update/build --parallel --config Release
|
||||||
|
- name: Capture utility
|
||||||
|
run: |
|
||||||
|
cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build capture/build --parallel --config Release
|
||||||
|
- name: Csvexport utility
|
||||||
|
run: |
|
||||||
|
cmake -B csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build csvexport/build --parallel --config Release
|
||||||
|
- name: Import utilities
|
||||||
|
run: |
|
||||||
|
cmake -B import/build -S import -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build import/build --parallel --config Release
|
||||||
|
- if: ${{ !startsWith(matrix.os, 'windows') }}
|
||||||
|
name: Library
|
||||||
|
run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib build && meson compile -C build && meson install -C build
|
||||||
|
- if: ${{ !startsWith(matrix.os, 'windows') }}
|
||||||
|
name: Find Artifacts
|
||||||
|
id: find_artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p bin
|
||||||
|
cp profiler/build/tracy-profiler bin
|
||||||
|
cp update/build/tracy-update bin
|
||||||
|
cp capture/build/tracy-capture bin
|
||||||
|
cp csvexport/build/tracy-csvexport bin
|
||||||
|
cp import/build/tracy-import-chrome bin
|
||||||
|
cp import/build/tracy-import-fuchsia bin
|
||||||
|
- if: startsWith(matrix.os, 'windows')
|
||||||
|
name: Find Artifacts
|
||||||
|
id: find_artifacts_windows
|
||||||
|
run: |
|
||||||
|
mkdir bin
|
||||||
|
copy profiler\build\Release\tracy-profiler.exe bin
|
||||||
|
copy update\build\Release\tracy-update.exe bin
|
||||||
|
copy capture\build\Release\tracy-capture.exe bin
|
||||||
|
copy csvexport\build\Release\tracy-csvexport.exe bin
|
||||||
|
copy import\build\Release\tracy-import-chrome.exe bin
|
||||||
|
copy import\build\Release\tracy-import-fuchsia.exe bin
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}
|
||||||
|
path: bin
|
63
.github/workflows/emscripten.yml
vendored
Normal file
63
.github/workflows/emscripten.yml
vendored
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
name: emscripten
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm-cache
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux:base-devel
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed cmake git unzip python ninja zstd
|
||||||
|
- name: Setup emscripten
|
||||||
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
|
with:
|
||||||
|
version: 3.1.67
|
||||||
|
- name: Trust git repo
|
||||||
|
run: git config --global --add safe.directory '*'
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Profiler GUI
|
||||||
|
run: |
|
||||||
|
cmake -G Ninja -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=MinSizeRel -DGIT_REV=${{ github.sha }} -DCMAKE_TOOLCHAIN_FILE=${{env.EMSDK}}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
|
||||||
|
cmake --build profiler/build --parallel
|
||||||
|
- name: Compress artifacts
|
||||||
|
run: |
|
||||||
|
zstd -18 profiler/build/tracy-profiler.js profiler/build/tracy-profiler.wasm
|
||||||
|
gzip -9 profiler/build/tracy-profiler.js profiler/build/tracy-profiler.wasm
|
||||||
|
- name: Find Artifacts
|
||||||
|
id: find_artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p bin
|
||||||
|
cp profiler/build/index.html bin
|
||||||
|
cp profiler/build/favicon.svg bin
|
||||||
|
cp profiler/build/tracy-profiler.data bin
|
||||||
|
cp profiler/build/tracy-profiler.js.gz bin
|
||||||
|
cp profiler/build/tracy-profiler.js.zst bin
|
||||||
|
cp profiler/build/tracy-profiler.wasm.gz bin
|
||||||
|
cp profiler/build/tracy-profiler.wasm.zst bin
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: emscripten
|
||||||
|
path: bin
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
- uses: wlixcc/SFTP-Deploy-Action@v1.2.4
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
server: ${{ secrets.SERVER }}
|
||||||
|
port: ${{ secrets.PORT }}
|
||||||
|
ssh_private_key: ${{ secrets.PRIVATE_KEY }}
|
||||||
|
local_path: './emscripten/*'
|
||||||
|
remote_path: ${{ secrets.REMOTE_PATH }}
|
||||||
|
sftp_only: true
|
45
.github/workflows/gcc.yml
vendored
45
.github/workflows/gcc.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: gcc
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-22.04, macOS-latest]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install linux libraries
|
|
||||||
if: ${{ matrix.os == 'ubuntu-22.04' }}
|
|
||||||
run: sudo apt-get update && sudo apt-get -y install libdbus-1-dev libcapstone-dev libtbb-dev libdebuginfod-dev libxkbcommon-dev libegl-dev libwayland-dev
|
|
||||||
- name: Install macos libraries
|
|
||||||
if: ${{ matrix.os == 'macOS-latest' }}
|
|
||||||
run: brew install capstone tbb pkg-config glfw
|
|
||||||
- name: Profiler GUI
|
|
||||||
run: make -j`nproc` -C profiler/build/unix debug release
|
|
||||||
- name: Update utility
|
|
||||||
run: make -j`nproc` -C update/build/unix debug release
|
|
||||||
- name: Capture utility
|
|
||||||
run: make -j`nproc` -C capture/build/unix debug release
|
|
||||||
- name: Csvexport utility
|
|
||||||
run: make -j`nproc` -C csvexport/build/unix debug release
|
|
||||||
- name: Import-chrome utility
|
|
||||||
run: make -j`nproc` -C import-chrome/build/unix debug release
|
|
||||||
- name: Library
|
|
||||||
run: make -j`nproc` -C library/unix debug release
|
|
||||||
- name: Test application
|
|
||||||
run: |
|
|
||||||
make -j`nproc` -C test
|
|
||||||
make -j`nproc` -C test clean
|
|
||||||
make -j`nproc` -C test TRACYFLAGS=-DTRACY_ON_DEMAND
|
|
||||||
make -j`nproc` -C test clean
|
|
||||||
make -j`nproc` -C test TRACYFLAGS="-DTRACY_DELAYED_INIT -DTRACY_MANUAL_LIFETIME"
|
|
||||||
make -C test -B ../public/TracyClient.o DEFINES='-DTRACY_DEMANGLE'
|
|
7
.github/workflows/latex.yml
vendored
7
.github/workflows/latex.yml
vendored
@ -12,17 +12,16 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Fix stupidity
|
- name: Fix stupidity
|
||||||
run: |
|
run: |
|
||||||
cp AUTHORS AUTHORS.
|
|
||||||
cp LICENSE LICENSE.
|
cp LICENSE LICENSE.
|
||||||
- name: Compile LaTeX
|
- name: Compile LaTeX
|
||||||
uses: xu-cheng/latex-action@v2
|
uses: xu-cheng/latex-action@v3
|
||||||
with:
|
with:
|
||||||
working_directory: manual
|
working_directory: manual
|
||||||
root_file: tracy.tex
|
root_file: tracy.tex
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: manual
|
name: manual
|
||||||
path: manual/tracy.pdf
|
path: manual/tracy.pdf
|
||||||
|
80
.github/workflows/linux.yml
vendored
Normal file
80
.github/workflows/linux.yml
vendored
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
name: linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm-cache
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: archlinux:base-devel
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed freetype2 debuginfod wayland dbus libxkbcommon libglvnd meson cmake git wayland-protocols nodejs
|
||||||
|
- name: Trust git repo
|
||||||
|
run: git config --global --add safe.directory '*'
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Profiler GUI
|
||||||
|
run: |
|
||||||
|
cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }}
|
||||||
|
cmake --build profiler/build --parallel
|
||||||
|
- name: Update utility
|
||||||
|
run: |
|
||||||
|
cmake -B update/build -S update -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build update/build --parallel
|
||||||
|
- name: Capture utility
|
||||||
|
run: |
|
||||||
|
cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build capture/build --parallel
|
||||||
|
- name: Csvexport utility
|
||||||
|
run: |
|
||||||
|
cmake -B csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build csvexport/build --parallel
|
||||||
|
- name: Import utilities
|
||||||
|
run: |
|
||||||
|
cmake -B import/build -S import -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build import/build --parallel
|
||||||
|
- name: Library
|
||||||
|
run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib build && meson compile -C build && meson install -C build
|
||||||
|
- name: Test application
|
||||||
|
run: |
|
||||||
|
# test compilation with different flags
|
||||||
|
# we clean the build folder to reset cached variables between runs
|
||||||
|
cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build test/build --parallel
|
||||||
|
rm -rf test/build
|
||||||
|
|
||||||
|
# same with TRACY_ON_DEMAND
|
||||||
|
cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_ON_DEMAND=ON .
|
||||||
|
cmake --build test/build --parallel
|
||||||
|
rm -rf test/build
|
||||||
|
|
||||||
|
# same with TRACY_DELAYED_INIT TRACY_MANUAL_LIFETIME
|
||||||
|
cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_DELAYED_INIT=ON -DTRACY_MANUAL_LIFETIME=ON .
|
||||||
|
cmake --build test/build --parallel
|
||||||
|
rm -rf test/build
|
||||||
|
|
||||||
|
# same with TRACY_DEMANGLE
|
||||||
|
cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_DEMANGLE=ON .
|
||||||
|
cmake --build test/build --parallel
|
||||||
|
rm -rf test/build
|
||||||
|
- name: Find Artifacts
|
||||||
|
id: find_artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p bin
|
||||||
|
cp profiler/build/tracy-profiler bin
|
||||||
|
cp update/build/tracy-update bin
|
||||||
|
cp capture/build/tracy-capture bin
|
||||||
|
cp csvexport/build/tracy-csvexport bin
|
||||||
|
cp import/build/tracy-import-chrome bin
|
||||||
|
cp import/build/tracy-import-fuchsia bin
|
||||||
|
strip bin/tracy-*
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: arch-linux
|
||||||
|
path: bin
|
72
.github/workflows/msvc.yml
vendored
72
.github/workflows/msvc.yml
vendored
@ -1,72 +0,0 @@
|
|||||||
name: MSVC
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-with-vcpkg-integration:
|
|
||||||
|
|
||||||
runs-on: windows-2022
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: microsoft/setup-msbuild@v1.0.2
|
|
||||||
- name: Integrate vcpkg
|
|
||||||
run: vcpkg integrate install
|
|
||||||
- name: Profiler GUI Debug
|
|
||||||
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Profiler GUI Release
|
|
||||||
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Update utility Debug
|
|
||||||
run: msbuild .\update\build\win32\update.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Update utility Release
|
|
||||||
run: msbuild .\update\build\win32\update.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Capture utility Debug
|
|
||||||
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Capture utility Release
|
|
||||||
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Csvexport utility Debug
|
|
||||||
run: msbuild .\csvexport\build\win32\csvexport.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Csvexport utility Release
|
|
||||||
run: msbuild .\csvexport\build\win32\csvexport.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Import-chrome utility Debug
|
|
||||||
run: msbuild .\import-chrome\build\win32\import-chrome.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Import-chrome utility Release
|
|
||||||
run: msbuild .\import-chrome\build\win32\import-chrome.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Library
|
|
||||||
run: msbuild .\library\win32\TracyProfiler.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Package binaries
|
|
||||||
run: |
|
|
||||||
mkdir bin
|
|
||||||
mkdir bin\dev
|
|
||||||
copy profiler\build\win32\x64\Release\Tracy.exe bin
|
|
||||||
copy update\build\win32\x64\Release\update.exe bin
|
|
||||||
copy capture\build\win32\x64\Release\capture.exe bin
|
|
||||||
copy import-chrome\build\win32\x64\Release\import-chrome.exe bin
|
|
||||||
copy csvexport\build\win32\x64\Release\csvexport.exe bin
|
|
||||||
copy library\win32\x64\Release\TracyProfiler.dll bin\dev
|
|
||||||
copy library\win32\x64\Release\TracyProfiler.lib bin\dev
|
|
||||||
7z a Tracy.7z bin
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
path: Tracy.7z
|
|
||||||
|
|
||||||
build-without-vcpkg-integration:
|
|
||||||
|
|
||||||
runs-on: windows-2022
|
|
||||||
|
|
||||||
env:
|
|
||||||
VCPKG_ROOT: ''
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: microsoft/setup-msbuild@v1.0.2
|
|
||||||
- name: Install vcpkg dependencies
|
|
||||||
run: vcpkg/install_vcpkg_dependencies.bat
|
|
||||||
- name: Profiler GUI Release
|
|
||||||
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Capture utility Release
|
|
||||||
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
16
.gitignore
vendored
16
.gitignore
vendored
@ -1,10 +1,4 @@
|
|||||||
.vs
|
.vs
|
||||||
*.opendb
|
|
||||||
*.db
|
|
||||||
*.vcxproj.user
|
|
||||||
x64
|
|
||||||
Release
|
|
||||||
Debug
|
|
||||||
_build
|
_build
|
||||||
_compiler
|
_compiler
|
||||||
tools/*
|
tools/*
|
||||||
@ -25,21 +19,17 @@ manual/t*.synctex.gz
|
|||||||
manual/t*.toc
|
manual/t*.toc
|
||||||
manual/t*.bbl
|
manual/t*.bbl
|
||||||
manual/t*.blg
|
manual/t*.blg
|
||||||
|
manual/t*.fdb_latexmk
|
||||||
|
manual/t*.fls
|
||||||
profiler/build/win32/packages
|
profiler/build/win32/packages
|
||||||
profiler/build/win32/Tracy.aps
|
profiler/build/win32/Tracy.aps
|
||||||
# include the vcpkg install script but not the files it produces
|
|
||||||
vcpkg/*
|
|
||||||
!vcpkg/install_vcpkg_dependencies.bat
|
|
||||||
/vcpkg_installed
|
|
||||||
.deps/
|
.deps/
|
||||||
.dirstamp
|
.dirstamp
|
||||||
.vscode/
|
|
||||||
|
|
||||||
/_*/**
|
/_*/**
|
||||||
/**/__pycache__/**
|
/**/__pycache__/**
|
||||||
extra/vswhere.exe
|
extra/vswhere.exe
|
||||||
extra/tracy-build
|
extra/tracy-build
|
||||||
/.cache
|
.cache
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
profiler/build/wasm/Tracy-release.*
|
profiler/build/wasm/Tracy-release.*
|
||||||
profiler/build/wasm/Tracy-debug.*
|
profiler/build/wasm/Tracy-debug.*
|
||||||
|
2
.mailmap
Normal file
2
.mailmap
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<wolf@nereid.pl> <wolf.pld@gmail.com>
|
||||||
|
<wolf@nereid.pl> <bartosz.taudul@game-lion.com>
|
17
.vscode/c_cpp_properties.json
vendored
17
.vscode/c_cpp_properties.json
vendored
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Linux",
|
|
||||||
"includePath": [
|
|
||||||
"${workspaceFolder}/**",
|
|
||||||
"/usr/include/freetype2"
|
|
||||||
],
|
|
||||||
"defines": [],
|
|
||||||
"compilerPath": "/usr/bin/clang++",
|
|
||||||
"cStandard": "c11",
|
|
||||||
"cppStandard": "c++17",
|
|
||||||
"intelliSenseMode": "clang-x64"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"version": 4
|
|
||||||
}
|
|
7
.vscode/extensions.json
vendored
Normal file
7
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"llvm-vs-code-extensions.vscode-clangd",
|
||||||
|
"vadimcn.vscode-lldb",
|
||||||
|
"ms-vscode.cmake-tools"
|
||||||
|
]
|
||||||
|
}
|
53
.vscode/launch.json
vendored
53
.vscode/launch.json
vendored
@ -1,58 +1,13 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Launch Profiler GUI",
|
"name": "Launch",
|
||||||
"type": "lldb",
|
"type": "lldb",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"program": "${workspaceFolder}/profiler/build/unix/Tracy-debug",
|
"program": "${command:cmake.launchTargetPath}",
|
||||||
"args": [],
|
"args": [],
|
||||||
"stopAtEntry": false,
|
"cwd": "${workspaceFolder}"
|
||||||
"cwd": "${workspaceFolder}",
|
}
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false,
|
|
||||||
"preLaunchTask": "Build Profiler GUI",
|
|
||||||
"console": "internalConsole",
|
|
||||||
"internalConsoleOptions": "neverOpen"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Launch capture tool",
|
|
||||||
"type": "lldb",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/capture/build/unix/capture-debug",
|
|
||||||
"args": [],
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false,
|
|
||||||
"preLaunchTask": "Build capture tool"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Launch update tool",
|
|
||||||
"type": "lldb",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/update/build/unix/update-debug",
|
|
||||||
"args": [],
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}",
|
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false,
|
|
||||||
"preLaunchTask": "Build update tool"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Launch test application",
|
|
||||||
"type": "lldb",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/test/tracy_test",
|
|
||||||
"args": [],
|
|
||||||
"stopAtEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}/test",
|
|
||||||
"environment": [],
|
|
||||||
"externalConsole": false,
|
|
||||||
"preLaunchTask": "Build test application"
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
20
.vscode/settings.json
vendored
Normal file
20
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"cmake.configureOnOpen": true,
|
||||||
|
"cmake.sourceDirectory": [
|
||||||
|
"${workspaceFolder}/profiler",
|
||||||
|
"${workspaceFolder}/capture",
|
||||||
|
"${workspaceFolder}/csvexport",
|
||||||
|
"${workspaceFolder}/import",
|
||||||
|
"${workspaceFolder}/update",
|
||||||
|
"${workspaceFolder}/test",
|
||||||
|
"${workspaceFolder}",
|
||||||
|
],
|
||||||
|
"cmake.buildDirectory": "${sourceDirectory}/build",
|
||||||
|
"cmake.autoSelectActiveFolder": false,
|
||||||
|
"cmake.options.advanced": {
|
||||||
|
"folder": { "statusBarVisibility": "visible" },
|
||||||
|
"variant": { "statusBarVisibility": "compact" }
|
||||||
|
},
|
||||||
|
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json",
|
||||||
|
"lldb.launch.initCommands": ["command script import ${workspaceRoot}/extra/natvis.py"],
|
||||||
|
}
|
88
.vscode/tasks.json
vendored
88
.vscode/tasks.json
vendored
@ -1,88 +0,0 @@
|
|||||||
{
|
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
||||||
// for the documentation about the tasks.json format
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "Build Profiler GUI",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make debug -C profiler/build/unix -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"close": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build capture tool",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make debug -C capture/build/unix -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"close": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build csvexport tool",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make debug -C csvexport/build/unix -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"close": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build import-chrome tool",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make debug -C import-chrome/build/unix -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build update tool",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make debug -C update/build/unix -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"close": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build client library",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make debug -C library/unix -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"close": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build test application",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "CC=clang CXX=clang++ make OPTFLAGS=-DTRACY_VERBOSE\\ -fno-omit-frame-pointer\\ -march=native\\ -g -C test -j `nproc`",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"close": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
20
AUTHORS
20
AUTHORS
@ -1,20 +0,0 @@
|
|||||||
Bartosz Taudul <wolf@nereid.pl>
|
|
||||||
Kamil Klimek <kamil.klimek@sharkbits.com> (initial find zone implementation)
|
|
||||||
Bartosz Szreder <zgredder@gmail.com> (view/worker split)
|
|
||||||
Arvid Gerstmann <dev@arvid-g.de> (compatibility fixes)
|
|
||||||
Rokas Kupstys <rokups@zoho.com> (compatibility fixes, initial CI work, MingW support)
|
|
||||||
Till Rathmann <till.rathmann@gmx.de> (DLL support)
|
|
||||||
Sherief Farouk <sherief.personal@gmail.com> (compatibility fixes)
|
|
||||||
Dedmen Miller <dedmen@dedmen.de> (find zone bug fixes, improvements)
|
|
||||||
Michał Cichoń <michcic@gmail.com> (OSX call stack decoding backport)
|
|
||||||
Thales Sabino <thales@codeplay.com> (OpenCL support)
|
|
||||||
Andrew Depke <andrewdepke@gmail.com> (Direct3D 12 support)
|
|
||||||
Simonas Kazlauskas <git@kazlauskas.me> (OSX CI, external bindings)
|
|
||||||
Jakub Žádník <kubouch@gmail.com> (csvexport utility)
|
|
||||||
Andrey Voroshilov <andrew.voroshilov@gmail.com> (multi-DLL fixes)
|
|
||||||
Benoit Jacob <benoitjacob@google.com> (Android improvements)
|
|
||||||
David Farrel <dafarrel@adobe.com> (Direct3D 11 support)
|
|
||||||
Terence Rokop <rokopt@sharpears.net> (Non-reentrant zones)
|
|
||||||
Lukas Berbuer <lukas.berbuer@gmail.com> (CMake integration)
|
|
||||||
Xavier Bouchoux <xavierb@gmail.com> (sample data in find zone)
|
|
||||||
Balazs Kovacsics <kovab93@gmail.com> (Universal Windows Platform)
|
|
137
CMakeLists.txt
137
CMakeLists.txt
@ -1,15 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
# Run version helper script
|
# Run version helper script
|
||||||
include(version.cmake)
|
include(cmake/version.cmake)
|
||||||
|
|
||||||
set(TRACY_VERSION_MAJOR ${major})
|
|
||||||
set(TRACY_VERSION_MINOR ${minor})
|
|
||||||
set(TRACY_VERSION_PATCH ${patch})
|
|
||||||
set(TRACY_VERSION_STRING "${TRACY_VERSION_MAJOR}.${TRACY_VERSION_MINOR}.${TRACY_VERSION_PATCH}")
|
|
||||||
|
|
||||||
project(Tracy LANGUAGES CXX VERSION ${TRACY_VERSION_STRING})
|
project(Tracy LANGUAGES CXX VERSION ${TRACY_VERSION_STRING})
|
||||||
|
|
||||||
|
file(GENERATE OUTPUT .gitignore CONTENT "*")
|
||||||
|
|
||||||
if(${BUILD_SHARED_LIBS})
|
if(${BUILD_SHARED_LIBS})
|
||||||
set(DEFAULT_STATIC OFF)
|
set(DEFAULT_STATIC OFF)
|
||||||
else()
|
else()
|
||||||
@ -17,12 +14,31 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(TRACY_STATIC "Whether to build Tracy as a static library" ${DEFAULT_STATIC})
|
option(TRACY_STATIC "Whether to build Tracy as a static library" ${DEFAULT_STATIC})
|
||||||
|
option(TRACY_Fortran "Build Fortran bindings" OFF)
|
||||||
|
option(TRACY_LTO "Enable Link-Time optimization" OFF)
|
||||||
|
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
enable_language(Fortran)
|
||||||
|
set(CMAKE_Fortran_VERSION 2003)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TRACY_LTO OR CMAKE_INTERPROCEDURAL_OPTIMIZATION)
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported(RESULT LTO_SUPPORTED)
|
||||||
|
if(NOT LTO_SUPPORTED)
|
||||||
|
message(WARNING "LTO is not supported!")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(LTO_SUPPORTED OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
set(TRACY_PUBLIC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/public)
|
set(TRACY_PUBLIC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/public)
|
||||||
|
|
||||||
if(TRACY_STATIC)
|
if(LTO_SUPPORTED)
|
||||||
|
set(TRACY_VISIBILITY "OBJECT")
|
||||||
|
elseif(TRACY_STATIC)
|
||||||
set(TRACY_VISIBILITY "STATIC")
|
set(TRACY_VISIBILITY "STATIC")
|
||||||
else()
|
else()
|
||||||
set(TRACY_VISIBILITY "SHARED")
|
set(TRACY_VISIBILITY "SHARED")
|
||||||
@ -30,6 +46,7 @@ endif()
|
|||||||
|
|
||||||
add_library(TracyClient ${TRACY_VISIBILITY} "${TRACY_PUBLIC_DIR}/TracyClient.cpp")
|
add_library(TracyClient ${TRACY_VISIBILITY} "${TRACY_PUBLIC_DIR}/TracyClient.cpp")
|
||||||
target_compile_features(TracyClient PUBLIC cxx_std_11)
|
target_compile_features(TracyClient PUBLIC cxx_std_11)
|
||||||
|
set_target_properties(TracyClient PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${LTO_SUPPORTED})
|
||||||
target_include_directories(TracyClient SYSTEM PUBLIC
|
target_include_directories(TracyClient SYSTEM PUBLIC
|
||||||
$<BUILD_INTERFACE:${TRACY_PUBLIC_DIR}>
|
$<BUILD_INTERFACE:${TRACY_PUBLIC_DIR}>
|
||||||
$<INSTALL_INTERFACE:include>)
|
$<INSTALL_INTERFACE:include>)
|
||||||
@ -40,8 +57,22 @@ target_link_libraries(
|
|||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
add_library(TracyClientF90 ${TRACY_VISIBILITY} "${TRACY_PUBLIC_DIR}/TracyClient.F90")
|
||||||
|
target_include_directories(TracyClientF90 PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
|
||||||
|
$<INSTALL_INTERFACE:include>)
|
||||||
|
target_link_libraries(
|
||||||
|
TracyClientF90
|
||||||
|
PUBLIC
|
||||||
|
TracyClient
|
||||||
|
)
|
||||||
|
set_target_properties(TracyClientF90 PROPERTIES Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
|
INTERPROCEDURAL_OPTIMIZATION ${LTO_SUPPORTED})
|
||||||
|
endif()
|
||||||
|
|
||||||
# Public dependency on some libraries required when using Mingw
|
# Public dependency on some libraries required when using Mingw
|
||||||
if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
|
if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
|
||||||
target_link_libraries(TracyClient PUBLIC ws2_32 dbghelp)
|
target_link_libraries(TracyClient PUBLIC ws2_32 dbghelp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -50,7 +81,24 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|||||||
target_link_libraries(TracyClient PUBLIC ${EXECINFO_LIBRARY})
|
target_link_libraries(TracyClient PUBLIC ${EXECINFO_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(TRACY_LIBUNWIND_BACKTRACE)
|
||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(unwind REQUIRED libunwind)
|
||||||
|
target_include_directories(TracyClient INTERFACE ${unwind_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyClient INTERFACE ${unwind_LINK_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(TRACY_DEBUGINFOD)
|
||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(debuginfod REQUIRED libdebuginfod)
|
||||||
|
target_include_directories(TracyClient INTERFACE ${debuginfod_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyClient INTERFACE ${debuginfod_LINK_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(Tracy::TracyClient ALIAS TracyClient)
|
add_library(Tracy::TracyClient ALIAS TracyClient)
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
add_library(Tracy::TracyClient_Fortran ALIAS TracyClientF90)
|
||||||
|
endif()
|
||||||
|
|
||||||
macro(set_option option help value)
|
macro(set_option option help value)
|
||||||
option(${option} ${help} ${value})
|
option(${option} ${help} ${value})
|
||||||
@ -64,7 +112,7 @@ endmacro()
|
|||||||
|
|
||||||
set_option(TRACY_ENABLE "Enable profiling" ON)
|
set_option(TRACY_ENABLE "Enable profiling" ON)
|
||||||
set_option(TRACY_ON_DEMAND "On-demand profiling" OFF)
|
set_option(TRACY_ON_DEMAND "On-demand profiling" OFF)
|
||||||
set_option(TRACY_CALLSTACK "Enfore callstack collection for tracy regions" OFF)
|
set_option(TRACY_CALLSTACK "Enforce callstack collection for tracy regions" OFF)
|
||||||
set_option(TRACY_NO_CALLSTACK "Disable all callstack related functionality" OFF)
|
set_option(TRACY_NO_CALLSTACK "Disable all callstack related functionality" OFF)
|
||||||
set_option(TRACY_NO_CALLSTACK_INLINES "Disables the inline functions in callstacks" OFF)
|
set_option(TRACY_NO_CALLSTACK_INLINES "Disables the inline functions in callstacks" OFF)
|
||||||
set_option(TRACY_ONLY_LOCALHOST "Only listen on the localhost interface" OFF)
|
set_option(TRACY_ONLY_LOCALHOST "Only listen on the localhost interface" OFF)
|
||||||
@ -84,6 +132,21 @@ set_option(TRACY_MANUAL_LIFETIME "Enable the manual lifetime management of the p
|
|||||||
set_option(TRACY_FIBERS "Enable fibers support" OFF)
|
set_option(TRACY_FIBERS "Enable fibers support" OFF)
|
||||||
set_option(TRACY_NO_CRASH_HANDLER "Disable crash handling" OFF)
|
set_option(TRACY_NO_CRASH_HANDLER "Disable crash handling" OFF)
|
||||||
set_option(TRACY_TIMER_FALLBACK "Use lower resolution timers" OFF)
|
set_option(TRACY_TIMER_FALLBACK "Use lower resolution timers" OFF)
|
||||||
|
set_option(TRACY_LIBUNWIND_BACKTRACE "Use libunwind backtracing where supported" OFF)
|
||||||
|
set_option(TRACY_SYMBOL_OFFLINE_RESOLVE "Instead of full runtime symbol resolution, only resolve the image path and offset to enable offline symbol resolution" OFF)
|
||||||
|
set_option(TRACY_LIBBACKTRACE_ELF_DYNLOAD_SUPPORT "Enable libbacktrace to support dynamically loaded elfs in symbol resolution resolution after the first symbol resolve operation" OFF)
|
||||||
|
set_option(TRACY_DEBUGINFOD "Enable debuginfod support" OFF)
|
||||||
|
|
||||||
|
# advanced
|
||||||
|
set_option(TRACY_VERBOSE "[advanced] Verbose output from the profiler" OFF)
|
||||||
|
mark_as_advanced(TRACY_VERBOSE)
|
||||||
|
set_option(TRACY_DEMANGLE "[advanced] Don't use default demangling function - You'll need to provide your own" OFF)
|
||||||
|
mark_as_advanced(TRACY_DEMANGLE)
|
||||||
|
|
||||||
|
# handle incompatible combinations
|
||||||
|
if(TRACY_MANUAL_LIFETIME AND NOT TRACY_DELAYED_INIT)
|
||||||
|
message(FATAL_ERROR "TRACY_MANUAL_LIFETIME can not be activated with disabled TRACY_DELAYED_INIT")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT TRACY_STATIC)
|
if(NOT TRACY_STATIC)
|
||||||
target_compile_definitions(TracyClient PRIVATE TRACY_EXPORTS)
|
target_compile_definitions(TracyClient PRIVATE TRACY_EXPORTS)
|
||||||
@ -94,6 +157,9 @@ include(CMakePackageConfigHelpers)
|
|||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
set_target_properties(TracyClient PROPERTIES VERSION ${PROJECT_VERSION})
|
set_target_properties(TracyClient PROPERTIES VERSION ${PROJECT_VERSION})
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
set_target_properties(TracyClientF90 PROPERTIES VERSION ${PROJECT_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(tracy_includes
|
set(tracy_includes
|
||||||
${TRACY_PUBLIC_DIR}/tracy/TracyC.h
|
${TRACY_PUBLIC_DIR}/tracy/TracyC.h
|
||||||
@ -109,6 +175,7 @@ set(client_includes
|
|||||||
${TRACY_PUBLIC_DIR}/client/tracy_concurrentqueue.h
|
${TRACY_PUBLIC_DIR}/client/tracy_concurrentqueue.h
|
||||||
${TRACY_PUBLIC_DIR}/client/tracy_rpmalloc.hpp
|
${TRACY_PUBLIC_DIR}/client/tracy_rpmalloc.hpp
|
||||||
${TRACY_PUBLIC_DIR}/client/tracy_SPSCQueue.h
|
${TRACY_PUBLIC_DIR}/client/tracy_SPSCQueue.h
|
||||||
|
${TRACY_PUBLIC_DIR}/client/TracyKCore.hpp
|
||||||
${TRACY_PUBLIC_DIR}/client/TracyArmCpuTable.hpp
|
${TRACY_PUBLIC_DIR}/client/TracyArmCpuTable.hpp
|
||||||
${TRACY_PUBLIC_DIR}/client/TracyCallstack.h
|
${TRACY_PUBLIC_DIR}/client/TracyCallstack.h
|
||||||
${TRACY_PUBLIC_DIR}/client/TracyCallstack.hpp
|
${TRACY_PUBLIC_DIR}/client/TracyCallstack.hpp
|
||||||
@ -147,20 +214,58 @@ install(TARGETS TracyClient
|
|||||||
EXPORT TracyConfig
|
EXPORT TracyConfig
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
COMPONENT lib)
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
install(TARGETS TracyClientF90
|
||||||
|
EXPORT TracyConfig
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
COMPONENT lib)
|
||||||
|
endif()
|
||||||
|
# Export targets to build tree root
|
||||||
|
export(TARGETS TracyClient
|
||||||
|
NAMESPACE Tracy::
|
||||||
|
FILE ${CMAKE_BINARY_DIR}/TracyTargets.cmake)
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
export(TARGETS TracyClientF90
|
||||||
|
NAMESPACE Tracy::
|
||||||
|
APPEND
|
||||||
|
FILE ${CMAKE_BINARY_DIR}/TracyTargets.cmake)
|
||||||
|
endif()
|
||||||
install(FILES ${tracy_includes}
|
install(FILES ${tracy_includes}
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tracy)
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tracy/tracy)
|
||||||
install(FILES ${client_includes}
|
install(FILES ${client_includes}
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/client)
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tracy/client)
|
||||||
install(FILES ${common_includes}
|
install(FILES ${common_includes}
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/common)
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tracy/common)
|
||||||
|
if(TRACY_Fortran)
|
||||||
|
if(${CMAKE_Fortran_COMPILER_ID} MATCHES "Cray")
|
||||||
|
install(FILES ${PROJECT_BINARY_DIR}/TRACY.mod
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tracy)
|
||||||
|
else()
|
||||||
|
install(FILES ${PROJECT_BINARY_DIR}/tracy.mod
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/tracy)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
install(EXPORT TracyConfig
|
install(EXPORT TracyConfig
|
||||||
NAMESPACE Tracy::
|
NAMESPACE Tracy::
|
||||||
FILE TracyTargets.cmake
|
FILE TracyTargets.cmake
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake"
|
||||||
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||||
|
|
||||||
|
option(TRACY_CLIENT_PYTHON "Whether to build Tracy python client library" OFF)
|
||||||
|
|
||||||
|
if(TRACY_CLIENT_PYTHON)
|
||||||
|
if(TRACY_STATIC)
|
||||||
|
message(FATAL_ERROR "Python-bindings require a shared client library")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(python)
|
||||||
|
endif()
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,7 +1,7 @@
|
|||||||
Tracy Profiler (https://github.com/wolfpld/tracy) is licensed under the
|
Tracy Profiler (https://github.com/wolfpld/tracy) is licensed under the
|
||||||
3-clause BSD license.
|
3-clause BSD license.
|
||||||
|
|
||||||
Copyright (c) 2017-2023, Bartosz Taudul <wolf@nereid.pl>
|
Copyright (c) 2017-2025, Bartosz Taudul <wolf@nereid.pl>
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
193
NEWS
193
NEWS
@ -2,6 +2,199 @@ Note: There is no guarantee that version mismatched client and server will
|
|||||||
be able to talk with each other. Network protocol breakages won't be listed
|
be able to talk with each other. Network protocol breakages won't be listed
|
||||||
here.
|
here.
|
||||||
|
|
||||||
|
vx.xx.x (xxxx-xx-xx)
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
- Enabled workaround for MSVC runtime library SNAFU, which manifested with
|
||||||
|
the profiler executables crashing at startup inside mutex code.
|
||||||
|
- CPU topology data now includes CPU die information.
|
||||||
|
- Clients running under Wine will now report that in the trace info.
|
||||||
|
- Added flame graph.
|
||||||
|
- The Git ref information for the build is now included in the about dialog.
|
||||||
|
- Added support for clipboard copy and paste on Wayland.
|
||||||
|
- The welcome dialog client address entry field will now trim the entered
|
||||||
|
address, so that stray spaces at the start and the end are removed. This
|
||||||
|
should reduce the amount of user precision required when copy pasting the
|
||||||
|
address from somewhere else.
|
||||||
|
- Metal GPU profiling is now available.
|
||||||
|
- Profiling zones can now optionally inherit their parent color.
|
||||||
|
- It is no longer needed to have up-to-date copy of wayland-protocols
|
||||||
|
installed. CMake will download the required version from GitHub.
|
||||||
|
- Added option to show the top inline in symbol statistics list in stead of
|
||||||
|
the symbol name.
|
||||||
|
- Parallel sorting is now performed with PPQSort (which removes potential
|
||||||
|
dependency on TBB).
|
||||||
|
- Added CMake option TRACY_DEBUGINFOD to enable use of libdebuginfod to
|
||||||
|
retrieve symbols on Linux clients.
|
||||||
|
- Added a "custom" label as an option to select for GPU context type.
|
||||||
|
- Symbol code retrieval is now protected against reading no longer available
|
||||||
|
memory.
|
||||||
|
- Clicking on a symbol in the symbol statistics list will now open a popup
|
||||||
|
with two options. This change intends to make the useful but quite hidden
|
||||||
|
disassembly view more discoverable.
|
||||||
|
- "View symbol" shows the symbol code disassembly. It was previously
|
||||||
|
available by right-click on the source file name.
|
||||||
|
- "Sample entry stacks" shows the list window that was previously
|
||||||
|
opened when the symbol entry was clicked.
|
||||||
|
- Plots are now extended to the end of the trace, instead of ending at the
|
||||||
|
last data point.
|
||||||
|
- Added TracyMemoryDiscard macros to mark that all allocations made in a
|
||||||
|
certain memory pool were freed. This enables better support for arena
|
||||||
|
allocators.
|
||||||
|
- It is now possible to fine-tune horizontal and vertical mouse wheel scroll
|
||||||
|
sensitivity.
|
||||||
|
- Added p75 and p90 percentiles in the Find zone window.
|
||||||
|
- Zone info window will now display (approximate) wall-clock time of when
|
||||||
|
the zone appeared, in addition to the previously displayed time from the
|
||||||
|
start of the program.
|
||||||
|
- Zone values passed via ZoneValue macro will be now also displayed in hex.
|
||||||
|
- The csvexport utility can now export plots.
|
||||||
|
- Fortran integration is now available.
|
||||||
|
|
||||||
|
|
||||||
|
v0.11.1 (2024-08-22)
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
- Utilities import-chrome and import-fuchsia now live together in the import
|
||||||
|
directory.
|
||||||
|
- Added TRACY_VERBOSE to available CMake options.
|
||||||
|
- It is now possible to set TRACY_SAMPLING_HZ via a environment variable.
|
||||||
|
- Thread group hints can be now used to group threads together in the
|
||||||
|
profiler UI.
|
||||||
|
- Limit Lua file names to 255 characters, as the source string can contain
|
||||||
|
the whole script, if loaded with loadstring().
|
||||||
|
|
||||||
|
|
||||||
|
v0.11.0 (2024-07-16)
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
- Support for pre-0.9 traces has been dropped.
|
||||||
|
- The old server-side build system has been replaced by CMake. The client
|
||||||
|
integration is not affected. Refer to the manual for details.
|
||||||
|
- Most importantly, a known version of the capstone library is now
|
||||||
|
downloaded from GitHub. You will need to have git installed for this
|
||||||
|
to work (there is a CMake option to use the capstone installed on the
|
||||||
|
system, as was done previously).
|
||||||
|
- Various Meson fixes.
|
||||||
|
- Proper way of loading Vulkan calibrated timestamps extension.
|
||||||
|
- Fixed C API support for GPU tracing when on demand mode is enabled.
|
||||||
|
- Added a way to resynchronize CPU and GPU timestamps.
|
||||||
|
- Using calibrated contexts should always be preferred.
|
||||||
|
- Each synchronization event requires a sync of CPU and GPU, which is
|
||||||
|
something you always want to avoid.
|
||||||
|
- This is not exposed as an easy-to-use API available through the GPU
|
||||||
|
wrappers.
|
||||||
|
- Added TracyIsStarted macro to check if the profiler has been started.
|
||||||
|
Using this functionality only makes sense in the manual lifetime mode,
|
||||||
|
and will always return true in any other mode of operation.
|
||||||
|
- Added basic QNX support.
|
||||||
|
- Zmmword is now recognized as an assemble size directive.
|
||||||
|
- Libunwind can be used for call stack capture on Linux if you build with
|
||||||
|
the TRACY_LIBUNWIND_BACKTRACE define.
|
||||||
|
- Preloading symbols for all modules on Windows, which is always performed
|
||||||
|
on program init, and which can be quite slow, may now be omitted through
|
||||||
|
the TRACY_NO_DBGHELP_INIT_LOAD define. In this mode, symbols will be
|
||||||
|
loaded as needed.
|
||||||
|
- Validation of discontinuous frames has been disabled in on-demand mode.
|
||||||
|
It's quite likely to connect in the middle of a discontinuous frame,
|
||||||
|
which resulted in frame end event for a frame that hasn't been started.
|
||||||
|
- Symbols can be now resolved offline on Windows and Linux.
|
||||||
|
- Enabled with the TRACY_SYMBOL_OFFLINE_RESOLVE define or env variable.
|
||||||
|
- The update utility has two additional options:
|
||||||
|
- -r, which enables resolving symbol and patching stack frames in the
|
||||||
|
trace.
|
||||||
|
- -p, which you can use to modify the paths used for symbol resolution.
|
||||||
|
- Some functionality will be missing if this mode is used. For example,
|
||||||
|
symbol statistics are unavailable.
|
||||||
|
- Resolving symbol names on Linux will now use image cache to reduce the
|
||||||
|
number of dladdr() calls.
|
||||||
|
- Compiling with the TRACY_LIBBACKTRACE_ELF_DYNLOAD_SUPPORT define will
|
||||||
|
enable support for run-time updating of known elf ranges in libbacktrace
|
||||||
|
on Linux. Previously, shared objects dlopened() after libbacktrace init
|
||||||
|
would not be visible during symbol resolution.
|
||||||
|
- Zone group count in the Find zone window is now explicitly displayed.
|
||||||
|
- Instrumentation statistics now display in how many threads each source
|
||||||
|
location has appeared in.
|
||||||
|
- Added import tool for fuchsia traces.
|
||||||
|
- https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format
|
||||||
|
- Added checks for overflow of source locations.
|
||||||
|
- As a reminder, Tracy only allows to have 64K unique source locations,
|
||||||
|
split in half between static and dynamic locations.
|
||||||
|
- Runtime checks are active during capture and will stop a trace that
|
||||||
|
goes beyond the limit.
|
||||||
|
- Load-time checks will stop any broken trace file from loading.
|
||||||
|
- Opening the source code view that has no associated address in code
|
||||||
|
(i.e., from the list of instrumented zones, or from the find zone
|
||||||
|
window) will now search the list of symbols for a function name match.
|
||||||
|
- In many cases this will result in displaying the full disassembly view
|
||||||
|
where previously you would only see the source code.
|
||||||
|
- Matching is performed by string comparisons, which in rare cases may
|
||||||
|
result in showing false data.
|
||||||
|
- Press ctrl key while opening source view to keep the old behavior.
|
||||||
|
- If more than one matching symbol is found (e.g., if two classes have
|
||||||
|
methods with the same name, or if a template is instantiated in multiple
|
||||||
|
places in code), it is not possible to tell which of the code locations
|
||||||
|
the source location corresponds to and only the source code will be
|
||||||
|
displayed.
|
||||||
|
- Added TracyNoop macro, which inserts a reference to Tracy's object file
|
||||||
|
into your application. Use it if you want to use Tracy in sampling mode,
|
||||||
|
without any manual instrumentation (so no references of your own exist)
|
||||||
|
and link Tracy as a static library. Linkers will only include library code
|
||||||
|
if code references it, and this doesn't work as intended with Tracy, as it
|
||||||
|
ignores global constructors that have side effects.
|
||||||
|
- ZoneText and ZoneName macros now have a printf-like variant, denoted with
|
||||||
|
a 'F' postfix.
|
||||||
|
- The 'tracy_shared_libs' Meson option was removed. Use interface provided
|
||||||
|
by Meson to set the library type instead.
|
||||||
|
- Dropped the 'tracy_' prefix from Meson options. The `tracy_enable` option
|
||||||
|
remains as it was, as it can be inherited from parent projects.
|
||||||
|
- Fixed display of active / inactive allocations in memory call tree.
|
||||||
|
- Instrumentation statistics can be now sorted by source location.
|
||||||
|
- Added option to hide external code frames in call stack view.
|
||||||
|
- There's now a copy to clipboard button in the statistics view. It copies
|
||||||
|
the visible rows of either the instrumentation or GPU statistics view to
|
||||||
|
a CSV string matching a subset of the csvexport format.
|
||||||
|
- Source file contents can be copied to the clipboard.
|
||||||
|
- Added key binding for immediate reconnect: Ctrl+Shift+Alt+R.
|
||||||
|
- Lock markup is now available through the C API.
|
||||||
|
- Symbol statistics window now allows aggregation of inlined functions in
|
||||||
|
symbols.
|
||||||
|
- Cost measurements of inlined functions in the symbol statistics window
|
||||||
|
can be now relative to the base symbol instead of total program run time.
|
||||||
|
- ScopedZone and AllocSourceLocation now accept color parameter. Impact on
|
||||||
|
existing code should be minimal.
|
||||||
|
- AllocSourceLocation has a new parameter with a default value.
|
||||||
|
- __tracy_alloc_srcloc and __tracy_alloc_srcloc_name break the existing
|
||||||
|
API. This can be easily fixed by setting the last parameter to zero.
|
||||||
|
- To build the profiler GUI with Wayland you now need wayland-scanner and
|
||||||
|
wayland-protocols to be installed. A reasonably recent release of the
|
||||||
|
protocols is required, which, as always, is not available on Ubuntu.
|
||||||
|
Seriously, stop trying to build modern software with that broken distro.
|
||||||
|
- Fractional DPI scaling is now properly supported on Wayland.
|
||||||
|
- Added Python bindings.
|
||||||
|
- The per-line sampling statistics are now also displayed as a percentage
|
||||||
|
of total program run time.
|
||||||
|
- The out-of-focus render frame rate reduction can be now disabled in
|
||||||
|
global settings.
|
||||||
|
- It is now possible to load source files that are newer than the trace.
|
||||||
|
The default setting is still to reject such files.
|
||||||
|
- Memory limit for a capture can be now set, both in the GUI profiler and
|
||||||
|
in the capture utility.
|
||||||
|
- Thread list can be now sorted alphabetically.
|
||||||
|
- It is now possible to adjust plot height.
|
||||||
|
- Trace comparison statistics were expanded and made more clear.
|
||||||
|
- Implemented retrieval of kernel symbol code on Linux.
|
||||||
|
- Added support for multiple compression streams in trace files. This
|
||||||
|
effectively parallelizes both load and save operations.
|
||||||
|
- The default save setup is now set to Zstd level 3 with 4 compression
|
||||||
|
streams. This gives both faster compression time and smaller file size.
|
||||||
|
- New users will be now eased into the profiler with a set of tutorial
|
||||||
|
achievements.
|
||||||
|
- You can now set the timeline options default values in global settings.
|
||||||
|
- Added a check for program memory being available before symbol retrieval
|
||||||
|
on Windows.
|
||||||
|
|
||||||
|
|
||||||
v0.10.0 (2023-10-16)
|
v0.10.0 (2023-10-16)
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
### A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.
|
### A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.
|
||||||
|
|
||||||
Tracy supports profiling CPU (Direct support is provided for C, C++, and Lua integration. At the same time, third-party bindings to many other languages exist on the internet, such as [Rust](https://github.com/nagisa/rust_tracy_client), [Zig](https://github.com/nektro/zig-tracy), [C#](https://github.com/clibequilibrium/Tracy-CSharp), [OCaml](https://github.com/imandra-ai/ocaml-tracy), [Odin](https://github.com/oskarnp/odin-tracy), etc.), GPU (All major graphic APIs: OpenGL, Vulkan, Direct3D 11/12, OpenCL.), memory allocations, locks, context switches, automatically attribute screenshots to captured frames, and much more.
|
Tracy supports profiling CPU (Direct support is provided for C, C++, Lua, Python and Fortran integration. At the same time, third-party bindings to many other languages exist on the internet, such as [Rust](https://github.com/nagisa/rust_tracy_client), [Zig](https://github.com/tealsnow/zig-tracy), [C#](https://github.com/clibequilibrium/Tracy-CSharp), [OCaml](https://github.com/imandra-ai/ocaml-tracy), [Odin](https://github.com/oskarnp/odin-tracy), etc.), GPU (All major graphic APIs: OpenGL, Vulkan, Direct3D 11/12, Metal, OpenCL.), memory allocations, locks, context switches, automatically attribute screenshots to captured frames, and much more.
|
||||||
|
|
||||||
- [Documentation](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf) for usage and build process instructions
|
- [Documentation](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf) for usage and build process instructions
|
||||||
- [Releases](https://github.com/wolfpld/tracy/releases) containing the documentation (`tracy.pdf`) and compiled Windows x64 binaries (`Tracy-<version>.7z`) as assets
|
- [Releases](https://github.com/wolfpld/tracy/releases) containing the documentation (`tracy.pdf`) and compiled Windows x64 binaries (`Tracy-<version>.7z`) as assets
|
||||||
@ -17,6 +17,8 @@ Tracy supports profiling CPU (Direct support is provided for C, C++, and Lua int
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
[An Introduction to Tracy Profiler in C++ - Marcos Slomp - CppCon 2023](https://youtu.be/ghXk3Bk5F2U?t=37)
|
||||||
|
|
||||||
[Introduction to Tracy Profiler v0.2](https://www.youtube.com/watch?v=fB5B46lbapc)
|
[Introduction to Tracy Profiler v0.2](https://www.youtube.com/watch?v=fB5B46lbapc)
|
||||||
[New features in Tracy Profiler v0.3](https://www.youtube.com/watch?v=3SXpDpDh2Uo)
|
[New features in Tracy Profiler v0.3](https://www.youtube.com/watch?v=3SXpDpDh2Uo)
|
||||||
[New features in Tracy Profiler v0.4](https://www.youtube.com/watch?v=eAkgkaO8B9o)
|
[New features in Tracy Profiler v0.4](https://www.youtube.com/watch?v=eAkgkaO8B9o)
|
||||||
|
28
capture/CMakeLists.txt
Normal file
28
capture/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
option(NO_ISA_EXTENSIONS "Disable ISA extensions (don't pass -march=native or -mcpu=native to the compiler)" OFF)
|
||||||
|
option(NO_STATISTICS "Disable calculation of statistics" ON)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
project(
|
||||||
|
tracy-capture
|
||||||
|
LANGUAGES C CXX
|
||||||
|
VERSION ${TRACY_VERSION_STRING}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/config.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(PROGRAM_FILES
|
||||||
|
src/capture.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${PROGRAM_FILES} ${COMMON_FILES} ${SERVER_FILES})
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE TracyServer TracyGetOpt)
|
||||||
|
set_property(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
|
||||||
|
|
||||||
|
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
@ -1,16 +0,0 @@
|
|||||||
all: release
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@$(MAKE) -f debug.mk all
|
|
||||||
|
|
||||||
release:
|
|
||||||
@$(MAKE) -f release.mk all
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@$(MAKE) -f build.mk clean
|
|
||||||
|
|
||||||
db: clean
|
|
||||||
@bear -- $(MAKE) -f debug.mk all
|
|
||||||
@mv -f compile_commands.json ../../../
|
|
||||||
|
|
||||||
.PHONY: all clean debug release db
|
|
@ -1,12 +0,0 @@
|
|||||||
CFLAGS +=
|
|
||||||
CXXFLAGS := $(CFLAGS) -std=gnu++17
|
|
||||||
DEFINES += -DTRACY_NO_STATISTICS
|
|
||||||
INCLUDES := $(shell pkg-config --cflags capstone)
|
|
||||||
LIBS += $(shell pkg-config --libs capstone) -lpthread
|
|
||||||
PROJECT := capture
|
|
||||||
IMAGE := $(PROJECT)-$(BUILD)
|
|
||||||
|
|
||||||
FILTER := ../../../getopt/getopt.c
|
|
||||||
include ../../../common/src-from-vcxproj.mk
|
|
||||||
|
|
||||||
include ../../../common/unix.mk
|
|
@ -1,6 +0,0 @@
|
|||||||
CFLAGS := -g3 -Wall
|
|
||||||
DEFINES := -DDEBUG
|
|
||||||
BUILD := debug
|
|
||||||
|
|
||||||
include ../../../common/unix-debug.mk
|
|
||||||
include build.mk
|
|
@ -1,9 +0,0 @@
|
|||||||
CFLAGS := -O3
|
|
||||||
ifndef TRACY_NO_LTO
|
|
||||||
CFLAGS += -flto
|
|
||||||
endif
|
|
||||||
DEFINES := -DNDEBUG
|
|
||||||
BUILD := release
|
|
||||||
|
|
||||||
include ../../../common/unix-release.mk
|
|
||||||
include build.mk
|
|
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.30907.101
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "capture", "capture.vcxproj", "{447D58BF-94CD-4469-BB90-549C05D03E00}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {3E51386C-43EA-44AC-9F24-AFAFE4D63ADE}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,210 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{447D58BF-94CD-4469-BB90-549C05D03E00}</ProjectGuid>
|
|
||||||
<RootNamespace>capture</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
<VcpkgTriplet>x64-windows-static</VcpkgTriplet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<PropertyGroup Label="Vcpkg">
|
|
||||||
<VcpkgEnableManifest>true</VcpkgEnableManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
||||||
<PreprocessorDefinitions>TRACY_NO_STATISTICS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
|
||||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include;$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include\capstone;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\include\capstone;$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\capstone</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>ws2_32.lib;capstone.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\debug\lib</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
||||||
<PreprocessorDefinitions>TRACY_NO_STATISTICS;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
|
||||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include;$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include\capstone;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\include\capstone;$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\capstone</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<AdditionalDependencies>ws2_32.lib;capstone.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\lib</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\getopt\getopt.c" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySocket.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracyStackFrames.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySystem.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4hc.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyPrint.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\debug.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\entropy_common.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\error_private.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\fse_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\pool.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\threading.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\xxhash.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\zstd_common.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\fse_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\hist.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\huf_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstdmt_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_literals.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_sequences.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_superblock.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_double_fast.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_fast.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_lazy.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_ldm.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_opt.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\huf_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_ddict.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress_block.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\cover.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\divsufsort.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\fastcover.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\zdict.c" />
|
|
||||||
<ClCompile Include="..\..\src\capture.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\getopt\getopt.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlign.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlloc.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyApi.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyColor.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyForceInline.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyMutex.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyProtocol.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyQueue.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySocket.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyStackFrames.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySystem.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyUwp.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyYield.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4hc.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyCharUtil.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMmap.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPrint.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracySlab.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTextureCompression.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyThreadCompress.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyVector.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyWorker.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\bitstream.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\compiler.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\cpu.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\debug.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\error_private.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\fse.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\huf.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\mem.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\pool.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\portability_macros.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\threading.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\xxhash.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_deps.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_trace.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\clevels.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\hist.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstdmt_compress.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_literals.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_sequences.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_superblock.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_cwksp.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_double_fast.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_fast.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_lazy.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm_geartab.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_opt.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_ddict.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_block.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\cover.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\divsufsort.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zdict.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd_errors.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\zstd\decompress\huf_decompress_amd64.S" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,371 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="src">
|
|
||||||
<UniqueIdentifier>{729c80ee-4d26-4a5e-8f1f-6c075783eb56}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="server">
|
|
||||||
<UniqueIdentifier>{cf23ef7b-7694-4154-830b-00cf053350ea}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="common">
|
|
||||||
<UniqueIdentifier>{e39d3623-47cd-4752-8da9-3ea324f964c1}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="getopt">
|
|
||||||
<UniqueIdentifier>{ee9737d2-69c7-44da-b9c7-539d18f9d4b4}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd">
|
|
||||||
<UniqueIdentifier>{f201463b-5e69-46fe-bdfc-1b5eed86c7f7}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\common">
|
|
||||||
<UniqueIdentifier>{7e93ae33-6543-4bca-b05b-50818dbf24cc}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\compress">
|
|
||||||
<UniqueIdentifier>{3b0c32f5-9efb-4503-9394-5ab95909fb1c}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\decompress">
|
|
||||||
<UniqueIdentifier>{c1f99170-d904-4af1-8010-0a3ded5736c8}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\dictBuilder">
|
|
||||||
<UniqueIdentifier>{456e6786-ea57-42b8-ae38-829cd2d918bd}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\src\capture.cpp">
|
|
||||||
<Filter>src</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyPrint.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\getopt\getopt.c">
|
|
||||||
<Filter>getopt</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\debug.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\entropy_common.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\error_private.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\fse_decompress.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\pool.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\threading.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\xxhash.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\zstd_common.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\fse_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\hist.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\huf_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_literals.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_sequences.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_superblock.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_double_fast.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_fast.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_lazy.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_ldm.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_opt.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstdmt_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\huf_decompress.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_ddict.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress_block.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\cover.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\divsufsort.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\fastcover.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\zdict.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4hc.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySocket.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracyStackFrames.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySystem.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyCharUtil.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracySlab.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyVector.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyWorker.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPrint.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyThreadCompress.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMmap.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTextureCompression.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\getopt\getopt.h">
|
|
||||||
<Filter>getopt</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd_errors.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\bitstream.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\compiler.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\cpu.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\debug.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\error_private.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\fse.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\huf.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\mem.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\pool.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\threading.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\xxhash.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_deps.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_internal.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_trace.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\hist.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_internal.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_literals.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_sequences.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_superblock.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_cwksp.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_double_fast.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_fast.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_lazy.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm_geartab.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_opt.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstdmt_compress.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_ddict.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_block.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_internal.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\cover.h">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\divsufsort.h">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zdict.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\portability_macros.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\clevels.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4hc.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlign.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlloc.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyApi.h">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyColor.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyForceInline.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyMutex.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyProtocol.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyQueue.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySocket.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyStackFrames.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySystem.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyUwp.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyYield.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\zstd\decompress\huf_decompress_amd64.S">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -21,6 +21,7 @@
|
|||||||
#include "../../server/TracyFileWrite.hpp"
|
#include "../../server/TracyFileWrite.hpp"
|
||||||
#include "../../server/TracyMemory.hpp"
|
#include "../../server/TracyMemory.hpp"
|
||||||
#include "../../server/TracyPrint.hpp"
|
#include "../../server/TracyPrint.hpp"
|
||||||
|
#include "../../server/TracySysUtil.hpp"
|
||||||
#include "../../server/TracyWorker.hpp"
|
#include "../../server/TracyWorker.hpp"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -61,6 +62,7 @@ bool IsStdoutATerminal() { return s_isStdoutATerminal; }
|
|||||||
#define ANSI_RED "\033[31m"
|
#define ANSI_RED "\033[31m"
|
||||||
#define ANSI_GREEN "\033[32m"
|
#define ANSI_GREEN "\033[32m"
|
||||||
#define ANSI_YELLOW "\033[33m"
|
#define ANSI_YELLOW "\033[33m"
|
||||||
|
#define ANSI_BLUE "\033[34m"
|
||||||
#define ANSI_MAGENTA "\033[35m"
|
#define ANSI_MAGENTA "\033[35m"
|
||||||
#define ANSI_CYAN "\033[36m"
|
#define ANSI_CYAN "\033[36m"
|
||||||
#define ANSI_ERASE_LINE "\033[2K"
|
#define ANSI_ERASE_LINE "\033[2K"
|
||||||
@ -90,7 +92,7 @@ void AnsiPrintf( const char* ansiEscape, const char* format, ... ) {
|
|||||||
|
|
||||||
[[noreturn]] void Usage()
|
[[noreturn]] void Usage()
|
||||||
{
|
{
|
||||||
printf( "Usage: capture -o output.tracy [-a address] [-p port] [-f] [-s seconds]\n" );
|
printf( "Usage: capture -o output.tracy [-a address] [-p port] [-f] [-s seconds] [-m memlimit]\n" );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,9 +113,10 @@ int main( int argc, char** argv )
|
|||||||
const char* output = nullptr;
|
const char* output = nullptr;
|
||||||
int port = 8086;
|
int port = 8086;
|
||||||
int seconds = -1;
|
int seconds = -1;
|
||||||
|
int64_t memoryLimit = -1;
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while( ( c = getopt( argc, argv, "a:o:p:fs:" ) ) != -1 )
|
while( ( c = getopt( argc, argv, "a:o:p:fs:m:" ) ) != -1 )
|
||||||
{
|
{
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
@ -130,7 +133,10 @@ int main( int argc, char** argv )
|
|||||||
overwrite = true;
|
overwrite = true;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
seconds = atoi (optarg);
|
seconds = atoi(optarg);
|
||||||
|
break;
|
||||||
|
case 'm':
|
||||||
|
memoryLimit = std::clamp( atoll( optarg ), 1ll, 999ll ) * tracy::GetPhysicalMemorySize() / 100;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Usage();
|
Usage();
|
||||||
@ -158,7 +164,7 @@ int main( int argc, char** argv )
|
|||||||
|
|
||||||
printf( "Connecting to %s:%i...", address, port );
|
printf( "Connecting to %s:%i...", address, port );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
tracy::Worker worker( address, port );
|
tracy::Worker worker( address, port, memoryLimit );
|
||||||
while( !worker.HasData() )
|
while( !worker.HasData() )
|
||||||
{
|
{
|
||||||
const auto handshake = worker.GetHandshakeStatus();
|
const auto handshake = worker.GetHandshakeStatus();
|
||||||
@ -234,7 +240,12 @@ int main( int argc, char** argv )
|
|||||||
AnsiPrintf( ANSI_YELLOW, "Tx: ");
|
AnsiPrintf( ANSI_YELLOW, "Tx: ");
|
||||||
AnsiPrintf( ANSI_GREEN, "%s", tracy::MemSizeToString( netTotal ) );
|
AnsiPrintf( ANSI_GREEN, "%s", tracy::MemSizeToString( netTotal ) );
|
||||||
printf( " | ");
|
printf( " | ");
|
||||||
AnsiPrintf( ANSI_RED ANSI_BOLD, "%s", tracy::MemSizeToString( tracy::memUsage ) );
|
AnsiPrintf( ANSI_RED ANSI_BOLD, "%s", tracy::MemSizeToString( tracy::memUsage.load( std::memory_order_relaxed ) ) );
|
||||||
|
if( memoryLimit > 0 )
|
||||||
|
{
|
||||||
|
printf( " / " );
|
||||||
|
AnsiPrintf( ANSI_BLUE ANSI_BOLD, "%s", tracy::MemSizeToString( memoryLimit ) );
|
||||||
|
}
|
||||||
printf( " | ");
|
printf( " | ");
|
||||||
AnsiPrintf( ANSI_RED, "%s", tracy::TimeToString( worker.GetLastTime() - firstTime ) );
|
AnsiPrintf( ANSI_RED, "%s", tracy::TimeToString( worker.GetLastTime() - firstTime ) );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
@ -265,7 +276,7 @@ int main( int argc, char** argv )
|
|||||||
}
|
}
|
||||||
if( fd.callstack != 0 )
|
if( fd.callstack != 0 )
|
||||||
{
|
{
|
||||||
AnsiPrintf( ANSI_BOLD, "\n%sFailure callstack:%s\n" );
|
AnsiPrintf( ANSI_BOLD, "\nFailure callstack:\n" );
|
||||||
auto& cs = worker.GetCallstack( fd.callstack );
|
auto& cs = worker.GetCallstack( fd.callstack );
|
||||||
int fidx = 0;
|
int fidx = 0;
|
||||||
for( auto& entry : cs )
|
for( auto& entry : cs )
|
||||||
@ -335,7 +346,7 @@ int main( int argc, char** argv )
|
|||||||
worker.GetFrameCount( *worker.GetFramesBase() ), tracy::TimeToString( worker.GetLastTime() - firstTime ), tracy::RealToString( worker.GetZoneCount() ),
|
worker.GetFrameCount( *worker.GetFramesBase() ), tracy::TimeToString( worker.GetLastTime() - firstTime ), tracy::RealToString( worker.GetZoneCount() ),
|
||||||
tracy::TimeToString( std::chrono::duration_cast<std::chrono::nanoseconds>( t1 - t0 ).count() ) );
|
tracy::TimeToString( std::chrono::duration_cast<std::chrono::nanoseconds>( t1 - t0 ).count() ) );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
auto f = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output ) );
|
auto f = std::unique_ptr<tracy::FileWrite>( tracy::FileWrite::Open( output, tracy::FileCompression::Zstd, 3, 4 ) );
|
||||||
if( f )
|
if( f )
|
||||||
{
|
{
|
||||||
worker.Write( *f, false );
|
worker.Write( *f, false );
|
||||||
|
1269
cmake/CPM.cmake
Normal file
1269
cmake/CPM.cmake
Normal file
File diff suppressed because it is too large
Load Diff
300
cmake/ECMFindModuleHelpers.cmake
Normal file
300
cmake/ECMFindModuleHelpers.cmake
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
#.rst:
|
||||||
|
# ECMFindModuleHelpers
|
||||||
|
# --------------------
|
||||||
|
#
|
||||||
|
# Helper macros for find modules: ecm_find_package_version_check(),
|
||||||
|
# ecm_find_package_parse_components() and
|
||||||
|
# ecm_find_package_handle_library_components().
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# ecm_find_package_version_check(<name>)
|
||||||
|
#
|
||||||
|
# Prints warnings if the CMake version or the project's required CMake version
|
||||||
|
# is older than that required by extra-cmake-modules.
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# ecm_find_package_parse_components(<name>
|
||||||
|
# RESULT_VAR <variable>
|
||||||
|
# KNOWN_COMPONENTS <component1> [<component2> [...]]
|
||||||
|
# [SKIP_DEPENDENCY_HANDLING])
|
||||||
|
#
|
||||||
|
# This macro will populate <variable> with a list of components found in
|
||||||
|
# <name>_FIND_COMPONENTS, after checking that all those components are in the
|
||||||
|
# list of KNOWN_COMPONENTS; if there are any unknown components, it will print
|
||||||
|
# an error or warning (depending on the value of <name>_FIND_REQUIRED) and call
|
||||||
|
# return().
|
||||||
|
#
|
||||||
|
# The order of components in <variable> is guaranteed to match the order they
|
||||||
|
# are listed in the KNOWN_COMPONENTS argument.
|
||||||
|
#
|
||||||
|
# If SKIP_DEPENDENCY_HANDLING is not set, for each component the variable
|
||||||
|
# <name>_<component>_component_deps will be checked for dependent components.
|
||||||
|
# If <component> is listed in <name>_FIND_COMPONENTS, then all its (transitive)
|
||||||
|
# dependencies will also be added to <variable>.
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# ecm_find_package_handle_library_components(<name>
|
||||||
|
# COMPONENTS <component> [<component> [...]]
|
||||||
|
# [SKIP_DEPENDENCY_HANDLING])
|
||||||
|
# [SKIP_PKG_CONFIG])
|
||||||
|
#
|
||||||
|
# Creates an imported library target for each component. The operation of this
|
||||||
|
# macro depends on the presence of a number of CMake variables.
|
||||||
|
#
|
||||||
|
# The <name>_<component>_lib variable should contain the name of this library,
|
||||||
|
# and <name>_<component>_header variable should contain the name of a header
|
||||||
|
# file associated with it (whatever relative path is normally passed to
|
||||||
|
# '#include'). <name>_<component>_header_subdir variable can be used to specify
|
||||||
|
# which subdirectory of the include path the headers will be found in.
|
||||||
|
# ecm_find_package_components() will then search for the library
|
||||||
|
# and include directory (creating appropriate cache variables) and create an
|
||||||
|
# imported library target named <name>::<component>.
|
||||||
|
#
|
||||||
|
# Additional variables can be used to provide additional information:
|
||||||
|
#
|
||||||
|
# If SKIP_PKG_CONFIG, the <name>_<component>_pkg_config variable is set, and
|
||||||
|
# pkg-config is found, the pkg-config module given by
|
||||||
|
# <name>_<component>_pkg_config will be searched for and used to help locate the
|
||||||
|
# library and header file. It will also be used to set
|
||||||
|
# <name>_<component>_VERSION.
|
||||||
|
#
|
||||||
|
# Note that if version information is found via pkg-config,
|
||||||
|
# <name>_<component>_FIND_VERSION can be set to require a particular version
|
||||||
|
# for each component.
|
||||||
|
#
|
||||||
|
# If SKIP_DEPENDENCY_HANDLING is not set, the INTERFACE_LINK_LIBRARIES property
|
||||||
|
# of the imported target for <component> will be set to contain the imported
|
||||||
|
# targets for the components listed in <name>_<component>_component_deps.
|
||||||
|
# <component>_FOUND will also be set to false if any of the components in
|
||||||
|
# <name>_<component>_component_deps are not found. This requires the components
|
||||||
|
# in <name>_<component>_component_deps to be listed before <component> in the
|
||||||
|
# COMPONENTS argument.
|
||||||
|
#
|
||||||
|
# The following variables will be set:
|
||||||
|
#
|
||||||
|
# ``<name>_TARGETS``
|
||||||
|
# the imported targets
|
||||||
|
# ``<name>_LIBRARIES``
|
||||||
|
# the found libraries
|
||||||
|
# ``<name>_INCLUDE_DIRS``
|
||||||
|
# the combined required include directories for the components
|
||||||
|
# ``<name>_DEFINITIONS``
|
||||||
|
# the "other" CFLAGS provided by pkg-config, if any
|
||||||
|
# ``<name>_VERSION``
|
||||||
|
# the value of ``<name>_<component>_VERSION`` for the first component that
|
||||||
|
# has this variable set (note that components are searched for in the order
|
||||||
|
# they are passed to the macro), although if it is already set, it will not
|
||||||
|
# be altered
|
||||||
|
#
|
||||||
|
# Note that these variables are never cleared, so if
|
||||||
|
# ecm_find_package_handle_library_components() is called multiple times with
|
||||||
|
# different components (typically because of multiple find_package() calls) then
|
||||||
|
# ``<name>_TARGETS``, for example, will contain all the targets found in any
|
||||||
|
# call (although no duplicates).
|
||||||
|
#
|
||||||
|
# Since pre-1.0.0.
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2014 Alex Merry <alex.merry@kde.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
macro(ecm_find_package_version_check module_name)
|
||||||
|
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||||
|
message(FATAL_ERROR "CMake 2.8.12 is required by Find${module_name}.cmake")
|
||||||
|
endif()
|
||||||
|
if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
|
||||||
|
message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use Find${module_name}.cmake")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(ecm_find_package_parse_components module_name)
|
||||||
|
set(ecm_fppc_options SKIP_DEPENDENCY_HANDLING)
|
||||||
|
set(ecm_fppc_oneValueArgs RESULT_VAR)
|
||||||
|
set(ecm_fppc_multiValueArgs KNOWN_COMPONENTS DEFAULT_COMPONENTS)
|
||||||
|
cmake_parse_arguments(ECM_FPPC "${ecm_fppc_options}" "${ecm_fppc_oneValueArgs}" "${ecm_fppc_multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if(ECM_FPPC_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unexpected arguments to ecm_find_package_parse_components: ${ECM_FPPC_UNPARSED_ARGUMENTS}")
|
||||||
|
endif()
|
||||||
|
if(NOT ECM_FPPC_RESULT_VAR)
|
||||||
|
message(FATAL_ERROR "Missing RESULT_VAR argument to ecm_find_package_parse_components")
|
||||||
|
endif()
|
||||||
|
if(NOT ECM_FPPC_KNOWN_COMPONENTS)
|
||||||
|
message(FATAL_ERROR "Missing KNOWN_COMPONENTS argument to ecm_find_package_parse_components")
|
||||||
|
endif()
|
||||||
|
if(NOT ECM_FPPC_DEFAULT_COMPONENTS)
|
||||||
|
set(ECM_FPPC_DEFAULT_COMPONENTS ${ECM_FPPC_KNOWN_COMPONENTS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(${module_name}_FIND_COMPONENTS)
|
||||||
|
set(ecm_fppc_requestedComps ${${module_name}_FIND_COMPONENTS})
|
||||||
|
|
||||||
|
if(NOT ECM_FPPC_SKIP_DEPENDENCY_HANDLING)
|
||||||
|
# Make sure deps are included
|
||||||
|
foreach(ecm_fppc_comp ${ecm_fppc_requestedComps})
|
||||||
|
foreach(ecm_fppc_dep_comp ${${module_name}_${ecm_fppc_comp}_component_deps})
|
||||||
|
list(FIND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}" ecm_fppc_index)
|
||||||
|
if("${ecm_fppc_index}" STREQUAL "-1")
|
||||||
|
if(NOT ${module_name}_FIND_QUIETLY)
|
||||||
|
message(STATUS "${module_name}: ${ecm_fppc_comp} requires ${${module_name}_${ecm_fppc_comp}_component_deps}")
|
||||||
|
endif()
|
||||||
|
list(APPEND ecm_fppc_requestedComps "${ecm_fppc_dep_comp}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
message(STATUS "Skipping dependency handling for ${module_name}")
|
||||||
|
endif()
|
||||||
|
list(REMOVE_DUPLICATES ecm_fppc_requestedComps)
|
||||||
|
|
||||||
|
# This makes sure components are listed in the same order as
|
||||||
|
# KNOWN_COMPONENTS (potentially important for inter-dependencies)
|
||||||
|
set(${ECM_FPPC_RESULT_VAR})
|
||||||
|
foreach(ecm_fppc_comp ${ECM_FPPC_KNOWN_COMPONENTS})
|
||||||
|
list(FIND ecm_fppc_requestedComps "${ecm_fppc_comp}" ecm_fppc_index)
|
||||||
|
if(NOT "${ecm_fppc_index}" STREQUAL "-1")
|
||||||
|
list(APPEND ${ECM_FPPC_RESULT_VAR} "${ecm_fppc_comp}")
|
||||||
|
list(REMOVE_AT ecm_fppc_requestedComps ${ecm_fppc_index})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
# if there are any left, they are unknown components
|
||||||
|
if(ecm_fppc_requestedComps)
|
||||||
|
set(ecm_fppc_msgType STATUS)
|
||||||
|
if(${module_name}_FIND_REQUIRED)
|
||||||
|
set(ecm_fppc_msgType FATAL_ERROR)
|
||||||
|
endif()
|
||||||
|
if(NOT ${module_name}_FIND_QUIETLY)
|
||||||
|
message(${ecm_fppc_msgType} "${module_name}: requested unknown components ${ecm_fppc_requestedComps}")
|
||||||
|
endif()
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(${ECM_FPPC_RESULT_VAR} ${ECM_FPPC_DEFAULT_COMPONENTS})
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
macro(ecm_find_package_handle_library_components module_name)
|
||||||
|
set(ecm_fpwc_options SKIP_PKG_CONFIG SKIP_DEPENDENCY_HANDLING)
|
||||||
|
set(ecm_fpwc_oneValueArgs)
|
||||||
|
set(ecm_fpwc_multiValueArgs COMPONENTS)
|
||||||
|
cmake_parse_arguments(ECM_FPWC "${ecm_fpwc_options}" "${ecm_fpwc_oneValueArgs}" "${ecm_fpwc_multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
|
if(ECM_FPWC_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unexpected arguments to ecm_find_package_handle_components: ${ECM_FPWC_UNPARSED_ARGUMENTS}")
|
||||||
|
endif()
|
||||||
|
if(NOT ECM_FPWC_COMPONENTS)
|
||||||
|
message(FATAL_ERROR "Missing COMPONENTS argument to ecm_find_package_handle_components")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package(PkgConfig QUIET)
|
||||||
|
foreach(ecm_fpwc_comp ${ECM_FPWC_COMPONENTS})
|
||||||
|
set(ecm_fpwc_dep_vars)
|
||||||
|
set(ecm_fpwc_dep_targets)
|
||||||
|
if(NOT SKIP_DEPENDENCY_HANDLING)
|
||||||
|
foreach(ecm_fpwc_dep ${${module_name}_${ecm_fpwc_comp}_component_deps})
|
||||||
|
list(APPEND ecm_fpwc_dep_vars "${module_name}_${ecm_fpwc_dep}_FOUND")
|
||||||
|
list(APPEND ecm_fpwc_dep_targets "${module_name}::${ecm_fpwc_dep}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT ECM_FPWC_SKIP_PKG_CONFIG AND ${module_name}_${ecm_fpwc_comp}_pkg_config)
|
||||||
|
pkg_check_modules(PKG_${module_name}_${ecm_fpwc_comp} QUIET
|
||||||
|
${${module_name}_${ecm_fpwc_comp}_pkg_config})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_path(${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
|
||||||
|
NAMES ${${module_name}_${ecm_fpwc_comp}_header}
|
||||||
|
HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_INCLUDE_DIRS}
|
||||||
|
PATH_SUFFIXES ${${module_name}_${ecm_fpwc_comp}_header_subdir}
|
||||||
|
)
|
||||||
|
find_library(${module_name}_${ecm_fpwc_comp}_LIBRARY
|
||||||
|
NAMES ${${module_name}_${ecm_fpwc_comp}_lib}
|
||||||
|
HINTS ${PKG_${module_name}_${ecm_fpwc_comp}_LIBRARY_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(${module_name}_${ecm_fpwc_comp}_VERSION "${PKG_${module_name}_${ecm_fpwc_comp}_VERSION}")
|
||||||
|
if(NOT ${module_name}_VERSION)
|
||||||
|
set(${module_name}_VERSION ${${module_name}_${ecm_fpwc_comp}_VERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_name_mismatched_arg)
|
||||||
|
if(NOT CMAKE_VERSION VERSION_LESS 3.17)
|
||||||
|
set(_name_mismatched_arg NAME_MISMATCHED)
|
||||||
|
endif()
|
||||||
|
find_package_handle_standard_args(${module_name}_${ecm_fpwc_comp}
|
||||||
|
FOUND_VAR
|
||||||
|
${module_name}_${ecm_fpwc_comp}_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
${module_name}_${ecm_fpwc_comp}_LIBRARY
|
||||||
|
${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
|
||||||
|
${ecm_fpwc_dep_vars}
|
||||||
|
VERSION_VAR
|
||||||
|
${module_name}_${ecm_fpwc_comp}_VERSION
|
||||||
|
${_name_mismatched_arg}
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
${module_name}_${ecm_fpwc_comp}_LIBRARY
|
||||||
|
${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${module_name}_${ecm_fpwc_comp}_FOUND)
|
||||||
|
list(APPEND ${module_name}_LIBRARIES
|
||||||
|
"${${module_name}_${ecm_fpwc_comp}_LIBRARY}")
|
||||||
|
list(APPEND ${module_name}_INCLUDE_DIRS
|
||||||
|
"${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}")
|
||||||
|
set(${module_name}_DEFINITIONS
|
||||||
|
${${module_name}_DEFINITIONS}
|
||||||
|
${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS})
|
||||||
|
if(NOT TARGET ${module_name}::${ecm_fpwc_comp})
|
||||||
|
add_library(${module_name}::${ecm_fpwc_comp} UNKNOWN IMPORTED)
|
||||||
|
set_target_properties(${module_name}::${ecm_fpwc_comp} PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${${module_name}_${ecm_fpwc_comp}_LIBRARY}"
|
||||||
|
INTERFACE_COMPILE_OPTIONS "${PKG_${module_name}_${ecm_fpwc_comp}_DEFINITIONS}"
|
||||||
|
INTERFACE_INCLUDE_DIRECTORIES "${${module_name}_${ecm_fpwc_comp}_INCLUDE_DIR}"
|
||||||
|
INTERFACE_LINK_LIBRARIES "${ecm_fpwc_dep_targets}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
list(APPEND ${module_name}_TARGETS
|
||||||
|
"${module_name}::${ecm_fpwc_comp}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
if(${module_name}_LIBRARIES)
|
||||||
|
list(REMOVE_DUPLICATES ${module_name}_LIBRARIES)
|
||||||
|
endif()
|
||||||
|
if(${module_name}_INCLUDE_DIRS)
|
||||||
|
list(REMOVE_DUPLICATES ${module_name}_INCLUDE_DIRS)
|
||||||
|
endif()
|
||||||
|
if(${module_name}_DEFINITIONS)
|
||||||
|
list(REMOVE_DUPLICATES ${module_name}_DEFINITIONS)
|
||||||
|
endif()
|
||||||
|
if(${module_name}_TARGETS)
|
||||||
|
list(REMOVE_DUPLICATES ${module_name}_TARGETS)
|
||||||
|
endif()
|
||||||
|
endmacro()
|
170
cmake/FindWaylandScanner.cmake
Normal file
170
cmake/FindWaylandScanner.cmake
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#.rst:
|
||||||
|
# FindWaylandScanner
|
||||||
|
# ------------------
|
||||||
|
#
|
||||||
|
# Try to find wayland-scanner.
|
||||||
|
#
|
||||||
|
# If the wayland-scanner executable is not in your PATH, you can provide
|
||||||
|
# an alternative name or full path location with the ``WaylandScanner_EXECUTABLE``
|
||||||
|
# variable.
|
||||||
|
#
|
||||||
|
# This will define the following variables:
|
||||||
|
#
|
||||||
|
# ``WaylandScanner_FOUND``
|
||||||
|
# True if wayland-scanner is available.
|
||||||
|
#
|
||||||
|
# ``WaylandScanner_EXECUTABLE``
|
||||||
|
# The wayland-scanner executable.
|
||||||
|
#
|
||||||
|
# If ``WaylandScanner_FOUND`` is TRUE, it will also define the following imported
|
||||||
|
# target:
|
||||||
|
#
|
||||||
|
# ``Wayland::Scanner``
|
||||||
|
# The wayland-scanner executable.
|
||||||
|
#
|
||||||
|
# This module provides the following functions to generate C protocol
|
||||||
|
# implementations:
|
||||||
|
#
|
||||||
|
# - ``ecm_add_wayland_client_protocol``
|
||||||
|
# - ``ecm_add_wayland_server_protocol``
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# ecm_add_wayland_client_protocol(<source_files_var>
|
||||||
|
# PROTOCOL <xmlfile>
|
||||||
|
# BASENAME <basename>)
|
||||||
|
#
|
||||||
|
# Generate Wayland client protocol files from ``<xmlfile>`` XML
|
||||||
|
# definition for the ``<basename>`` interface and append those files
|
||||||
|
# to ``<source_files_var>``.
|
||||||
|
#
|
||||||
|
# ::
|
||||||
|
#
|
||||||
|
# ecm_add_wayland_server_protocol(<source_files_var>
|
||||||
|
# PROTOCOL <xmlfile>
|
||||||
|
# BASENAME <basename>)
|
||||||
|
#
|
||||||
|
# Generate Wayland server protocol files from ``<xmlfile>`` XML
|
||||||
|
# definition for the ``<basename>`` interface and append those files
|
||||||
|
# to ``<source_files_var>``.
|
||||||
|
#
|
||||||
|
# Since 1.4.0.
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# Copyright 2012-2014 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 3. The name of the author may not be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
|
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
|
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#=============================================================================
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpers.cmake)
|
||||||
|
|
||||||
|
ecm_find_package_version_check(WaylandScanner)
|
||||||
|
|
||||||
|
# Find wayland-scanner
|
||||||
|
find_program(WaylandScanner_EXECUTABLE NAMES wayland-scanner)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(WaylandScanner
|
||||||
|
FOUND_VAR
|
||||||
|
WaylandScanner_FOUND
|
||||||
|
REQUIRED_VARS
|
||||||
|
WaylandScanner_EXECUTABLE
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(WaylandScanner_EXECUTABLE)
|
||||||
|
|
||||||
|
if(NOT TARGET Wayland::Scanner AND WaylandScanner_FOUND)
|
||||||
|
add_executable(Wayland::Scanner IMPORTED)
|
||||||
|
set_target_properties(Wayland::Scanner PROPERTIES
|
||||||
|
IMPORTED_LOCATION "${WaylandScanner_EXECUTABLE}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(FeatureSummary)
|
||||||
|
set_package_properties(WaylandScanner PROPERTIES
|
||||||
|
URL "https://wayland.freedesktop.org/"
|
||||||
|
DESCRIPTION "Executable that converts XML protocol files to C code"
|
||||||
|
)
|
||||||
|
|
||||||
|
function(ecm_add_wayland_client_protocol out_var)
|
||||||
|
# Parse arguments
|
||||||
|
set(oneValueArgs PROTOCOL BASENAME)
|
||||||
|
cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN})
|
||||||
|
|
||||||
|
if(ARGS_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_client_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE)
|
||||||
|
set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h")
|
||||||
|
set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-protocol.c")
|
||||||
|
|
||||||
|
set_source_files_properties(${_client_header} GENERATED)
|
||||||
|
set_source_files_properties(${_code} GENERATED)
|
||||||
|
set_property(SOURCE ${_client_header} PROPERTY SKIP_AUTOMOC ON)
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT "${_client_header}"
|
||||||
|
COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header}
|
||||||
|
DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT "${_code}"
|
||||||
|
COMMAND ${WaylandScanner_EXECUTABLE} private-code ${_infile} ${_code}
|
||||||
|
DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile} ${_client_header}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND ${out_var} "${_client_header}" "${_code}")
|
||||||
|
set(${out_var} ${${out_var}} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
function(ecm_add_wayland_server_protocol out_var)
|
||||||
|
# Parse arguments
|
||||||
|
set(oneValueArgs PROTOCOL BASENAME)
|
||||||
|
cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN})
|
||||||
|
|
||||||
|
if(ARGS_UNPARSED_ARGUMENTS)
|
||||||
|
message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_server_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
ecm_add_wayland_client_protocol(${out_var}
|
||||||
|
PROTOCOL ${ARGS_PROTOCOL}
|
||||||
|
BASENAME ${ARGS_BASENAME})
|
||||||
|
|
||||||
|
get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE)
|
||||||
|
set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-server-protocol.h")
|
||||||
|
set_property(SOURCE ${_server_header} PROPERTY SKIP_AUTOMOC ON)
|
||||||
|
set_source_files_properties(${_server_header} GENERATED)
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT "${_server_header}"
|
||||||
|
COMMAND ${WaylandScanner_EXECUTABLE} server-header ${_infile} ${_server_header}
|
||||||
|
DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND ${out_var} "${_server_header}")
|
||||||
|
set(${out_var} ${${out_var}} PARENT_SCOPE)
|
||||||
|
endfunction()
|
62
cmake/config.cmake
Normal file
62
cmake/config.cmake
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
if (NOT NO_ISA_EXTENSIONS)
|
||||||
|
include(CheckCXXCompilerFlag)
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-mcpu=native" COMPILER_SUPPORTS_MCPU_NATIVE)
|
||||||
|
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||||
|
add_compile_options(-mcpu=native)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||||
|
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
||||||
|
add_compile_options(-march=native)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(WIN32)
|
||||||
|
add_compile_options(/arch:AVX2)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT LEGACY)
|
||||||
|
set(USE_WAYLAND ON)
|
||||||
|
else()
|
||||||
|
set(USE_WAYLAND OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fexperimental-library>)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
|
||||||
|
add_compile_options(/MP)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
add_compile_options(-pthread -DIMGUI_IMPL_OPENGL_ES2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT EMSCRIPTEN)
|
||||||
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
find_program(MOLD_LINKER mold)
|
||||||
|
if(MOLD_LINKER)
|
||||||
|
set(CMAKE_LINKER_TYPE "MOLD")
|
||||||
|
endif()
|
||||||
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
add_compile_options(-fno-eliminate-unused-debug-types)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_program(CCACHE ccache)
|
||||||
|
if(CCACHE)
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GENERATE OUTPUT .gitignore CONTENT "*")
|
||||||
|
|
||||||
|
set(CMAKE_COLOR_DIAGNOSTICS ON)
|
12
cmake/gl3w-extra-symbols.patch
Normal file
12
cmake/gl3w-extra-symbols.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/extra_symbols.txt b/extra_symbols.txt
|
||||||
|
index b95bb58..6b8f616 100644
|
||||||
|
--- a/extra_symbols.txt
|
||||||
|
+++ b/extra_symbols.txt
|
||||||
|
@@ -1,3 +1,7 @@
|
||||||
|
+glCompressedTexImage2D
|
||||||
|
+GL_LINEAR_MIPMAP_LINEAR
|
||||||
|
+GL_TEXTURE_WRAP_S
|
||||||
|
+GL_TEXTURE_WRAP_T
|
||||||
|
glReadPixels
|
||||||
|
glClearColor
|
||||||
|
glClear
|
14
cmake/imgui-emscripten.patch
Normal file
14
cmake/imgui-emscripten.patch
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff '--color=auto' -ruN 72d8f61727dc878102157113d1998f86b852d20e/imconfig.h new/imconfig.h
|
||||||
|
--- 72d8f61727dc878102157113d1998f86b852d20e/imconfig.h 2024-09-27 14:28:05.568760349 +0200
|
||||||
|
+++ new/imconfig.h 2024-09-27 14:29:47.310243707 +0200
|
||||||
|
@@ -113,6 +113,10 @@
|
||||||
|
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
|
||||||
|
//#define ImDrawIdx unsigned int
|
||||||
|
|
||||||
|
+#ifdef __EMSCRIPTEN__
|
||||||
|
+#define ImDrawIdx unsigned int
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
|
||||||
|
//struct ImDrawList;
|
||||||
|
//struct ImDrawCmd;
|
56
cmake/imgui-loader.patch
Normal file
56
cmake/imgui-loader.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
diff --git a/backends/imgui_impl_opengl3_loader.h b/backends/imgui_impl_opengl3_loader.h
|
||||||
|
index d6ffa5a2d..e48372c64 100644
|
||||||
|
--- a/backends/imgui_impl_opengl3_loader.h
|
||||||
|
+++ b/backends/imgui_impl_opengl3_loader.h
|
||||||
|
@@ -179,6 +179,7 @@ typedef khronos_uint8_t GLubyte;
|
||||||
|
#define GL_VERSION 0x1F02
|
||||||
|
#define GL_EXTENSIONS 0x1F03
|
||||||
|
#define GL_LINEAR 0x2601
|
||||||
|
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
|
||||||
|
#define GL_TEXTURE_MAG_FILTER 0x2800
|
||||||
|
#define GL_TEXTURE_MIN_FILTER 0x2801
|
||||||
|
#define GL_TEXTURE_WRAP_S 0x2802
|
||||||
|
@@ -241,8 +242,10 @@ GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
|
||||||
|
#define GL_TEXTURE0 0x84C0
|
||||||
|
#define GL_ACTIVE_TEXTURE 0x84E0
|
||||||
|
typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
|
||||||
|
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||||
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
|
GLAPI void APIENTRY glActiveTexture (GLenum texture);
|
||||||
|
+GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data);
|
||||||
|
#endif
|
||||||
|
#endif /* GL_VERSION_1_3 */
|
||||||
|
#ifndef GL_VERSION_1_4
|
||||||
|
@@ -478,7 +481,7 @@ GL3W_API GL3WglProc imgl3wGetProcAddress(const char *proc);
|
||||||
|
|
||||||
|
/* gl3w internal state */
|
||||||
|
union ImGL3WProcs {
|
||||||
|
- GL3WglProc ptr[59];
|
||||||
|
+ GL3WglProc ptr[60];
|
||||||
|
struct {
|
||||||
|
PFNGLACTIVETEXTUREPROC ActiveTexture;
|
||||||
|
PFNGLATTACHSHADERPROC AttachShader;
|
||||||
|
@@ -494,6 +497,7 @@ union ImGL3WProcs {
|
||||||
|
PFNGLCLEARPROC Clear;
|
||||||
|
PFNGLCLEARCOLORPROC ClearColor;
|
||||||
|
PFNGLCOMPILESHADERPROC CompileShader;
|
||||||
|
+ PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D;
|
||||||
|
PFNGLCREATEPROGRAMPROC CreateProgram;
|
||||||
|
PFNGLCREATESHADERPROC CreateShader;
|
||||||
|
PFNGLDELETEBUFFERSPROC DeleteBuffers;
|
||||||
|
@@ -559,6 +563,7 @@ GL3W_API extern union ImGL3WProcs imgl3wProcs;
|
||||||
|
#define glClear imgl3wProcs.gl.Clear
|
||||||
|
#define glClearColor imgl3wProcs.gl.ClearColor
|
||||||
|
#define glCompileShader imgl3wProcs.gl.CompileShader
|
||||||
|
+#define glCompressedTexImage2D imgl3wProcs.gl.CompressedTexImage2D
|
||||||
|
#define glCreateProgram imgl3wProcs.gl.CreateProgram
|
||||||
|
#define glCreateShader imgl3wProcs.gl.CreateShader
|
||||||
|
#define glDeleteBuffers imgl3wProcs.gl.DeleteBuffers
|
||||||
|
@@ -854,6 +859,7 @@ static const char *proc_names[] = {
|
||||||
|
"glClear",
|
||||||
|
"glClearColor",
|
||||||
|
"glCompileShader",
|
||||||
|
+ "glCompressedTexImage2D",
|
||||||
|
"glCreateProgram",
|
||||||
|
"glCreateShader",
|
||||||
|
"glDeleteBuffers",
|
35
cmake/server.cmake
Normal file
35
cmake/server.cmake
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
set(TRACY_COMMON_DIR ${CMAKE_CURRENT_LIST_DIR}/../public/common)
|
||||||
|
|
||||||
|
set(TRACY_COMMON_SOURCES
|
||||||
|
tracy_lz4.cpp
|
||||||
|
tracy_lz4hc.cpp
|
||||||
|
TracySocket.cpp
|
||||||
|
TracyStackFrames.cpp
|
||||||
|
TracySystem.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
list(TRANSFORM TRACY_COMMON_SOURCES PREPEND "${TRACY_COMMON_DIR}/")
|
||||||
|
|
||||||
|
|
||||||
|
set(TRACY_SERVER_DIR ${CMAKE_CURRENT_LIST_DIR}/../server)
|
||||||
|
|
||||||
|
set(TRACY_SERVER_SOURCES
|
||||||
|
TracyMemory.cpp
|
||||||
|
TracyMmap.cpp
|
||||||
|
TracyPrint.cpp
|
||||||
|
TracySysUtil.cpp
|
||||||
|
TracyTaskDispatch.cpp
|
||||||
|
TracyTextureCompression.cpp
|
||||||
|
TracyThreadCompress.cpp
|
||||||
|
TracyWorker.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
list(TRANSFORM TRACY_SERVER_SOURCES PREPEND "${TRACY_SERVER_DIR}/")
|
||||||
|
|
||||||
|
|
||||||
|
add_library(TracyServer STATIC EXCLUDE_FROM_ALL ${TRACY_COMMON_SOURCES} ${TRACY_SERVER_SOURCES})
|
||||||
|
target_include_directories(TracyServer PUBLIC ${TRACY_COMMON_DIR} ${TRACY_SERVER_DIR})
|
||||||
|
target_link_libraries(TracyServer PUBLIC TracyCapstone libzstd PPQSort::PPQSort)
|
||||||
|
if(NO_STATISTICS)
|
||||||
|
target_compile_definitions(TracyServer PUBLIC TRACY_NO_STATISTICS)
|
||||||
|
endif()
|
222
cmake/vendor.cmake
Normal file
222
cmake/vendor.cmake
Normal file
@ -0,0 +1,222 @@
|
|||||||
|
# Vendor Specific CMake
|
||||||
|
# The Tracy project keeps most vendor source locally
|
||||||
|
|
||||||
|
set (ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../")
|
||||||
|
|
||||||
|
# Dependencies are taken from the system first and if not found, they are pulled with CPM and built from source
|
||||||
|
|
||||||
|
include(FindPkgConfig)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake)
|
||||||
|
|
||||||
|
option(DOWNLOAD_CAPSTONE "Force download capstone" ON)
|
||||||
|
option(DOWNLOAD_GLFW "Force download glfw" OFF)
|
||||||
|
option(DOWNLOAD_FREETYPE "Force download freetype" OFF)
|
||||||
|
|
||||||
|
# capstone
|
||||||
|
|
||||||
|
pkg_check_modules(CAPSTONE capstone)
|
||||||
|
if(CAPSTONE_FOUND AND NOT DOWNLOAD_CAPSTONE)
|
||||||
|
message(STATUS "Capstone found: ${CAPSTONE}")
|
||||||
|
add_library(TracyCapstone INTERFACE)
|
||||||
|
target_include_directories(TracyCapstone INTERFACE ${CAPSTONE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyCapstone INTERFACE ${CAPSTONE_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME capstone
|
||||||
|
GITHUB_REPOSITORY capstone-engine/capstone
|
||||||
|
GIT_TAG 6.0.0-Alpha1
|
||||||
|
OPTIONS
|
||||||
|
"CAPSTONE_X86_ATT_DISABLE ON"
|
||||||
|
"CAPSTONE_ALPHA_SUPPORT OFF"
|
||||||
|
"CAPSTONE_HPPA_SUPPORT OFF"
|
||||||
|
"CAPSTONE_LOONGARCH_SUPPORT OFF"
|
||||||
|
"CAPSTONE_M680X_SUPPORT OFF"
|
||||||
|
"CAPSTONE_M68K_SUPPORT OFF"
|
||||||
|
"CAPSTONE_MIPS_SUPPORT OFF"
|
||||||
|
"CAPSTONE_MOS65XX_SUPPORT OFF"
|
||||||
|
"CAPSTONE_PPC_SUPPORT OFF"
|
||||||
|
"CAPSTONE_SPARC_SUPPORT OFF"
|
||||||
|
"CAPSTONE_SYSTEMZ_SUPPORT OFF"
|
||||||
|
"CAPSTONE_XCORE_SUPPORT OFF"
|
||||||
|
"CAPSTONE_TRICORE_SUPPORT OFF"
|
||||||
|
"CAPSTONE_TMS320C64X_SUPPORT OFF"
|
||||||
|
"CAPSTONE_M680X_SUPPORT OFF"
|
||||||
|
"CAPSTONE_EVM_SUPPORT OFF"
|
||||||
|
"CAPSTONE_WASM_SUPPORT OFF"
|
||||||
|
"CAPSTONE_BPF_SUPPORT OFF"
|
||||||
|
"CAPSTONE_RISCV_SUPPORT OFF"
|
||||||
|
"CAPSTONE_SH_SUPPORT OFF"
|
||||||
|
"CAPSTONE_XTENSA_SUPPORT OFF"
|
||||||
|
"CAPSTONE_BUILD_MACOS_THIN ON"
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
)
|
||||||
|
add_library(TracyCapstone INTERFACE)
|
||||||
|
target_include_directories(TracyCapstone INTERFACE ${capstone_SOURCE_DIR}/include/capstone)
|
||||||
|
target_link_libraries(TracyCapstone INTERFACE capstone)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# GLFW
|
||||||
|
|
||||||
|
if(NOT USE_WAYLAND AND NOT EMSCRIPTEN)
|
||||||
|
pkg_check_modules(GLFW glfw3)
|
||||||
|
if (GLFW_FOUND AND NOT DOWNLOAD_GLFW)
|
||||||
|
add_library(TracyGlfw3 INTERFACE)
|
||||||
|
target_include_directories(TracyGlfw3 INTERFACE ${GLFW_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyGlfw3 INTERFACE ${GLFW_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME glfw
|
||||||
|
GITHUB_REPOSITORY glfw/glfw
|
||||||
|
GIT_TAG 3.4
|
||||||
|
OPTIONS
|
||||||
|
"GLFW_BUILD_EXAMPLES OFF"
|
||||||
|
"GLFW_BUILD_TESTS OFF"
|
||||||
|
"GLFW_BUILD_DOCS OFF"
|
||||||
|
"GLFW_INSTALL OFF"
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
)
|
||||||
|
add_library(TracyGlfw3 INTERFACE)
|
||||||
|
target_link_libraries(TracyGlfw3 INTERFACE glfw)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# freetype
|
||||||
|
|
||||||
|
pkg_check_modules(FREETYPE freetype2)
|
||||||
|
if (FREETYPE_FOUND AND NOT DOWNLOAD_FREETYPE)
|
||||||
|
add_library(TracyFreetype INTERFACE)
|
||||||
|
target_include_directories(TracyFreetype INTERFACE ${FREETYPE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyFreetype INTERFACE ${FREETYPE_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME freetype
|
||||||
|
GITHUB_REPOSITORY freetype/freetype
|
||||||
|
GIT_TAG VER-2-13-3
|
||||||
|
OPTIONS
|
||||||
|
"FT_DISABLE_HARFBUZZ ON"
|
||||||
|
"FT_WITH_HARFBUZZ OFF"
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
)
|
||||||
|
add_library(TracyFreetype INTERFACE)
|
||||||
|
target_link_libraries(TracyFreetype INTERFACE freetype)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Zstd
|
||||||
|
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME zstd
|
||||||
|
GITHUB_REPOSITORY facebook/zstd
|
||||||
|
GIT_TAG v1.5.7
|
||||||
|
OPTIONS
|
||||||
|
"ZSTD_BUILD_SHARED OFF"
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
SOURCE_SUBDIR build/cmake
|
||||||
|
)
|
||||||
|
|
||||||
|
# Diff Template Library
|
||||||
|
|
||||||
|
set(DTL_DIR "${ROOT_DIR}/dtl")
|
||||||
|
file(GLOB_RECURSE DTL_HEADERS CONFIGURE_DEPENDS RELATIVE ${DTL_DIR} "*.hpp")
|
||||||
|
add_library(TracyDtl INTERFACE)
|
||||||
|
target_sources(TracyDtl INTERFACE ${DTL_HEADERS})
|
||||||
|
target_include_directories(TracyDtl INTERFACE ${DTL_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
# Get Opt
|
||||||
|
|
||||||
|
set(GETOPT_DIR "${ROOT_DIR}/getopt")
|
||||||
|
set(GETOPT_SOURCES ${GETOPT_DIR}/getopt.c)
|
||||||
|
set(GETOPT_HEADERS ${GETOPT_DIR}/getopt.h)
|
||||||
|
add_library(TracyGetOpt STATIC EXCLUDE_FROM_ALL ${GETOPT_SOURCES} ${GETOPT_HEADERS})
|
||||||
|
target_include_directories(TracyGetOpt PUBLIC ${GETOPT_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
# ImGui
|
||||||
|
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME ImGui
|
||||||
|
GITHUB_REPOSITORY ocornut/imgui
|
||||||
|
GIT_TAG v1.91.8-docking
|
||||||
|
DOWNLOAD_ONLY TRUE
|
||||||
|
PATCHES
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/imgui-emscripten.patch"
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/imgui-loader.patch"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(IMGUI_SOURCES
|
||||||
|
imgui_widgets.cpp
|
||||||
|
imgui_draw.cpp
|
||||||
|
imgui_demo.cpp
|
||||||
|
imgui.cpp
|
||||||
|
imgui_tables.cpp
|
||||||
|
misc/freetype/imgui_freetype.cpp
|
||||||
|
backends/imgui_impl_opengl3.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
list(TRANSFORM IMGUI_SOURCES PREPEND "${ImGui_SOURCE_DIR}/")
|
||||||
|
|
||||||
|
add_library(TracyImGui STATIC EXCLUDE_FROM_ALL ${IMGUI_SOURCES})
|
||||||
|
target_include_directories(TracyImGui PUBLIC ${ImGui_SOURCE_DIR})
|
||||||
|
target_link_libraries(TracyImGui PUBLIC TracyFreetype)
|
||||||
|
target_compile_definitions(TracyImGui PRIVATE "IMGUI_ENABLE_FREETYPE")
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
target_compile_definitions(TracyImGui PRIVATE "IMGUI_DISABLE_DEBUG_TOOLS")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# NFD
|
||||||
|
|
||||||
|
if (NOT NO_FILESELECTOR AND NOT EMSCRIPTEN)
|
||||||
|
set(NFD_DIR "${ROOT_DIR}/nfd")
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_win.cpp")
|
||||||
|
elseif (APPLE)
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_cocoa.m")
|
||||||
|
else()
|
||||||
|
if (GTK_FILESELECTOR)
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_gtk.cpp")
|
||||||
|
else()
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_portal.cpp")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GLOB_RECURSE NFD_HEADERS CONFIGURE_DEPENDS RELATIVE ${NFD_DIR} "*.h")
|
||||||
|
add_library(TracyNfd STATIC EXCLUDE_FROM_ALL ${NFD_SOURCES} ${NFD_HEADERS})
|
||||||
|
target_include_directories(TracyNfd PUBLIC ${NFD_DIR})
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
find_library(APPKIT_LIBRARY AppKit)
|
||||||
|
find_library(UNIFORMTYPEIDENTIFIERS_LIBRARY UniformTypeIdentifiers)
|
||||||
|
target_link_libraries(TracyNfd PUBLIC ${APPKIT_LIBRARY} ${UNIFORMTYPEIDENTIFIERS_LIBRARY})
|
||||||
|
elseif (UNIX)
|
||||||
|
if (GTK_FILESELECTOR)
|
||||||
|
pkg_check_modules(GTK3 gtk+-3.0)
|
||||||
|
if (NOT GTK3_FOUND)
|
||||||
|
message(FATAL_ERROR "GTK3 not found. Please install it or set GTK_FILESELECTOR to OFF.")
|
||||||
|
endif()
|
||||||
|
add_library(TracyGtk3 INTERFACE)
|
||||||
|
target_include_directories(TracyGtk3 INTERFACE ${GTK3_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyGtk3 INTERFACE ${GTK3_LINK_LIBRARIES})
|
||||||
|
target_link_libraries(TracyNfd PUBLIC TracyGtk3)
|
||||||
|
else()
|
||||||
|
pkg_check_modules(DBUS dbus-1)
|
||||||
|
if (NOT DBUS_FOUND)
|
||||||
|
message(FATAL_ERROR "D-Bus not found. Please install it or set GTK_FILESELECTOR to ON.")
|
||||||
|
endif()
|
||||||
|
add_library(TracyDbus INTERFACE)
|
||||||
|
target_include_directories(TracyDbus INTERFACE ${DBUS_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyDbus INTERFACE ${DBUS_LINK_LIBRARIES})
|
||||||
|
target_link_libraries(TracyNfd PUBLIC TracyDbus)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# PPQSort
|
||||||
|
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME PPQSort
|
||||||
|
GITHUB_REPOSITORY GabTux/PPQSort
|
||||||
|
VERSION 1.0.5
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
)
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
|
|||||||
|
|
||||||
message("Parsing public/common/TracyVersion.hpp file")
|
message("Parsing public/common/TracyVersion.hpp file")
|
||||||
|
|
||||||
file(READ "public/common/TracyVersion.hpp" version)
|
file(READ "${CMAKE_CURRENT_LIST_DIR}/../public/common/TracyVersion.hpp" version)
|
||||||
|
|
||||||
# Note: This looks for a specific pattern in TracyVersion.hpp, if it changes
|
# Note: This looks for a specific pattern in TracyVersion.hpp, if it changes
|
||||||
# this needs updating.
|
# this needs updating.
|
||||||
@ -11,12 +11,14 @@ string(REGEX MATCH "Major = ([0-9]+)" _ ${version})
|
|||||||
# This works do to the above () subexpression selection. See
|
# This works do to the above () subexpression selection. See
|
||||||
# https://cmake.org/cmake/help/latest/command/string.html#regex-match for more
|
# https://cmake.org/cmake/help/latest/command/string.html#regex-match for more
|
||||||
# details
|
# details
|
||||||
set(major ${CMAKE_MATCH_1})
|
set(TRACY_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
string(REGEX MATCH "Minor = ([0-9]+)" _ ${version})
|
string(REGEX MATCH "Minor = ([0-9]+)" _ ${version})
|
||||||
set(minor ${CMAKE_MATCH_1})
|
set(TRACY_VERSION_MINOR ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
string(REGEX MATCH "Patch = ([0-9]+)" _ ${version})
|
string(REGEX MATCH "Patch = ([0-9]+)" _ ${version})
|
||||||
set(patch ${CMAKE_MATCH_1})
|
set(TRACY_VERSION_PATCH ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
message("VERSION ${major}.${minor}.${patch}")
|
set(TRACY_VERSION_STRING "${TRACY_VERSION_MAJOR}.${TRACY_VERSION_MINOR}.${TRACY_VERSION_PATCH}")
|
||||||
|
|
||||||
|
message("VERSION ${TRACY_VERSION_STRING}")
|
@ -1,21 +0,0 @@
|
|||||||
# Extract the actual list of source files from a sibling Visual Studio project.
|
|
||||||
|
|
||||||
# Ensure these are simply-substituted variables, without changing their values.
|
|
||||||
SRC := $(SRC)
|
|
||||||
SRC2 := $(SRC2)
|
|
||||||
SRC3 := $(SRC3)
|
|
||||||
SRC4 := $(SRC4)
|
|
||||||
|
|
||||||
# Paths here are relative to the directory in which make was invoked, not to
|
|
||||||
# this file, so ../win32/$(PROJECT).vcxproj refers to the Visual Studio project
|
|
||||||
# of whichever tool is including this makefile fragment.
|
|
||||||
|
|
||||||
BASE := $(shell grep -E 'ClCompile.*cpp"' ../win32/$(PROJECT).vcxproj | sed -e 's/.*\"\(.*\)\".*/\1/' | sed -e 's@\\@/@g')
|
|
||||||
BASE2 := $(shell grep -E 'ClCompile.*c"' ../win32/$(PROJECT).vcxproj | sed -e 's/.*\"\(.*\)\".*/\1/' | sed -e 's@\\@/@g')
|
|
||||||
BASE4 := $(shell grep -E 'None.*S"' ../win32/$(PROJECT).vcxproj | sed -e 's/.*\"\(.*\)\".*/\1/' | sed -e 's@\\@/@g')
|
|
||||||
|
|
||||||
# The tool-specific makefile may request that certain files be omitted.
|
|
||||||
SRC += $(filter-out $(FILTER),$(BASE))
|
|
||||||
SRC2 += $(filter-out $(FILTER),$(BASE2))
|
|
||||||
SRC3 += $(filter-out $(FILTER),$(BASE3))
|
|
||||||
SRC4 += $(filter-out $(FILTER),$(BASE4))
|
|
@ -1,15 +0,0 @@
|
|||||||
ARCH := $(shell uname -m)
|
|
||||||
|
|
||||||
ifeq (1,$(shell $(CC) --version | grep clang > /dev/null && echo 1 || echo 0))
|
|
||||||
ifeq (1,$(shell ld.mold --version > /dev/null 2> /dev/null && echo 1 || echo 0))
|
|
||||||
LDFLAGS := -fuse-ld=mold
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef TRACY_NO_ISA_EXTENSIONS
|
|
||||||
ifneq (,$(filter $(ARCH),aarch64 arm64))
|
|
||||||
CFLAGS += -mcpu=native
|
|
||||||
else
|
|
||||||
CFLAGS += -march=native
|
|
||||||
endif
|
|
||||||
endif
|
|
@ -1,19 +0,0 @@
|
|||||||
ARCH := $(shell uname -m)
|
|
||||||
|
|
||||||
ifeq (0,$(shell $(CC) --version | grep clang > /dev/null && echo 1 || echo 0))
|
|
||||||
CFLAGS += -s
|
|
||||||
else
|
|
||||||
ifeq (1,$(shell ld.mold --version > /dev/null 2> /dev/null && echo 1 || echo 0))
|
|
||||||
LDFLAGS := -s -fuse-ld=mold
|
|
||||||
else
|
|
||||||
LDFLAGS := -s
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef TRACY_NO_ISA_EXTENSIONS
|
|
||||||
ifneq (,$(filter $(ARCH),aarch64 arm64))
|
|
||||||
CFLAGS += -mcpu=native
|
|
||||||
else
|
|
||||||
CFLAGS += -march=native
|
|
||||||
endif
|
|
||||||
endif
|
|
@ -1,84 +0,0 @@
|
|||||||
# Common code needed by most Tracy Unix Makefiles.
|
|
||||||
|
|
||||||
# Ensure these are simply-substituted variables, without changing their values.
|
|
||||||
LIBS := $(LIBS)
|
|
||||||
|
|
||||||
ifndef NO_TBB
|
|
||||||
# Tracy does not use TBB directly, but the implementation of parallel algorithms
|
|
||||||
# in some versions of libstdc++ depends on TBB. When it does, you must
|
|
||||||
# explicitly link against -ltbb.
|
|
||||||
#
|
|
||||||
# Some distributions have pgk-config files for TBB, others don't.
|
|
||||||
ifeq (0,$(shell pkg-config --libs tbb >/dev/null 2>&1; echo $$?))
|
|
||||||
LIBS += $(shell pkg-config --libs tbb)
|
|
||||||
else ifeq (0,$(shell ld -ltbb -o /dev/null 2>/dev/null; echo $$?))
|
|
||||||
LIBS += -ltbb
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
OBJDIRBASE := obj/$(BUILD)
|
|
||||||
OBJDIR := $(OBJDIRBASE)/o/o/o
|
|
||||||
|
|
||||||
OBJ := $(addprefix $(OBJDIR)/,$(SRC:%.cpp=%.o))
|
|
||||||
OBJ2 := $(addprefix $(OBJDIR)/,$(SRC2:%.c=%.o))
|
|
||||||
OBJ3 := $(addprefix $(OBJDIR)/,$(SRC3:%.m=%.o))
|
|
||||||
OBJ4 := $(addprefix $(OBJDIR)/,$(SRC4:%.S=%.o))
|
|
||||||
|
|
||||||
all: $(IMAGE)
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.cpp
|
|
||||||
$(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< -o $@
|
|
||||||
|
|
||||||
$(OBJDIR)/%.d : %.cpp
|
|
||||||
@echo Resolving dependencies of $<
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@$(CXX) -MM $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< > $@.$$$$; \
|
|
||||||
sed 's,.*\.o[ :]*,$(OBJDIR)/$(<:.cpp=.o) $@ : ,g' < $@.$$$$ > $@; \
|
|
||||||
rm -f $@.$$$$
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.c
|
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
|
||||||
|
|
||||||
$(OBJDIR)/%.d : %.c
|
|
||||||
@echo Resolving dependencies of $<
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@$(CC) -MM $(INCLUDES) $(CFLAGS) $(DEFINES) $< > $@.$$$$; \
|
|
||||||
sed 's,.*\.o[ :]*,$(OBJDIR)/$(<:.c=.o) $@ : ,g' < $@.$$$$ > $@; \
|
|
||||||
rm -f $@.$$$$
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.m
|
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
|
||||||
|
|
||||||
$(OBJDIR)/%.d : %.m
|
|
||||||
@echo Resolving dependencies of $<
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@$(CC) -MM $(INCLUDES) $(CFLAGS) $(DEFINES) $< > $@.$$$$; \
|
|
||||||
sed 's,.*\.o[ :]*,$(OBJDIR)/$(<:.m=.o) $@ : ,g' < $@.$$$$ > $@; \
|
|
||||||
rm -f $@.$$$$
|
|
||||||
|
|
||||||
$(OBJDIR)/%.o: %.S
|
|
||||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
|
||||||
|
|
||||||
$(OBJDIR)/%.d : %.S
|
|
||||||
@echo Resolving dependencies of $<
|
|
||||||
@mkdir -p $(@D)
|
|
||||||
@$(CC) -MM $(INCLUDES) $(CFLAGS) $(DEFINES) $< > $@.$$$$; \
|
|
||||||
sed 's,.*\.o[ :]*,$(OBJDIR)/$(<:.m=.o) $@ : ,g' < $@.$$$$ > $@; \
|
|
||||||
rm -f $@.$$$$
|
|
||||||
|
|
||||||
ifeq (yes,$(SHARED_LIBRARY))
|
|
||||||
$(IMAGE): $(OBJ) $(OBJ2) $(OBJ4)
|
|
||||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(DEFINES) $(OBJ) $(OBJ2) $(OBJ4) $(LIBS) -shared -o $@
|
|
||||||
else
|
|
||||||
$(IMAGE): $(OBJ) $(OBJ2) $(OBJ3) $(OBJ4)
|
|
||||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(DEFINES) $(OBJ) $(OBJ2) $(OBJ3) $(OBJ4) $(LIBS) -o $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq "$(MAKECMDGOALS)" "clean"
|
|
||||||
-include $(addprefix $(OBJDIR)/,$(SRC:.cpp=.d)) $(addprefix $(OBJDIR)/,$(SRC2:.c=.d)) $(addprefix $(OBJDIR)/,$(SRC3:.m=.d)) $(addprefix $(OBJDIR)/,$(SRC4:.S=.d))
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(OBJDIRBASE) $(IMAGE)*
|
|
||||||
|
|
||||||
.PHONY: clean all
|
|
29
csvexport/CMakeLists.txt
Normal file
29
csvexport/CMakeLists.txt
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
option(NO_ISA_EXTENSIONS "Disable ISA extensions (don't pass -march=native or -mcpu=native to the compiler)" OFF)
|
||||||
|
|
||||||
|
set(NO_STATISTICS OFF)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
project(
|
||||||
|
tracy-csvexport
|
||||||
|
LANGUAGES C CXX
|
||||||
|
VERSION ${TRACY_VERSION_STRING}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/config.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(PROGRAM_FILES
|
||||||
|
src/csvexport.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(${PROJECT_NAME} ${PROGRAM_FILES} ${COMMON_FILES} ${SERVER_FILES})
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE TracyServer TracyGetOpt)
|
||||||
|
set_property(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
|
||||||
|
|
||||||
|
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
@ -1,16 +0,0 @@
|
|||||||
all: release
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@$(MAKE) -f debug.mk all
|
|
||||||
|
|
||||||
release:
|
|
||||||
@$(MAKE) -f release.mk all
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@$(MAKE) -f build.mk clean
|
|
||||||
|
|
||||||
db: clean
|
|
||||||
@bear -- $(MAKE) -f debug.mk all
|
|
||||||
@mv -f compile_commands.json ../../../
|
|
||||||
|
|
||||||
.PHONY: all clean debug release db
|
|
@ -1,12 +0,0 @@
|
|||||||
CFLAGS +=
|
|
||||||
CXXFLAGS := $(CFLAGS) -std=gnu++17
|
|
||||||
# DEFINES += -DTRACY_NO_STATISTICS
|
|
||||||
INCLUDES := $(shell pkg-config --cflags capstone)
|
|
||||||
LIBS := $(shell pkg-config --libs capstone) -lpthread
|
|
||||||
PROJECT := csvexport
|
|
||||||
IMAGE := $(PROJECT)-$(BUILD)
|
|
||||||
|
|
||||||
FILTER :=
|
|
||||||
include ../../../common/src-from-vcxproj.mk
|
|
||||||
|
|
||||||
include ../../../common/unix.mk
|
|
@ -1,6 +0,0 @@
|
|||||||
CFLAGS := -g3 -Wall
|
|
||||||
DEFINES := -DDEBUG
|
|
||||||
BUILD := debug
|
|
||||||
|
|
||||||
include ../../../common/unix-debug.mk
|
|
||||||
include build.mk
|
|
@ -1,9 +0,0 @@
|
|||||||
CFLAGS := -O3
|
|
||||||
ifndef TRACY_NO_LTO
|
|
||||||
CFLAGS += -flto
|
|
||||||
endif
|
|
||||||
DEFINES := -DNDEBUG
|
|
||||||
BUILD := release
|
|
||||||
|
|
||||||
include ../../../common/unix-release.mk
|
|
||||||
include build.mk
|
|
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.30907.101
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csvexport", "csvexport.vcxproj", "{447D58BF-94CD-4469-BB90-549C05D03E00}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {3E51386C-43EA-44AC-9F24-AFAFE4D63ADE}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,210 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{447D58BF-94CD-4469-BB90-549C05D03E00}</ProjectGuid>
|
|
||||||
<RootNamespace>capture</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
<VcpkgTriplet>x64-windows-static</VcpkgTriplet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<PropertyGroup Label="Vcpkg">
|
|
||||||
<VcpkgEnableManifest>true</VcpkgEnableManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
|
||||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include;$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include\capstone;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\include\capstone;$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\capstone</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>ws2_32.lib;capstone.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\debug\lib</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
||||||
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
|
||||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include;$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include\capstone;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\include\capstone;$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\capstone</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<AdditionalDependencies>ws2_32.lib;capstone.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\lib</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\getopt\getopt.c" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySocket.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracyStackFrames.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySystem.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4hc.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyPrint.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\debug.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\entropy_common.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\error_private.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\fse_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\pool.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\threading.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\xxhash.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\zstd_common.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\fse_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\hist.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\huf_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstdmt_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_literals.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_sequences.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_superblock.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_double_fast.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_fast.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_lazy.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_ldm.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_opt.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\huf_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_ddict.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress_block.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\cover.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\divsufsort.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\fastcover.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\zdict.c" />
|
|
||||||
<ClCompile Include="..\..\src\csvexport.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\getopt\getopt.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlign.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlloc.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyApi.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyColor.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyForceInline.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyMutex.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyProtocol.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyQueue.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySocket.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyStackFrames.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySystem.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyUwp.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyYield.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4hc.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyCharUtil.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMmap.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPrint.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracySlab.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTextureCompression.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyThreadCompress.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyVector.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyWorker.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\bitstream.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\compiler.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\cpu.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\debug.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\error_private.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\fse.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\huf.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\mem.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\pool.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\portability_macros.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\threading.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\xxhash.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_deps.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_trace.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\clevels.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\hist.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstdmt_compress.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_literals.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_sequences.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_superblock.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_cwksp.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_double_fast.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_fast.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_lazy.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm_geartab.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_opt.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_ddict.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_block.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\cover.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\divsufsort.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zdict.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd_errors.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\zstd\decompress\huf_decompress_amd64.S" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,371 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="src">
|
|
||||||
<UniqueIdentifier>{729c80ee-4d26-4a5e-8f1f-6c075783eb56}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="server">
|
|
||||||
<UniqueIdentifier>{cf23ef7b-7694-4154-830b-00cf053350ea}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="common">
|
|
||||||
<UniqueIdentifier>{e39d3623-47cd-4752-8da9-3ea324f964c1}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="getopt">
|
|
||||||
<UniqueIdentifier>{ee9737d2-69c7-44da-b9c7-539d18f9d4b4}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd">
|
|
||||||
<UniqueIdentifier>{44ea1742-0fd9-40ba-879c-031868509600}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\common">
|
|
||||||
<UniqueIdentifier>{2d065bba-d78e-4e44-87f7-b44cf3248260}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\compress">
|
|
||||||
<UniqueIdentifier>{a19ca3bc-2a17-49c5-a0d9-5916213de774}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\decompress">
|
|
||||||
<UniqueIdentifier>{d4181058-2198-4931-ae31-b7eda0312458}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\dictBuilder">
|
|
||||||
<UniqueIdentifier>{873c22fe-b4d7-480d-ad67-48271296f4c1}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyPrint.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\getopt\getopt.c">
|
|
||||||
<Filter>getopt</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\src\csvexport.cpp">
|
|
||||||
<Filter>src</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\debug.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\entropy_common.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\error_private.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\fse_decompress.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\pool.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\threading.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\xxhash.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\zstd_common.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\huf_decompress.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_ddict.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress_block.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\fse_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\hist.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\huf_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_literals.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_sequences.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_superblock.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_double_fast.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_fast.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_lazy.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_ldm.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_opt.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstdmt_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\cover.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\divsufsort.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\fastcover.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\zdict.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4hc.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySocket.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracyStackFrames.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySystem.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyCharUtil.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracySlab.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyVector.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyWorker.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPrint.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyThreadCompress.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMmap.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTextureCompression.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\getopt\getopt.h">
|
|
||||||
<Filter>getopt</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd_errors.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\bitstream.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\compiler.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\cpu.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\debug.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\error_private.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\fse.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\huf.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\mem.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\pool.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\threading.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\xxhash.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_deps.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_internal.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_trace.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_ddict.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_block.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_internal.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\hist.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_internal.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_literals.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_sequences.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_superblock.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_cwksp.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_double_fast.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_fast.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_lazy.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm_geartab.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_opt.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstdmt_compress.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zdict.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\cover.h">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\divsufsort.h">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\portability_macros.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\clevels.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4hc.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlign.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlloc.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyApi.h">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyColor.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyForceInline.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyMutex.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyProtocol.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyQueue.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySocket.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyStackFrames.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySystem.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyUwp.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyYield.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\zstd\decompress\huf_decompress_amd64.S">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -28,8 +28,10 @@ void print_usage_exit(int e)
|
|||||||
fprintf(stderr, " -s, --sep arg CSV separator (default: ,)\n");
|
fprintf(stderr, " -s, --sep arg CSV separator (default: ,)\n");
|
||||||
fprintf(stderr, " -c, --case Case sensitive filtering\n");
|
fprintf(stderr, " -c, --case Case sensitive filtering\n");
|
||||||
fprintf(stderr, " -e, --self Get self times\n");
|
fprintf(stderr, " -e, --self Get self times\n");
|
||||||
fprintf(stderr, " -u, --unwrap Report each zone event\n");
|
fprintf(stderr, " -u, --unwrap Report each cpu zone event\n");
|
||||||
|
fprintf(stderr, " -g, --gpu Report each gpu zone event\n" );
|
||||||
fprintf(stderr, " -m, --messages Report only messages\n");
|
fprintf(stderr, " -m, --messages Report only messages\n");
|
||||||
|
fprintf(stderr, " -p, --plot Report plot data (only with -u)\n");
|
||||||
|
|
||||||
exit(e);
|
exit(e);
|
||||||
}
|
}
|
||||||
@ -41,7 +43,9 @@ struct Args {
|
|||||||
bool case_sensitive;
|
bool case_sensitive;
|
||||||
bool self_time;
|
bool self_time;
|
||||||
bool unwrap;
|
bool unwrap;
|
||||||
|
bool show_gpu;
|
||||||
bool unwrapMessages;
|
bool unwrapMessages;
|
||||||
|
bool plot;
|
||||||
};
|
};
|
||||||
|
|
||||||
Args parse_args(int argc, char** argv)
|
Args parse_args(int argc, char** argv)
|
||||||
@ -51,7 +55,7 @@ Args parse_args(int argc, char** argv)
|
|||||||
print_usage_exit(1);
|
print_usage_exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
Args args = { "", ",", "", false, false, false, false };
|
Args args = { "", ",", "", false, false, false, false, false, false };
|
||||||
|
|
||||||
struct option long_opts[] = {
|
struct option long_opts[] = {
|
||||||
{ "help", no_argument, NULL, 'h' },
|
{ "help", no_argument, NULL, 'h' },
|
||||||
@ -60,12 +64,14 @@ Args parse_args(int argc, char** argv)
|
|||||||
{ "case", no_argument, NULL, 'c' },
|
{ "case", no_argument, NULL, 'c' },
|
||||||
{ "self", no_argument, NULL, 'e' },
|
{ "self", no_argument, NULL, 'e' },
|
||||||
{ "unwrap", no_argument, NULL, 'u' },
|
{ "unwrap", no_argument, NULL, 'u' },
|
||||||
|
{ "gpu", no_argument, NULL, 'g' },
|
||||||
{ "messages", no_argument, NULL, 'm' },
|
{ "messages", no_argument, NULL, 'm' },
|
||||||
|
{ "plot", no_argument, NULL, 'p' },
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while ((c = getopt_long(argc, argv, "hf:s:ceum", long_opts, NULL)) != -1)
|
while ((c = getopt_long(argc, argv, "hf:s:ceugmp", long_opts, NULL)) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
@ -87,9 +93,15 @@ Args parse_args(int argc, char** argv)
|
|||||||
case 'u':
|
case 'u':
|
||||||
args.unwrap = true;
|
args.unwrap = true;
|
||||||
break;
|
break;
|
||||||
|
case 'g':
|
||||||
|
args.show_gpu = true;
|
||||||
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
args.unwrapMessages = true;
|
args.unwrapMessages = true;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
args.plot = true;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
print_usage_exit(1);
|
print_usage_exit(1);
|
||||||
break;
|
break;
|
||||||
@ -241,6 +253,68 @@ int main(int argc, char** argv)
|
|||||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args.show_gpu)
|
||||||
|
{
|
||||||
|
auto& gpu_slz = worker.GetGpuSourceLocationZones();
|
||||||
|
tracy::Vector<decltype( gpu_slz.begin() )> gpu_slz_selected;
|
||||||
|
gpu_slz_selected.reserve( gpu_slz.size() );
|
||||||
|
|
||||||
|
uint32_t total_cnt = 0;
|
||||||
|
for (auto it = gpu_slz.begin(); it != gpu_slz.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->second.total != 0)
|
||||||
|
{
|
||||||
|
++total_cnt;
|
||||||
|
if (args.filter[0] == '\0')
|
||||||
|
{
|
||||||
|
gpu_slz_selected.push_back_no_space_check( it );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
auto name = get_name( it->first, worker );
|
||||||
|
if (is_substring( args.filter, name, args.case_sensitive))
|
||||||
|
{
|
||||||
|
gpu_slz_selected.push_back_no_space_check( it );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<const char*> columns;
|
||||||
|
columns = {"name", "src_file", "Time from start of program", "GPU execution time"};
|
||||||
|
|
||||||
|
std::string header = join(columns, args.separator);
|
||||||
|
printf("%s\n", header.data());
|
||||||
|
|
||||||
|
const auto last_time = worker.GetLastTime();
|
||||||
|
for (auto& it : gpu_slz_selected)
|
||||||
|
{
|
||||||
|
std::vector<std::string> values( columns.size() );
|
||||||
|
|
||||||
|
values[0] = get_name( it->first, worker );
|
||||||
|
|
||||||
|
const auto& srcloc = worker.GetSourceLocation( it->first );
|
||||||
|
values[1] = worker.GetString( srcloc.file );
|
||||||
|
|
||||||
|
const auto& zone_data = it->second;
|
||||||
|
for (const auto& zone_thread_data : zone_data.zones)
|
||||||
|
{
|
||||||
|
tracy::GpuEvent* gpu_event = zone_thread_data.Zone();
|
||||||
|
const auto start = gpu_event->GpuStart();
|
||||||
|
const auto end = gpu_event->GpuEnd();
|
||||||
|
|
||||||
|
values[2] = std::to_string( start );
|
||||||
|
|
||||||
|
auto timespan = end - start;
|
||||||
|
values[3] = std::to_string( timespan );
|
||||||
|
|
||||||
|
std::string row = join( values, args.separator );
|
||||||
|
printf( "%s\n", row.data() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
auto& slz = worker.GetSourceLocationZones();
|
auto& slz = worker.GetSourceLocationZones();
|
||||||
tracy::Vector<decltype(slz.begin())> slz_selected;
|
tracy::Vector<decltype(slz.begin())> slz_selected;
|
||||||
slz_selected.reserve(slz.size());
|
slz_selected.reserve(slz.size());
|
||||||
@ -270,7 +344,7 @@ int main(int argc, char** argv)
|
|||||||
if (args.unwrap)
|
if (args.unwrap)
|
||||||
{
|
{
|
||||||
columns = {
|
columns = {
|
||||||
"name", "src_file", "src_line", "ns_since_start", "exec_time_ns", "thread"
|
"name", "src_file", "src_line", "ns_since_start", "exec_time_ns", "thread", "value"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -313,6 +387,12 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
values[4] = std::to_string(timespan);
|
values[4] = std::to_string(timespan);
|
||||||
values[5] = std::to_string(tId);
|
values[5] = std::to_string(tId);
|
||||||
|
if (worker.HasZoneExtra(*zone_event)) {
|
||||||
|
const auto& text = worker.GetZoneExtra(*zone_event).text;
|
||||||
|
if (text.Active()) {
|
||||||
|
values[6] = worker.GetString(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string row = join(values, args.separator);
|
std::string row = join(values, args.separator);
|
||||||
printf("%s\n", row.data());
|
printf("%s\n", row.data());
|
||||||
@ -349,5 +429,26 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(args.plot && args.unwrap)
|
||||||
|
{
|
||||||
|
auto& plots = worker.GetPlots();
|
||||||
|
for(const auto& plot : plots)
|
||||||
|
{
|
||||||
|
std::vector<std::string> values(columns.size());
|
||||||
|
values[0] = worker.GetString(plot->name);
|
||||||
|
|
||||||
|
for(const auto& val : plot->data)
|
||||||
|
{
|
||||||
|
if (args.unwrap)
|
||||||
|
{
|
||||||
|
values[3] = std::to_string(val.time.Val());
|
||||||
|
values[6] = std::to_string(val.val);
|
||||||
|
}
|
||||||
|
std::string row = join(values, args.separator);
|
||||||
|
printf("%s\n", row.data());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
370
doc/design.svg
370
doc/design.svg
@ -1,370 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
id="svg8"
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 139.17125 37.041668"
|
|
||||||
height="140"
|
|
||||||
width="526.00159">
|
|
||||||
<defs
|
|
||||||
id="defs2">
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker6660"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path6658" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker6158"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path6156" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="Arrow1Send"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path4694" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker5984"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path5982" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
orient="auto"
|
|
||||||
refY="0"
|
|
||||||
refX="0"
|
|
||||||
id="marker5482"
|
|
||||||
style="overflow:visible">
|
|
||||||
<path
|
|
||||||
id="path5480"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
orient="auto"
|
|
||||||
refY="0"
|
|
||||||
refX="0"
|
|
||||||
id="marker5472"
|
|
||||||
style="overflow:visible">
|
|
||||||
<path
|
|
||||||
id="path5470"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker5378"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path5376" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker5308"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path5306" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="Arrow1Mend"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path4688" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
orient="auto"
|
|
||||||
refY="0"
|
|
||||||
refX="0"
|
|
||||||
id="marker5170"
|
|
||||||
style="overflow:visible">
|
|
||||||
<path
|
|
||||||
id="path5168"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
orient="auto"
|
|
||||||
refY="0"
|
|
||||||
refX="0"
|
|
||||||
id="marker4963"
|
|
||||||
style="overflow:visible">
|
|
||||||
<path
|
|
||||||
id="path4961"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
transform="matrix(-0.8,0,0,-0.8,-10,0)" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker6158-2"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto">
|
|
||||||
<path
|
|
||||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
|
||||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
|
||||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
|
||||||
id="path6156-2" />
|
|
||||||
</marker>
|
|
||||||
</defs>
|
|
||||||
<metadata
|
|
||||||
id="metadata5">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
transform="translate(-18.388332,-17.864582)"
|
|
||||||
id="layer1">
|
|
||||||
<g
|
|
||||||
id="g4666">
|
|
||||||
<rect
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect4607"
|
|
||||||
width="17.197916"
|
|
||||||
height="6.614583"
|
|
||||||
x="18.520834"
|
|
||||||
y="20.510416" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="20.968229"
|
|
||||||
y="24.869841"
|
|
||||||
id="text4611"><tspan
|
|
||||||
id="tspan4609"
|
|
||||||
x="20.968229"
|
|
||||||
y="24.869841"
|
|
||||||
style="stroke-width:0.26458332px">Thread 1</tspan></text>
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
id="g4661">
|
|
||||||
<rect
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect4607-4"
|
|
||||||
width="17.197916"
|
|
||||||
height="6.6145835"
|
|
||||||
x="18.520834"
|
|
||||||
y="32.416668" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;line-height:6.61458349px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="20.979254"
|
|
||||||
y="36.776093"
|
|
||||||
id="text4611-8"><tspan
|
|
||||||
id="tspan4609-9"
|
|
||||||
x="20.979254"
|
|
||||||
y="36.776093"
|
|
||||||
style="stroke-width:0.26458332px">Thread 2</tspan></text>
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
id="g4671">
|
|
||||||
<rect
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect4607-8"
|
|
||||||
width="17.197916"
|
|
||||||
height="6.6145835"
|
|
||||||
x="18.520832"
|
|
||||||
y="44.322918" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;line-height:6.61458349px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="20.951002"
|
|
||||||
y="48.682343"
|
|
||||||
id="text4611-89"><tspan
|
|
||||||
id="tspan4609-6"
|
|
||||||
x="20.951002"
|
|
||||||
y="48.682343"
|
|
||||||
style="stroke-width:0.26458332px">Thread 3</tspan></text>
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
id="g5096">
|
|
||||||
<ellipse
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path4644"
|
|
||||||
cx="67.775978"
|
|
||||||
cy="36.3787"
|
|
||||||
rx="10.583333"
|
|
||||||
ry="4.6302085" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="67.733261"
|
|
||||||
y="35.623535"
|
|
||||||
id="text4648"><tspan
|
|
||||||
id="tspan4646"
|
|
||||||
x="67.733261"
|
|
||||||
y="35.623535"
|
|
||||||
style="text-align:center;text-anchor:middle;stroke-width:0.26458332px">Tracy</tspan><tspan
|
|
||||||
x="67.733261"
|
|
||||||
y="39.151314"
|
|
||||||
style="text-align:center;text-anchor:middle;stroke-width:0.26458332px"
|
|
||||||
id="tspan4650">client</tspan></text>
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
id="path4673"
|
|
||||||
d="m 37.041666,24.479166 19.84375,7.937502"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5472)" />
|
|
||||||
<path
|
|
||||||
id="path4675"
|
|
||||||
d="m 37.041666,46.968751 19.84375,-6.614584"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5482)" />
|
|
||||||
<path
|
|
||||||
id="path4677"
|
|
||||||
d="M 37.041667,36.385417 H 55.5625"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5378)" />
|
|
||||||
<path
|
|
||||||
id="path5059"
|
|
||||||
d="M 84.666667,17.864582 V 54.90625"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.05833327, 2.11666654;stroke-dashoffset:0;stroke-opacity:1" />
|
|
||||||
<g
|
|
||||||
id="g5106">
|
|
||||||
<ellipse
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path4644-1"
|
|
||||||
cx="101.98283"
|
|
||||||
cy="36.56768"
|
|
||||||
rx="10.583333"
|
|
||||||
ry="4.6302085" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="101.90772"
|
|
||||||
y="35.812515"
|
|
||||||
id="text4648-2"><tspan
|
|
||||||
id="tspan4646-5"
|
|
||||||
x="101.90772"
|
|
||||||
y="35.812515"
|
|
||||||
style="text-align:center;text-anchor:middle;stroke-width:0.26458332px">Tracy</tspan><tspan
|
|
||||||
x="101.90772"
|
|
||||||
y="39.340294"
|
|
||||||
style="text-align:center;text-anchor:middle;stroke-width:0.26458332px"
|
|
||||||
id="tspan4650-1">server</tspan></text>
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
id="path5108"
|
|
||||||
d="M 79.375,37.708333 H 89.958333"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6660)" />
|
|
||||||
<path
|
|
||||||
id="path5110"
|
|
||||||
d="M 89.958333,35.0625 H 79.375"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5308)" />
|
|
||||||
<g
|
|
||||||
transform="translate(-2.64619,-1.3704153)"
|
|
||||||
id="g6152">
|
|
||||||
<ellipse
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
||||||
id="path6114"
|
|
||||||
cx="128.98439"
|
|
||||||
cy="33.692333"
|
|
||||||
rx="4.6302085"
|
|
||||||
ry="1.2756696" />
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
||||||
d="m 124.36251,41.677042 c -0.004,0.01582 -0.007,0.03168 -0.008,0.04754 5.3e-4,0.704384 2.07327,1.275328 4.62995,1.275373 2.55689,3.5e-5 4.62988,-0.570931 4.63048,-1.275373 -10e-4,-0.01585 -0.003,-0.03171 -0.006,-0.04754"
|
|
||||||
id="path6114-1" />
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
d="m 124.35417,33.739583 v 8.021022"
|
|
||||||
id="path6138" />
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
d="m 133.61458,33.739582 v 8.051744"
|
|
||||||
id="path6140" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="126.89217"
|
|
||||||
y="39.409225"
|
|
||||||
id="text6144"><tspan
|
|
||||||
id="tspan6142"
|
|
||||||
x="126.89217"
|
|
||||||
y="39.409225"
|
|
||||||
style="stroke-width:0.26458332px">DB</tspan></text>
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
id="path6154"
|
|
||||||
d="m 113.77082,36.385418 h 6.61459"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6158)" />
|
|
||||||
<g
|
|
||||||
transform="translate(2.6458333,1.2715659e-6)"
|
|
||||||
id="g6241">
|
|
||||||
<rect
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26499999;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
||||||
id="rect6232"
|
|
||||||
width="17.197916"
|
|
||||||
height="5.291667"
|
|
||||||
x="137.58333"
|
|
||||||
y="33.739582" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-weight:normal;font-size:2.82222223px;line-height:6.61458302px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
|
||||||
x="140.8851"
|
|
||||||
y="37.164005"
|
|
||||||
id="text6236"><tspan
|
|
||||||
id="tspan6234"
|
|
||||||
x="140.8851"
|
|
||||||
y="37.164005"
|
|
||||||
style="stroke-width:0.26458332px">Display</tspan></text>
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
id="path6154-3"
|
|
||||||
d="m 132.29166,36.385417 h 6.61459"
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6158-2)" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
@ -164,7 +164,7 @@ namespace dtl {
|
|||||||
return trivial;
|
return trivial;
|
||||||
}
|
}
|
||||||
|
|
||||||
void enableTrivial () const {
|
void enableTrivial () {
|
||||||
this->trivial = true;
|
this->trivial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include <algorithm>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include <CL/cl.h>
|
#include <CL/cl.h>
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
<magic>
|
<magic>
|
||||||
<match type="string" value="tlZ\x04" offset="0"/>
|
<match type="string" value="tlZ\x04" offset="0"/>
|
||||||
<match type="string" value="tZst" offset="0"/>
|
<match type="string" value="tZst" offset="0"/>
|
||||||
|
<match type="string" value="tr\xFDP" offset="0"/>
|
||||||
</magic>
|
</magic>
|
||||||
<glob pattern="*.tracy"/>
|
<glob pattern="*.tracy"/>
|
||||||
</mime-type>
|
</mime-type>
|
||||||
|
30
extra/git-ref.py
Normal file
30
extra/git-ref.py
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/env python3
|
||||||
|
|
||||||
|
import filecmp
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
out = "GitRef.hpp"
|
||||||
|
tmp = f"{out}.tmp"
|
||||||
|
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
rev = sys.argv[1]
|
||||||
|
else:
|
||||||
|
rev = "HEAD"
|
||||||
|
|
||||||
|
try:
|
||||||
|
ref = subprocess.run(["git", "rev-parse", "--short", rev], check=True, capture_output=True).stdout.decode().strip()
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
ref = "unknown"
|
||||||
|
|
||||||
|
if not os.path.exists(out):
|
||||||
|
with open(out, "w") as f:
|
||||||
|
print(f"#pragma once\n\nnamespace tracy {{ static inline const char* GitRef = \"{ref}\"; }}", file=f)
|
||||||
|
else:
|
||||||
|
with open(tmp, "w") as f:
|
||||||
|
print(f"#pragma once\n\nnamespace tracy {{ static inline const char* GitRef = \"{ref}\"; }}", file=f)
|
||||||
|
if not filecmp.cmp(out, tmp, shallow=False):
|
||||||
|
os.replace(tmp, out)
|
||||||
|
else:
|
||||||
|
os.unlink(tmp)
|
154
extra/natvis.py
Normal file
154
extra/natvis.py
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
import lldb
|
||||||
|
|
||||||
|
def VectorSummary(value, dict):
|
||||||
|
v = value.GetNonSyntheticValue()
|
||||||
|
size = v.GetChildMemberWithName('m_size').GetValueAsUnsigned()
|
||||||
|
capacityVal = v.GetChildMemberWithName('m_capacity').GetValueAsUnsigned()
|
||||||
|
capacity = 1 << capacityVal if capacityVal < 63 else 'read-only'
|
||||||
|
magic = bool(v.GetChildMemberWithName('m_magic').GetValueAsUnsigned())
|
||||||
|
return f'{{size={size}, capacity={capacity}, magic={magic}}}'
|
||||||
|
|
||||||
|
def ShortPtrSummary(value, dict):
|
||||||
|
val = value.GetNonSyntheticValue()
|
||||||
|
ptr = val.GetChildMemberWithName('m_ptr')
|
||||||
|
type = val.GetType().GetTemplateArgumentType(0)
|
||||||
|
p0 = ptr.GetChildAtIndex(0).GetValueAsUnsigned()
|
||||||
|
p1 = ptr.GetChildAtIndex(1).GetValueAsUnsigned()
|
||||||
|
p2 = ptr.GetChildAtIndex(2).GetValueAsUnsigned()
|
||||||
|
p3 = ptr.GetChildAtIndex(3).GetValueAsUnsigned()
|
||||||
|
p4 = ptr.GetChildAtIndex(4).GetValueAsUnsigned()
|
||||||
|
p5 = ptr.GetChildAtIndex(5).GetValueAsUnsigned()
|
||||||
|
#return '0x{0:02x}{1:02x}{2:02x}{3:02x}{4:02x}{5:02x}'.format(p5, p4, p3, p2, p1, p0)
|
||||||
|
return value.CreateValueFromAddress('m_ptr', p0 | (p1 << 8) | (p2 << 16) | (p3 << 24) | (p4 << 32) | (p5 << 40), type)
|
||||||
|
|
||||||
|
class ShortPtrPrinter:
|
||||||
|
def __init__(self, val, dict):
|
||||||
|
self.val = val
|
||||||
|
self.type = self.val.GetType().GetTemplateArgumentType(0)
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
ptr = self.val.GetChildMemberWithName('m_ptr')
|
||||||
|
p0 = ptr.GetChildAtIndex(0).GetValueAsUnsigned()
|
||||||
|
p1 = ptr.GetChildAtIndex(1).GetValueAsUnsigned()
|
||||||
|
p2 = ptr.GetChildAtIndex(2).GetValueAsUnsigned()
|
||||||
|
p3 = ptr.GetChildAtIndex(3).GetValueAsUnsigned()
|
||||||
|
p4 = ptr.GetChildAtIndex(4).GetValueAsUnsigned()
|
||||||
|
p5 = ptr.GetChildAtIndex(5).GetValueAsUnsigned()
|
||||||
|
self.ptr = p0 | (p1 << 8) | (p2 << 16) | (p3 << 24) | (p4 << 32) | (p5 << 40)
|
||||||
|
|
||||||
|
def num_children(self):
|
||||||
|
return 1
|
||||||
|
|
||||||
|
def get_child_index(self, name):
|
||||||
|
return int(name.lstrip('[').rstrip(']'))
|
||||||
|
|
||||||
|
def get_child_at_index(self, index):
|
||||||
|
return self.val.CreateValueFromAddress('m_ptr', self.ptr, self.type)
|
||||||
|
|
||||||
|
class VectorPrinter:
|
||||||
|
def __init__(self, val, dict):
|
||||||
|
self.val = val
|
||||||
|
self.magic = bool(val.GetChildMemberWithName('m_magic').GetValueAsUnsigned())
|
||||||
|
if self.magic:
|
||||||
|
self.type = val.GetType().GetTemplateArgumentType(0).GetTemplateArgumentType(0)
|
||||||
|
else:
|
||||||
|
self.type = val.GetType().GetTemplateArgumentType(0)
|
||||||
|
self.stride = self.type.GetByteSize()
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
ptr = self.val.GetChildMemberWithName('m_ptr').GetChildMemberWithName('m_ptr')
|
||||||
|
p0 = ptr.GetChildAtIndex(0).GetValueAsUnsigned()
|
||||||
|
p1 = ptr.GetChildAtIndex(1).GetValueAsUnsigned()
|
||||||
|
p2 = ptr.GetChildAtIndex(2).GetValueAsUnsigned()
|
||||||
|
p3 = ptr.GetChildAtIndex(3).GetValueAsUnsigned()
|
||||||
|
p4 = ptr.GetChildAtIndex(4).GetValueAsUnsigned()
|
||||||
|
p5 = ptr.GetChildAtIndex(5).GetValueAsUnsigned()
|
||||||
|
self.ptr = p0 | (p1 << 8) | (p2 << 16) | (p3 << 24) | (p4 << 32) | (p5 << 40)
|
||||||
|
self.size = self.val.GetChildMemberWithName('m_size').GetValueAsUnsigned()
|
||||||
|
|
||||||
|
def num_children(self):
|
||||||
|
return self.size
|
||||||
|
|
||||||
|
def get_child_index(self, name):
|
||||||
|
return int(name.lstrip('[').rstrip(']'))
|
||||||
|
|
||||||
|
def get_child_at_index(self, index):
|
||||||
|
return self.val.CreateValueFromAddress('[%d]' % index, self.ptr + index * self.stride, self.type)
|
||||||
|
|
||||||
|
def Int24Summary(value, dict):
|
||||||
|
val = value.GetNonSyntheticValue().GetChildMemberWithName('m_val')
|
||||||
|
p0 = val.GetChildAtIndex(0).GetValueAsUnsigned()
|
||||||
|
p1 = val.GetChildAtIndex(1).GetValueAsUnsigned()
|
||||||
|
p2 = val.GetChildAtIndex(2).GetValueAsUnsigned()
|
||||||
|
return p0 | (p1 << 8) | (p2 << 16)
|
||||||
|
|
||||||
|
def Int48Summary(value, dict):
|
||||||
|
val = value.GetNonSyntheticValue().GetChildMemberWithName('m_val')
|
||||||
|
p0 = val.GetChildAtIndex(0).GetValueAsUnsigned()
|
||||||
|
p1 = val.GetChildAtIndex(1).GetValueAsUnsigned()
|
||||||
|
p2 = val.GetChildAtIndex(2).GetValueAsUnsigned()
|
||||||
|
p3 = val.GetChildAtIndex(3).GetValueAsUnsigned()
|
||||||
|
p4 = val.GetChildAtIndex(4).GetValueAsUnsigned()
|
||||||
|
p5 = val.GetChildAtIndex(5).GetValueAsUnsigned()
|
||||||
|
return p0 | (p1 << 8) | (p2 << 16) | (p3 << 24) | (p4 << 32) | (p5 << 40)
|
||||||
|
|
||||||
|
class ZoneEventPrinter:
|
||||||
|
def __init__(self, val, dict):
|
||||||
|
self.val = val
|
||||||
|
|
||||||
|
def update(self):
|
||||||
|
_start_srcloc = self.val.GetChildMemberWithName('_start_srcloc').GetValueAsUnsigned()
|
||||||
|
_child2 = self.val.GetChildMemberWithName('_child2').GetValueAsUnsigned()
|
||||||
|
_end_child1 = self.val.GetChildMemberWithName('_end_child1').GetValueAsUnsigned()
|
||||||
|
self.extra = self.val.GetChildMemberWithName('extra').GetValueAsUnsigned()
|
||||||
|
self.start = _start_srcloc >> 16
|
||||||
|
self.end = _end_child1 >> 16
|
||||||
|
self.srcloc = _start_srcloc & 0xffff
|
||||||
|
self.child = ((_end_child1 & 0xffff) << 16) | _child2
|
||||||
|
|
||||||
|
def num_children(self):
|
||||||
|
return 5
|
||||||
|
|
||||||
|
def get_child_index(self, name):
|
||||||
|
if name == 'start':
|
||||||
|
return 0
|
||||||
|
if name == 'end':
|
||||||
|
return 1
|
||||||
|
if name == 'srcloc':
|
||||||
|
return 2
|
||||||
|
if name == 'child':
|
||||||
|
return 3
|
||||||
|
if name == 'extra':
|
||||||
|
return 4
|
||||||
|
return -1
|
||||||
|
|
||||||
|
def get_child_at_index(self, index):
|
||||||
|
if index == 0:
|
||||||
|
return self.val.CreateValueFromExpression('start', f'int64_t x = {self.start}; x')
|
||||||
|
if index == 1:
|
||||||
|
return self.val.CreateValueFromExpression('end', f'int64_t x = {self.end}; x')
|
||||||
|
if index == 2:
|
||||||
|
return self.val.CreateValueFromExpression('srcloc', f'int16_t x = {self.srcloc}; x')
|
||||||
|
if index == 3:
|
||||||
|
return self.val.CreateValueFromExpression('child', f'int32_t x = {self.child}; x')
|
||||||
|
if index == 4:
|
||||||
|
return self.val.CreateValueFromExpression('extra', f'uint32_t x = {self.extra}; x')
|
||||||
|
|
||||||
|
def RobinHoodSummary(value, dict):
|
||||||
|
val = value.GetNonSyntheticValue()
|
||||||
|
size = val.GetChildMemberWithName('mNumElements').GetValueAsUnsigned()
|
||||||
|
mask = val.GetChildMemberWithName('mMask').GetValueAsUnsigned()
|
||||||
|
return f'{{size={size}, load={float(size) / (mask+1)}}}'
|
||||||
|
|
||||||
|
def __lldb_init_module(debugger, dict):
|
||||||
|
lldb.formatters.Logger._lldb_formatters_debug_level = 2
|
||||||
|
debugger.HandleCommand('type summary add -w tracy -F natvis.VectorSummary -x ^tracy::Vector<.+>')
|
||||||
|
debugger.HandleCommand('type summary add -w tracy -F natvis.ShortPtrSummary -x ^tracy::short_ptr<.+>')
|
||||||
|
debugger.HandleCommand('type summary add -w tracy -F natvis.Int24Summary -x ^tracy::Int24')
|
||||||
|
debugger.HandleCommand('type summary add -w tracy -F natvis.Int48Summary -x ^tracy::Int48')
|
||||||
|
debugger.HandleCommand('type summary add -w tracy -F natvis.RobinHoodSummary -x ^tracy::detail::Table<.*>')
|
||||||
|
debugger.HandleCommand('type synthetic add -w tracy -l natvis.VectorPrinter -x ^tracy::Vector<.+>')
|
||||||
|
debugger.HandleCommand('type synthetic add -w tracy -l natvis.ShortPtrPrinter -x ^tracy::short_ptr<.+>')
|
||||||
|
debugger.HandleCommand('type synthetic add -w tracy -l natvis.ZoneEventPrinter -x ^tracy::ZoneEvent')
|
||||||
|
debugger.HandleCommand('type summary add -w tracy -x ^tracy::ZoneEvent --summary-string "start = ${var.start}, end = ${var.end}, srcloc = ${var.srcloc}, child = ${var.child}, extra = ${var.extra}"')
|
||||||
|
debugger.HandleCommand('type category enable tracy')
|
@ -1,21 +0,0 @@
|
|||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2014-2023 Omar Cornut
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
129
imgui/imconfig.h
129
imgui/imconfig.h
@ -1,129 +0,0 @@
|
|||||||
//-----------------------------------------------------------------------------
|
|
||||||
// DEAR IMGUI COMPILE-TIME OPTIONS
|
|
||||||
// Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure.
|
|
||||||
// You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it)
|
|
||||||
// B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp
|
|
||||||
// files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures.
|
|
||||||
// Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts.
|
|
||||||
// Call IMGUI_CHECKVERSION() from your .cpp file to verify that the data structures your files are using are matching the ones imgui.cpp is using.
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
//---- Define assertion handler. Defaults to calling assert().
|
|
||||||
// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
|
|
||||||
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)
|
|
||||||
//#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts
|
|
||||||
|
|
||||||
//---- Define attributes of all API symbols declarations, e.g. for DLL under Windows
|
|
||||||
// Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility.
|
|
||||||
// DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
|
|
||||||
// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
|
|
||||||
//#define IMGUI_API __declspec( dllexport )
|
|
||||||
//#define IMGUI_API __declspec( dllimport )
|
|
||||||
|
|
||||||
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to clean your code of obsolete function/names.
|
|
||||||
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
||||||
//#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions.
|
|
||||||
|
|
||||||
//---- Disable all of Dear ImGui or don't implement standard windows/tools.
|
|
||||||
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
|
|
||||||
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
|
|
||||||
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
|
|
||||||
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88).
|
|
||||||
|
|
||||||
//---- Don't implement some functions to reduce linkage requirements.
|
|
||||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
|
|
||||||
//#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW)
|
|
||||||
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a)
|
|
||||||
//#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, IME).
|
|
||||||
//#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default).
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf)
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself.
|
|
||||||
//#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies)
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function.
|
|
||||||
//#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions().
|
|
||||||
//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available
|
|
||||||
|
|
||||||
//---- Include imgui_user.h at the end of imgui.h as a convenience
|
|
||||||
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
|
||||||
|
|
||||||
//---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another)
|
|
||||||
//#define IMGUI_USE_BGRA_PACKED_COLOR
|
|
||||||
|
|
||||||
//---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...)
|
|
||||||
//#define IMGUI_USE_WCHAR32
|
|
||||||
|
|
||||||
//---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version
|
|
||||||
// By default the embedded implementations are declared static and not available outside of Dear ImGui sources files.
|
|
||||||
//#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h"
|
|
||||||
//#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h"
|
|
||||||
//#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if IMGUI_USE_STB_SPRINTF is defined.
|
|
||||||
//#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
|
||||||
//#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
//#define IMGUI_DISABLE_STB_SPRINTF_IMPLEMENTATION // only disabled if IMGUI_USE_STB_SPRINTF is defined.
|
|
||||||
|
|
||||||
//---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined)
|
|
||||||
// Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h.
|
|
||||||
//#define IMGUI_USE_STB_SPRINTF
|
|
||||||
|
|
||||||
//---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui)
|
|
||||||
// Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided).
|
|
||||||
// On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'.
|
|
||||||
//#define IMGUI_ENABLE_FREETYPE
|
|
||||||
|
|
||||||
//---- Use FreeType+lunasvg library to render OpenType SVG fonts (SVGinOT)
|
|
||||||
// Requires lunasvg headers to be available in the include path + program to be linked with the lunasvg library (not provided).
|
|
||||||
// Only works in combination with IMGUI_ENABLE_FREETYPE.
|
|
||||||
// (implementation is based on Freetype's rsvg-port.c which is licensed under CeCILL-C Free Software License Agreement)
|
|
||||||
//#define IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
|
|
||||||
//---- Use stb_truetype to build and rasterize the font atlas (default)
|
|
||||||
// The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend.
|
|
||||||
//#define IMGUI_ENABLE_STB_TRUETYPE
|
|
||||||
|
|
||||||
//---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4.
|
|
||||||
// This will be inlined as part of ImVec2 and ImVec4 class declarations.
|
|
||||||
/*
|
|
||||||
#define IM_VEC2_CLASS_EXTRA \
|
|
||||||
constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \
|
|
||||||
operator MyVec2() const { return MyVec2(x,y); }
|
|
||||||
|
|
||||||
#define IM_VEC4_CLASS_EXTRA \
|
|
||||||
constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \
|
|
||||||
operator MyVec4() const { return MyVec4(x,y,z,w); }
|
|
||||||
*/
|
|
||||||
//---- ...Or use Dear ImGui's own very basic math operators.
|
|
||||||
//#define IMGUI_DEFINE_MATH_OPERATORS
|
|
||||||
|
|
||||||
//---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices.
|
|
||||||
// Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices).
|
|
||||||
// Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer.
|
|
||||||
// Read about ImGuiBackendFlags_RendererHasVtxOffset for details.
|
|
||||||
//#define ImDrawIdx unsigned int
|
|
||||||
|
|
||||||
//---- Override ImDrawCallback signature (will need to modify renderer backends accordingly)
|
|
||||||
//struct ImDrawList;
|
|
||||||
//struct ImDrawCmd;
|
|
||||||
//typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data);
|
|
||||||
//#define ImDrawCallback MyImDrawCallback
|
|
||||||
|
|
||||||
//---- Debug Tools: Macro to break in Debugger (we provide a default implementation of this in the codebase)
|
|
||||||
// (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.)
|
|
||||||
//#define IM_DEBUG_BREAK IM_ASSERT(0)
|
|
||||||
//#define IM_DEBUG_BREAK __debugbreak()
|
|
||||||
|
|
||||||
//---- Debug Tools: Enable slower asserts
|
|
||||||
//#define IMGUI_DEBUG_PARANOID
|
|
||||||
|
|
||||||
//---- Tip: You can add extra functions within the ImGui:: namespace from anywhere (e.g. your own sources/header files)
|
|
||||||
/*
|
|
||||||
namespace ImGui
|
|
||||||
{
|
|
||||||
void MyFunction(const char* name, MyMatrix44* mtx);
|
|
||||||
}
|
|
||||||
*/
|
|
20767
imgui/imgui.cpp
20767
imgui/imgui.cpp
File diff suppressed because it is too large
Load Diff
3474
imgui/imgui.h
3474
imgui/imgui.h
File diff suppressed because it is too large
Load Diff
8553
imgui/imgui_demo.cpp
8553
imgui/imgui_demo.cpp
File diff suppressed because it is too large
Load Diff
4254
imgui/imgui_draw.cpp
4254
imgui/imgui_draw.cpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,627 +0,0 @@
|
|||||||
// [DEAR IMGUI]
|
|
||||||
// This is a slightly modified version of stb_rect_pack.h 1.01.
|
|
||||||
// Grep for [DEAR IMGUI] to find the changes.
|
|
||||||
//
|
|
||||||
// stb_rect_pack.h - v1.01 - public domain - rectangle packing
|
|
||||||
// Sean Barrett 2014
|
|
||||||
//
|
|
||||||
// Useful for e.g. packing rectangular textures into an atlas.
|
|
||||||
// Does not do rotation.
|
|
||||||
//
|
|
||||||
// Before #including,
|
|
||||||
//
|
|
||||||
// #define STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
//
|
|
||||||
// in the file that you want to have the implementation.
|
|
||||||
//
|
|
||||||
// Not necessarily the awesomest packing method, but better than
|
|
||||||
// the totally naive one in stb_truetype (which is primarily what
|
|
||||||
// this is meant to replace).
|
|
||||||
//
|
|
||||||
// Has only had a few tests run, may have issues.
|
|
||||||
//
|
|
||||||
// More docs to come.
|
|
||||||
//
|
|
||||||
// No memory allocations; uses qsort() and assert() from stdlib.
|
|
||||||
// Can override those by defining STBRP_SORT and STBRP_ASSERT.
|
|
||||||
//
|
|
||||||
// This library currently uses the Skyline Bottom-Left algorithm.
|
|
||||||
//
|
|
||||||
// Please note: better rectangle packers are welcome! Please
|
|
||||||
// implement them to the same API, but with a different init
|
|
||||||
// function.
|
|
||||||
//
|
|
||||||
// Credits
|
|
||||||
//
|
|
||||||
// Library
|
|
||||||
// Sean Barrett
|
|
||||||
// Minor features
|
|
||||||
// Martins Mozeiko
|
|
||||||
// github:IntellectualKitty
|
|
||||||
//
|
|
||||||
// Bugfixes / warning fixes
|
|
||||||
// Jeremy Jaussaud
|
|
||||||
// Fabian Giesen
|
|
||||||
//
|
|
||||||
// Version history:
|
|
||||||
//
|
|
||||||
// 1.01 (2021-07-11) always use large rect mode, expose STBRP__MAXVAL in public section
|
|
||||||
// 1.00 (2019-02-25) avoid small space waste; gracefully fail too-wide rectangles
|
|
||||||
// 0.99 (2019-02-07) warning fixes
|
|
||||||
// 0.11 (2017-03-03) return packing success/fail result
|
|
||||||
// 0.10 (2016-10-25) remove cast-away-const to avoid warnings
|
|
||||||
// 0.09 (2016-08-27) fix compiler warnings
|
|
||||||
// 0.08 (2015-09-13) really fix bug with empty rects (w=0 or h=0)
|
|
||||||
// 0.07 (2015-09-13) fix bug with empty rects (w=0 or h=0)
|
|
||||||
// 0.06 (2015-04-15) added STBRP_SORT to allow replacing qsort
|
|
||||||
// 0.05: added STBRP_ASSERT to allow replacing assert
|
|
||||||
// 0.04: fixed minor bug in STBRP_LARGE_RECTS support
|
|
||||||
// 0.01: initial release
|
|
||||||
//
|
|
||||||
// LICENSE
|
|
||||||
//
|
|
||||||
// See end of file for license information.
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// INCLUDE SECTION
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef STB_INCLUDE_STB_RECT_PACK_H
|
|
||||||
#define STB_INCLUDE_STB_RECT_PACK_H
|
|
||||||
|
|
||||||
#define STB_RECT_PACK_VERSION 1
|
|
||||||
|
|
||||||
#ifdef STBRP_STATIC
|
|
||||||
#define STBRP_DEF static
|
|
||||||
#else
|
|
||||||
#define STBRP_DEF extern
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct stbrp_context stbrp_context;
|
|
||||||
typedef struct stbrp_node stbrp_node;
|
|
||||||
typedef struct stbrp_rect stbrp_rect;
|
|
||||||
|
|
||||||
typedef int stbrp_coord;
|
|
||||||
|
|
||||||
#define STBRP__MAXVAL 0x7fffffff
|
|
||||||
// Mostly for internal use, but this is the maximum supported coordinate value.
|
|
||||||
|
|
||||||
STBRP_DEF int stbrp_pack_rects (stbrp_context *context, stbrp_rect *rects, int num_rects);
|
|
||||||
// Assign packed locations to rectangles. The rectangles are of type
|
|
||||||
// 'stbrp_rect' defined below, stored in the array 'rects', and there
|
|
||||||
// are 'num_rects' many of them.
|
|
||||||
//
|
|
||||||
// Rectangles which are successfully packed have the 'was_packed' flag
|
|
||||||
// set to a non-zero value and 'x' and 'y' store the minimum location
|
|
||||||
// on each axis (i.e. bottom-left in cartesian coordinates, top-left
|
|
||||||
// if you imagine y increasing downwards). Rectangles which do not fit
|
|
||||||
// have the 'was_packed' flag set to 0.
|
|
||||||
//
|
|
||||||
// You should not try to access the 'rects' array from another thread
|
|
||||||
// while this function is running, as the function temporarily reorders
|
|
||||||
// the array while it executes.
|
|
||||||
//
|
|
||||||
// To pack into another rectangle, you need to call stbrp_init_target
|
|
||||||
// again. To continue packing into the same rectangle, you can call
|
|
||||||
// this function again. Calling this multiple times with multiple rect
|
|
||||||
// arrays will probably produce worse packing results than calling it
|
|
||||||
// a single time with the full rectangle array, but the option is
|
|
||||||
// available.
|
|
||||||
//
|
|
||||||
// The function returns 1 if all of the rectangles were successfully
|
|
||||||
// packed and 0 otherwise.
|
|
||||||
|
|
||||||
struct stbrp_rect
|
|
||||||
{
|
|
||||||
// reserved for your use:
|
|
||||||
int id;
|
|
||||||
|
|
||||||
// input:
|
|
||||||
stbrp_coord w, h;
|
|
||||||
|
|
||||||
// output:
|
|
||||||
stbrp_coord x, y;
|
|
||||||
int was_packed; // non-zero if valid packing
|
|
||||||
|
|
||||||
}; // 16 bytes, nominally
|
|
||||||
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_init_target (stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes);
|
|
||||||
// Initialize a rectangle packer to:
|
|
||||||
// pack a rectangle that is 'width' by 'height' in dimensions
|
|
||||||
// using temporary storage provided by the array 'nodes', which is 'num_nodes' long
|
|
||||||
//
|
|
||||||
// You must call this function every time you start packing into a new target.
|
|
||||||
//
|
|
||||||
// There is no "shutdown" function. The 'nodes' memory must stay valid for
|
|
||||||
// the following stbrp_pack_rects() call (or calls), but can be freed after
|
|
||||||
// the call (or calls) finish.
|
|
||||||
//
|
|
||||||
// Note: to guarantee best results, either:
|
|
||||||
// 1. make sure 'num_nodes' >= 'width'
|
|
||||||
// or 2. call stbrp_allow_out_of_mem() defined below with 'allow_out_of_mem = 1'
|
|
||||||
//
|
|
||||||
// If you don't do either of the above things, widths will be quantized to multiples
|
|
||||||
// of small integers to guarantee the algorithm doesn't run out of temporary storage.
|
|
||||||
//
|
|
||||||
// If you do #2, then the non-quantized algorithm will be used, but the algorithm
|
|
||||||
// may run out of temporary storage and be unable to pack some rectangles.
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_allow_out_of_mem (stbrp_context *context, int allow_out_of_mem);
|
|
||||||
// Optionally call this function after init but before doing any packing to
|
|
||||||
// change the handling of the out-of-temp-memory scenario, described above.
|
|
||||||
// If you call init again, this will be reset to the default (false).
|
|
||||||
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_heuristic (stbrp_context *context, int heuristic);
|
|
||||||
// Optionally select which packing heuristic the library should use. Different
|
|
||||||
// heuristics will produce better/worse results for different data sets.
|
|
||||||
// If you call init again, this will be reset to the default.
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
STBRP_HEURISTIC_Skyline_default=0,
|
|
||||||
STBRP_HEURISTIC_Skyline_BL_sortHeight = STBRP_HEURISTIC_Skyline_default,
|
|
||||||
STBRP_HEURISTIC_Skyline_BF_sortHeight
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// the details of the following structures don't matter to you, but they must
|
|
||||||
// be visible so you can handle the memory allocations for them
|
|
||||||
|
|
||||||
struct stbrp_node
|
|
||||||
{
|
|
||||||
stbrp_coord x,y;
|
|
||||||
stbrp_node *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct stbrp_context
|
|
||||||
{
|
|
||||||
int width;
|
|
||||||
int height;
|
|
||||||
int align;
|
|
||||||
int init_mode;
|
|
||||||
int heuristic;
|
|
||||||
int num_nodes;
|
|
||||||
stbrp_node *active_head;
|
|
||||||
stbrp_node *free_head;
|
|
||||||
stbrp_node extra[2]; // we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2'
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// IMPLEMENTATION SECTION
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifdef STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
#ifndef STBRP_SORT
|
|
||||||
#include <stdlib.h>
|
|
||||||
#define STBRP_SORT qsort
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef STBRP_ASSERT
|
|
||||||
#include <assert.h>
|
|
||||||
#define STBRP_ASSERT assert
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define STBRP__NOTUSED(v) (void)(v)
|
|
||||||
#define STBRP__CDECL __cdecl
|
|
||||||
#else
|
|
||||||
#define STBRP__NOTUSED(v) (void)sizeof(v)
|
|
||||||
#define STBRP__CDECL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
STBRP__INIT_skyline = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_heuristic(stbrp_context *context, int heuristic)
|
|
||||||
{
|
|
||||||
switch (context->init_mode) {
|
|
||||||
case STBRP__INIT_skyline:
|
|
||||||
STBRP_ASSERT(heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight || heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight);
|
|
||||||
context->heuristic = heuristic;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
STBRP_ASSERT(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_setup_allow_out_of_mem(stbrp_context *context, int allow_out_of_mem)
|
|
||||||
{
|
|
||||||
if (allow_out_of_mem)
|
|
||||||
// if it's ok to run out of memory, then don't bother aligning them;
|
|
||||||
// this gives better packing, but may fail due to OOM (even though
|
|
||||||
// the rectangles easily fit). @TODO a smarter approach would be to only
|
|
||||||
// quantize once we've hit OOM, then we could get rid of this parameter.
|
|
||||||
context->align = 1;
|
|
||||||
else {
|
|
||||||
// if it's not ok to run out of memory, then quantize the widths
|
|
||||||
// so that num_nodes is always enough nodes.
|
|
||||||
//
|
|
||||||
// I.e. num_nodes * align >= width
|
|
||||||
// align >= width / num_nodes
|
|
||||||
// align = ceil(width/num_nodes)
|
|
||||||
|
|
||||||
context->align = (context->width + context->num_nodes-1) / context->num_nodes;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, stbrp_node *nodes, int num_nodes)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i=0; i < num_nodes-1; ++i)
|
|
||||||
nodes[i].next = &nodes[i+1];
|
|
||||||
nodes[i].next = NULL;
|
|
||||||
context->init_mode = STBRP__INIT_skyline;
|
|
||||||
context->heuristic = STBRP_HEURISTIC_Skyline_default;
|
|
||||||
context->free_head = &nodes[0];
|
|
||||||
context->active_head = &context->extra[0];
|
|
||||||
context->width = width;
|
|
||||||
context->height = height;
|
|
||||||
context->num_nodes = num_nodes;
|
|
||||||
stbrp_setup_allow_out_of_mem(context, 0);
|
|
||||||
|
|
||||||
// node 0 is the full width, node 1 is the sentinel (lets us not store width explicitly)
|
|
||||||
context->extra[0].x = 0;
|
|
||||||
context->extra[0].y = 0;
|
|
||||||
context->extra[0].next = &context->extra[1];
|
|
||||||
context->extra[1].x = (stbrp_coord) width;
|
|
||||||
context->extra[1].y = (1<<30);
|
|
||||||
context->extra[1].next = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// find minimum y position if it starts at x1
|
|
||||||
static int stbrp__skyline_find_min_y(stbrp_context *c, stbrp_node *first, int x0, int width, int *pwaste)
|
|
||||||
{
|
|
||||||
stbrp_node *node = first;
|
|
||||||
int x1 = x0 + width;
|
|
||||||
int min_y, visited_width, waste_area;
|
|
||||||
|
|
||||||
STBRP__NOTUSED(c);
|
|
||||||
|
|
||||||
STBRP_ASSERT(first->x <= x0);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// skip in case we're past the node
|
|
||||||
while (node->next->x <= x0)
|
|
||||||
++node;
|
|
||||||
#else
|
|
||||||
STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency
|
|
||||||
#endif
|
|
||||||
|
|
||||||
STBRP_ASSERT(node->x <= x0);
|
|
||||||
|
|
||||||
min_y = 0;
|
|
||||||
waste_area = 0;
|
|
||||||
visited_width = 0;
|
|
||||||
while (node->x < x1) {
|
|
||||||
if (node->y > min_y) {
|
|
||||||
// raise min_y higher.
|
|
||||||
// we've accounted for all waste up to min_y,
|
|
||||||
// but we'll now add more waste for everything we've visted
|
|
||||||
waste_area += visited_width * (node->y - min_y);
|
|
||||||
min_y = node->y;
|
|
||||||
// the first time through, visited_width might be reduced
|
|
||||||
if (node->x < x0)
|
|
||||||
visited_width += node->next->x - x0;
|
|
||||||
else
|
|
||||||
visited_width += node->next->x - node->x;
|
|
||||||
} else {
|
|
||||||
// add waste area
|
|
||||||
int under_width = node->next->x - node->x;
|
|
||||||
if (under_width + visited_width > width)
|
|
||||||
under_width = width - visited_width;
|
|
||||||
waste_area += under_width * (min_y - node->y);
|
|
||||||
visited_width += under_width;
|
|
||||||
}
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
*pwaste = waste_area;
|
|
||||||
return min_y;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int x,y;
|
|
||||||
stbrp_node **prev_link;
|
|
||||||
} stbrp__findresult;
|
|
||||||
|
|
||||||
static stbrp__findresult stbrp__skyline_find_best_pos(stbrp_context *c, int width, int height)
|
|
||||||
{
|
|
||||||
int best_waste = (1<<30), best_x, best_y = (1 << 30);
|
|
||||||
stbrp__findresult fr;
|
|
||||||
stbrp_node **prev, *node, *tail, **best = NULL;
|
|
||||||
|
|
||||||
// align to multiple of c->align
|
|
||||||
width = (width + c->align - 1);
|
|
||||||
width -= width % c->align;
|
|
||||||
STBRP_ASSERT(width % c->align == 0);
|
|
||||||
|
|
||||||
// if it can't possibly fit, bail immediately
|
|
||||||
if (width > c->width || height > c->height) {
|
|
||||||
fr.prev_link = NULL;
|
|
||||||
fr.x = fr.y = 0;
|
|
||||||
return fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
node = c->active_head;
|
|
||||||
prev = &c->active_head;
|
|
||||||
while (node->x + width <= c->width) {
|
|
||||||
int y,waste;
|
|
||||||
y = stbrp__skyline_find_min_y(c, node, node->x, width, &waste);
|
|
||||||
if (c->heuristic == STBRP_HEURISTIC_Skyline_BL_sortHeight) { // actually just want to test BL
|
|
||||||
// bottom left
|
|
||||||
if (y < best_y) {
|
|
||||||
best_y = y;
|
|
||||||
best = prev;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// best-fit
|
|
||||||
if (y + height <= c->height) {
|
|
||||||
// can only use it if it first vertically
|
|
||||||
if (y < best_y || (y == best_y && waste < best_waste)) {
|
|
||||||
best_y = y;
|
|
||||||
best_waste = waste;
|
|
||||||
best = prev;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
prev = &node->next;
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
best_x = (best == NULL) ? 0 : (*best)->x;
|
|
||||||
|
|
||||||
// if doing best-fit (BF), we also have to try aligning right edge to each node position
|
|
||||||
//
|
|
||||||
// e.g, if fitting
|
|
||||||
//
|
|
||||||
// ____________________
|
|
||||||
// |____________________|
|
|
||||||
//
|
|
||||||
// into
|
|
||||||
//
|
|
||||||
// | |
|
|
||||||
// | ____________|
|
|
||||||
// |____________|
|
|
||||||
//
|
|
||||||
// then right-aligned reduces waste, but bottom-left BL is always chooses left-aligned
|
|
||||||
//
|
|
||||||
// This makes BF take about 2x the time
|
|
||||||
|
|
||||||
if (c->heuristic == STBRP_HEURISTIC_Skyline_BF_sortHeight) {
|
|
||||||
tail = c->active_head;
|
|
||||||
node = c->active_head;
|
|
||||||
prev = &c->active_head;
|
|
||||||
// find first node that's admissible
|
|
||||||
while (tail->x < width)
|
|
||||||
tail = tail->next;
|
|
||||||
while (tail) {
|
|
||||||
int xpos = tail->x - width;
|
|
||||||
int y,waste;
|
|
||||||
STBRP_ASSERT(xpos >= 0);
|
|
||||||
// find the left position that matches this
|
|
||||||
while (node->next->x <= xpos) {
|
|
||||||
prev = &node->next;
|
|
||||||
node = node->next;
|
|
||||||
}
|
|
||||||
STBRP_ASSERT(node->next->x > xpos && node->x <= xpos);
|
|
||||||
y = stbrp__skyline_find_min_y(c, node, xpos, width, &waste);
|
|
||||||
if (y + height <= c->height) {
|
|
||||||
if (y <= best_y) {
|
|
||||||
if (y < best_y || waste < best_waste || (waste==best_waste && xpos < best_x)) {
|
|
||||||
best_x = xpos;
|
|
||||||
//STBRP_ASSERT(y <= best_y); [DEAR IMGUI]
|
|
||||||
best_y = y;
|
|
||||||
best_waste = waste;
|
|
||||||
best = prev;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
tail = tail->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fr.prev_link = best;
|
|
||||||
fr.x = best_x;
|
|
||||||
fr.y = best_y;
|
|
||||||
return fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, int width, int height)
|
|
||||||
{
|
|
||||||
// find best position according to heuristic
|
|
||||||
stbrp__findresult res = stbrp__skyline_find_best_pos(context, width, height);
|
|
||||||
stbrp_node *node, *cur;
|
|
||||||
|
|
||||||
// bail if:
|
|
||||||
// 1. it failed
|
|
||||||
// 2. the best node doesn't fit (we don't always check this)
|
|
||||||
// 3. we're out of memory
|
|
||||||
if (res.prev_link == NULL || res.y + height > context->height || context->free_head == NULL) {
|
|
||||||
res.prev_link = NULL;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
// on success, create new node
|
|
||||||
node = context->free_head;
|
|
||||||
node->x = (stbrp_coord) res.x;
|
|
||||||
node->y = (stbrp_coord) (res.y + height);
|
|
||||||
|
|
||||||
context->free_head = node->next;
|
|
||||||
|
|
||||||
// insert the new node into the right starting point, and
|
|
||||||
// let 'cur' point to the remaining nodes needing to be
|
|
||||||
// stiched back in
|
|
||||||
|
|
||||||
cur = *res.prev_link;
|
|
||||||
if (cur->x < res.x) {
|
|
||||||
// preserve the existing one, so start testing with the next one
|
|
||||||
stbrp_node *next = cur->next;
|
|
||||||
cur->next = node;
|
|
||||||
cur = next;
|
|
||||||
} else {
|
|
||||||
*res.prev_link = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
// from here, traverse cur and free the nodes, until we get to one
|
|
||||||
// that shouldn't be freed
|
|
||||||
while (cur->next && cur->next->x <= res.x + width) {
|
|
||||||
stbrp_node *next = cur->next;
|
|
||||||
// move the current node to the free list
|
|
||||||
cur->next = context->free_head;
|
|
||||||
context->free_head = cur;
|
|
||||||
cur = next;
|
|
||||||
}
|
|
||||||
|
|
||||||
// stitch the list back in
|
|
||||||
node->next = cur;
|
|
||||||
|
|
||||||
if (cur->x < res.x + width)
|
|
||||||
cur->x = (stbrp_coord) (res.x + width);
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
cur = context->active_head;
|
|
||||||
while (cur->x < context->width) {
|
|
||||||
STBRP_ASSERT(cur->x < cur->next->x);
|
|
||||||
cur = cur->next;
|
|
||||||
}
|
|
||||||
STBRP_ASSERT(cur->next == NULL);
|
|
||||||
|
|
||||||
{
|
|
||||||
int count=0;
|
|
||||||
cur = context->active_head;
|
|
||||||
while (cur) {
|
|
||||||
cur = cur->next;
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
cur = context->free_head;
|
|
||||||
while (cur) {
|
|
||||||
cur = cur->next;
|
|
||||||
++count;
|
|
||||||
}
|
|
||||||
STBRP_ASSERT(count == context->num_nodes+2);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int STBRP__CDECL rect_height_compare(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
const stbrp_rect *p = (const stbrp_rect *) a;
|
|
||||||
const stbrp_rect *q = (const stbrp_rect *) b;
|
|
||||||
if (p->h > q->h)
|
|
||||||
return -1;
|
|
||||||
if (p->h < q->h)
|
|
||||||
return 1;
|
|
||||||
return (p->w > q->w) ? -1 : (p->w < q->w);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int STBRP__CDECL rect_original_order(const void *a, const void *b)
|
|
||||||
{
|
|
||||||
const stbrp_rect *p = (const stbrp_rect *) a;
|
|
||||||
const stbrp_rect *q = (const stbrp_rect *) b;
|
|
||||||
return (p->was_packed < q->was_packed) ? -1 : (p->was_packed > q->was_packed);
|
|
||||||
}
|
|
||||||
|
|
||||||
STBRP_DEF int stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int num_rects)
|
|
||||||
{
|
|
||||||
int i, all_rects_packed = 1;
|
|
||||||
|
|
||||||
// we use the 'was_packed' field internally to allow sorting/unsorting
|
|
||||||
for (i=0; i < num_rects; ++i) {
|
|
||||||
rects[i].was_packed = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// sort according to heuristic
|
|
||||||
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
|
|
||||||
|
|
||||||
for (i=0; i < num_rects; ++i) {
|
|
||||||
if (rects[i].w == 0 || rects[i].h == 0) {
|
|
||||||
rects[i].x = rects[i].y = 0; // empty rect needs no space
|
|
||||||
} else {
|
|
||||||
stbrp__findresult fr = stbrp__skyline_pack_rectangle(context, rects[i].w, rects[i].h);
|
|
||||||
if (fr.prev_link) {
|
|
||||||
rects[i].x = (stbrp_coord) fr.x;
|
|
||||||
rects[i].y = (stbrp_coord) fr.y;
|
|
||||||
} else {
|
|
||||||
rects[i].x = rects[i].y = STBRP__MAXVAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// unsort
|
|
||||||
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_original_order);
|
|
||||||
|
|
||||||
// set was_packed flags and all_rects_packed status
|
|
||||||
for (i=0; i < num_rects; ++i) {
|
|
||||||
rects[i].was_packed = !(rects[i].x == STBRP__MAXVAL && rects[i].y == STBRP__MAXVAL);
|
|
||||||
if (!rects[i].was_packed)
|
|
||||||
all_rects_packed = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// return the all_rects_packed status
|
|
||||||
return all_rects_packed;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
This software is available under 2 licenses -- choose whichever you prefer.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE A - MIT License
|
|
||||||
Copyright (c) 2017 Sean Barrett
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
ALTERNATIVE B - Public Domain (www.unlicense.org)
|
|
||||||
This is free and unencumbered software released into the public domain.
|
|
||||||
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
|
||||||
software, either in source code form or as a compiled binary, for any purpose,
|
|
||||||
commercial or non-commercial, and by any means.
|
|
||||||
In jurisdictions that recognize copyright laws, the author or authors of this
|
|
||||||
software dedicate any and all copyright interest in the software to the public
|
|
||||||
domain. We make this dedication for the benefit of the public at large and to
|
|
||||||
the detriment of our heirs and successors. We intend this dedication to be an
|
|
||||||
overt act of relinquishment in perpetuity of all present and future rights to
|
|
||||||
this software under copyright law.
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
||||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
||||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
*/
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,44 +0,0 @@
|
|||||||
# imgui_freetype
|
|
||||||
|
|
||||||
Build font atlases using FreeType instead of stb_truetype (which is the default font rasterizer).
|
|
||||||
<br>by @vuhdo, @mikesart, @ocornut.
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
|
|
||||||
1. Get latest FreeType binaries or build yourself (under Windows you may use vcpkg with `vcpkg install freetype --triplet=x64-windows`, `vcpkg integrate install`).
|
|
||||||
2. Add imgui_freetype.h/cpp alongside your project files.
|
|
||||||
3. Add `#define IMGUI_ENABLE_FREETYPE` in your [imconfig.h](https://github.com/ocornut/imgui/blob/master/imconfig.h) file
|
|
||||||
|
|
||||||
### About Gamma Correct Blending
|
|
||||||
|
|
||||||
FreeType assumes blending in linear space rather than gamma space.
|
|
||||||
See FreeType note for [FT_Render_Glyph](https://freetype.org/freetype2/docs/reference/ft2-glyph_retrieval.html#ft_render_glyph).
|
|
||||||
For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
|
|
||||||
The default Dear ImGui styles will be impacted by this change (alpha values will need tweaking).
|
|
||||||
|
|
||||||
### Testbed for toying with settings (for developers)
|
|
||||||
|
|
||||||
See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad
|
|
||||||
|
|
||||||
### Known issues
|
|
||||||
|
|
||||||
- Oversampling settings are ignored but also not so much necessary with the higher quality rendering.
|
|
||||||
|
|
||||||
### Comparison
|
|
||||||
|
|
||||||
Small, thin anti-aliased fonts typically benefit a lot from FreeType's hinting:
|
|
||||||

|
|
||||||
|
|
||||||
### Colorful glyphs/emojis
|
|
||||||
|
|
||||||
You can use the `ImGuiFreeTypeBuilderFlags_LoadColor` flag to load certain colorful glyphs. See the
|
|
||||||
["Using Colorful Glyphs/Emojis"](https://github.com/ocornut/imgui/blob/master/docs/FONTS.md#using-colorful-glyphsemojis) section of FONTS.md.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Using OpenType SVG fonts (SVGinOT)
|
|
||||||
- *SVG in Open Type* is a standard by Adobe and Mozilla for color OpenType and Open Font Format fonts. It allows font creators to embed complete SVG files within a font enabling full color and even animations.
|
|
||||||
- Popular fonts such as [twemoji](https://github.com/13rac1/twemoji-color-font) and fonts made with [scfbuild](https://github.com/13rac1/scfbuild) is SVGinOT
|
|
||||||
- Requires: [lunasvg](https://github.com/sammycage/lunasvg) v2.3.2 and above
|
|
||||||
1. Add `#define IMGUI_ENABLE_FREETYPE_LUNASVG` in your `imconfig.h`.
|
|
||||||
2. Get latest lunasvg binaries or build yourself. Under Windows you may use vcpkg with: `vcpkg install lunasvg --triplet=x64-windows`.
|
|
@ -1,942 +0,0 @@
|
|||||||
// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
|
|
||||||
// (code)
|
|
||||||
|
|
||||||
// Get the latest version at https://github.com/ocornut/imgui/tree/master/misc/freetype
|
|
||||||
// Original code by @vuhdo (Aleksei Skriabin). Improvements by @mikesart. Maintained since 2019 by @ocornut.
|
|
||||||
|
|
||||||
// CHANGELOG
|
|
||||||
// (minor and older changes stripped away, please see git history for details)
|
|
||||||
// 2023/08/01: added support for SVG fonts, enable by using '#define IMGUI_ENABLE_FREETYPE_LUNASVG' (#6591)
|
|
||||||
// 2023/01/04: fixed a packing issue which in some occurrences would prevent large amount of glyphs from being packed correctly.
|
|
||||||
// 2021/08/23: fixed crash when FT_Render_Glyph() fails to render a glyph and returns NULL.
|
|
||||||
// 2021/03/05: added ImGuiFreeTypeBuilderFlags_Bitmap to load bitmap glyphs.
|
|
||||||
// 2021/03/02: set 'atlas->TexPixelsUseColors = true' to help some backends with deciding of a prefered texture format.
|
|
||||||
// 2021/01/28: added support for color-layered glyphs via ImGuiFreeTypeBuilderFlags_LoadColor (require Freetype 2.10+).
|
|
||||||
// 2021/01/26: simplified integration by using '#define IMGUI_ENABLE_FREETYPE'. renamed ImGuiFreeType::XXX flags to ImGuiFreeTypeBuilderFlags_XXX for consistency with other API. removed ImGuiFreeType::BuildFontAtlas().
|
|
||||||
// 2020/06/04: fix for rare case where FT_Get_Char_Index() succeed but FT_Load_Glyph() fails.
|
|
||||||
// 2019/02/09: added RasterizerFlags::Monochrome flag to disable font anti-aliasing (combine with ::MonoHinting for best results!)
|
|
||||||
// 2019/01/15: added support for imgui allocators + added FreeType only override function SetAllocatorFunctions().
|
|
||||||
// 2019/01/10: re-factored to match big update in STB builder. fixed texture height waste. fixed redundant glyphs when merging. support for glyph padding.
|
|
||||||
// 2018/06/08: added support for ImFontConfig::GlyphMinAdvanceX, GlyphMaxAdvanceX.
|
|
||||||
// 2018/02/04: moved to main imgui repository (away from http://www.github.com/ocornut/imgui_club)
|
|
||||||
// 2018/01/22: fix for addition of ImFontAtlas::TexUvscale member.
|
|
||||||
// 2017/10/22: minor inconsequential change to match change in master (removed an unnecessary statement).
|
|
||||||
// 2017/09/26: fixes for imgui internal changes.
|
|
||||||
// 2017/08/26: cleanup, optimizations, support for ImFontConfig::RasterizerFlags, ImFontConfig::RasterizerMultiply.
|
|
||||||
// 2017/08/16: imported from https://github.com/Vuhdo/imgui_freetype into http://www.github.com/ocornut/imgui_club, updated for latest changes in ImFontAtlas, minor tweaks.
|
|
||||||
|
|
||||||
// About Gamma Correct Blending:
|
|
||||||
// - FreeType assumes blending in linear space rather than gamma space.
|
|
||||||
// - See https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Glyph
|
|
||||||
// - For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
|
|
||||||
// - The default dear imgui styles will be impacted by this change (alpha values will need tweaking).
|
|
||||||
|
|
||||||
// FIXME: cfg.OversampleH, OversampleV are not supported (but perhaps not so necessary with this rasterizer).
|
|
||||||
|
|
||||||
#include "imgui.h"
|
|
||||||
#ifndef IMGUI_DISABLE
|
|
||||||
#include "imgui_freetype.h"
|
|
||||||
#include "imgui_internal.h" // ImMin,ImMax,ImFontAtlasBuild*,
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <ft2build.h>
|
|
||||||
#include FT_FREETYPE_H // <freetype/freetype.h>
|
|
||||||
#include FT_MODULE_H // <freetype/ftmodapi.h>
|
|
||||||
#include FT_GLYPH_H // <freetype/ftglyph.h>
|
|
||||||
#include FT_SYNTHESIS_H // <freetype/ftsynth.h>
|
|
||||||
|
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
#include FT_OTSVG_H // <freetype/otsvg.h>
|
|
||||||
#include FT_BBOX_H // <freetype/ftbbox.h>
|
|
||||||
#include <lunasvg.h>
|
|
||||||
#if !((FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR >= 12))
|
|
||||||
#error IMGUI_ENABLE_FREETYPE_LUNASVG requires FreeType version >= 2.12
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning (push)
|
|
||||||
#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
|
|
||||||
#pragma warning (disable: 26812) // [Static Analyzer] The enum type 'xxx' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wpragmas" // warning: unknown option after '#pragma GCC diagnostic' kind
|
|
||||||
#pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used
|
|
||||||
#pragma GCC diagnostic ignored "-Wsubobject-linkage" // warning: 'xxxx' has a field 'xxxx' whose type uses the anonymous namespace
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
// Data
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Default memory allocators
|
|
||||||
static void* ImGuiFreeTypeDefaultAllocFunc(size_t size, void* user_data) { IM_UNUSED(user_data); return IM_ALLOC(size); }
|
|
||||||
static void ImGuiFreeTypeDefaultFreeFunc(void* ptr, void* user_data) { IM_UNUSED(user_data); IM_FREE(ptr); }
|
|
||||||
|
|
||||||
// Current memory allocators
|
|
||||||
static void* (*GImGuiFreeTypeAllocFunc)(size_t size, void* user_data) = ImGuiFreeTypeDefaultAllocFunc;
|
|
||||||
static void (*GImGuiFreeTypeFreeFunc)(void* ptr, void* user_data) = ImGuiFreeTypeDefaultFreeFunc;
|
|
||||||
static void* GImGuiFreeTypeAllocatorUserData = nullptr;
|
|
||||||
|
|
||||||
// Lunasvg support
|
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
static FT_Error ImGuiLunasvgPortInit(FT_Pointer* state);
|
|
||||||
static void ImGuiLunasvgPortFree(FT_Pointer* state);
|
|
||||||
static FT_Error ImGuiLunasvgPortRender(FT_GlyphSlot slot, FT_Pointer* _state);
|
|
||||||
static FT_Error ImGuiLunasvgPortPresetSlot(FT_GlyphSlot slot, FT_Bool cache, FT_Pointer* _state);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
// Code
|
|
||||||
//-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
// Glyph metrics:
|
|
||||||
// --------------
|
|
||||||
//
|
|
||||||
// xmin xmax
|
|
||||||
// | |
|
|
||||||
// |<-------- width -------->|
|
|
||||||
// | |
|
|
||||||
// | +-------------------------+----------------- ymax
|
|
||||||
// | | ggggggggg ggggg | ^ ^
|
|
||||||
// | | g:::::::::ggg::::g | | |
|
|
||||||
// | | g:::::::::::::::::g | | |
|
|
||||||
// | | g::::::ggggg::::::gg | | |
|
|
||||||
// | | g:::::g g:::::g | | |
|
|
||||||
// offsetX -|-------->| g:::::g g:::::g | offsetY |
|
|
||||||
// | | g:::::g g:::::g | | |
|
|
||||||
// | | g::::::g g:::::g | | |
|
|
||||||
// | | g:::::::ggggg:::::g | | |
|
|
||||||
// | | g::::::::::::::::g | | height
|
|
||||||
// | | gg::::::::::::::g | | |
|
|
||||||
// baseline ---*---------|---- gggggggg::::::g-----*-------- |
|
|
||||||
// / | | g:::::g | |
|
|
||||||
// origin | | gggggg g:::::g | |
|
|
||||||
// | | g:::::gg gg:::::g | |
|
|
||||||
// | | g::::::ggg:::::::g | |
|
|
||||||
// | | gg:::::::::::::g | |
|
|
||||||
// | | ggg::::::ggg | |
|
|
||||||
// | | gggggg | v
|
|
||||||
// | +-------------------------+----------------- ymin
|
|
||||||
// | |
|
|
||||||
// |------------- advanceX ----------->|
|
|
||||||
|
|
||||||
// A structure that describe a glyph.
|
|
||||||
struct GlyphInfo
|
|
||||||
{
|
|
||||||
int Width; // Glyph's width in pixels.
|
|
||||||
int Height; // Glyph's height in pixels.
|
|
||||||
FT_Int OffsetX; // The distance from the origin ("pen position") to the left of the glyph.
|
|
||||||
FT_Int OffsetY; // The distance from the origin to the top of the glyph. This is usually a value < 0.
|
|
||||||
float AdvanceX; // The distance from the origin to the origin of the next glyph. This is usually a value > 0.
|
|
||||||
bool IsColored; // The glyph is colored
|
|
||||||
};
|
|
||||||
|
|
||||||
// Font parameters and metrics.
|
|
||||||
struct FontInfo
|
|
||||||
{
|
|
||||||
uint32_t PixelHeight; // Size this font was generated with.
|
|
||||||
float Ascender; // The pixel extents above the baseline in pixels (typically positive).
|
|
||||||
float Descender; // The extents below the baseline in pixels (typically negative).
|
|
||||||
float LineSpacing; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
|
|
||||||
float LineGap; // The spacing in pixels between one row's descent and the next row's ascent.
|
|
||||||
float MaxAdvanceWidth; // This field gives the maximum horizontal cursor advance for all glyphs in the font.
|
|
||||||
};
|
|
||||||
|
|
||||||
// FreeType glyph rasterizer.
|
|
||||||
// NB: No ctor/dtor, explicitly call Init()/Shutdown()
|
|
||||||
struct FreeTypeFont
|
|
||||||
{
|
|
||||||
bool InitFont(FT_Library ft_library, const ImFontConfig& cfg, unsigned int extra_user_flags); // Initialize from an external data buffer. Doesn't copy data, and you must ensure it stays valid up to this object lifetime.
|
|
||||||
void CloseFont();
|
|
||||||
void SetPixelHeight(int pixel_height); // Change font pixel size. All following calls to RasterizeGlyph() will use this size
|
|
||||||
const FT_Glyph_Metrics* LoadGlyph(uint32_t in_codepoint);
|
|
||||||
const FT_Bitmap* RenderGlyphAndGetInfo(GlyphInfo* out_glyph_info);
|
|
||||||
void BlitGlyph(const FT_Bitmap* ft_bitmap, uint32_t* dst, uint32_t dst_pitch, unsigned char* multiply_table = nullptr);
|
|
||||||
~FreeTypeFont() { CloseFont(); }
|
|
||||||
|
|
||||||
// [Internals]
|
|
||||||
FontInfo Info; // Font descriptor of the current font.
|
|
||||||
FT_Face Face;
|
|
||||||
unsigned int UserFlags; // = ImFontConfig::RasterizerFlags
|
|
||||||
FT_Int32 LoadFlags;
|
|
||||||
FT_Render_Mode RenderMode;
|
|
||||||
};
|
|
||||||
|
|
||||||
// From SDL_ttf: Handy routines for converting from fixed point
|
|
||||||
#define FT_CEIL(X) (((X + 63) & -64) / 64)
|
|
||||||
|
|
||||||
bool FreeTypeFont::InitFont(FT_Library ft_library, const ImFontConfig& cfg, unsigned int extra_font_builder_flags)
|
|
||||||
{
|
|
||||||
FT_Error error = FT_New_Memory_Face(ft_library, (uint8_t*)cfg.FontData, (uint32_t)cfg.FontDataSize, (uint32_t)cfg.FontNo, &Face);
|
|
||||||
if (error != 0)
|
|
||||||
return false;
|
|
||||||
error = FT_Select_Charmap(Face, FT_ENCODING_UNICODE);
|
|
||||||
if (error != 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Convert to FreeType flags (NB: Bold and Oblique are processed separately)
|
|
||||||
UserFlags = cfg.FontBuilderFlags | extra_font_builder_flags;
|
|
||||||
|
|
||||||
LoadFlags = 0;
|
|
||||||
if ((UserFlags & ImGuiFreeTypeBuilderFlags_Bitmap) == 0)
|
|
||||||
LoadFlags |= FT_LOAD_NO_BITMAP;
|
|
||||||
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_NoHinting)
|
|
||||||
LoadFlags |= FT_LOAD_NO_HINTING;
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_NoAutoHint)
|
|
||||||
LoadFlags |= FT_LOAD_NO_AUTOHINT;
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_ForceAutoHint)
|
|
||||||
LoadFlags |= FT_LOAD_FORCE_AUTOHINT;
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_LightHinting)
|
|
||||||
LoadFlags |= FT_LOAD_TARGET_LIGHT;
|
|
||||||
else if (UserFlags & ImGuiFreeTypeBuilderFlags_MonoHinting)
|
|
||||||
LoadFlags |= FT_LOAD_TARGET_MONO;
|
|
||||||
else
|
|
||||||
LoadFlags |= FT_LOAD_TARGET_NORMAL;
|
|
||||||
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_Monochrome)
|
|
||||||
RenderMode = FT_RENDER_MODE_MONO;
|
|
||||||
else
|
|
||||||
RenderMode = FT_RENDER_MODE_NORMAL;
|
|
||||||
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_LoadColor)
|
|
||||||
LoadFlags |= FT_LOAD_COLOR;
|
|
||||||
|
|
||||||
memset(&Info, 0, sizeof(Info));
|
|
||||||
SetPixelHeight((uint32_t)cfg.SizePixels);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FreeTypeFont::CloseFont()
|
|
||||||
{
|
|
||||||
if (Face)
|
|
||||||
{
|
|
||||||
FT_Done_Face(Face);
|
|
||||||
Face = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void FreeTypeFont::SetPixelHeight(int pixel_height)
|
|
||||||
{
|
|
||||||
// Vuhdo: I'm not sure how to deal with font sizes properly. As far as I understand, currently ImGui assumes that the 'pixel_height'
|
|
||||||
// is a maximum height of an any given glyph, i.e. it's the sum of font's ascender and descender. Seems strange to me.
|
|
||||||
// NB: FT_Set_Pixel_Sizes() doesn't seem to get us the same result.
|
|
||||||
FT_Size_RequestRec req;
|
|
||||||
req.type = (UserFlags & ImGuiFreeTypeBuilderFlags_Bitmap) ? FT_SIZE_REQUEST_TYPE_NOMINAL : FT_SIZE_REQUEST_TYPE_REAL_DIM;
|
|
||||||
req.width = 0;
|
|
||||||
req.height = (uint32_t)pixel_height * 64;
|
|
||||||
req.horiResolution = 0;
|
|
||||||
req.vertResolution = 0;
|
|
||||||
FT_Request_Size(Face, &req);
|
|
||||||
|
|
||||||
// Update font info
|
|
||||||
FT_Size_Metrics metrics = Face->size->metrics;
|
|
||||||
Info.PixelHeight = (uint32_t)pixel_height;
|
|
||||||
Info.Ascender = (float)FT_CEIL(metrics.ascender);
|
|
||||||
Info.Descender = (float)FT_CEIL(metrics.descender);
|
|
||||||
Info.LineSpacing = (float)FT_CEIL(metrics.height);
|
|
||||||
Info.LineGap = (float)FT_CEIL(metrics.height - metrics.ascender + metrics.descender);
|
|
||||||
Info.MaxAdvanceWidth = (float)FT_CEIL(metrics.max_advance);
|
|
||||||
}
|
|
||||||
|
|
||||||
const FT_Glyph_Metrics* FreeTypeFont::LoadGlyph(uint32_t codepoint)
|
|
||||||
{
|
|
||||||
uint32_t glyph_index = FT_Get_Char_Index(Face, codepoint);
|
|
||||||
if (glyph_index == 0)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
// If this crash for you: FreeType 2.11.0 has a crash bug on some bitmap/colored fonts.
|
|
||||||
// - https://gitlab.freedesktop.org/freetype/freetype/-/issues/1076
|
|
||||||
// - https://github.com/ocornut/imgui/issues/4567
|
|
||||||
// - https://github.com/ocornut/imgui/issues/4566
|
|
||||||
// You can use FreeType 2.10, or the patched version of 2.11.0 in VcPkg, or probably any upcoming FreeType version.
|
|
||||||
FT_Error error = FT_Load_Glyph(Face, glyph_index, LoadFlags);
|
|
||||||
if (error)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
// Need an outline for this to work
|
|
||||||
FT_GlyphSlot slot = Face->glyph;
|
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
IM_ASSERT(slot->format == FT_GLYPH_FORMAT_OUTLINE || slot->format == FT_GLYPH_FORMAT_BITMAP || slot->format == FT_GLYPH_FORMAT_SVG);
|
|
||||||
#else
|
|
||||||
#if ((FREETYPE_MAJOR >= 2) && (FREETYPE_MINOR >= 12))
|
|
||||||
IM_ASSERT(slot->format != FT_GLYPH_FORMAT_SVG && "The font contains SVG glyphs, you'll need to enable IMGUI_ENABLE_FREETYPE_LUNASVG in imconfig.h and install required libraries in order to use this font");
|
|
||||||
#endif
|
|
||||||
IM_ASSERT(slot->format == FT_GLYPH_FORMAT_OUTLINE || slot->format == FT_GLYPH_FORMAT_BITMAP);
|
|
||||||
#endif // IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
|
|
||||||
// Apply convenience transform (this is not picking from real "Bold"/"Italic" fonts! Merely applying FreeType helper transform. Oblique == Slanting)
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_Bold)
|
|
||||||
FT_GlyphSlot_Embolden(slot);
|
|
||||||
if (UserFlags & ImGuiFreeTypeBuilderFlags_Oblique)
|
|
||||||
{
|
|
||||||
FT_GlyphSlot_Oblique(slot);
|
|
||||||
//FT_BBox bbox;
|
|
||||||
//FT_Outline_Get_BBox(&slot->outline, &bbox);
|
|
||||||
//slot->metrics.width = bbox.xMax - bbox.xMin;
|
|
||||||
//slot->metrics.height = bbox.yMax - bbox.yMin;
|
|
||||||
}
|
|
||||||
|
|
||||||
return &slot->metrics;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FT_Bitmap* FreeTypeFont::RenderGlyphAndGetInfo(GlyphInfo* out_glyph_info)
|
|
||||||
{
|
|
||||||
FT_GlyphSlot slot = Face->glyph;
|
|
||||||
FT_Error error = FT_Render_Glyph(slot, RenderMode);
|
|
||||||
if (error != 0)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
FT_Bitmap* ft_bitmap = &Face->glyph->bitmap;
|
|
||||||
out_glyph_info->Width = (int)ft_bitmap->width;
|
|
||||||
out_glyph_info->Height = (int)ft_bitmap->rows;
|
|
||||||
out_glyph_info->OffsetX = Face->glyph->bitmap_left;
|
|
||||||
out_glyph_info->OffsetY = -Face->glyph->bitmap_top;
|
|
||||||
out_glyph_info->AdvanceX = (float)FT_CEIL(slot->advance.x);
|
|
||||||
out_glyph_info->IsColored = (ft_bitmap->pixel_mode == FT_PIXEL_MODE_BGRA);
|
|
||||||
|
|
||||||
return ft_bitmap;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FreeTypeFont::BlitGlyph(const FT_Bitmap* ft_bitmap, uint32_t* dst, uint32_t dst_pitch, unsigned char* multiply_table)
|
|
||||||
{
|
|
||||||
IM_ASSERT(ft_bitmap != nullptr);
|
|
||||||
const uint32_t w = ft_bitmap->width;
|
|
||||||
const uint32_t h = ft_bitmap->rows;
|
|
||||||
const uint8_t* src = ft_bitmap->buffer;
|
|
||||||
const uint32_t src_pitch = ft_bitmap->pitch;
|
|
||||||
|
|
||||||
switch (ft_bitmap->pixel_mode)
|
|
||||||
{
|
|
||||||
case FT_PIXEL_MODE_GRAY: // Grayscale image, 1 byte per pixel.
|
|
||||||
{
|
|
||||||
if (multiply_table == nullptr)
|
|
||||||
{
|
|
||||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
|
||||||
for (uint32_t x = 0; x < w; x++)
|
|
||||||
dst[x] = IM_COL32(255, 255, 255, src[x]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
|
||||||
for (uint32_t x = 0; x < w; x++)
|
|
||||||
dst[x] = IM_COL32(255, 255, 255, multiply_table[src[x]]);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FT_PIXEL_MODE_MONO: // Monochrome image, 1 bit per pixel. The bits in each byte are ordered from MSB to LSB.
|
|
||||||
{
|
|
||||||
uint8_t color0 = multiply_table ? multiply_table[0] : 0;
|
|
||||||
uint8_t color1 = multiply_table ? multiply_table[255] : 255;
|
|
||||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
|
||||||
{
|
|
||||||
uint8_t bits = 0;
|
|
||||||
const uint8_t* bits_ptr = src;
|
|
||||||
for (uint32_t x = 0; x < w; x++, bits <<= 1)
|
|
||||||
{
|
|
||||||
if ((x & 7) == 0)
|
|
||||||
bits = *bits_ptr++;
|
|
||||||
dst[x] = IM_COL32(255, 255, 255, (bits & 0x80) ? color1 : color0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case FT_PIXEL_MODE_BGRA:
|
|
||||||
{
|
|
||||||
// FIXME: Converting pre-multiplied alpha to straight. Doesn't smell good.
|
|
||||||
#define DE_MULTIPLY(color, alpha) (ImU32)(255.0f * (float)color / (float)alpha + 0.5f)
|
|
||||||
if (multiply_table == nullptr)
|
|
||||||
{
|
|
||||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
|
||||||
for (uint32_t x = 0; x < w; x++)
|
|
||||||
{
|
|
||||||
uint8_t r = src[x * 4 + 2], g = src[x * 4 + 1], b = src[x * 4], a = src[x * 4 + 3];
|
|
||||||
dst[x] = IM_COL32(DE_MULTIPLY(r, a), DE_MULTIPLY(g, a), DE_MULTIPLY(b, a), a);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for (uint32_t y = 0; y < h; y++, src += src_pitch, dst += dst_pitch)
|
|
||||||
{
|
|
||||||
for (uint32_t x = 0; x < w; x++)
|
|
||||||
{
|
|
||||||
uint8_t r = src[x * 4 + 2], g = src[x * 4 + 1], b = src[x * 4], a = src[x * 4 + 3];
|
|
||||||
dst[x] = IM_COL32(multiply_table[DE_MULTIPLY(r, a)], multiply_table[DE_MULTIPLY(g, a)], multiply_table[DE_MULTIPLY(b, a)], multiply_table[a]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#undef DE_MULTIPLY
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
IM_ASSERT(0 && "FreeTypeFont::BlitGlyph(): Unknown bitmap pixel mode!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
#ifndef STB_RECT_PACK_IMPLEMENTATION // in case the user already have an implementation in the _same_ compilation unit (e.g. unity builds)
|
|
||||||
#ifndef IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
#define STBRP_ASSERT(x) do { IM_ASSERT(x); } while (0)
|
|
||||||
#define STBRP_STATIC
|
|
||||||
#define STB_RECT_PACK_IMPLEMENTATION
|
|
||||||
#endif
|
|
||||||
#ifdef IMGUI_STB_RECT_PACK_FILENAME
|
|
||||||
#include IMGUI_STB_RECT_PACK_FILENAME
|
|
||||||
#else
|
|
||||||
#include "imstb_rectpack.h"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct ImFontBuildSrcGlyphFT
|
|
||||||
{
|
|
||||||
GlyphInfo Info;
|
|
||||||
uint32_t Codepoint;
|
|
||||||
unsigned int* BitmapData; // Point within one of the dst_tmp_bitmap_buffers[] array
|
|
||||||
|
|
||||||
ImFontBuildSrcGlyphFT() { memset((void*)this, 0, sizeof(*this)); }
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ImFontBuildSrcDataFT
|
|
||||||
{
|
|
||||||
FreeTypeFont Font;
|
|
||||||
stbrp_rect* Rects; // Rectangle to pack. We first fill in their size and the packer will give us their position.
|
|
||||||
const ImWchar* SrcRanges; // Ranges as requested by user (user is allowed to request too much, e.g. 0x0020..0xFFFF)
|
|
||||||
int DstIndex; // Index into atlas->Fonts[] and dst_tmp_array[]
|
|
||||||
int GlyphsHighest; // Highest requested codepoint
|
|
||||||
int GlyphsCount; // Glyph count (excluding missing glyphs and glyphs already set by an earlier source font)
|
|
||||||
ImBitVector GlyphsSet; // Glyph bit map (random access, 1-bit per codepoint. This will be a maximum of 8KB)
|
|
||||||
ImVector<ImFontBuildSrcGlyphFT> GlyphsList;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Temporary data for one destination ImFont* (multiple source fonts can be merged into one destination ImFont)
|
|
||||||
struct ImFontBuildDstDataFT
|
|
||||||
{
|
|
||||||
int SrcCount; // Number of source fonts targeting this destination font.
|
|
||||||
int GlyphsHighest;
|
|
||||||
int GlyphsCount;
|
|
||||||
ImBitVector GlyphsSet; // This is used to resolve collision when multiple sources are merged into a same destination font.
|
|
||||||
};
|
|
||||||
|
|
||||||
bool ImFontAtlasBuildWithFreeTypeEx(FT_Library ft_library, ImFontAtlas* atlas, unsigned int extra_flags)
|
|
||||||
{
|
|
||||||
IM_ASSERT(atlas->ConfigData.Size > 0);
|
|
||||||
|
|
||||||
ImFontAtlasBuildInit(atlas);
|
|
||||||
|
|
||||||
// Clear atlas
|
|
||||||
atlas->TexID = (ImTextureID)nullptr;
|
|
||||||
atlas->TexWidth = atlas->TexHeight = 0;
|
|
||||||
atlas->TexUvScale = ImVec2(0.0f, 0.0f);
|
|
||||||
atlas->TexUvWhitePixel = ImVec2(0.0f, 0.0f);
|
|
||||||
atlas->ClearTexData();
|
|
||||||
|
|
||||||
// Temporary storage for building
|
|
||||||
bool src_load_color = false;
|
|
||||||
ImVector<ImFontBuildSrcDataFT> src_tmp_array;
|
|
||||||
ImVector<ImFontBuildDstDataFT> dst_tmp_array;
|
|
||||||
src_tmp_array.resize(atlas->ConfigData.Size);
|
|
||||||
dst_tmp_array.resize(atlas->Fonts.Size);
|
|
||||||
memset((void*)src_tmp_array.Data, 0, (size_t)src_tmp_array.size_in_bytes());
|
|
||||||
memset((void*)dst_tmp_array.Data, 0, (size_t)dst_tmp_array.size_in_bytes());
|
|
||||||
|
|
||||||
// 1. Initialize font loading structure, check font data validity
|
|
||||||
for (int src_i = 0; src_i < atlas->ConfigData.Size; src_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
|
||||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
|
||||||
FreeTypeFont& font_face = src_tmp.Font;
|
|
||||||
IM_ASSERT(cfg.DstFont && (!cfg.DstFont->IsLoaded() || cfg.DstFont->ContainerAtlas == atlas));
|
|
||||||
|
|
||||||
// Find index from cfg.DstFont (we allow the user to set cfg.DstFont. Also it makes casual debugging nicer than when storing indices)
|
|
||||||
src_tmp.DstIndex = -1;
|
|
||||||
for (int output_i = 0; output_i < atlas->Fonts.Size && src_tmp.DstIndex == -1; output_i++)
|
|
||||||
if (cfg.DstFont == atlas->Fonts[output_i])
|
|
||||||
src_tmp.DstIndex = output_i;
|
|
||||||
IM_ASSERT(src_tmp.DstIndex != -1); // cfg.DstFont not pointing within atlas->Fonts[] array?
|
|
||||||
if (src_tmp.DstIndex == -1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Load font
|
|
||||||
if (!font_face.InitFont(ft_library, cfg, extra_flags))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// Measure highest codepoints
|
|
||||||
src_load_color |= (cfg.FontBuilderFlags & ImGuiFreeTypeBuilderFlags_LoadColor) != 0;
|
|
||||||
ImFontBuildDstDataFT& dst_tmp = dst_tmp_array[src_tmp.DstIndex];
|
|
||||||
src_tmp.SrcRanges = cfg.GlyphRanges ? cfg.GlyphRanges : atlas->GetGlyphRangesDefault();
|
|
||||||
for (const ImWchar* src_range = src_tmp.SrcRanges; src_range[0] && src_range[1]; src_range += 2)
|
|
||||||
{
|
|
||||||
// Check for valid range. This may also help detect *some* dangling pointers, because a common
|
|
||||||
// user error is to setup ImFontConfig::GlyphRanges with a pointer to data that isn't persistent.
|
|
||||||
IM_ASSERT(src_range[0] <= src_range[1]);
|
|
||||||
src_tmp.GlyphsHighest = ImMax(src_tmp.GlyphsHighest, (int)src_range[1]);
|
|
||||||
}
|
|
||||||
dst_tmp.SrcCount++;
|
|
||||||
dst_tmp.GlyphsHighest = ImMax(dst_tmp.GlyphsHighest, src_tmp.GlyphsHighest);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. For every requested codepoint, check for their presence in the font data, and handle redundancy or overlaps between source fonts to avoid unused glyphs.
|
|
||||||
int total_glyphs_count = 0;
|
|
||||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
|
||||||
ImFontBuildDstDataFT& dst_tmp = dst_tmp_array[src_tmp.DstIndex];
|
|
||||||
src_tmp.GlyphsSet.Create(src_tmp.GlyphsHighest + 1);
|
|
||||||
if (dst_tmp.GlyphsSet.Storage.empty())
|
|
||||||
dst_tmp.GlyphsSet.Create(dst_tmp.GlyphsHighest + 1);
|
|
||||||
|
|
||||||
for (const ImWchar* src_range = src_tmp.SrcRanges; src_range[0] && src_range[1]; src_range += 2)
|
|
||||||
for (int codepoint = src_range[0]; codepoint <= (int)src_range[1]; codepoint++)
|
|
||||||
{
|
|
||||||
if (dst_tmp.GlyphsSet.TestBit(codepoint)) // Don't overwrite existing glyphs. We could make this an option (e.g. MergeOverwrite)
|
|
||||||
continue;
|
|
||||||
uint32_t glyph_index = FT_Get_Char_Index(src_tmp.Font.Face, codepoint); // It is actually in the font? (FIXME-OPT: We are not storing the glyph_index..)
|
|
||||||
if (glyph_index == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Add to avail set/counters
|
|
||||||
src_tmp.GlyphsCount++;
|
|
||||||
dst_tmp.GlyphsCount++;
|
|
||||||
src_tmp.GlyphsSet.SetBit(codepoint);
|
|
||||||
dst_tmp.GlyphsSet.SetBit(codepoint);
|
|
||||||
total_glyphs_count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Unpack our bit map into a flat list (we now have all the Unicode points that we know are requested _and_ available _and_ not overlapping another)
|
|
||||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
|
||||||
src_tmp.GlyphsList.reserve(src_tmp.GlyphsCount);
|
|
||||||
|
|
||||||
IM_ASSERT(sizeof(src_tmp.GlyphsSet.Storage.Data[0]) == sizeof(ImU32));
|
|
||||||
const ImU32* it_begin = src_tmp.GlyphsSet.Storage.begin();
|
|
||||||
const ImU32* it_end = src_tmp.GlyphsSet.Storage.end();
|
|
||||||
for (const ImU32* it = it_begin; it < it_end; it++)
|
|
||||||
if (ImU32 entries_32 = *it)
|
|
||||||
for (ImU32 bit_n = 0; bit_n < 32; bit_n++)
|
|
||||||
if (entries_32 & ((ImU32)1 << bit_n))
|
|
||||||
{
|
|
||||||
ImFontBuildSrcGlyphFT src_glyph;
|
|
||||||
src_glyph.Codepoint = (ImWchar)(((it - it_begin) << 5) + bit_n);
|
|
||||||
//src_glyph.GlyphIndex = 0; // FIXME-OPT: We had this info in the previous step and lost it..
|
|
||||||
src_tmp.GlyphsList.push_back(src_glyph);
|
|
||||||
}
|
|
||||||
src_tmp.GlyphsSet.Clear();
|
|
||||||
IM_ASSERT(src_tmp.GlyphsList.Size == src_tmp.GlyphsCount);
|
|
||||||
}
|
|
||||||
for (int dst_i = 0; dst_i < dst_tmp_array.Size; dst_i++)
|
|
||||||
dst_tmp_array[dst_i].GlyphsSet.Clear();
|
|
||||||
dst_tmp_array.clear();
|
|
||||||
|
|
||||||
// Allocate packing character data and flag packed characters buffer as non-packed (x0=y0=x1=y1=0)
|
|
||||||
// (We technically don't need to zero-clear buf_rects, but let's do it for the sake of sanity)
|
|
||||||
ImVector<stbrp_rect> buf_rects;
|
|
||||||
buf_rects.resize(total_glyphs_count);
|
|
||||||
memset(buf_rects.Data, 0, (size_t)buf_rects.size_in_bytes());
|
|
||||||
|
|
||||||
// Allocate temporary rasterization data buffers.
|
|
||||||
// We could not find a way to retrieve accurate glyph size without rendering them.
|
|
||||||
// (e.g. slot->metrics->width not always matching bitmap->width, especially considering the Oblique transform)
|
|
||||||
// We allocate in chunks of 256 KB to not waste too much extra memory ahead. Hopefully users of FreeType won't mind the temporary allocations.
|
|
||||||
const int BITMAP_BUFFERS_CHUNK_SIZE = 256 * 1024;
|
|
||||||
int buf_bitmap_current_used_bytes = 0;
|
|
||||||
ImVector<unsigned char*> buf_bitmap_buffers;
|
|
||||||
buf_bitmap_buffers.push_back((unsigned char*)IM_ALLOC(BITMAP_BUFFERS_CHUNK_SIZE));
|
|
||||||
|
|
||||||
// 4. Gather glyphs sizes so we can pack them in our virtual canvas.
|
|
||||||
// 8. Render/rasterize font characters into the texture
|
|
||||||
int total_surface = 0;
|
|
||||||
int buf_rects_out_n = 0;
|
|
||||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
|
||||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
|
||||||
if (src_tmp.GlyphsCount == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
src_tmp.Rects = &buf_rects[buf_rects_out_n];
|
|
||||||
buf_rects_out_n += src_tmp.GlyphsCount;
|
|
||||||
|
|
||||||
// Compute multiply table if requested
|
|
||||||
const bool multiply_enabled = (cfg.RasterizerMultiply != 1.0f);
|
|
||||||
unsigned char multiply_table[256];
|
|
||||||
if (multiply_enabled)
|
|
||||||
ImFontAtlasBuildMultiplyCalcLookupTable(multiply_table, cfg.RasterizerMultiply);
|
|
||||||
|
|
||||||
// Gather the sizes of all rectangles we will need to pack
|
|
||||||
const int padding = atlas->TexGlyphPadding;
|
|
||||||
for (int glyph_i = 0; glyph_i < src_tmp.GlyphsList.Size; glyph_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcGlyphFT& src_glyph = src_tmp.GlyphsList[glyph_i];
|
|
||||||
|
|
||||||
const FT_Glyph_Metrics* metrics = src_tmp.Font.LoadGlyph(src_glyph.Codepoint);
|
|
||||||
if (metrics == nullptr)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Render glyph into a bitmap (currently held by FreeType)
|
|
||||||
const FT_Bitmap* ft_bitmap = src_tmp.Font.RenderGlyphAndGetInfo(&src_glyph.Info);
|
|
||||||
if (ft_bitmap == nullptr)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Allocate new temporary chunk if needed
|
|
||||||
const int bitmap_size_in_bytes = src_glyph.Info.Width * src_glyph.Info.Height * 4;
|
|
||||||
if (buf_bitmap_current_used_bytes + bitmap_size_in_bytes > BITMAP_BUFFERS_CHUNK_SIZE)
|
|
||||||
{
|
|
||||||
buf_bitmap_current_used_bytes = 0;
|
|
||||||
buf_bitmap_buffers.push_back((unsigned char*)IM_ALLOC(BITMAP_BUFFERS_CHUNK_SIZE));
|
|
||||||
}
|
|
||||||
IM_ASSERT(buf_bitmap_current_used_bytes + bitmap_size_in_bytes <= BITMAP_BUFFERS_CHUNK_SIZE); // We could probably allocate custom-sized buffer instead.
|
|
||||||
|
|
||||||
// Blit rasterized pixels to our temporary buffer and keep a pointer to it.
|
|
||||||
src_glyph.BitmapData = (unsigned int*)(buf_bitmap_buffers.back() + buf_bitmap_current_used_bytes);
|
|
||||||
buf_bitmap_current_used_bytes += bitmap_size_in_bytes;
|
|
||||||
src_tmp.Font.BlitGlyph(ft_bitmap, src_glyph.BitmapData, src_glyph.Info.Width, multiply_enabled ? multiply_table : nullptr);
|
|
||||||
|
|
||||||
src_tmp.Rects[glyph_i].w = (stbrp_coord)(src_glyph.Info.Width + padding);
|
|
||||||
src_tmp.Rects[glyph_i].h = (stbrp_coord)(src_glyph.Info.Height + padding);
|
|
||||||
total_surface += src_tmp.Rects[glyph_i].w * src_tmp.Rects[glyph_i].h;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need a width for the skyline algorithm, any width!
|
|
||||||
// The exact width doesn't really matter much, but some API/GPU have texture size limitations and increasing width can decrease height.
|
|
||||||
// User can override TexDesiredWidth and TexGlyphPadding if they wish, otherwise we use a simple heuristic to select the width based on expected surface.
|
|
||||||
const int surface_sqrt = (int)ImSqrt((float)total_surface) + 1;
|
|
||||||
atlas->TexHeight = 0;
|
|
||||||
if (atlas->TexDesiredWidth > 0)
|
|
||||||
atlas->TexWidth = atlas->TexDesiredWidth;
|
|
||||||
else
|
|
||||||
atlas->TexWidth = (surface_sqrt >= 4096 * 0.7f) ? 4096 : (surface_sqrt >= 2048 * 0.7f) ? 2048 : (surface_sqrt >= 1024 * 0.7f) ? 1024 : 512;
|
|
||||||
|
|
||||||
// 5. Start packing
|
|
||||||
// Pack our extra data rectangles first, so it will be on the upper-left corner of our texture (UV will have small values).
|
|
||||||
const int TEX_HEIGHT_MAX = 1024 * 32;
|
|
||||||
const int num_nodes_for_packing_algorithm = atlas->TexWidth - atlas->TexGlyphPadding;
|
|
||||||
ImVector<stbrp_node> pack_nodes;
|
|
||||||
pack_nodes.resize(num_nodes_for_packing_algorithm);
|
|
||||||
stbrp_context pack_context;
|
|
||||||
stbrp_init_target(&pack_context, atlas->TexWidth - atlas->TexGlyphPadding, TEX_HEIGHT_MAX - atlas->TexGlyphPadding, pack_nodes.Data, pack_nodes.Size);
|
|
||||||
ImFontAtlasBuildPackCustomRects(atlas, &pack_context);
|
|
||||||
|
|
||||||
// 6. Pack each source font. No rendering yet, we are working with rectangles in an infinitely tall texture at this point.
|
|
||||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
|
||||||
if (src_tmp.GlyphsCount == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
stbrp_pack_rects(&pack_context, src_tmp.Rects, src_tmp.GlyphsCount);
|
|
||||||
|
|
||||||
// Extend texture height and mark missing glyphs as non-packed so we won't render them.
|
|
||||||
// FIXME: We are not handling packing failure here (would happen if we got off TEX_HEIGHT_MAX or if a single if larger than TexWidth?)
|
|
||||||
for (int glyph_i = 0; glyph_i < src_tmp.GlyphsCount; glyph_i++)
|
|
||||||
if (src_tmp.Rects[glyph_i].was_packed)
|
|
||||||
atlas->TexHeight = ImMax(atlas->TexHeight, src_tmp.Rects[glyph_i].y + src_tmp.Rects[glyph_i].h);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 7. Allocate texture
|
|
||||||
atlas->TexHeight = (atlas->Flags & ImFontAtlasFlags_NoPowerOfTwoHeight) ? (atlas->TexHeight + 1) : ImUpperPowerOfTwo(atlas->TexHeight);
|
|
||||||
atlas->TexUvScale = ImVec2(1.0f / atlas->TexWidth, 1.0f / atlas->TexHeight);
|
|
||||||
if (src_load_color)
|
|
||||||
{
|
|
||||||
size_t tex_size = (size_t)atlas->TexWidth * atlas->TexHeight * 4;
|
|
||||||
atlas->TexPixelsRGBA32 = (unsigned int*)IM_ALLOC(tex_size);
|
|
||||||
memset(atlas->TexPixelsRGBA32, 0, tex_size);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
size_t tex_size = (size_t)atlas->TexWidth * atlas->TexHeight * 1;
|
|
||||||
atlas->TexPixelsAlpha8 = (unsigned char*)IM_ALLOC(tex_size);
|
|
||||||
memset(atlas->TexPixelsAlpha8, 0, tex_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 8. Copy rasterized font characters back into the main texture
|
|
||||||
// 9. Setup ImFont and glyphs for runtime
|
|
||||||
bool tex_use_colors = false;
|
|
||||||
for (int src_i = 0; src_i < src_tmp_array.Size; src_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcDataFT& src_tmp = src_tmp_array[src_i];
|
|
||||||
if (src_tmp.GlyphsCount == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// When merging fonts with MergeMode=true:
|
|
||||||
// - We can have multiple input fonts writing into a same destination font.
|
|
||||||
// - dst_font->ConfigData is != from cfg which is our source configuration.
|
|
||||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
|
||||||
ImFont* dst_font = cfg.DstFont;
|
|
||||||
|
|
||||||
const float ascent = src_tmp.Font.Info.Ascender;
|
|
||||||
const float descent = src_tmp.Font.Info.Descender;
|
|
||||||
ImFontAtlasBuildSetupFont(atlas, dst_font, &cfg, ascent, descent);
|
|
||||||
const float font_off_x = cfg.GlyphOffset.x;
|
|
||||||
const float font_off_y = cfg.GlyphOffset.y + IM_ROUND(dst_font->Ascent);
|
|
||||||
|
|
||||||
const int padding = atlas->TexGlyphPadding;
|
|
||||||
for (int glyph_i = 0; glyph_i < src_tmp.GlyphsCount; glyph_i++)
|
|
||||||
{
|
|
||||||
ImFontBuildSrcGlyphFT& src_glyph = src_tmp.GlyphsList[glyph_i];
|
|
||||||
stbrp_rect& pack_rect = src_tmp.Rects[glyph_i];
|
|
||||||
IM_ASSERT(pack_rect.was_packed);
|
|
||||||
if (pack_rect.w == 0 && pack_rect.h == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
GlyphInfo& info = src_glyph.Info;
|
|
||||||
IM_ASSERT(info.Width + padding <= pack_rect.w);
|
|
||||||
IM_ASSERT(info.Height + padding <= pack_rect.h);
|
|
||||||
const int tx = pack_rect.x + padding;
|
|
||||||
const int ty = pack_rect.y + padding;
|
|
||||||
|
|
||||||
// Register glyph
|
|
||||||
float x0 = info.OffsetX + font_off_x;
|
|
||||||
float y0 = info.OffsetY + font_off_y;
|
|
||||||
float x1 = x0 + info.Width;
|
|
||||||
float y1 = y0 + info.Height;
|
|
||||||
float u0 = (tx) / (float)atlas->TexWidth;
|
|
||||||
float v0 = (ty) / (float)atlas->TexHeight;
|
|
||||||
float u1 = (tx + info.Width) / (float)atlas->TexWidth;
|
|
||||||
float v1 = (ty + info.Height) / (float)atlas->TexHeight;
|
|
||||||
dst_font->AddGlyph(&cfg, (ImWchar)src_glyph.Codepoint, x0, y0, x1, y1, u0, v0, u1, v1, info.AdvanceX);
|
|
||||||
|
|
||||||
ImFontGlyph* dst_glyph = &dst_font->Glyphs.back();
|
|
||||||
IM_ASSERT(dst_glyph->Codepoint == src_glyph.Codepoint);
|
|
||||||
if (src_glyph.Info.IsColored)
|
|
||||||
dst_glyph->Colored = tex_use_colors = true;
|
|
||||||
|
|
||||||
// Blit from temporary buffer to final texture
|
|
||||||
size_t blit_src_stride = (size_t)src_glyph.Info.Width;
|
|
||||||
size_t blit_dst_stride = (size_t)atlas->TexWidth;
|
|
||||||
unsigned int* blit_src = src_glyph.BitmapData;
|
|
||||||
if (atlas->TexPixelsAlpha8 != nullptr)
|
|
||||||
{
|
|
||||||
unsigned char* blit_dst = atlas->TexPixelsAlpha8 + (ty * blit_dst_stride) + tx;
|
|
||||||
for (int y = 0; y < info.Height; y++, blit_dst += blit_dst_stride, blit_src += blit_src_stride)
|
|
||||||
for (int x = 0; x < info.Width; x++)
|
|
||||||
blit_dst[x] = (unsigned char)((blit_src[x] >> IM_COL32_A_SHIFT) & 0xFF);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
unsigned int* blit_dst = atlas->TexPixelsRGBA32 + (ty * blit_dst_stride) + tx;
|
|
||||||
for (int y = 0; y < info.Height; y++, blit_dst += blit_dst_stride, blit_src += blit_src_stride)
|
|
||||||
for (int x = 0; x < info.Width; x++)
|
|
||||||
blit_dst[x] = blit_src[x];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
src_tmp.Rects = nullptr;
|
|
||||||
}
|
|
||||||
atlas->TexPixelsUseColors = tex_use_colors;
|
|
||||||
|
|
||||||
// Cleanup
|
|
||||||
for (int buf_i = 0; buf_i < buf_bitmap_buffers.Size; buf_i++)
|
|
||||||
IM_FREE(buf_bitmap_buffers[buf_i]);
|
|
||||||
src_tmp_array.clear_destruct();
|
|
||||||
|
|
||||||
ImFontAtlasBuildFinish(atlas);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FreeType memory allocation callbacks
|
|
||||||
static void* FreeType_Alloc(FT_Memory /*memory*/, long size)
|
|
||||||
{
|
|
||||||
return GImGuiFreeTypeAllocFunc((size_t)size, GImGuiFreeTypeAllocatorUserData);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void FreeType_Free(FT_Memory /*memory*/, void* block)
|
|
||||||
{
|
|
||||||
GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void* FreeType_Realloc(FT_Memory /*memory*/, long cur_size, long new_size, void* block)
|
|
||||||
{
|
|
||||||
// Implement realloc() as we don't ask user to provide it.
|
|
||||||
if (block == nullptr)
|
|
||||||
return GImGuiFreeTypeAllocFunc((size_t)new_size, GImGuiFreeTypeAllocatorUserData);
|
|
||||||
|
|
||||||
if (new_size == 0)
|
|
||||||
{
|
|
||||||
GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (new_size > cur_size)
|
|
||||||
{
|
|
||||||
void* new_block = GImGuiFreeTypeAllocFunc((size_t)new_size, GImGuiFreeTypeAllocatorUserData);
|
|
||||||
memcpy(new_block, block, (size_t)cur_size);
|
|
||||||
GImGuiFreeTypeFreeFunc(block, GImGuiFreeTypeAllocatorUserData);
|
|
||||||
return new_block;
|
|
||||||
}
|
|
||||||
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool ImFontAtlasBuildWithFreeType(ImFontAtlas* atlas)
|
|
||||||
{
|
|
||||||
// FreeType memory management: https://www.freetype.org/freetype2/docs/design/design-4.html
|
|
||||||
FT_MemoryRec_ memory_rec = {};
|
|
||||||
memory_rec.user = nullptr;
|
|
||||||
memory_rec.alloc = &FreeType_Alloc;
|
|
||||||
memory_rec.free = &FreeType_Free;
|
|
||||||
memory_rec.realloc = &FreeType_Realloc;
|
|
||||||
|
|
||||||
// https://www.freetype.org/freetype2/docs/reference/ft2-module_management.html#FT_New_Library
|
|
||||||
FT_Library ft_library;
|
|
||||||
FT_Error error = FT_New_Library(&memory_rec, &ft_library);
|
|
||||||
if (error != 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// If you don't call FT_Add_Default_Modules() the rest of code may work, but FreeType won't use our custom allocator.
|
|
||||||
FT_Add_Default_Modules(ft_library);
|
|
||||||
|
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
// Install svg hooks for FreeType
|
|
||||||
// https://freetype.org/freetype2/docs/reference/ft2-properties.html#svg-hooks
|
|
||||||
// https://freetype.org/freetype2/docs/reference/ft2-svg_fonts.html#svg_fonts
|
|
||||||
SVG_RendererHooks hooks = { ImGuiLunasvgPortInit, ImGuiLunasvgPortFree, ImGuiLunasvgPortRender, ImGuiLunasvgPortPresetSlot };
|
|
||||||
FT_Property_Set(ft_library, "ot-svg", "svg-hooks", &hooks);
|
|
||||||
#endif // IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
|
|
||||||
bool ret = ImFontAtlasBuildWithFreeTypeEx(ft_library, atlas, atlas->FontBuilderFlags);
|
|
||||||
FT_Done_Library(ft_library);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ImFontBuilderIO* ImGuiFreeType::GetBuilderForFreeType()
|
|
||||||
{
|
|
||||||
static ImFontBuilderIO io;
|
|
||||||
io.FontBuilder_Build = ImFontAtlasBuildWithFreeType;
|
|
||||||
return &io;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ImGuiFreeType::SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data)
|
|
||||||
{
|
|
||||||
GImGuiFreeTypeAllocFunc = alloc_func;
|
|
||||||
GImGuiFreeTypeFreeFunc = free_func;
|
|
||||||
GImGuiFreeTypeAllocatorUserData = user_data;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
// For more details, see https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/rsvg-port.c
|
|
||||||
// The original code from the demo is licensed under CeCILL-C Free Software License Agreement (https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/LICENSE.TXT)
|
|
||||||
struct LunasvgPortState
|
|
||||||
{
|
|
||||||
FT_Error err = FT_Err_Ok;
|
|
||||||
lunasvg::Matrix matrix;
|
|
||||||
std::unique_ptr<lunasvg::Document> svg = nullptr;
|
|
||||||
};
|
|
||||||
|
|
||||||
static FT_Error ImGuiLunasvgPortInit(FT_Pointer* _state)
|
|
||||||
{
|
|
||||||
*_state = IM_NEW(LunasvgPortState)();
|
|
||||||
return FT_Err_Ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ImGuiLunasvgPortFree(FT_Pointer* _state)
|
|
||||||
{
|
|
||||||
IM_DELETE(*_state);
|
|
||||||
}
|
|
||||||
|
|
||||||
static FT_Error ImGuiLunasvgPortRender(FT_GlyphSlot slot, FT_Pointer* _state)
|
|
||||||
{
|
|
||||||
LunasvgPortState* state = *(LunasvgPortState**)_state;
|
|
||||||
|
|
||||||
// If there was an error while loading the svg in ImGuiLunasvgPortPresetSlot(), the renderer hook still get called, so just returns the error.
|
|
||||||
if (state->err != FT_Err_Ok)
|
|
||||||
return state->err;
|
|
||||||
|
|
||||||
// rows is height, pitch (or stride) equals to width * sizeof(int32)
|
|
||||||
lunasvg::Bitmap bitmap((uint8_t*)slot->bitmap.buffer, slot->bitmap.width, slot->bitmap.rows, slot->bitmap.pitch);
|
|
||||||
state->svg->setMatrix(state->svg->matrix().identity()); // Reset the svg matrix to the default value
|
|
||||||
state->svg->render(bitmap, state->matrix); // state->matrix is already scaled and translated
|
|
||||||
state->err = FT_Err_Ok;
|
|
||||||
return state->err;
|
|
||||||
}
|
|
||||||
|
|
||||||
static FT_Error ImGuiLunasvgPortPresetSlot(FT_GlyphSlot slot, FT_Bool cache, FT_Pointer* _state)
|
|
||||||
{
|
|
||||||
FT_SVG_Document document = (FT_SVG_Document)slot->other;
|
|
||||||
LunasvgPortState* state = *(LunasvgPortState**)_state;
|
|
||||||
FT_Size_Metrics& metrics = document->metrics;
|
|
||||||
|
|
||||||
// This function is called twice, once in the FT_Load_Glyph() and another right before ImGuiLunasvgPortRender().
|
|
||||||
// If it's the latter, don't do anything because it's // already done in the former.
|
|
||||||
if (cache)
|
|
||||||
return state->err;
|
|
||||||
|
|
||||||
state->svg = lunasvg::Document::loadFromData((const char*)document->svg_document, document->svg_document_length);
|
|
||||||
if (state->svg == nullptr)
|
|
||||||
{
|
|
||||||
state->err = FT_Err_Invalid_SVG_Document;
|
|
||||||
return state->err;
|
|
||||||
}
|
|
||||||
|
|
||||||
lunasvg::Box box = state->svg->box();
|
|
||||||
double scale = std::min(metrics.x_ppem / box.w, metrics.y_ppem / box.h);
|
|
||||||
double xx = (double)document->transform.xx / (1 << 16);
|
|
||||||
double xy = -(double)document->transform.xy / (1 << 16);
|
|
||||||
double yx = -(double)document->transform.yx / (1 << 16);
|
|
||||||
double yy = (double)document->transform.yy / (1 << 16);
|
|
||||||
double x0 = (double)document->delta.x / 64 * box.w / metrics.x_ppem;
|
|
||||||
double y0 = -(double)document->delta.y / 64 * box.h / metrics.y_ppem;
|
|
||||||
|
|
||||||
// Scale and transform, we don't translate the svg yet
|
|
||||||
state->matrix.identity();
|
|
||||||
state->matrix.scale(scale, scale);
|
|
||||||
state->matrix.transform(xx, xy, yx, yy, x0, y0);
|
|
||||||
state->svg->setMatrix(state->matrix);
|
|
||||||
|
|
||||||
// Pre-translate the matrix for the rendering step
|
|
||||||
state->matrix.translate(-box.x, -box.y);
|
|
||||||
|
|
||||||
// Get the box again after the transformation
|
|
||||||
box = state->svg->box();
|
|
||||||
|
|
||||||
// Calculate the bitmap size
|
|
||||||
slot->bitmap_left = FT_Int(box.x);
|
|
||||||
slot->bitmap_top = FT_Int(-box.y);
|
|
||||||
slot->bitmap.rows = (unsigned int)(ImCeil((float)box.h));
|
|
||||||
slot->bitmap.width = (unsigned int)(ImCeil((float)box.w));
|
|
||||||
slot->bitmap.pitch = slot->bitmap.width * 4;
|
|
||||||
slot->bitmap.pixel_mode = FT_PIXEL_MODE_BGRA;
|
|
||||||
|
|
||||||
// Compute all the bearings and set them correctly. The outline is scaled already, we just need to use the bounding box.
|
|
||||||
double metrics_width = box.w;
|
|
||||||
double metrics_height = box.h;
|
|
||||||
double horiBearingX = box.x;
|
|
||||||
double horiBearingY = -box.y;
|
|
||||||
double vertBearingX = slot->metrics.horiBearingX / 64.0 - slot->metrics.horiAdvance / 64.0 / 2.0;
|
|
||||||
double vertBearingY = (slot->metrics.vertAdvance / 64.0 - slot->metrics.height / 64.0) / 2.0;
|
|
||||||
slot->metrics.width = FT_Pos(IM_ROUND(metrics_width * 64.0)); // Using IM_ROUND() assume width and height are positive
|
|
||||||
slot->metrics.height = FT_Pos(IM_ROUND(metrics_height * 64.0));
|
|
||||||
slot->metrics.horiBearingX = FT_Pos(horiBearingX * 64);
|
|
||||||
slot->metrics.horiBearingY = FT_Pos(horiBearingY * 64);
|
|
||||||
slot->metrics.vertBearingX = FT_Pos(vertBearingX * 64);
|
|
||||||
slot->metrics.vertBearingY = FT_Pos(vertBearingY * 64);
|
|
||||||
|
|
||||||
if (slot->metrics.vertAdvance == 0)
|
|
||||||
slot->metrics.vertAdvance = FT_Pos(metrics_height * 1.2 * 64.0);
|
|
||||||
|
|
||||||
state->err = FT_Err_Ok;
|
|
||||||
return state->err;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // #ifdef IMGUI_ENABLE_FREETYPE_LUNASVG
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#pragma warning (pop)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // #ifndef IMGUI_DISABLE
|
|
@ -1,52 +0,0 @@
|
|||||||
// dear imgui: FreeType font builder (used as a replacement for the stb_truetype builder)
|
|
||||||
// (headers)
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "imgui.h" // IMGUI_API
|
|
||||||
#ifndef IMGUI_DISABLE
|
|
||||||
|
|
||||||
// Forward declarations
|
|
||||||
struct ImFontAtlas;
|
|
||||||
struct ImFontBuilderIO;
|
|
||||||
|
|
||||||
// Hinting greatly impacts visuals (and glyph sizes).
|
|
||||||
// - By default, hinting is enabled and the font's native hinter is preferred over the auto-hinter.
|
|
||||||
// - When disabled, FreeType generates blurrier glyphs, more or less matches the stb_truetype.h
|
|
||||||
// - The Default hinting mode usually looks good, but may distort glyphs in an unusual way.
|
|
||||||
// - The Light hinting mode generates fuzzier glyphs but better matches Microsoft's rasterizer.
|
|
||||||
// You can set those flags globaly in ImFontAtlas::FontBuilderFlags
|
|
||||||
// You can set those flags on a per font basis in ImFontConfig::FontBuilderFlags
|
|
||||||
enum ImGuiFreeTypeBuilderFlags
|
|
||||||
{
|
|
||||||
ImGuiFreeTypeBuilderFlags_NoHinting = 1 << 0, // Disable hinting. This generally generates 'blurrier' bitmap glyphs when the glyph are rendered in any of the anti-aliased modes.
|
|
||||||
ImGuiFreeTypeBuilderFlags_NoAutoHint = 1 << 1, // Disable auto-hinter.
|
|
||||||
ImGuiFreeTypeBuilderFlags_ForceAutoHint = 1 << 2, // Indicates that the auto-hinter is preferred over the font's native hinter.
|
|
||||||
ImGuiFreeTypeBuilderFlags_LightHinting = 1 << 3, // A lighter hinting algorithm for gray-level modes. Many generated glyphs are fuzzier but better resemble their original shape. This is achieved by snapping glyphs to the pixel grid only vertically (Y-axis), as is done by Microsoft's ClearType and Adobe's proprietary font renderer. This preserves inter-glyph spacing in horizontal text.
|
|
||||||
ImGuiFreeTypeBuilderFlags_MonoHinting = 1 << 4, // Strong hinting algorithm that should only be used for monochrome output.
|
|
||||||
ImGuiFreeTypeBuilderFlags_Bold = 1 << 5, // Styling: Should we artificially embolden the font?
|
|
||||||
ImGuiFreeTypeBuilderFlags_Oblique = 1 << 6, // Styling: Should we slant the font, emulating italic style?
|
|
||||||
ImGuiFreeTypeBuilderFlags_Monochrome = 1 << 7, // Disable anti-aliasing. Combine this with MonoHinting for best results!
|
|
||||||
ImGuiFreeTypeBuilderFlags_LoadColor = 1 << 8, // Enable FreeType color-layered glyphs
|
|
||||||
ImGuiFreeTypeBuilderFlags_Bitmap = 1 << 9 // Enable FreeType bitmap glyphs
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace ImGuiFreeType
|
|
||||||
{
|
|
||||||
// This is automatically assigned when using '#define IMGUI_ENABLE_FREETYPE'.
|
|
||||||
// If you need to dynamically select between multiple builders:
|
|
||||||
// - you can manually assign this builder with 'atlas->FontBuilderIO = ImGuiFreeType::GetBuilderForFreeType()'
|
|
||||||
// - prefer deep-copying this into your own ImFontBuilderIO instance if you use hot-reloading that messes up static data.
|
|
||||||
IMGUI_API const ImFontBuilderIO* GetBuilderForFreeType();
|
|
||||||
|
|
||||||
// Override allocators. By default ImGuiFreeType will use IM_ALLOC()/IM_FREE()
|
|
||||||
// However, as FreeType does lots of allocations we provide a way for the user to redirect it to a separate memory heap if desired.
|
|
||||||
IMGUI_API void SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data = nullptr);
|
|
||||||
|
|
||||||
// Obsolete names (will be removed soon)
|
|
||||||
// Prefer using '#define IMGUI_ENABLE_FREETYPE'
|
|
||||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
|
||||||
static inline bool BuildFontAtlas(ImFontAtlas* atlas, unsigned int flags = 0) { atlas->FontBuilderIO = GetBuilderForFreeType(); atlas->FontBuilderFlags = flags; return atlas->Build(); }
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // #ifndef IMGUI_DISABLE
|
|
@ -1,16 +0,0 @@
|
|||||||
all: release
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@$(MAKE) -f debug.mk all
|
|
||||||
|
|
||||||
release:
|
|
||||||
@$(MAKE) -f release.mk all
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@$(MAKE) -f build.mk clean
|
|
||||||
|
|
||||||
db: clean
|
|
||||||
@bear -- $(MAKE) -f debug.mk all
|
|
||||||
@mv -f compile_commands.json ../../../
|
|
||||||
|
|
||||||
.PHONY: all clean debug release db
|
|
@ -1,12 +0,0 @@
|
|||||||
CFLAGS +=
|
|
||||||
CXXFLAGS := $(CFLAGS) -std=gnu++17
|
|
||||||
DEFINES += -DTRACY_NO_STATISTICS
|
|
||||||
INCLUDES := $(shell pkg-config --cflags capstone)
|
|
||||||
LIBS += $(shell pkg-config --libs capstone) -lpthread
|
|
||||||
PROJECT := import-chrome
|
|
||||||
IMAGE := $(PROJECT)-$(BUILD)
|
|
||||||
|
|
||||||
FILTER :=
|
|
||||||
include ../../../common/src-from-vcxproj.mk
|
|
||||||
|
|
||||||
include ../../../common/unix.mk
|
|
@ -1,6 +0,0 @@
|
|||||||
CFLAGS := -g3 -Wall
|
|
||||||
DEFINES := -DDEBUG
|
|
||||||
BUILD := debug
|
|
||||||
|
|
||||||
include ../../../common/unix-debug.mk
|
|
||||||
include build.mk
|
|
@ -1,9 +0,0 @@
|
|||||||
CFLAGS := -O3
|
|
||||||
ifndef TRACY_NO_LTO
|
|
||||||
CFLAGS += -flto
|
|
||||||
endif
|
|
||||||
DEFINES := -DNDEBUG
|
|
||||||
BUILD := release
|
|
||||||
|
|
||||||
include ../../../common/unix-release.mk
|
|
||||||
include build.mk
|
|
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.30907.101
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "import-chrome", "import-chrome.vcxproj", "{447D58BF-94CD-4469-BB90-549C05D03E00}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{447D58BF-94CD-4469-BB90-549C05D03E00}.Release|x64.Build.0 = Release|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {3E51386C-43EA-44AC-9F24-AFAFE4D63ADE}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,206 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>15.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{447D58BF-94CD-4469-BB90-549C05D03E00}</ProjectGuid>
|
|
||||||
<RootNamespace>import-chrome</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
<VcpkgTriplet>x64-windows-static</VcpkgTriplet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<PropertyGroup Label="Vcpkg">
|
|
||||||
<VcpkgEnableManifest>true</VcpkgEnableManifest>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>Disabled</Optimization>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
||||||
<PreprocessorDefinitions>TRACY_NO_STATISTICS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
|
||||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include;$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include\capstone;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\include\capstone;$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\capstone</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies>ws2_32.lib;capstone.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\debug\lib</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<Optimization>MaxSpeed</Optimization>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
||||||
<PreprocessorDefinitions>TRACY_NO_STATISTICS;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
|
|
||||||
<LanguageStandard>stdcpplatest</LanguageStandard>
|
|
||||||
<AdditionalIncludeDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include;$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\include\capstone;$(VcpkgManifestRoot)\vcpkg_installed\$(VcpkgTriplet)\$(VcpkgTriplet)\include\capstone;$(VcpkgRoot)\installed\$(VcpkgTriplet)\include\capstone</AdditionalIncludeDirectories>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<AdditionalDependencies>ws2_32.lib;capstone.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<AdditionalLibraryDirectories>$(ProjectDir)..\..\..\vcpkg_installed\$(VcpkgTriplet)\lib</AdditionalLibraryDirectories>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySocket.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracyStackFrames.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySystem.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4hc.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\debug.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\entropy_common.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\error_private.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\fse_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\pool.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\threading.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\xxhash.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\zstd_common.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\fse_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\hist.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\huf_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstdmt_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_literals.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_sequences.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_superblock.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_double_fast.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_fast.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_lazy.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_ldm.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_opt.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\huf_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_ddict.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress_block.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\cover.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\divsufsort.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\fastcover.c" />
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\zdict.c" />
|
|
||||||
<ClCompile Include="..\..\src\import-chrome.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlign.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlloc.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyApi.h" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyColor.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyForceInline.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyMutex.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyProtocol.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyQueue.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySocket.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyStackFrames.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySystem.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyUwp.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyYield.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4hc.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyCharUtil.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMmap.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracySlab.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTextureCompression.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyThreadCompress.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyVector.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\server\TracyWorker.hpp" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\bitstream.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\compiler.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\cpu.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\debug.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\error_private.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\fse.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\huf.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\mem.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\pool.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\portability_macros.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\threading.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\xxhash.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_deps.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_trace.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\clevels.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\hist.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstdmt_compress.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_literals.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_sequences.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_superblock.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_cwksp.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_double_fast.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_fast.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_lazy.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm_geartab.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_opt.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_ddict.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_block.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_internal.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\cover.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\divsufsort.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zdict.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd.h" />
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd_errors.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\zstd\decompress\huf_decompress_amd64.S" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,356 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="src">
|
|
||||||
<UniqueIdentifier>{729c80ee-4d26-4a5e-8f1f-6c075783eb56}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="server">
|
|
||||||
<UniqueIdentifier>{cf23ef7b-7694-4154-830b-00cf053350ea}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="common">
|
|
||||||
<UniqueIdentifier>{e39d3623-47cd-4752-8da9-3ea324f964c1}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd">
|
|
||||||
<UniqueIdentifier>{9ec18988-3ab7-4c05-a9d0-46c0a68037de}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\common">
|
|
||||||
<UniqueIdentifier>{5ee9ba63-2914-4027-997e-e743a294bba6}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\compress">
|
|
||||||
<UniqueIdentifier>{a166d032-7be0-4d07-9f85-a8199cc1ec7c}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\decompress">
|
|
||||||
<UniqueIdentifier>{438fff23-197c-4b6f-91f0-74f8b3878571}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="zstd\dictBuilder">
|
|
||||||
<UniqueIdentifier>{e5c7021a-e0e4-45c2-b461-e806bc036d5f}</UniqueIdentifier>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMemory.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyWorker.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\src\import-chrome.cpp">
|
|
||||||
<Filter>src</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyThreadCompress.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTaskDispatch.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyMmap.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\server\TracyTextureCompression.cpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\debug.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\entropy_common.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\error_private.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\fse_decompress.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\pool.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\threading.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\xxhash.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\common\zstd_common.c">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\fse_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\hist.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\huf_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_literals.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_sequences.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_compress_superblock.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_double_fast.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_fast.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_lazy.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_ldm.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstd_opt.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\compress\zstdmt_compress.c">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\huf_decompress.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_ddict.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\decompress\zstd_decompress_block.c">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\cover.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\divsufsort.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\fastcover.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\zstd\dictBuilder\zdict.c">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\tracy_lz4hc.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySocket.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracyStackFrames.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\..\public\common\TracySystem.cpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyCharUtil.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyPopcnt.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracySlab.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyVector.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyWorker.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyThreadCompress.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTaskDispatch.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyMmap.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\server\TracyTextureCompression.hpp">
|
|
||||||
<Filter>server</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zstd_errors.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\bitstream.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\compiler.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\cpu.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\debug.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\error_private.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\fse.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\huf.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\mem.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\pool.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\threading.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\xxhash.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_deps.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_internal.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\zstd_trace.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\hist.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_internal.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_literals.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_sequences.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_compress_superblock.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_cwksp.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_double_fast.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_fast.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_lazy.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_ldm_geartab.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstd_opt.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\zstdmt_compress.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_ddict.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_block.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\decompress\zstd_decompress_internal.h">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\zdict.h">
|
|
||||||
<Filter>zstd</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\cover.h">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\dictBuilder\divsufsort.h">
|
|
||||||
<Filter>zstd\dictBuilder</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\common\portability_macros.h">
|
|
||||||
<Filter>zstd\common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\zstd\compress\clevels.h">
|
|
||||||
<Filter>zstd\compress</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\tracy_lz4hc.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlign.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyAlloc.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyApi.h">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyColor.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyForceInline.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyMutex.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyProtocol.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyQueue.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySocket.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyStackFrames.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracySystem.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyUwp.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\..\public\common\TracyYield.hpp">
|
|
||||||
<Filter>common</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\..\..\zstd\decompress\huf_decompress_amd64.S">
|
|
||||||
<Filter>zstd\decompress</Filter>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
30
import/CMakeLists.txt
Normal file
30
import/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
option(NO_ISA_EXTENSIONS "Disable ISA extensions (don't pass -march=native or -mcpu=native to the compiler)" OFF)
|
||||||
|
option(NO_STATISTICS "Disable calculation of statistics" ON)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
project(
|
||||||
|
tracy-import
|
||||||
|
LANGUAGES C CXX
|
||||||
|
VERSION ${TRACY_VERSION_STRING}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/config.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
add_executable(tracy-import-chrome
|
||||||
|
src/import-chrome.cpp
|
||||||
|
)
|
||||||
|
target_link_libraries(tracy-import-chrome PRIVATE TracyServer)
|
||||||
|
|
||||||
|
add_executable(tracy-import-fuchsia
|
||||||
|
src/import-fuchsia.cpp
|
||||||
|
)
|
||||||
|
target_link_libraries(tracy-import-fuchsia PRIVATE TracyServer)
|
||||||
|
|
||||||
|
set_property(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
|
@ -7,9 +7,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unordered_map>
|
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <zstd.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# define stat64 _stat64
|
# define stat64 _stat64
|
||||||
@ -23,7 +23,6 @@
|
|||||||
#include "../../server/TracyFileWrite.hpp"
|
#include "../../server/TracyFileWrite.hpp"
|
||||||
#include "../../server/TracyMmap.hpp"
|
#include "../../server/TracyMmap.hpp"
|
||||||
#include "../../server/TracyWorker.hpp"
|
#include "../../server/TracyWorker.hpp"
|
||||||
#include "../../zstd/zstd.h"
|
|
||||||
|
|
||||||
using json = nlohmann::json;
|
using json = nlohmann::json;
|
||||||
|
|
||||||
@ -50,7 +49,7 @@ int main( int argc, char** argv )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tracy::FileWrite::Compression clev = tracy::FileWrite::Compression::Fast;
|
tracy::FileCompression clev = tracy::FileCompression::Fast;
|
||||||
|
|
||||||
if( argc != 3 ) Usage();
|
if( argc != 3 ) Usage();
|
||||||
|
|
686
import/src/import-fuchsia.cpp
Normal file
686
import/src/import-fuchsia.cpp
Normal file
@ -0,0 +1,686 @@
|
|||||||
|
#include <cinttypes>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <exception>
|
||||||
|
#include <ostream>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <variant>
|
||||||
|
#include <zstd.h>
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define stat64 _stat64
|
||||||
|
#endif
|
||||||
|
#if defined __APPLE__
|
||||||
|
#define stat64 stat
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "../../server/TracyFileWrite.hpp"
|
||||||
|
#include "../../server/TracyMmap.hpp"
|
||||||
|
#include "../../server/TracyWorker.hpp"
|
||||||
|
|
||||||
|
void Usage() {
|
||||||
|
printf("Usage: import-fuchsia input.json output.tracy\n\n");
|
||||||
|
printf("See: "
|
||||||
|
"https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format\n\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ROUND_TO_WORD(n) ((n) + ((~((n)-1)) & 0x7))
|
||||||
|
|
||||||
|
struct ThreadRef {
|
||||||
|
uint64_t pid;
|
||||||
|
uint64_t tid;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline bool operator==(const ThreadRef t1, const ThreadRef t2) {
|
||||||
|
return t1.pid == t2.pid && t1.tid == t2.tid;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct Unit {};
|
||||||
|
|
||||||
|
// arguments
|
||||||
|
using ArgumentValue =
|
||||||
|
std::variant<uint64_t, int64_t, double, bool, Unit, std::string>;
|
||||||
|
|
||||||
|
struct Argument {
|
||||||
|
std::string name;
|
||||||
|
ArgumentValue value;
|
||||||
|
};
|
||||||
|
|
||||||
|
// encode a pair of "real pid, real tid" from a trace into a
|
||||||
|
// pseudo thread ID living in the single namespace of Tracy threads.
|
||||||
|
struct PidTidEncoder {
|
||||||
|
ThreadRef thref;
|
||||||
|
uint64_t pseudo_tid; // fake thread id, unique within Tracy
|
||||||
|
};
|
||||||
|
|
||||||
|
// A span into the main buffer
|
||||||
|
struct Record {
|
||||||
|
const uint64_t *p;
|
||||||
|
uint16_t len_word;
|
||||||
|
uint64_t header;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct DecodeState {
|
||||||
|
std::vector<PidTidEncoder> tid_encoders;
|
||||||
|
std::unordered_map<uint64_t, std::string> threadNames;
|
||||||
|
// compressed thread refs
|
||||||
|
std::unordered_map<uint16_t, ThreadRef> threadRefs;
|
||||||
|
// compressed strings
|
||||||
|
std::unordered_map<uint16_t, std::string> stringRefs;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Append a string representation of `val` to `res`
|
||||||
|
void appendArgumentValue(std::string &res, ArgumentValue &val) {
|
||||||
|
char buf[32];
|
||||||
|
buf[31] = 0;
|
||||||
|
if (std::holds_alternative<std::string>(val)) {
|
||||||
|
res += std::get<std::string>(val);
|
||||||
|
} else if (std::holds_alternative<uint64_t>(val)) {
|
||||||
|
snprintf(buf, 31, "%" PRIu64, std::get<uint64_t>(val));
|
||||||
|
res.append(buf);
|
||||||
|
} else if (std::holds_alternative<int64_t>(val)) {
|
||||||
|
snprintf(buf, 31, "%" PRId64, std::get<int64_t>(val));
|
||||||
|
res.append(buf);
|
||||||
|
} else if (std::holds_alternative<bool>(val)) {
|
||||||
|
res += std::get<bool>(val) ? "true" : "false";
|
||||||
|
} else if (std::holds_alternative<double>(val)) {
|
||||||
|
snprintf(buf, 31, "%.5f", std::get<double>(val));
|
||||||
|
res += buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read input into a local buffer
|
||||||
|
std::vector<uint8_t> read_input(const char *input) {
|
||||||
|
std::vector<uint8_t> buf;
|
||||||
|
|
||||||
|
FILE *f = fopen(input, "rb");
|
||||||
|
if (!f) {
|
||||||
|
fprintf(stderr, "Cannot open input file!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
struct stat64 sb;
|
||||||
|
if (stat64(input, &sb) != 0) {
|
||||||
|
fprintf(stderr, "Cannot open input file!\n");
|
||||||
|
fclose(f);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto zsz = sb.st_size;
|
||||||
|
auto zbuf = (char *)mmap(nullptr, zsz, PROT_READ, MAP_SHARED, fileno(f), 0);
|
||||||
|
fclose(f);
|
||||||
|
if (!zbuf) {
|
||||||
|
fprintf(stderr, "Cannot mmap input file!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto fnsz = strlen(input);
|
||||||
|
if (fnsz > 4 && memcmp(input + fnsz - 4, ".zst", 4) == 0) {
|
||||||
|
|
||||||
|
auto zctx = ZSTD_createDStream();
|
||||||
|
ZSTD_initDStream(zctx);
|
||||||
|
|
||||||
|
enum { tmpSize = 64 * 1024 };
|
||||||
|
auto tmp = new char[tmpSize];
|
||||||
|
|
||||||
|
ZSTD_inBuffer_s zin = {zbuf, (size_t)zsz};
|
||||||
|
ZSTD_outBuffer_s zout = {tmp, (size_t)tmpSize};
|
||||||
|
|
||||||
|
buf.reserve(1024 * 1024);
|
||||||
|
|
||||||
|
while (zin.pos < zin.size) {
|
||||||
|
const auto res = ZSTD_decompressStream(zctx, &zout, &zin);
|
||||||
|
if (ZSTD_isError(res)) {
|
||||||
|
ZSTD_freeDStream(zctx);
|
||||||
|
delete[] tmp;
|
||||||
|
fprintf(stderr, "Couldn't decompress input file (%s)!\n",
|
||||||
|
ZSTD_getErrorName(res));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if (zout.pos > 0) {
|
||||||
|
const auto bsz = buf.size();
|
||||||
|
buf.resize(bsz + zout.pos);
|
||||||
|
memcpy(buf.data() + bsz, tmp, zout.pos);
|
||||||
|
zout.pos = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ZSTD_freeDStream(zctx);
|
||||||
|
delete[] tmp;
|
||||||
|
} else {
|
||||||
|
// just copy to memory
|
||||||
|
buf.resize(zsz);
|
||||||
|
memcpy(buf.data(), zbuf, zsz);
|
||||||
|
}
|
||||||
|
|
||||||
|
munmap(zbuf, zsz);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
// read next record starting at `offset`. Returns
|
||||||
|
// either `(ok, r)` for an in-bound record, or `(false, …)` otherwise.
|
||||||
|
std::pair<bool, Record> read_next_record(std::vector<uint8_t> const &input, size_t &offset) {
|
||||||
|
|
||||||
|
// bound check
|
||||||
|
#define CHECK_BOUND(n) if ((n) > input.size()) { \
|
||||||
|
fprintf(stderr, "warning: invalid record at offset %" PRIu64 "\n", offset); \
|
||||||
|
return std::make_pair(false,Record{}); \
|
||||||
|
}
|
||||||
|
|
||||||
|
CHECK_BOUND(offset+8);
|
||||||
|
|
||||||
|
uint64_t header = *((uint64_t *)&input[offset]);
|
||||||
|
uint16_t len_word = (header >> 4) & 0xfff;
|
||||||
|
|
||||||
|
CHECK_BOUND(offset + 8*len_word);
|
||||||
|
|
||||||
|
Record r{(uint64_t *)&input[offset], len_word, header};
|
||||||
|
offset += 8 * len_word;
|
||||||
|
return std::make_pair(true, r);
|
||||||
|
}
|
||||||
|
|
||||||
|
// there might be multiple processes so we allocate a pseudo-tid
|
||||||
|
// for each pair (pid, real_tid)
|
||||||
|
uint64_t getPseudoTid(DecodeState &dec, ThreadRef th) {
|
||||||
|
for (auto &pair : dec.tid_encoders) {
|
||||||
|
if (pair.thref == th)
|
||||||
|
return pair.pseudo_tid;
|
||||||
|
}
|
||||||
|
|
||||||
|
// not found, invent a new one
|
||||||
|
assert(th.pid <= std::numeric_limits<uint32_t>::max());
|
||||||
|
assert(th.tid <= std::numeric_limits<uint32_t>::max());
|
||||||
|
|
||||||
|
const auto pseudo_tid = (th.tid & 0xFFFFFFFF) | (th.pid << 32);
|
||||||
|
dec.tid_encoders.emplace_back(PidTidEncoder{th, pseudo_tid});
|
||||||
|
return pseudo_tid;
|
||||||
|
}
|
||||||
|
|
||||||
|
// decode thread info from a ref
|
||||||
|
ThreadRef readThread(DecodeState &dec, Record const &r, size_t &offset,
|
||||||
|
uint8_t ref) {
|
||||||
|
ThreadRef th;
|
||||||
|
if (ref == 0) {
|
||||||
|
// inline
|
||||||
|
th = {r.p[offset], r.p[offset + 1]};
|
||||||
|
offset += 2;
|
||||||
|
} else {
|
||||||
|
th = dec.threadRefs[ref];
|
||||||
|
}
|
||||||
|
return th;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read a string reference into `res`
|
||||||
|
void readString(DecodeState &dec, std::string &res, Record const &r,
|
||||||
|
size_t &offset, uint16_t ref) {
|
||||||
|
res.clear();
|
||||||
|
if (ref == 0) {
|
||||||
|
} else if ((ref & 0x8000) != 0) {
|
||||||
|
// inline string
|
||||||
|
size_t size_name = ref & 0x7fff;
|
||||||
|
res.resize(size_name + 1);
|
||||||
|
memcpy(res.data(), (uint8_t *)&r.p[offset], size_name);
|
||||||
|
res[size_name] = 0;
|
||||||
|
offset += ROUND_TO_WORD(size_name) >> 3;
|
||||||
|
} else {
|
||||||
|
res = dec.stringRefs[ref];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Skip string reference (just modify offset)
|
||||||
|
void skipString(size_t &offset, uint16_t ref) {
|
||||||
|
if (ref != 0 && (ref & 0x8000) != 0) {
|
||||||
|
size_t size = ref & 0x7fff;
|
||||||
|
offset += ROUND_TO_WORD(size) >> 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read a single argument
|
||||||
|
void readArgument(std::vector<Argument> &args, DecodeState &dec,
|
||||||
|
Record const &r, size_t &offset) {
|
||||||
|
uint64_t header = r.p[offset];
|
||||||
|
offset += 1;
|
||||||
|
|
||||||
|
auto ty = (uint8_t)(header & 0xf);
|
||||||
|
|
||||||
|
uint16_t name_ref = (header >> 16) & 0xffff;
|
||||||
|
std::string name;
|
||||||
|
readString(dec, name, r, offset, name_ref);
|
||||||
|
|
||||||
|
ArgumentValue value;
|
||||||
|
switch (ty) {
|
||||||
|
case 0:
|
||||||
|
value = Unit{};
|
||||||
|
break;
|
||||||
|
case 1: {
|
||||||
|
int32_t i = header >> 32;
|
||||||
|
value = (int64_t)i;
|
||||||
|
} break;
|
||||||
|
case 2: {
|
||||||
|
uint32_t i = header >> 32;
|
||||||
|
value = (int64_t)i;
|
||||||
|
} break;
|
||||||
|
case 3: {
|
||||||
|
int64_t i = r.p[offset];
|
||||||
|
offset += 1;
|
||||||
|
value = i;
|
||||||
|
} break;
|
||||||
|
case 4: {
|
||||||
|
uint64_t i = r.p[offset];
|
||||||
|
offset += 1;
|
||||||
|
value = i;
|
||||||
|
} break;
|
||||||
|
case 5: {
|
||||||
|
double i = *((double *)&r.p[offset]);
|
||||||
|
offset += 1;
|
||||||
|
value = i;
|
||||||
|
} break;
|
||||||
|
case 6: {
|
||||||
|
uint16_t value_ref = (header >> 32) & 0xffff;
|
||||||
|
std::string res;
|
||||||
|
readString(dec, res, r, offset, value_ref);
|
||||||
|
value = res;
|
||||||
|
} break;
|
||||||
|
case 7:
|
||||||
|
// pointer
|
||||||
|
case 8: {
|
||||||
|
// koid
|
||||||
|
uint64_t i = r.p[offset];
|
||||||
|
offset += 1;
|
||||||
|
value = i;
|
||||||
|
} break;
|
||||||
|
case 9: {
|
||||||
|
// bool
|
||||||
|
bool b = (bool)((header >> 32) & 1);
|
||||||
|
value = b;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
args.push_back({name, value});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Read `n_args` arguments from given offset
|
||||||
|
void readArguments(std::vector<Argument> &args, DecodeState &dec, Record r,
|
||||||
|
size_t &offset, const int n_args) {
|
||||||
|
args.clear();
|
||||||
|
for (int i = 0; i < n_args; ++i)
|
||||||
|
readArgument(args, dec, r, offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool argumentIsNumber(Argument const &arg) {
|
||||||
|
return std::holds_alternative<double>(arg.value) ||
|
||||||
|
std::holds_alternative<int64_t>(arg.value) ||
|
||||||
|
std::holds_alternative<uint64_t>(arg.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
double argumentToNumber(Argument const &arg) {
|
||||||
|
if (std::holds_alternative<double>(arg.value)) {
|
||||||
|
return std::get<double>(arg.value);
|
||||||
|
} else if (std::holds_alternative<int64_t>(arg.value)) {
|
||||||
|
return static_cast<double>(std::get<int64_t>(arg.value));
|
||||||
|
} else if (std::holds_alternative<uint64_t>(arg.value)) {
|
||||||
|
return static_cast<double>(std::get<uint64_t>(arg.value));
|
||||||
|
} else {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// text made of arguments
|
||||||
|
void printArgumentsToString(std::string &res, std::vector<Argument> &args) {
|
||||||
|
for (auto &kv : args) {
|
||||||
|
res += kv.name.data();
|
||||||
|
res += ": ";
|
||||||
|
appendArgumentValue(res, kv.value);
|
||||||
|
res += "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read location for a given span
|
||||||
|
void readLoc(std::string &locFile, uint32_t &locLine,
|
||||||
|
std::vector<Argument> const &args) {
|
||||||
|
for (auto &kv : args) {
|
||||||
|
if (strcmp(kv.name.data(), "loc") == 0 &&
|
||||||
|
std::holds_alternative<std::string>(kv.value)) {
|
||||||
|
auto loc = std::get<std::string>(kv.value);
|
||||||
|
const auto lpos = loc.find_last_of(':');
|
||||||
|
if (lpos == std::string::npos) {
|
||||||
|
std::swap(loc, locFile);
|
||||||
|
} else {
|
||||||
|
locFile = loc.substr(0, lpos);
|
||||||
|
locLine = atoi(loc.c_str() + lpos + 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct TraceNotInitialized : std::exception {};
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (!AttachConsole(ATTACH_PARENT_PROCESS)) {
|
||||||
|
AllocConsole();
|
||||||
|
SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), 0x07);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
tracy::FileCompression clev = tracy::FileCompression::Fast;
|
||||||
|
|
||||||
|
if (argc != 3)
|
||||||
|
Usage();
|
||||||
|
|
||||||
|
const char *input = argv[1];
|
||||||
|
const char *output = argv[2];
|
||||||
|
|
||||||
|
printf("Loading...\r");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
std::vector<uint8_t> buf = read_input(input);
|
||||||
|
|
||||||
|
printf("\33[2KParsing...\r");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
std::vector<tracy::Worker::ImportEventTimeline> timeline;
|
||||||
|
std::vector<tracy::Worker::ImportEventMessages> messages;
|
||||||
|
std::vector<tracy::Worker::ImportEventPlots> plots;
|
||||||
|
DecodeState dec;
|
||||||
|
|
||||||
|
size_t offset = 0;
|
||||||
|
int n_records = 0;
|
||||||
|
std::string name;
|
||||||
|
std::vector<Argument> arguments;
|
||||||
|
bool initialized = false;
|
||||||
|
|
||||||
|
#define CHECK_INIT() if (!initialized) throw TraceNotInitialized{}
|
||||||
|
|
||||||
|
while (offset < buf.size()) {
|
||||||
|
auto [ok, r] = read_next_record(buf, offset);
|
||||||
|
if (!ok) break;
|
||||||
|
n_records++;
|
||||||
|
|
||||||
|
uint8_t ty = r.header & 0xf;
|
||||||
|
|
||||||
|
switch (ty) {
|
||||||
|
case 0: {
|
||||||
|
// metadata record
|
||||||
|
if (!initialized) {
|
||||||
|
if (r.header == 0x0016547846040010) {
|
||||||
|
// magic string "FxT"
|
||||||
|
// https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format#magic-number-record
|
||||||
|
initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1: {
|
||||||
|
CHECK_INIT();
|
||||||
|
break; // initialization record
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
// string
|
||||||
|
CHECK_INIT();
|
||||||
|
uint16_t str_ref = (r.header >> 16) & 0xffff;
|
||||||
|
assert((str_ref & 0x8000) == 0);
|
||||||
|
uint16_t str_len = (r.header >> 32) & 0x7fff;
|
||||||
|
|
||||||
|
name.resize(str_len + 1);
|
||||||
|
memcpy(name.data(), (uint8_t *)&r.p[1], str_len);
|
||||||
|
dec.stringRefs[str_ref] = name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
// thread record
|
||||||
|
CHECK_INIT();
|
||||||
|
uint8_t th_ref = (r.header >> 16) & 0xff;
|
||||||
|
uint64_t pid = r.p[1];
|
||||||
|
uint64_t tid = r.p[2];
|
||||||
|
ThreadRef th{pid, tid};
|
||||||
|
dec.threadRefs[th_ref] = th;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4: {
|
||||||
|
// event
|
||||||
|
CHECK_INIT();
|
||||||
|
uint8_t ev_ty = (r.header >> 16) & 0xf;
|
||||||
|
uint8_t n_args = (r.header >> 20) & 0xf;
|
||||||
|
|
||||||
|
uint64_t timestamp = r.p[1];
|
||||||
|
size_t offset = 2;
|
||||||
|
|
||||||
|
// decode thread info
|
||||||
|
uint8_t th_ref = (r.header >> 24) & 0xff;
|
||||||
|
ThreadRef th = readThread(dec, r, offset, th_ref);
|
||||||
|
|
||||||
|
// skip category
|
||||||
|
uint16_t cat_ref = (r.header >> 32) & 0xffff;
|
||||||
|
skipString(offset, cat_ref);
|
||||||
|
|
||||||
|
// decode name
|
||||||
|
uint16_t name_ref = (r.header >> 48) & 0xffff;
|
||||||
|
readString(dec, name, r, offset, name_ref);
|
||||||
|
|
||||||
|
readArguments(arguments, dec, r, offset, n_args);
|
||||||
|
|
||||||
|
std::string locFile;
|
||||||
|
uint32_t locLine = 0;
|
||||||
|
readLoc(locFile, locLine, arguments);
|
||||||
|
|
||||||
|
switch (ev_ty) {
|
||||||
|
case 0: {
|
||||||
|
// instant
|
||||||
|
messages.emplace_back(tracy::Worker::ImportEventMessages{
|
||||||
|
getPseudoTid(dec, th), timestamp, name});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: {
|
||||||
|
// counter
|
||||||
|
for (auto &kv : arguments) {
|
||||||
|
bool plotFound = false;
|
||||||
|
auto &metricName = kv.name;
|
||||||
|
|
||||||
|
if (!argumentIsNumber(kv))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
auto dataPoint = std::make_pair(timestamp, argumentToNumber(kv));
|
||||||
|
|
||||||
|
// The input file is assumed to have only very few metrics,
|
||||||
|
// so iterating through plots is not a problem.
|
||||||
|
for (auto &plot : plots) {
|
||||||
|
if (plot.name == metricName) {
|
||||||
|
plot.data.emplace_back(dataPoint);
|
||||||
|
plotFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!plotFound) {
|
||||||
|
auto formatting = tracy::PlotValueFormatting::Number;
|
||||||
|
plots.emplace_back(tracy::Worker::ImportEventPlots{
|
||||||
|
std::move(metricName), formatting, {dataPoint}});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: {
|
||||||
|
// duration begin
|
||||||
|
std::string zoneText;
|
||||||
|
printArgumentsToString(zoneText, arguments);
|
||||||
|
timeline.emplace_back(tracy::Worker::ImportEventTimeline{
|
||||||
|
getPseudoTid(dec, th), timestamp, name, std::move(zoneText), false,
|
||||||
|
std::move(locFile), locLine});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 3: {
|
||||||
|
// duration end
|
||||||
|
std::string zoneText;
|
||||||
|
printArgumentsToString(zoneText, arguments);
|
||||||
|
timeline.emplace_back(tracy::Worker::ImportEventTimeline{
|
||||||
|
getPseudoTid(dec, th), timestamp, "", std::move(zoneText), true});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 4: {
|
||||||
|
// complete duration
|
||||||
|
const auto ts_end = r.p[offset]; // end timestamp
|
||||||
|
const auto tid = getPseudoTid(dec, th);
|
||||||
|
std::string zoneText;
|
||||||
|
printArgumentsToString(zoneText, arguments);
|
||||||
|
timeline.emplace_back(tracy::Worker::ImportEventTimeline{
|
||||||
|
tid, timestamp, name, std::move(zoneText), false,
|
||||||
|
std::move(locFile), locLine});
|
||||||
|
timeline.emplace_back(
|
||||||
|
tracy::Worker::ImportEventTimeline{tid, ts_end, "", "", true});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 7: {
|
||||||
|
// kernel object
|
||||||
|
CHECK_INIT();
|
||||||
|
|
||||||
|
uint8_t ty = (r.header >> 16) & 0xff;
|
||||||
|
uint16_t name_ref = (r.header >> 24) & 0xffff;
|
||||||
|
uint8_t n_args = (r.header >> 40) & 0xf;
|
||||||
|
size_t offset = 1;
|
||||||
|
|
||||||
|
uint64_t koid = r.p[offset];
|
||||||
|
offset++;
|
||||||
|
|
||||||
|
readString(dec, name, r, offset, name_ref);
|
||||||
|
|
||||||
|
readArguments(arguments, dec, r, offset, n_args);
|
||||||
|
|
||||||
|
switch (ty) {
|
||||||
|
case 1: {
|
||||||
|
// process
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: {
|
||||||
|
// thread
|
||||||
|
auto real_tid = koid;
|
||||||
|
|
||||||
|
// we need the pid as well
|
||||||
|
uint64_t pid;
|
||||||
|
bool foundPid = false;
|
||||||
|
for (auto &kv : arguments) {
|
||||||
|
if (strcmp(kv.name.data(), "process") == 0 &&
|
||||||
|
std::holds_alternative<uint64_t>(kv.value)) {
|
||||||
|
// koid (argument type 8) are decoded as uint64
|
||||||
|
pid = std::get<uint64_t>(kv.value);
|
||||||
|
foundPid = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!foundPid)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ThreadRef th{pid, real_tid};
|
||||||
|
const auto tid = getPseudoTid(dec, th);
|
||||||
|
dec.threadNames[tid] = name;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
default: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("read %d records\n", n_records);
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
std::stable_sort(
|
||||||
|
timeline.begin(), timeline.end(),
|
||||||
|
[](const auto &l, const auto &r) { return l.timestamp < r.timestamp; });
|
||||||
|
std::stable_sort(
|
||||||
|
messages.begin(), messages.end(),
|
||||||
|
[](const auto &l, const auto &r) { return l.timestamp < r.timestamp; });
|
||||||
|
for (auto &v : plots)
|
||||||
|
std::stable_sort(
|
||||||
|
v.data.begin(), v.data.end(),
|
||||||
|
[](const auto &l, const auto &r) { return l.first < r.first; });
|
||||||
|
|
||||||
|
uint64_t mts = 0;
|
||||||
|
if (!timeline.empty()) {
|
||||||
|
mts = timeline[0].timestamp;
|
||||||
|
}
|
||||||
|
if (!messages.empty()) {
|
||||||
|
if (mts > messages[0].timestamp)
|
||||||
|
mts = messages[0].timestamp;
|
||||||
|
}
|
||||||
|
for (auto &plot : plots) {
|
||||||
|
if (mts > plot.data[0].first)
|
||||||
|
mts = plot.data[0].first;
|
||||||
|
}
|
||||||
|
for (auto &v : timeline)
|
||||||
|
v.timestamp -= mts;
|
||||||
|
for (auto &v : messages)
|
||||||
|
v.timestamp -= mts;
|
||||||
|
for (auto &plot : plots) {
|
||||||
|
for (auto &v : plot.data)
|
||||||
|
v.first -= mts;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("\33[2KProcessing...\r");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
auto &&getFilename = [](const char *in) {
|
||||||
|
auto out = in;
|
||||||
|
while (*out)
|
||||||
|
++out;
|
||||||
|
--out;
|
||||||
|
while (out > in && (*out != '/' || *out != '\\'))
|
||||||
|
out--;
|
||||||
|
return out;
|
||||||
|
};
|
||||||
|
|
||||||
|
tracy::Worker worker(getFilename(output), getFilename(input), timeline,
|
||||||
|
messages, plots, std::move(dec.threadNames));
|
||||||
|
|
||||||
|
auto w =
|
||||||
|
std::unique_ptr<tracy::FileWrite>(tracy::FileWrite::Open(output, clev));
|
||||||
|
if (!w) {
|
||||||
|
fprintf(stderr, "Cannot open output file!\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
printf("\33[2KSaving...\r");
|
||||||
|
fflush(stdout);
|
||||||
|
worker.Write(*w, false);
|
||||||
|
|
||||||
|
printf("\33[2KCleanup...\n");
|
||||||
|
fflush(stdout);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,17 +0,0 @@
|
|||||||
all: release
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@$(MAKE) -f debug.mk all
|
|
||||||
|
|
||||||
release:
|
|
||||||
@$(MAKE) -f release.mk all
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@$(MAKE) -f build.mk clean
|
|
||||||
rm -f libtracy-*.so
|
|
||||||
|
|
||||||
db: clean
|
|
||||||
@bear -- $(MAKE) -f debug.mk all
|
|
||||||
@mv -f compile_commands.json ../../
|
|
||||||
|
|
||||||
.PHONY: all clean debug release db
|
|
@ -1,12 +0,0 @@
|
|||||||
CFLAGS +=
|
|
||||||
CXXFLAGS := $(CFLAGS) -std=c++11 -fpic
|
|
||||||
DEFINES += -DTRACY_ENABLE
|
|
||||||
INCLUDES :=
|
|
||||||
LIBS := -lpthread -ldl
|
|
||||||
PROJECT := libtracy
|
|
||||||
IMAGE := $(PROJECT)-$(BUILD).so
|
|
||||||
SHARED_LIBRARY := yes
|
|
||||||
|
|
||||||
SRC := ../../public/TracyClient.cpp
|
|
||||||
|
|
||||||
include ../../common/unix.mk
|
|
@ -1,13 +0,0 @@
|
|||||||
ARCH := $(shell uname -m)
|
|
||||||
|
|
||||||
CFLAGS := -g3 -Wall
|
|
||||||
DEFINES := -DDEBUG
|
|
||||||
BUILD := debug
|
|
||||||
|
|
||||||
ifndef TRACY_NO_ISA_EXTENSIONS
|
|
||||||
ifeq ($(ARCH),x86_64)
|
|
||||||
CFLAGS += -msse4.1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include build.mk
|
|
@ -1,13 +0,0 @@
|
|||||||
ARCH := $(shell uname -m)
|
|
||||||
|
|
||||||
CFLAGS := -O3 -s
|
|
||||||
DEFINES := -DNDEBUG
|
|
||||||
BUILD := release
|
|
||||||
|
|
||||||
ifndef TRACY_NO_ISA_EXTENSIONS
|
|
||||||
ifeq ($(ARCH),x86_64)
|
|
||||||
CFLAGS += -msse4.1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include build.mk
|
|
@ -1,25 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.30907.101
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TracyProfiler", "TracyProfiler.vcxproj", "{C5B825D3-F140-45AB-8A47-B740E56631FB}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
ReleaseOnDemand|x64 = ReleaseOnDemand|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{C5B825D3-F140-45AB-8A47-B740E56631FB}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{C5B825D3-F140-45AB-8A47-B740E56631FB}.Release|x64.Build.0 = Release|x64
|
|
||||||
{C5B825D3-F140-45AB-8A47-B740E56631FB}.ReleaseOnDemand|x64.ActiveCfg = ReleaseOnDemand|x64
|
|
||||||
{C5B825D3-F140-45AB-8A47-B740E56631FB}.ReleaseOnDemand|x64.Build.0 = ReleaseOnDemand|x64
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {E739AC0A-0937-46D7-8807-1EE95CEB576D}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@ -1,229 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="ReleaseOnDemand|Win32">
|
|
||||||
<Configuration>ReleaseOnDemand</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="ReleaseOnDemand|x64">
|
|
||||||
<Configuration>ReleaseOnDemand</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\public\TracyClient.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>16.0</VCProjectVersion>
|
|
||||||
<ProjectGuid>{C5B825D3-F140-45AB-8A47-B740E56631FB}</ProjectGuid>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<RootNamespace>TracyProfiler</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|Win32'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|x64'" Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableUAC>false</EnableUAC>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_DEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableUAC>false</EnableUAC>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableUAC>false</EnableUAC>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableUAC>false</EnableUAC>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>TRACY_ENABLE;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableUAC>false</EnableUAC>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseOnDemand|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>TRACY_ON_DEMAND;TRACY_ENABLE;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Windows</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
<EnableUAC>false</EnableUAC>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="..\..\public\TracyClient.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -96,7 +96,7 @@ This is the technical documentation of the Tracy Profiler. It is meant as a guid
|
|||||||
|
|
||||||
This document assumes that you have basic knowledge of how the Tracy Profiler works, as the concepts which are already described in the user manual won't be covered here.
|
This document assumes that you have basic knowledge of how the Tracy Profiler works, as the concepts which are already described in the user manual won't be covered here.
|
||||||
|
|
||||||
The information found in this documentation is intended to give you only a brief overview of the algorithms and data structures used in the profiler. It may be incomplete, cursory, or even plainly wrong. This is not a requirements specification. As usual, the source code is the ultimate place to gain knowledge and insight. You are expected to do your homework.
|
The information found in this documentation is intended to give you only a brief overview of the algorithms and data structures used in the profiler. It may be obsolete, incomplete, cursory, or even plainly wrong. This is not a requirements specification. As usual, the source code is the ultimate place to gain knowledge and insight. You are expected to do your homework.
|
||||||
\end{abstract}
|
\end{abstract}
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
@ -258,12 +258,16 @@ This is a very OS-specific task. It is split into two parts: getting the call st
|
|||||||
|
|
||||||
On some platforms a bit of setup work is required. This is done in the \texttt{InitCallstack()} function.
|
On some platforms a bit of setup work is required. This is done in the \texttt{InitCallstack()} function.
|
||||||
|
|
||||||
|
On Windows, tracy will attempt to preload symbols at \texttt{InitCallstack()} time. It does this for device drivers and process modules. As this process can be slow when a lot of pdbs are involved, you can set the \texttt{TRACY\_NO\_DBGHELP\_INIT\_LOAD} environment variable to "1" to disable this behavior and rely on-demand symbol loading.
|
||||||
|
|
||||||
\subsubsection{Getting the frames}
|
\subsubsection{Getting the frames}
|
||||||
|
|
||||||
Call stack collection is initiated by calling the \texttt{Callstack()} procedure, with maximum stack depth to be collected passed as a parameter. Stack unwinding must be performed in the place in which call stack was queried, as further execution of the application will change the stack contents. The unfortunate part is that the stack unwinding on platforms other than x86 is not a fast operation.
|
Call stack collection is initiated by calling the \texttt{Callstack()} procedure, with maximum stack depth to be collected passed as a parameter. Stack unwinding must be performed in the place in which call stack was queried, as further execution of the application will change the stack contents. The unfortunate part is that the stack unwinding on platforms other than x86 is not a fast operation.
|
||||||
|
|
||||||
To perform unwinding various OS functions are used: \texttt{RtlWalkFrameChain()}, \texttt{\_Unwind\_Backtrace()}, \texttt{backtrace()}. A list of returned frame pointers is saved in a buffer, which will be later sent to the server. The maximum unwinding depth limit (63 entries) is due to the specifics of the underlying OS functionality.
|
To perform unwinding various OS functions are used: \texttt{RtlWalkFrameChain()}, \texttt{\_Unwind\_Backtrace()}, \texttt{backtrace()}. A list of returned frame pointers is saved in a buffer, which will be later sent to the server. The maximum unwinding depth limit (63 entries) is due to the specifics of the underlying OS functionality.
|
||||||
|
|
||||||
|
On some platforms you can define \texttt{TRACY\_LIBUNWIND\_BACKTRACE} to use libunwind to perform callstack captures, as it might be a faster alternative than the default implementation. If you do, you must compile/link you client against libunwind. See \url{https://github.com/libunwind/libunwind} for more details.
|
||||||
|
|
||||||
\subsubsection{Decoding stack frames}
|
\subsubsection{Decoding stack frames}
|
||||||
|
|
||||||
Unlike the always changing call stack, stack frames themselves are immutable pointers to a specific place in the executable code. As such, the decoding process can be performed at any time (even outside of the program execution, as exemplified by debuggers). Frame decoding is only performed when the server asks for the details of a frame (section~\ref{communicationsprotocol}).
|
Unlike the always changing call stack, stack frames themselves are immutable pointers to a specific place in the executable code. As such, the decoding process can be performed at any time (even outside of the program execution, as exemplified by debuggers). Frame decoding is only performed when the server asks for the details of a frame (section~\ref{communicationsprotocol}).
|
||||||
@ -517,8 +521,8 @@ The DXT1 compression used to reduce size of the images is a from-scratch impleme
|
|||||||
|
|
||||||
\subsection{Thread naming}
|
\subsection{Thread naming}
|
||||||
|
|
||||||
Most operating systems don't have adequate support for giving threads arbitrary names. On such systems the \texttt{TRACY\_COLLECT\_THREAD\_NAMES} macro will be defined, which enables storage of thread names in a lock-free list. On subsequent thread name queries this list is used, instead of the system facilities.
|
Most operating systems don't have adequate support for giving threads arbitrary names. Tracy supplements this by providing an alternative way via an internal lock-free list. On subsequent thread name queries this list is used, instead of the system facilities.
|
||||||
|
|
||||||
Even if the lock-free list is used, Tracy will also set the thread name using the OS functionality. These names can be then used by debuggers and other external tools.
|
When `setThreadName()` is called, Tracy will also set the thread name using the OS functionality when possible. These names can be then used by debuggers and other external tools.
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
952
manual/tracy.tex
952
manual/tracy.tex
File diff suppressed because it is too large
Load Diff
171
meson.build
171
meson.build
@ -1,100 +1,134 @@
|
|||||||
project('tracy', ['cpp'], version: '0.10.0')
|
project('tracy', ['cpp'], version: '0.11.1', meson_version: '>=1.3.0', default_options : ['cpp_std=c++11'])
|
||||||
|
|
||||||
|
# internal compiler flags
|
||||||
|
tracy_compile_args = []
|
||||||
|
|
||||||
|
# compiler flags shared between the capture library itself and the code using it
|
||||||
|
tracy_common_args = []
|
||||||
|
|
||||||
|
# dependencies that will be propagated to the users of the capture library
|
||||||
|
tracy_public_deps = []
|
||||||
|
|
||||||
if get_option('tracy_enable')
|
if get_option('tracy_enable')
|
||||||
add_project_arguments('-DTRACY_ENABLE', language : 'cpp')
|
tracy_common_args += ['-DTRACY_ENABLE']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_on_demand')
|
if get_option('on_demand')
|
||||||
add_project_arguments('-DTRACY_ON_DEMAND', language : 'cpp')
|
tracy_common_args += ['-DTRACY_ON_DEMAND']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_callstack')
|
if get_option('callstack')
|
||||||
add_project_arguments('-DTRACY_CALLSTACK', language : 'cpp')
|
tracy_common_args += ['-DTRACY_CALLSTACK']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_callstack')
|
if get_option('no_callstack')
|
||||||
add_project_arguments('-DTRACY_NO_CALLSTACK', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_CALLSTACK']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_callstack_inlines')
|
if get_option('no_callstack_inlines')
|
||||||
add_project_arguments('-DTRACY_NO_CALLSTACK_INLINES', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_CALLSTACK_INLINES']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_only_localhost')
|
if get_option('only_localhost')
|
||||||
add_project_arguments('-DTRACY_ONLY_LOCALHOST', language : 'cpp')
|
tracy_common_args += ['-DTRACY_ONLY_LOCALHOST']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_broadcast')
|
if get_option('no_broadcast')
|
||||||
add_project_arguments('-DTRACY_NO_BROADCAST', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_BROADCAST']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_only_ipv4')
|
if get_option('only_ipv4')
|
||||||
add_project_arguments('-DTRACY_ONLY_IPV4', language : 'cpp')
|
tracy_common_args += ['-DTRACY_ONLY_IPV4']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_code_transfer')
|
if get_option('no_code_transfer')
|
||||||
add_project_arguments('-DTRACY_NO_CODE_TRANSFER', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_CODE_TRANSFER']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_context_switch')
|
if get_option('no_context_switch')
|
||||||
add_project_arguments('-DTRACY_NO_CONTEXT_SWITCH', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_CONTEXT_SWITCH']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_exit')
|
if get_option('no_exit')
|
||||||
add_project_arguments('-DTRACY_NO_EXIT', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_EXIT']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_sampling')
|
if get_option('no_sampling')
|
||||||
add_project_arguments('-DTRACY_NO_SAMPLING', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_SAMPLING']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_verify')
|
if get_option('no_verify')
|
||||||
add_project_arguments('-DTRACY_NO_VERIFY', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_VERIFY']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_vsync_capture')
|
if get_option('no_vsync_capture')
|
||||||
add_project_arguments('-DTRACY_NO_VSYNC_CAPTURE', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_VSYNC_CAPTURE']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_frame_image')
|
if get_option('no_frame_image')
|
||||||
add_project_arguments('-DTRACY_NO_FRAME_IMAGE', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_FRAME_IMAGE']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_system_tracing')
|
if get_option('no_system_tracing')
|
||||||
add_project_arguments('-DTRACY_NO_SYSTEM_TRACING', language : 'cpp')
|
tracy_common_args += ['-DTRACY_NO_SYSTEM_TRACING']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_patchable_nopsleds')
|
if get_option('patchable_nopsleds')
|
||||||
add_project_arguments('-DTRACY_PATCHABLE_NOPSLEDS', language : 'cpp')
|
tracy_common_args += ['-DTRACY_PATCHABLE_NOPSLEDS']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_delayed_init')
|
if get_option('delayed_init')
|
||||||
add_project_arguments('-DTRACY_DELAYED_INIT', language : 'cpp')
|
tracy_common_args += ['-DTRACY_DELAYED_INIT']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_manual_lifetime')
|
if get_option('manual_lifetime')
|
||||||
add_project_arguments('-DTRACY_MANUAL_LIFETIME', language : 'cpp')
|
tracy_common_args += ['-DTRACY_MANUAL_LIFETIME']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_fibers')
|
if get_option('fibers')
|
||||||
add_project_arguments('-DTRACY_FIBERS', language : 'cpp')
|
tracy_common_args += ['-DTRACY_FIBERS']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_timer_fallback')
|
if get_option('timer_fallback')
|
||||||
add_project_arguments('-DTRACY_TIMER_FALLBACK', language : 'cpp')
|
tracy_common_args += ['-DTRACY_TIMER_FALLBACK']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
tracy_shared_libs = get_option('tracy_shared_libs')
|
if get_option('no_crash_handler')
|
||||||
|
tracy_common_args += ['-DTRACY_NO_CRASH_HANDLER']
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('libunwind_backtrace')
|
||||||
|
tracy_common_args += ['-DTRACY_LIBUNWIND_BACKTRACE']
|
||||||
|
tracy_public_deps += dependency('libunwind')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('symbol_offline_resolve')
|
||||||
|
tracy_compile_args += ['-DTRACY_SYMBOL_OFFLINE_RESOLVE']
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('libbacktrace_elf_dynload_support')
|
||||||
|
tracy_compile_args += ['-DTRACY_LIBBACKTRACE_ELF_DYNLOAD_SUPPORT']
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('verbose')
|
||||||
|
tracy_common_args += ['-DTRACY_VERBOSE']
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('debuginfod')
|
||||||
|
tracy_common_args += ['-DTRACY_DEBUGINFOD']
|
||||||
|
tracy_public_deps += dependency('libdebuginfod')
|
||||||
|
endif
|
||||||
|
|
||||||
|
tracy_shared_libs = get_option('default_library') == 'shared'
|
||||||
|
|
||||||
if tracy_shared_libs
|
if tracy_shared_libs
|
||||||
add_project_arguments('-DTRACY_EXPORTS', language : 'cpp')
|
tracy_compile_args += ['-DTRACY_EXPORTS']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get_option('tracy_no_crash_handler')
|
if host_machine.system() == 'windows'
|
||||||
add_project_arguments('-DTRACY_NO_CRASH_HANDLER', language : 'cpp')
|
tracy_compile_args += ['-DWINVER=0x0601', '-D_WIN32_WINNT=0x0601']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
threads_dep = dependency('threads')
|
|
||||||
|
|
||||||
includes = [
|
includes = [
|
||||||
'public/tracy/TracyC.h',
|
'public/tracy/TracyC.h',
|
||||||
'public/tracy/Tracy.hpp',
|
'public/tracy/Tracy.hpp',
|
||||||
@ -116,11 +150,13 @@ client_includes = [
|
|||||||
'public/client/TracyDebug.hpp',
|
'public/client/TracyDebug.hpp',
|
||||||
'public/client/TracyDxt1.hpp',
|
'public/client/TracyDxt1.hpp',
|
||||||
'public/client/TracyFastVector.hpp',
|
'public/client/TracyFastVector.hpp',
|
||||||
|
'public/client/TracyKCore.hpp',
|
||||||
'public/client/TracyLock.hpp',
|
'public/client/TracyLock.hpp',
|
||||||
'public/client/TracyProfiler.hpp',
|
'public/client/TracyProfiler.hpp',
|
||||||
'public/client/TracyRingBuffer.hpp',
|
'public/client/TracyRingBuffer.hpp',
|
||||||
'public/client/TracyScoped.hpp',
|
'public/client/TracyScoped.hpp',
|
||||||
'public/client/TracyStringHelpers.hpp',
|
'public/client/TracyStringHelpers.hpp',
|
||||||
|
'public/client/TracySysPower.hpp',
|
||||||
'public/client/TracySysTime.hpp',
|
'public/client/TracySysTime.hpp',
|
||||||
'public/client/TracySysTrace.hpp',
|
'public/client/TracySysTrace.hpp',
|
||||||
'public/client/TracyThread.hpp'
|
'public/client/TracyThread.hpp'
|
||||||
@ -130,7 +166,6 @@ common_includes = [
|
|||||||
'public/common/tracy_lz4.hpp',
|
'public/common/tracy_lz4.hpp',
|
||||||
'public/common/tracy_lz4hc.hpp',
|
'public/common/tracy_lz4hc.hpp',
|
||||||
'public/common/TracyAlign.hpp',
|
'public/common/TracyAlign.hpp',
|
||||||
'public/common/TracyAlign.hpp',
|
|
||||||
'public/common/TracyAlloc.hpp',
|
'public/common/TracyAlloc.hpp',
|
||||||
'public/common/TracyApi.h',
|
'public/common/TracyApi.h',
|
||||||
'public/common/TracyColor.hpp',
|
'public/common/TracyColor.hpp',
|
||||||
@ -155,40 +190,40 @@ tracy_public_include_dirs = include_directories('public')
|
|||||||
|
|
||||||
compiler = meson.get_compiler('cpp')
|
compiler = meson.get_compiler('cpp')
|
||||||
override_options = []
|
override_options = []
|
||||||
if compiler.get_id() != 'msvc'
|
# MSVC c++ lib does not work properly with C++11 and compilation may fail
|
||||||
override_options += 'cpp_std=c++11'
|
if compiler.has_define('_MSC_VER') and get_option('cpp_std') == 'c++11'
|
||||||
|
override_options += 'cpp_std=c++14'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if tracy_shared_libs
|
tracy_compile_args += tracy_common_args
|
||||||
tracy = shared_library('tracy', tracy_src, tracy_header_files,
|
|
||||||
dependencies : [ threads_dep ],
|
tracy_deps = [dependency('threads')] + tracy_public_deps
|
||||||
|
|
||||||
|
tracy = library('tracy', tracy_src, tracy_header_files,
|
||||||
|
dependencies : tracy_deps,
|
||||||
include_directories : tracy_public_include_dirs,
|
include_directories : tracy_public_include_dirs,
|
||||||
|
cpp_args : tracy_compile_args,
|
||||||
override_options : override_options,
|
override_options : override_options,
|
||||||
install : true)
|
install : true)
|
||||||
else
|
|
||||||
tracy = static_library('tracy', tracy_src, tracy_header_files,
|
|
||||||
dependencies : [ threads_dep ],
|
|
||||||
include_directories : tracy_public_include_dirs,
|
|
||||||
override_options : override_options,
|
|
||||||
install : true)
|
|
||||||
endif
|
|
||||||
|
|
||||||
install_headers(includes)
|
install_headers(includes, subdir : 'tracy/tracy')
|
||||||
install_headers(common_includes, subdir : 'common')
|
install_headers(common_includes, subdir : 'tracy/common')
|
||||||
install_headers(client_includes, subdir : 'client')
|
install_headers(client_includes, subdir : 'tracy/client')
|
||||||
|
|
||||||
tracy_dep_compile_args = []
|
tracy_dep_compile_args = tracy_common_args
|
||||||
|
|
||||||
if tracy_shared_libs
|
if tracy_shared_libs
|
||||||
tracy_dep_compile_args += [ '-DTRACY_IMPORTS' ]
|
tracy_dep_compile_args += [ '-DTRACY_IMPORTS' ]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
pkg = import('pkgconfig')
|
||||||
|
pkg.generate(tracy,
|
||||||
|
extra_cflags : tracy_dep_compile_args,
|
||||||
|
requires : tracy_public_deps)
|
||||||
|
|
||||||
tracy_dep = declare_dependency(
|
tracy_dep = declare_dependency(
|
||||||
compile_args : tracy_dep_compile_args,
|
compile_args : tracy_dep_compile_args,
|
||||||
link_with : tracy,
|
link_with : tracy,
|
||||||
include_directories : tracy_public_include_dirs)
|
include_directories : tracy_public_include_dirs)
|
||||||
|
|
||||||
tracy_dep_dynamic = declare_dependency(
|
|
||||||
include_directories : tracy_public_include_dirs)
|
|
||||||
|
|
||||||
meson.override_dependency('tracy', tracy_dep)
|
meson.override_dependency('tracy', tracy_dep)
|
||||||
|
27
meson.options
Normal file
27
meson.options
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
option('tracy_enable', type : 'boolean', value : true, description : 'Enable profiling', yield: true)
|
||||||
|
option('on_demand', type : 'boolean', value : false, description : 'On-demand profiling')
|
||||||
|
option('callstack', type : 'boolean', value : false, description : 'Enfore callstack collection for tracy regions')
|
||||||
|
option('no_callstack', type : 'boolean', value : false, description : 'Disable all callstack related functionality')
|
||||||
|
option('no_callstack_inlines', type : 'boolean', value : false, description : 'Disables the inline functions in callstacks')
|
||||||
|
option('only_localhost', type : 'boolean', value : false, description : 'Only listen on the localhost interface')
|
||||||
|
option('no_broadcast', type : 'boolean', value : false, description : 'Disable client discovery by broadcast to local network')
|
||||||
|
option('only_ipv4', type : 'boolean', value : false, description : 'Tracy will only accept connections on IPv4 addresses (disable IPv6)')
|
||||||
|
option('no_code_transfer', type : 'boolean', value : false, description : 'Disable collection of source code')
|
||||||
|
option('no_context_switch', type : 'boolean', value : false, description : 'Disable capture of context switches')
|
||||||
|
option('no_exit', type : 'boolean', value : false, description : 'Client executable does not exit until all profile data is sent to server')
|
||||||
|
option('no_sampling', type : 'boolean', value : false, description : 'Disable call stack sampling')
|
||||||
|
option('no_verify', type : 'boolean', value : false, description : 'Disable zone validation for C API')
|
||||||
|
option('no_vsync_capture', type : 'boolean', value : false, description : 'Disable capture of hardware Vsync events')
|
||||||
|
option('no_frame_image', type : 'boolean', value : false, description : 'Disable the frame image support and its thread')
|
||||||
|
option('no_system_tracing', type : 'boolean', value : false, description : 'Disable systrace sampling')
|
||||||
|
option('patchable_nopsleds', type : 'boolean', value : false, description : 'Enable nopsleds for efficient patching by system-level tools (e.g. rr)')
|
||||||
|
option('timer_fallback', type : 'boolean', value : false, description : 'Use lower resolution timers')
|
||||||
|
option('libunwind_backtrace', type : 'boolean', value : false, description : 'Use libunwind backtracing where supported')
|
||||||
|
option('symbol_offline_resolve', type : 'boolean', value : false, description : 'Instead of full runtime symbol resolution, only resolve the image path and offset to enable offline symbol resolution')
|
||||||
|
option('libbacktrace_elf_dynload_support', type : 'boolean', value : false, description : 'Enable libbacktrace to support dynamically loaded elfs in symbol resolution resolution after the first symbol resolve operation')
|
||||||
|
option('delayed_init', type : 'boolean', value : false, description : 'Enable delayed initialization of the library (init on first call)')
|
||||||
|
option('manual_lifetime', type : 'boolean', value : false, description : 'Enable the manual lifetime management of the profile')
|
||||||
|
option('fibers', type : 'boolean', value : false, description : 'Enable fibers support')
|
||||||
|
option('no_crash_handler', type : 'boolean', value : false, description : 'Disable crash handling')
|
||||||
|
option('verbose', type : 'boolean', value : false, description : 'Enable verbose logging')
|
||||||
|
option('debuginfod', type : 'boolean', value : false, description : 'Enable debuginfod support')
|
@ -1,23 +0,0 @@
|
|||||||
option('tracy_enable', type : 'boolean', value : true, description : 'Enable profiling')
|
|
||||||
option('tracy_on_demand', type : 'boolean', value : false, description : 'On-demand profiling')
|
|
||||||
option('tracy_callstack', type : 'boolean', value : false, description : 'Enfore callstack collection for tracy regions')
|
|
||||||
option('tracy_no_callstack', type : 'boolean', value : false, description : 'Disable all callstack related functionality')
|
|
||||||
option('tracy_no_callstack_inlines', type : 'boolean', value : false, description : 'Disables the inline functions in callstacks')
|
|
||||||
option('tracy_only_localhost', type : 'boolean', value : false, description : 'Only listen on the localhost interface')
|
|
||||||
option('tracy_no_broadcast', type : 'boolean', value : false, description : 'Disable client discovery by broadcast to local network')
|
|
||||||
option('tracy_only_ipv4', type : 'boolean', value : false, description : 'Tracy will only accept connections on IPv4 addresses (disable IPv6)')
|
|
||||||
option('tracy_no_code_transfer', type : 'boolean', value : false, description : 'Disable collection of source code')
|
|
||||||
option('tracy_no_context_switch', type : 'boolean', value : false, description : 'Disable capture of context switches')
|
|
||||||
option('tracy_no_exit', type : 'boolean', value : false, description : 'Client executable does not exit until all profile data is sent to server')
|
|
||||||
option('tracy_no_sampling', type : 'boolean', value : false, description : 'Disable call stack sampling')
|
|
||||||
option('tracy_no_verify', type : 'boolean', value : false, description : 'Disable zone validation for C API')
|
|
||||||
option('tracy_no_vsync_capture', type : 'boolean', value : false, description : 'Disable capture of hardware Vsync events')
|
|
||||||
option('tracy_no_frame_image', type : 'boolean', value : false, description : 'Disable the frame image support and its thread')
|
|
||||||
option('tracy_no_system_tracing', type : 'boolean', value : false, description : 'Disable systrace sampling')
|
|
||||||
option('tracy_patchable_nopsleds', type : 'boolean', value : false, description : 'Enable nopsleds for efficient patching by system-level tools (e.g. rr)')
|
|
||||||
option('tracy_timer_fallback', type : 'boolean', value : false, description : 'Use lower resolution timers')
|
|
||||||
option('tracy_delayed_init', type : 'boolean', value : false, description : 'Enable delayed initialization of the library (init on first call)')
|
|
||||||
option('tracy_manual_lifetime', type : 'boolean', value : false, description : 'Enable the manual lifetime management of the profile')
|
|
||||||
option('tracy_fibers', type : 'boolean', value : false, description : 'Enable fibers support')
|
|
||||||
option('tracy_shared_libs', type : 'boolean', value : false, description : 'Builds Tracy as a shared object')
|
|
||||||
option('tracy_no_crash_handler', type : 'boolean', value : false, description : 'Disable crash handling')
|
|
215
profiler/CMakeLists.txt
Normal file
215
profiler/CMakeLists.txt
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.21)
|
||||||
|
|
||||||
|
option(NO_FILESELECTOR "Disable the file selector" OFF)
|
||||||
|
option(GTK_FILESELECTOR "Use the GTK file selector on Linux instead of the xdg-portal one" OFF)
|
||||||
|
option(LEGACY "Instead of Wayland, use the legacy X11 backend on Linux" OFF)
|
||||||
|
option(NO_ISA_EXTENSIONS "Disable ISA extensions (don't pass -march=native or -mcpu=native to the compiler)" OFF)
|
||||||
|
option(NO_STATISTICS "Disable calculation of statistics" OFF)
|
||||||
|
option(SELF_PROFILE "Enable self-profiling" OFF)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
|
project(
|
||||||
|
tracy-profiler
|
||||||
|
LANGUAGES C CXX
|
||||||
|
VERSION ${TRACY_VERSION_STRING}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(SELF_PROFILE)
|
||||||
|
add_definitions(-DTRACY_ENABLE)
|
||||||
|
add_compile_options(-g -O3 -fno-omit-frame-pointer)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/config.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(SERVER_FILES
|
||||||
|
TracyAchievementData.cpp
|
||||||
|
TracyAchievements.cpp
|
||||||
|
TracyBadVersion.cpp
|
||||||
|
TracyColor.cpp
|
||||||
|
TracyEventDebug.cpp
|
||||||
|
TracyFileselector.cpp
|
||||||
|
TracyFilesystem.cpp
|
||||||
|
TracyImGui.cpp
|
||||||
|
TracyMicroArchitecture.cpp
|
||||||
|
TracyMouse.cpp
|
||||||
|
TracyProtoHistory.cpp
|
||||||
|
TracySourceContents.cpp
|
||||||
|
TracySourceTokenizer.cpp
|
||||||
|
TracySourceView.cpp
|
||||||
|
TracyStorage.cpp
|
||||||
|
TracyTexture.cpp
|
||||||
|
TracyTimelineController.cpp
|
||||||
|
TracyTimelineItem.cpp
|
||||||
|
TracyTimelineItemCpuData.cpp
|
||||||
|
TracyTimelineItemGpu.cpp
|
||||||
|
TracyTimelineItemPlot.cpp
|
||||||
|
TracyTimelineItemThread.cpp
|
||||||
|
TracyUserData.cpp
|
||||||
|
TracyUtility.cpp
|
||||||
|
TracyView.cpp
|
||||||
|
TracyView_Annotations.cpp
|
||||||
|
TracyView_Callstack.cpp
|
||||||
|
TracyView_Compare.cpp
|
||||||
|
TracyView_ConnectionState.cpp
|
||||||
|
TracyView_ContextSwitch.cpp
|
||||||
|
TracyView_CpuData.cpp
|
||||||
|
TracyView_FindZone.cpp
|
||||||
|
TracyView_FlameGraph.cpp
|
||||||
|
TracyView_FrameOverview.cpp
|
||||||
|
TracyView_FrameTimeline.cpp
|
||||||
|
TracyView_FrameTree.cpp
|
||||||
|
TracyView_GpuTimeline.cpp
|
||||||
|
TracyView_Locks.cpp
|
||||||
|
TracyView_Memory.cpp
|
||||||
|
TracyView_Messages.cpp
|
||||||
|
TracyView_Navigation.cpp
|
||||||
|
TracyView_NotificationArea.cpp
|
||||||
|
TracyView_Options.cpp
|
||||||
|
TracyView_Playback.cpp
|
||||||
|
TracyView_Plots.cpp
|
||||||
|
TracyView_Ranges.cpp
|
||||||
|
TracyView_Samples.cpp
|
||||||
|
TracyView_Statistics.cpp
|
||||||
|
TracyView_Timeline.cpp
|
||||||
|
TracyView_TraceInfo.cpp
|
||||||
|
TracyView_Utility.cpp
|
||||||
|
TracyView_ZoneInfo.cpp
|
||||||
|
TracyView_ZoneTimeline.cpp
|
||||||
|
TracyWeb.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
list(TRANSFORM SERVER_FILES PREPEND "src/profiler/")
|
||||||
|
|
||||||
|
set(PROFILER_FILES
|
||||||
|
src/ConnectionHistory.cpp
|
||||||
|
src/Filters.cpp
|
||||||
|
src/Fonts.cpp
|
||||||
|
src/HttpRequest.cpp
|
||||||
|
src/ImGuiContext.cpp
|
||||||
|
src/ini.c
|
||||||
|
src/IsElevated.cpp
|
||||||
|
src/main.cpp
|
||||||
|
src/ResolvService.cpp
|
||||||
|
src/RunQueue.cpp
|
||||||
|
src/WindowPosition.cpp
|
||||||
|
src/winmain.cpp
|
||||||
|
src/winmainArchDiscovery.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(INCLUDES "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
set(LIBS "")
|
||||||
|
|
||||||
|
if(USE_WAYLAND)
|
||||||
|
pkg_check_modules(WAYLAND REQUIRED egl wayland-egl wayland-cursor xkbcommon)
|
||||||
|
set(LIBS "${LIBS};${WAYLAND_LIBRARIES}")
|
||||||
|
set(PROFILER_FILES ${PROFILER_FILES}
|
||||||
|
src/BackendWayland.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/FindWaylandScanner.cmake)
|
||||||
|
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME wayland-protocols
|
||||||
|
GIT_REPOSITORY https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||||
|
GIT_TAG 1.37
|
||||||
|
DOWNLOAD_ONLY YES
|
||||||
|
)
|
||||||
|
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/stable/xdg-shell/xdg-shell.xml
|
||||||
|
BASENAME xdg-shell
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/staging/xdg-activation/xdg-activation-v1.xml
|
||||||
|
BASENAME xdg-activation
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml
|
||||||
|
BASENAME xdg-decoration
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/staging/fractional-scale/fractional-scale-v1.xml
|
||||||
|
BASENAME fractional-scale
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/stable/viewporter/viewporter.xml
|
||||||
|
BASENAME viewporter
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/staging/cursor-shape/cursor-shape-v1.xml
|
||||||
|
BASENAME cursor-shape
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/unstable/tablet/tablet-unstable-v2.xml
|
||||||
|
BASENAME tablet
|
||||||
|
)
|
||||||
|
ecm_add_wayland_client_protocol(PROFILER_FILES
|
||||||
|
PROTOCOL ${wayland-protocols_SOURCE_DIR}/staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml
|
||||||
|
BASENAME xdg-toplevel-icon
|
||||||
|
)
|
||||||
|
elseif(EMSCRIPTEN)
|
||||||
|
set(PROFILER_FILES ${PROFILER_FILES}
|
||||||
|
src/BackendEmscripten.cpp
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(PROFILER_FILES ${PROFILER_FILES}
|
||||||
|
src/BackendGlfw.cpp
|
||||||
|
${ImGui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include_directories(${INCLUDES})
|
||||||
|
link_libraries(${LIBS})
|
||||||
|
|
||||||
|
if(SELF_PROFILE)
|
||||||
|
set(PROFILER_FILES ${PROFILER_FILES}
|
||||||
|
../public/TracyClient.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(PROFILER_FILES ${PROFILER_FILES}
|
||||||
|
win32/Tracy.manifest
|
||||||
|
win32/Tracy.rc
|
||||||
|
)
|
||||||
|
add_executable(${PROJECT_NAME} WIN32 ${PROFILER_FILES} ${COMMON_FILES} ${SERVER_FILES})
|
||||||
|
set_property(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
|
||||||
|
else()
|
||||||
|
add_executable(${PROJECT_NAME} ${PROFILER_FILES} ${COMMON_FILES} ${SERVER_FILES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE TracyServer TracyImGui)
|
||||||
|
|
||||||
|
if(NOT DEFINED GIT_REV)
|
||||||
|
set(GIT_REV "HEAD")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
||||||
|
add_custom_target(git-ref
|
||||||
|
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py ${GIT_REV}
|
||||||
|
BYPRODUCTS GitRef.hpp
|
||||||
|
)
|
||||||
|
add_dependencies(${PROJECT_NAME} git-ref)
|
||||||
|
|
||||||
|
if(NOT EMSCRIPTEN)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE TracyNfd)
|
||||||
|
if (NOT USE_WAYLAND)
|
||||||
|
target_link_libraries(${PROJECT_NAME} PRIVATE TracyGlfw3)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EMSCRIPTEN)
|
||||||
|
target_link_options(${PROJECT_NAME} PRIVATE -pthread -sASSERTIONS=0 -sINITIAL_MEMORY=384mb -sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=4gb -sSTACK_SIZE=1048576 -sWASM_BIGINT=1 -sPTHREAD_POOL_SIZE=8 -sEXPORTED_FUNCTIONS=_main,_nativeOpenFile -sEXPORTED_RUNTIME_METHODS=ccall -sENVIRONMENT=web,worker --preload-file embed.tracy)
|
||||||
|
|
||||||
|
file(DOWNLOAD https://share.nereid.pl/i/embed.tracy ${CMAKE_CURRENT_BINARY_DIR}/embed.tracy EXPECTED_MD5 ca0fa4f01e7b8ca5581daa16b16c768d)
|
||||||
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/wasm/index.html DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/wasm/httpd.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
file(COPY_FILE ${CMAKE_CURRENT_LIST_DIR}/../icon/icon.svg ${CMAKE_CURRENT_BINARY_DIR}/favicon.svg)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
@ -1,20 +0,0 @@
|
|||||||
ifneq ($(shell uname),Linux)
|
|
||||||
export LEGACY=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: release
|
|
||||||
|
|
||||||
debug:
|
|
||||||
@$(MAKE) -f debug.mk all
|
|
||||||
|
|
||||||
release:
|
|
||||||
@$(MAKE) -f release.mk all
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@$(MAKE) -f build.mk clean
|
|
||||||
|
|
||||||
db: clean
|
|
||||||
@bear -- $(MAKE) -f debug.mk all
|
|
||||||
@mv -f compile_commands.json ../../../
|
|
||||||
|
|
||||||
.PHONY: all clean debug release db
|
|
@ -1,30 +0,0 @@
|
|||||||
CFLAGS +=
|
|
||||||
CXXFLAGS := $(CFLAGS) -std=c++17
|
|
||||||
DEFINES += -DIMGUI_ENABLE_FREETYPE
|
|
||||||
INCLUDES := $(shell pkg-config --cflags freetype2 capstone wayland-egl egl wayland-cursor xkbcommon) -I../../../imgui
|
|
||||||
LIBS := $(shell pkg-config --libs freetype2 capstone wayland-egl egl wayland-cursor xkbcommon) -lpthread -ldl
|
|
||||||
|
|
||||||
PROJECT := Tracy
|
|
||||||
IMAGE := $(PROJECT)-$(BUILD)
|
|
||||||
|
|
||||||
FILTER := ../../../nfd/nfd_win.cpp ../../src/BackendGlfw.cpp ../../src/imgui/imgui_impl_glfw.cpp
|
|
||||||
include ../../../common/src-from-vcxproj.mk
|
|
||||||
|
|
||||||
SRC += ../../src/BackendWayland.cpp
|
|
||||||
SRC2 += ../../src/wayland/xdg-shell.c ../../src/wayland/xdg-activation.c ../../src/wayland/xdg-decoration.c
|
|
||||||
|
|
||||||
ifdef TRACY_NO_FILESELECTOR
|
|
||||||
CXXFLAGS += -DTRACY_NO_FILESELECTOR
|
|
||||||
else
|
|
||||||
ifdef TRACY_GTK_FILESELECTOR
|
|
||||||
SRC += ../../../nfd/nfd_gtk.cpp
|
|
||||||
INCLUDES += $(shell pkg-config --cflags gtk+-3.0)
|
|
||||||
LIBS += $(shell pkg-config --libs gtk+-3.0)
|
|
||||||
else
|
|
||||||
SRC += ../../../nfd/nfd_portal.cpp
|
|
||||||
INCLUDES += $(shell pkg-config --cflags dbus-1)
|
|
||||||
LIBS += $(shell pkg-config --libs dbus-1)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
include ../../../common/unix.mk
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user