yum-mirror/slang

Making it easier to work with shaders

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

Ellie Hermaszewskaformatf65d756bf

master
917 B34 linesraw
1#include "slang-entrypoint.h"
2
3#include "../util/record-utility.h"
4
5namespace SlangRecord
6{
7EntryPointRecorder::EntryPointRecorder(
8    SessionRecorder* sessionRecorder,
9    slang::IEntryPoint* entryPoint,
10    RecordManager* recordManager)
11    : IComponentTypeRecorder(entryPoint, recordManager)
12    , m_sessionRecorder(sessionRecorder)
13    , m_actualEntryPoint(entryPoint)
14{
15    SLANG_RECORD_ASSERT(m_actualEntryPoint != nullptr);
16    slangRecordLog(LogLevel::Verbose, "%s: %p\n", __PRETTY_FUNCTION__, entryPoint);
17}
18
19ISlangUnknown* EntryPointRecorder::getInterface(const Guid& guid)
20{
21    if (guid == IEntryPointRecorder::getTypeGuid())
22    {
23        return static_cast<IEntryPointRecorder*>(this);
24    }
25    else
26        return nullptr;
27}
28
29SLANG_NO_THROW slang::FunctionReflection* EntryPointRecorder::getFunctionReflection()
30{
31    return m_actualEntryPoint->getFunctionReflection();
32}
33
34} // namespace SlangRecord