GpuQuerySystemDescriptor.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. #include <Atom/RPI.Reflect/GpuQuerySystemDescriptor.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <AzCore/Serialization/EditContext.h>
  11. namespace AZ
  12. {
  13. namespace RPI
  14. {
  15. void GpuQuerySystemDescriptor::Reflect(AZ::ReflectContext* context)
  16. {
  17. if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  18. {
  19. serializeContext->Class<GpuQuerySystemDescriptor>()
  20. ->Version(0)
  21. ->Field("OcclusionQueryCount", &GpuQuerySystemDescriptor::m_occlusionQueryCount)
  22. ->Field("StatisticsQueryCount", &GpuQuerySystemDescriptor::m_statisticsQueryCount)
  23. ->Field("TimestampQueryCount", &GpuQuerySystemDescriptor::m_timestampQueryCount)
  24. ->Field("StatisticsQueryFlags", &GpuQuerySystemDescriptor::m_statisticsQueryFlags)
  25. ;
  26. if (AZ::EditContext* ec = serializeContext->GetEditContext())
  27. {
  28. ec->Class<GpuQuerySystemDescriptor>("Gpu Query System Settings", "Settings for the Gpu Query System")
  29. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  30. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  31. ->DataElement(AZ::Edit::UIHandlers::Default, &GpuQuerySystemDescriptor::m_occlusionQueryCount, "Occlusion GPU Query Count", "The amount of available queries for Occlusion")
  32. ->DataElement(AZ::Edit::UIHandlers::Default, &GpuQuerySystemDescriptor::m_statisticsQueryCount, "Statistics GPU Query Count", "The amount of available queries for Pipeline Statistics")
  33. ->DataElement(AZ::Edit::UIHandlers::Default, &GpuQuerySystemDescriptor::m_timestampQueryCount, "Timestamp GPU Query Count", "The amount of available queries for Timestamps")
  34. ->DataElement(AZ::Edit::UIHandlers::Default, &GpuQuerySystemDescriptor::m_statisticsQueryFlags, "StatisticsQueryFlags", "Flags that determine which values to readback from the Pipeline Statistics queries")
  35. ;
  36. }
  37. }
  38. }
  39. } // namespace RPI
  40. } // namespace AZ