Query.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <Tests/Query.h>
  9. namespace UnitTest
  10. {
  11. using namespace AZ;
  12. RHI::ResultCode Query::BeginInternal([[maybe_unused]] RHI::CommandList& commandList, [[maybe_unused]] RHI::QueryControlFlags flags)
  13. {
  14. return RHI::ResultCode::Success;
  15. }
  16. RHI::ResultCode Query::EndInternal([[maybe_unused]] RHI::CommandList& commandList)
  17. {
  18. return RHI::ResultCode::Success;
  19. }
  20. RHI::ResultCode Query::WriteTimestampInternal([[maybe_unused]] RHI::CommandList& commandList)
  21. {
  22. return RHI::ResultCode::Success;
  23. }
  24. RHI::ResultCode QueryPool::InitInternal([[maybe_unused]] RHI::Device& device, [[maybe_unused]] const RHI::QueryPoolDescriptor& descriptor)
  25. {
  26. return RHI::ResultCode::Success;
  27. }
  28. RHI::ResultCode QueryPool::InitQueryInternal([[maybe_unused]] RHI::DeviceQuery& query)
  29. {
  30. return RHI::ResultCode::Success;
  31. }
  32. RHI::ResultCode QueryPool::GetResultsInternal(uint32_t startIndex, uint32_t queryCount, uint64_t* results, [[maybe_unused]] uint32_t resultsCount, [[maybe_unused]] RHI::QueryResultFlagBits flags)
  33. {
  34. m_calledIntervals.emplace_back(startIndex, startIndex + queryCount - 1);
  35. for (uint32_t i = 0; i < queryCount; ++i)
  36. {
  37. results[i] = startIndex + i;
  38. }
  39. return RHI::ResultCode::Success;
  40. }
  41. }