yum-mirror/slang

Making it easier to work with shaders

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

Ellie Hermaszewskaformatf65d756bf

master
865 B42 linesraw
1// metal-transient-heap.cpp
2#include "metal-transient-heap.h"
3
4#include "metal-device.h"
5#include "metal-util.h"
6
7namespace gfx
8{
9
10using namespace Slang;
11
12namespace metal
13{
14
15Result TransientResourceHeapImpl::init(const ITransientResourceHeap::Desc& desc, DeviceImpl* device)
16{
17    Super::init(
18        desc,
19        256, // TODO
20        device);
21
22    return SLANG_OK;
23}
24
25TransientResourceHeapImpl::~TransientResourceHeapImpl() {}
26
27Result TransientResourceHeapImpl::createCommandBuffer(ICommandBuffer** outCmdBuffer)
28{
29    RefPtr<CommandBufferImpl> commandBuffer = new CommandBufferImpl();
30    SLANG_RETURN_ON_FAIL(commandBuffer->init(m_device, this));
31    returnComPtr(outCmdBuffer, commandBuffer);
32    return SLANG_OK;
33}
34
35Result TransientResourceHeapImpl::synchronizeAndReset()
36{
37    Super::reset();
38    return SLANG_OK;
39}
40
41} // namespace metal
42} // namespace gfx