Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cf74c37
Add RegisterCaptureMask() functionality
ccp-chargeback Jul 9, 2026
315486c
Merge remote-tracking branch 'carbonengine/main' into capture_mask_su…
ccp-chargeback Jul 10, 2026
d45f9ee
Fix errors after Color=>CcpColor name change
ccp-chargeback Jul 10, 2026
f44da09
Remove static from ColorUtil inline helper functions
ccp-chargeback Jul 10, 2026
0ec85dc
Add CcpGetRegisteredCaptureMasks() support
ccp-chargeback Jul 14, 2026
3a7688b
Store registered CaptureMasks in a fixed size array
ccp-chargeback Jul 15, 2026
332a605
Add CcpSetActiveCaptureMask() support
ccp-chargeback Jul 16, 2026
867b6d7
Add support for color to the TracyTestClient.
ccp-chargeback Jul 16, 2026
31f7c93
Explicitly add includes for std types used in CcpTelemetry.h
ccp-chargeback Jul 16, 2026
d9f7aea
Add support for CaptureMasks in CcpTelemetryEnterZone/TelemetryZone
ccp-chargeback Jul 17, 2026
fd800aa
Use EXPECT_TRUE instead of ASSERT_TRUE in CcpTelemetry tests
ccp-chargeback Jul 17, 2026
4a6ace5
Merge remote-tracking branch 'carbonengine/main' into capture_mask_su…
ccp-chargeback Jul 17, 2026
bbec690
Simplify auto color selection for CaptureMasks
ccp-chargeback Jul 17, 2026
8283b2e
Use deBruijn to find the index of a single bit number
ccp-chargeback Jul 17, 2026
78306a4
Remove un-necessary std::atomic use on CaptureMasks
ccp-chargeback Jul 18, 2026
e5ed1dc
Fix wrong function name in non-Telemetry code path
ccp-chargeback Jul 18, 2026
4a58c70
Remove double bookkeeping on registeredCaptureMasks vs their bits
ccp-chargeback Jul 18, 2026
942e009
Fix typo in test helper IsSCaptureMaskSingleBit()
ccp-chargeback Jul 20, 2026
7142ed6
Remove unused headers from `CcpColorConstants.h`
CCP-Aporia Jul 20, 2026
82609e4
Use currently advised copyright statement
CCP-Aporia Jul 20, 2026
59ac96c
Update `CcpColorString` to return a `string_view` of all possible nam…
CCP-Aporia Jul 20, 2026
f6094aa
Remove unnecessary `CcpRegisterCaptureMask` overload
CCP-Aporia Jul 20, 2026
9eee0e4
Use `constexpr size_t` instead of `#define`
CCP-Aporia Jul 21, 2026
253ae9f
Remove slow test that covers an unimportant implementation details
CCP-Aporia Jul 21, 2026
ae7e72b
Remove `uint64_t` overload for `CcpSetActiveCaptureMask`
CCP-Aporia Jul 21, 2026
8a812a9
Return list of active capture mask names instead of bitmask
CCP-Aporia Jul 21, 2026
a9ab8f3
Use `ASSERT_*` instead of `EXPECT_*` in a few places
CCP-Aporia Jul 21, 2026
6b6fdf8
Remove `CaptureMaskBitTag` hack that was introduced for preserving AB…
CCP-Aporia Jul 21, 2026
1528331
Add missing export annotation to `CcpColorToString`
CCP-Aporia Jul 21, 2026
1e43e26
Introduce `CcpCaptureMaskHandle` as handle to a registered telemetry …
CCP-Aporia Jul 21, 2026
601d77f
Add missing `uint32_t` -> `CcpCaptureMaskHandle` type change
CCP-Aporia Jul 21, 2026
a57664a
Remove unnecessary comment
CCP-Aporia Jul 21, 2026
5d3dab5
Remove no longer existing function overload from non-telemetry path
CCP-Aporia Jul 21, 2026
f6a294a
Rename `CcpSetActiveCaptureMask` to `CcpSetCaptureMask`
CCP-Aporia Jul 21, 2026
4803123
Fix crash related to erasing fiber names
CCP-Aporia Jul 24, 2026
1bb58df
Remove obsolete tests
CCP-Aporia Jul 27, 2026
6eb92bf
Reword the "capture mask" concept as "profiler zone"
CCP-Aporia Jul 27, 2026
5632876
Skip telemetry tests if `WITH_TELEMETRY=OFF`
CCP-Aporia Jul 27, 2026
e9819c3
Rename `CcpGetActiveProfilerZone` to `CcpGetActiveProfilerZones`
CCP-Aporia Jul 27, 2026
5cd97fb
Add missing bounds check
CCP-Aporia Jul 27, 2026
2de388f
Use `std::optional` for tracking registered profiler zones
CCP-Aporia Jul 27, 2026
188e049
Return `CcpProfilerZone` where applicable
CCP-Aporia Jul 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set(SRC_FILES
CcpCore.cpp
CCPAssert.cpp
CCPCallstack.cpp
CcpColorConstants.cpp
CCPDefines.cpp
CcpFileUtils.cpp
CCPHash.cpp
Expand Down
152 changes: 152 additions & 0 deletions CcpColorConstants.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
// Copyright © 2026 CCP ehf.

#include "include/CcpColorConstants.h"

std::string_view CcpColorToString( CcpColor color )
{
// For colors sharing the same RGB value (Aqua/Cyan, Fuchsia/Magenta, and the
// various *Gray/*Grey pairs), all names sharing that value are returned.
switch( color )
{
case CcpColor::AliceBlue: return "AliceBlue";
case CcpColor::AntiqueWhite: return "AntiqueWhite";
case CcpColor::Aqua: return "Aqua / Cyan";
case CcpColor::Aquamarine: return "Aquamarine";
case CcpColor::Azure: return "Azure";
case CcpColor::Beige: return "Beige";
case CcpColor::Bisque: return "Bisque";
case CcpColor::Black: return "Black";
case CcpColor::BlanchedAlmond: return "BlanchedAlmond";
case CcpColor::Blue: return "Blue";
case CcpColor::BlueViolet: return "BlueViolet";
case CcpColor::Brown: return "Brown";
case CcpColor::BurlyWood: return "BurlyWood";
case CcpColor::CadetBlue: return "CadetBlue";
case CcpColor::Chartreuse: return "Chartreuse";
case CcpColor::Chocolate: return "Chocolate";
case CcpColor::Coral: return "Coral";
case CcpColor::CornflowerBlue: return "CornflowerBlue";
case CcpColor::Cornsilk: return "Cornsilk";
case CcpColor::Crimson: return "Crimson";
case CcpColor::DarkBlue: return "DarkBlue";
case CcpColor::DarkCyan: return "DarkCyan";
case CcpColor::DarkGoldenrod: return "DarkGoldenrod";
case CcpColor::DarkGray: return "DarkGray / DarkGrey";
case CcpColor::DarkGreen: return "DarkGreen";
case CcpColor::DarkKhaki: return "DarkKhaki";
case CcpColor::DarkMagenta: return "DarkMagenta";
case CcpColor::DarkOliveGreen: return "DarkOliveGreen";
case CcpColor::DarkOrange: return "DarkOrange";
case CcpColor::DarkOrchid: return "DarkOrchid";
case CcpColor::DarkRed: return "DarkRed";
case CcpColor::DarkSalmon: return "DarkSalmon";
case CcpColor::DarkSeaGreen: return "DarkSeaGreen";
case CcpColor::DarkSlateBlue: return "DarkSlateBlue";
case CcpColor::DarkSlateGray: return "DarkSlateGray / DarkSlateGrey";
case CcpColor::DarkTurquoise: return "DarkTurquoise";
case CcpColor::DarkViolet: return "DarkViolet";
case CcpColor::DeepPink: return "DeepPink";
case CcpColor::DeepSkyBlue: return "DeepSkyBlue";
case CcpColor::DimGray: return "DimGray / DimGrey";
case CcpColor::DodgerBlue: return "DodgerBlue";
case CcpColor::FireBrick: return "FireBrick";
case CcpColor::FloralWhite: return "FloralWhite";
case CcpColor::ForestGreen: return "ForestGreen";
case CcpColor::Fuchsia: return "Fuchsia / Magenta";
case CcpColor::Gainsboro: return "Gainsboro";
case CcpColor::GhostWhite: return "GhostWhite";
case CcpColor::Gold: return "Gold";
case CcpColor::Goldenrod: return "Goldenrod";
case CcpColor::Gray: return "Gray / Grey";
case CcpColor::Green: return "Green";
case CcpColor::GreenYellow: return "GreenYellow";
case CcpColor::Honeydew: return "Honeydew";
case CcpColor::HotPink: return "HotPink";
case CcpColor::IndianRed: return "IndianRed";
case CcpColor::Indigo: return "Indigo";
case CcpColor::Ivory: return "Ivory";
case CcpColor::Khaki: return "Khaki";
case CcpColor::Lavender: return "Lavender";
case CcpColor::LavenderBlush: return "LavenderBlush";
case CcpColor::LawnGreen: return "LawnGreen";
case CcpColor::LemonChiffon: return "LemonChiffon";
case CcpColor::LightBlue: return "LightBlue";
case CcpColor::LightCoral: return "LightCoral";
case CcpColor::LightCyan: return "LightCyan";
case CcpColor::LightGoldenrodYellow: return "LightGoldenrodYellow";
case CcpColor::LightGray: return "LightGray / LightGrey";
case CcpColor::LightGreen: return "LightGreen";
case CcpColor::LightPink: return "LightPink";
case CcpColor::LightSalmon: return "LightSalmon";
case CcpColor::LightSeaGreen: return "LightSeaGreen";
case CcpColor::LightSkyBlue: return "LightSkyBlue";
case CcpColor::LightSlateGray: return "LightSlateGray / LightSlateGrey";
case CcpColor::LightSteelBlue: return "LightSteelBlue";
case CcpColor::LightYellow: return "LightYellow";
case CcpColor::Lime: return "Lime";
case CcpColor::LimeGreen: return "LimeGreen";
case CcpColor::Linen: return "Linen";
case CcpColor::Maroon: return "Maroon";
case CcpColor::MediumAquamarine: return "MediumAquamarine";
case CcpColor::MediumBlue: return "MediumBlue";
case CcpColor::MediumOrchid: return "MediumOrchid";
case CcpColor::MediumPurple: return "MediumPurple";
case CcpColor::MediumSeaGreen: return "MediumSeaGreen";
case CcpColor::MediumSlateBlue: return "MediumSlateBlue";
case CcpColor::MediumSpringGreen: return "MediumSpringGreen";
case CcpColor::MediumTurquoise: return "MediumTurquoise";
case CcpColor::MediumVioletRed: return "MediumVioletRed";
case CcpColor::MidnightBlue: return "MidnightBlue";
case CcpColor::MintCream: return "MintCream";
case CcpColor::MistyRose: return "MistyRose";
case CcpColor::Moccasin: return "Moccasin";
case CcpColor::NavajoWhite: return "NavajoWhite";
case CcpColor::Navy: return "Navy";
case CcpColor::OldLace: return "OldLace";
case CcpColor::Olive: return "Olive";
case CcpColor::OliveDrab: return "OliveDrab";
case CcpColor::Orange: return "Orange";
case CcpColor::OrangeRed: return "OrangeRed";
case CcpColor::Orchid: return "Orchid";
case CcpColor::PaleGoldenrod: return "PaleGoldenrod";
case CcpColor::PaleGreen: return "PaleGreen";
case CcpColor::PaleTurquoise: return "PaleTurquoise";
case CcpColor::PaleVioletRed: return "PaleVioletRed";
case CcpColor::PapayaWhip: return "PapayaWhip";
case CcpColor::PeachPuff: return "PeachPuff";
case CcpColor::Peru: return "Peru";
case CcpColor::Pink: return "Pink";
case CcpColor::Plum: return "Plum";
case CcpColor::PowderBlue: return "PowderBlue";
case CcpColor::Purple: return "Purple";
case CcpColor::RebeccaPurple: return "RebeccaPurple";
case CcpColor::Red: return "Red";
case CcpColor::RosyBrown: return "RosyBrown";
case CcpColor::RoyalBlue: return "RoyalBlue";
case CcpColor::SaddleBrown: return "SaddleBrown";
case CcpColor::Salmon: return "Salmon";
case CcpColor::SandyBrown: return "SandyBrown";
case CcpColor::SeaGreen: return "SeaGreen";
case CcpColor::SeaShell: return "SeaShell";
case CcpColor::Sienna: return "Sienna";
case CcpColor::Silver: return "Silver";
case CcpColor::SkyBlue: return "SkyBlue";
case CcpColor::SlateBlue: return "SlateBlue";
case CcpColor::SlateGray: return "SlateGray / SlateGrey";
case CcpColor::Snow: return "Snow";
case CcpColor::SpringGreen: return "SpringGreen";
case CcpColor::SteelBlue: return "SteelBlue";
case CcpColor::Tan: return "Tan";
case CcpColor::Teal: return "Teal";
case CcpColor::Thistle: return "Thistle";
case CcpColor::Tomato: return "Tomato";
case CcpColor::Turquoise: return "Turquoise";
case CcpColor::Violet: return "Violet";
case CcpColor::Wheat: return "Wheat";
case CcpColor::White: return "White";
case CcpColor::WhiteSmoke: return "WhiteSmoke";
case CcpColor::Yellow: return "Yellow";
case CcpColor::YellowGreen: return "YellowGreen";
default: return "ColorNotFound";
}
}
Loading