VegetationProfiler.h 1014 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Debug/Profiler.h>
  10. AZ_DECLARE_BUDGET(Vegetation);
  11. // VEG_PROFILE_ENABLED is defined in the wscript
  12. // VEG_PROFILE_ENABLED is only defined in the Vegetation gem by default
  13. #if defined(VEG_PROFILE_ENABLED)
  14. #define VEG_PROFILE_METHOD(Method) Method
  15. #else
  16. #define VEG_PROFILE_METHOD(...) // no-op
  17. #endif
  18. //#define ENABLE_VEGETATION_PROFILE_VERBOSE
  19. #ifdef ENABLE_VEGETATION_PROFILE_VERBOSE
  20. // Add verbose profile markers
  21. #define VEGETATION_PROFILE_SCOPE_VERBOSE(...) AZ_PROFILE_SCOPE(Vegetation, __VA_ARGS__);
  22. #define VEGETATION_PROFILE_FUNCTION_VERBOSE AZ_PROFILE_FUNCTION(Vegetation);
  23. #else
  24. // Define ENABLE_VEGETATION_PROFILE_VERBOSE to get verbose profile markers
  25. #define VEGETATION_PROFILE_SCOPE_VERBOSE(...)
  26. #define VEGETATION_PROFILE_FUNCTION_VERBOSE
  27. #endif