MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / BeginEvent

Method BeginEvent

Source/Engine/GraphicsDevice/Vulkan/CmdBufferVulkan.cpp:97–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95#if GPU_ALLOW_PROFILE_EVENTS
96
97void CmdBufferVulkan::BeginEvent(const Char* name, void* tracyContext)
98{
99 _eventsBegin++;
100
101 char buffer[60];
102 int32 bufferSize = StringUtils::Copy(buffer, name, sizeof(buffer));
103
104#if GPU_ENABLE_TRACY
105 auto& zone = _tracyZones.AddOne();
106 tracy::BeginVkZoneScope(zone.Data, tracyContext, GetHandle(), buffer, bufferSize);
107#endif
108
109#if VK_EXT_debug_utils
110 if (vkCmdBeginDebugUtilsLabelEXT)
111 {
112 VkDebugUtilsLabelEXT label;
113 RenderToolsVulkan::ZeroStruct(label, VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT);
114 label.pLabelName = buffer;
115 vkCmdBeginDebugUtilsLabelEXT(GetHandle(), &label);
116 }
117#endif
118}
119
120void CmdBufferVulkan::EndEvent()
121{

Callers 2

EventBeginMethod · 0.45
EventBeginMethod · 0.45

Calls 3

BeginVkZoneScopeFunction · 0.85
AddOneMethod · 0.80
GetHandleFunction · 0.50

Tested by

no test coverage detected