VkTimestampQuery.h 761 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Gr/TimestampQuery.h>
  7. #include <AnKi/Gr/Vulkan/VkQueryFactory.h>
  8. namespace anki {
  9. /// @addtogroup vulkan
  10. /// @{
  11. /// Occlusion query.
  12. class TimestampQueryImpl final : public TimestampQuery
  13. {
  14. friend class TimestampQuery;
  15. public:
  16. MicroQuery m_handle = {};
  17. TimestampQueryImpl(CString name)
  18. : TimestampQuery(name)
  19. {
  20. }
  21. ~TimestampQueryImpl();
  22. /// Create the query.
  23. Error init();
  24. /// Get query result.
  25. TimestampQueryResult getResultInternal(Second& timestamp) const;
  26. private:
  27. U64 m_timestampPeriod = 0;
  28. };
  29. /// @}
  30. } // end namespace anki