vk: unconditionally enable systrace for group markers (#9501)

This commit is contained in:
Powei Feng
2025-12-11 09:09:38 -08:00
committed by GitHub
parent dcf7621c35
commit ee6c8c3e76
2 changed files with 13 additions and 5 deletions

View File

@@ -169,6 +169,13 @@ static_assert(FVK_ENABLED(FVK_DEBUG_VALIDATION));
#define FVK_PROFILE_MARKER(marker)
#endif
// In some instances, we want to enable systrace markers regardless of the build type (ie.e debug vs.
// release) or the compile-time configuration (i.e. FVK_DEBUG_SYSTRACE).
#define FVK_ALWAYS_ON_SYSTRACE_CONTEXT() FILAMENT_TRACING_CONTEXT(FILAMENT_TRACING_CATEGORY_FILAMENT)
#define FVK_ALWAYS_ON_SYSTRACE_START(marker) FILAMENT_TRACING_NAME_BEGIN(FILAMENT_TRACING_CATEGORY_FILAMENT, marker)
#define FVK_ALWAYS_ON_SYSTRACE_END() FILAMENT_TRACING_NAME_END(FILAMENT_TRACING_CATEGORY_FILAMENT)
#define FVK_ALWAYS_ON_SYSTRACE_SCOPE() FILAMENT_TRACING_CALL(FILAMENT_TRACING_CATEGORY_FILAMENT)
#ifndef FVK_HANDLE_ARENA_SIZE_IN_MB
#define FVK_HANDLE_ARENA_SIZE_IN_MB 8
#endif

View File

@@ -22,11 +22,12 @@
#include "VulkanBufferCache.h"
#include "VulkanBufferProxy.h"
#include "VulkanCommands.h"
#include "VulkanConstants.h"
#include "VulkanDriverFactory.h"
#include "VulkanHandles.h"
#include "VulkanMemory.h"
#include "VulkanSamplerCache.h"
#include "VulkanTexture.h"
#include "vulkan/VulkanSamplerCache.h"
#include "vulkan/memory/ResourceManager.h"
#include "vulkan/memory/ResourcePointer.h"
#include "vulkan/utils/Conversion.h"
@@ -1969,16 +1970,16 @@ void VulkanDriver::pushGroupMarker(char const* string) {
#if FVK_ENABLED(FVK_DEBUG_GROUP_MARKERS)
mCommands.pushGroupMarker(string);
#endif
FVK_SYSTRACE_CONTEXT();
FVK_SYSTRACE_START(string);
FVK_ALWAYS_ON_SYSTRACE_CONTEXT();
FVK_ALWAYS_ON_SYSTRACE_START(string);
}
void VulkanDriver::popGroupMarker(int) {
#if FVK_ENABLED(FVK_DEBUG_GROUP_MARKERS)
mCommands.popGroupMarker();
#endif
FVK_SYSTRACE_CONTEXT();
FVK_SYSTRACE_END();
FVK_ALWAYS_ON_SYSTRACE_CONTEXT();
FVK_ALWAYS_ON_SYSTRACE_END();
}
void VulkanDriver::startCapture(int) {}