yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Ellie Hermaszewskaformatf65d756bf

master
491 B28 linesraw
1// cpu-query.cpp
2#include "cpu-query.h"
3
4namespace gfx
5{
6using namespace Slang;
7
8namespace cpu
9{
10
11Result QueryPoolImpl::init(const IQueryPool::Desc& desc)
12{
13    m_queries.setCount(desc.count);
14    return SLANG_OK;
15}
16
17SLANG_NO_THROW Result SLANG_MCALL
18QueryPoolImpl::getResult(GfxIndex queryIndex, GfxCount count, uint64_t* data)
19{
20    for (GfxCount i = 0; i < count; i++)
21    {
22        data[i] = m_queries[queryIndex + i];
23    }
24    return SLANG_OK;
25}
26
27} // namespace cpu
28} // namespace gfx