From ed37dcbc175d07134cb0493f5e379a19e97c82f5 Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:53:36 -0700 Subject: Split render-cpu into smaller files (#2340) * render-cpu split, does not compile * split finished, one compile error * added missing include and missing destructor implementation * Rerun TeamCity CI --- tools/gfx/cpu/cpu-query.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tools/gfx/cpu/cpu-query.cpp (limited to 'tools/gfx/cpu/cpu-query.cpp') diff --git a/tools/gfx/cpu/cpu-query.cpp b/tools/gfx/cpu/cpu-query.cpp new file mode 100644 index 000000000..3f87d7a65 --- /dev/null +++ b/tools/gfx/cpu/cpu-query.cpp @@ -0,0 +1,28 @@ +// cpu-query.cpp +#include "cpu-query.h" + +namespace gfx +{ +using namespace Slang; + +namespace cpu +{ + +Result QueryPoolImpl::init(const IQueryPool::Desc& desc) +{ + m_queries.setCount(desc.count); + return SLANG_OK; +} + +SLANG_NO_THROW Result SLANG_MCALL QueryPoolImpl::getResult( + GfxIndex queryIndex, GfxCount count, uint64_t* data) +{ + for (GfxCount i = 0; i < count; i++) + { + data[i] = m_queries[queryIndex + i]; + } + return SLANG_OK; +} + +} // namespace cpu +} // namespace gfx -- cgit v1.2.3