mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add profiler option to SCons builds.
Add `tracy` option to `profiler`. If set, a tracy profiling client will be injected into the Godot binary. # Conflicts: # platform/linuxbsd/godot_linuxbsd.cpp
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#import "godot_application.h"
|
||||
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "main/main.h"
|
||||
|
||||
#if defined(SANITIZERS_ENABLED)
|
||||
@@ -39,6 +40,8 @@
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
godot_init_profiler();
|
||||
|
||||
#if defined(VULKAN_ENABLED)
|
||||
setenv("MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE", "1", 1); // MoltenVK - enable full component swizzling support.
|
||||
setenv("MVK_CONFIG_SWAPCHAIN_MIN_MAG_FILTER_USE_NEAREST", "0", 1); // MoltenVK - use linear surface scaling. TODO: remove when full DPI scaling is implemented.
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "core/crypto/crypto_core.h"
|
||||
#include "core/io/file_access.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "core/version_generated.gen.h"
|
||||
#include "drivers/apple/os_log_logger.h"
|
||||
#include "main/main.h"
|
||||
@@ -1080,6 +1081,8 @@ static void handle_interrupt(int sig) {
|
||||
}
|
||||
|
||||
void OS_MacOS_NSApp::start_main() {
|
||||
godot_init_profiler();
|
||||
|
||||
Error err;
|
||||
@autoreleasepool {
|
||||
err = Main::setup(execpath, argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user