yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1// cuda-command-buffer.cpp 2#include "cuda-command-buffer.h" 3 4namespace gfx 5{ 6#ifdef GFX_ENABLE_CUDA 7using namespace Slang ; 8 9namespace cuda 10{ 11 12ICommandBuffer * CommandBufferImpl ::getInterface (const Guid & guid ) 13{ 14if (guid == GfxGUID ::IID_ISlangUnknown || guid == GfxGUID ::IID_ICommandBuffer ) 15return static_cast < ICommandBuffer *> (this ); 16return nullptr ; 17} 18 19void CommandBufferImpl ::init (DeviceImpl * device ,TransientResourceHeapBase * transientHeap ) 20{ 21m_device = device ; 22m_transientHeap = transientHeap ; 23} 24 25SLANG_NO_THROW void SLANG_MCALL CommandBufferImpl ::encodeRenderCommands ( 26IRenderPassLayout * renderPass , 27IFramebuffer * framebuffer , 28IRenderCommandEncoder ** outEncoder ) 29{ 30SLANG_UNUSED (renderPass ); 31SLANG_UNUSED (framebuffer ); 32* outEncoder = nullptr ; 33} 34 35SLANG_NO_THROW void SLANG_MCALL 36CommandBufferImpl ::encodeResourceCommands (IResourceCommandEncoder ** outEncoder ) 37{ 38m_resourceCommandEncoder .init (this ); 39* outEncoder = & m_resourceCommandEncoder ; 40} 41 42SLANG_NO_THROW void SLANG_MCALL 43CommandBufferImpl ::encodeComputeCommands (IComputeCommandEncoder ** outEncoder ) 44{ 45m_computeCommandEncoder .init (this ); 46* outEncoder = & m_computeCommandEncoder ; 47} 48 49SLANG_NO_THROW void SLANG_MCALL 50CommandBufferImpl ::encodeRayTracingCommands (IRayTracingCommandEncoder ** outEncoder ) 51{ 52* outEncoder = nullptr ; 53} 54 55SLANG_NO_THROW Result SLANG_MCALL CommandBufferImpl ::getNativeHandle (InteropHandle * outHandle ) 56{ 57return SLANG_FAIL ; 58} 59 60}// namespace cuda 61#endif 62}// namespace gfx