yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1// metal-resource-views.cpp 2#include "metal-resource-views.h" 3 4namespace gfx 5{ 6 7using namespace Slang ; 8 9namespace metal 10{ 11 12TextureResourceViewImpl ::~TextureResourceViewImpl () {} 13 14Result TextureResourceViewImpl ::getNativeHandle (InteropHandle * outHandle ) 15{ 16outHandle -> api = InteropHandleAPI ::Metal ; 17outHandle -> handleValue = reinterpret_cast < uintptr_t > (m_textureView .get ()); 18return SLANG_OK ; 19} 20 21BufferResourceViewImpl ::~BufferResourceViewImpl () {} 22 23Result BufferResourceViewImpl ::getNativeHandle (InteropHandle * outHandle ) 24{ 25outHandle -> api = InteropHandleAPI ::Metal ; 26outHandle -> handleValue = reinterpret_cast < uintptr_t > (m_buffer -> m_buffer .get ()); 27return SLANG_OK ; 28} 29 30TexelBufferResourceViewImpl ::TexelBufferResourceViewImpl (DeviceImpl * device ) 31 :ResourceViewImpl (ViewType ::TexelBuffer ,device ) 32{ 33} 34 35TexelBufferResourceViewImpl ::~TexelBufferResourceViewImpl () {} 36 37Result TexelBufferResourceViewImpl ::getNativeHandle (InteropHandle * outHandle ) 38{ 39return SLANG_E_NOT_IMPLEMENTED ; 40} 41 42DeviceAddress AccelerationStructureImpl ::getDeviceAddress () 43{ 44return 0 ; 45} 46 47Result AccelerationStructureImpl ::getNativeHandle (InteropHandle * outHandle ) 48{ 49return SLANG_E_NOT_IMPLEMENTED ; 50} 51 52AccelerationStructureImpl ::~AccelerationStructureImpl () {} 53 54}// namespace metal 55}// namespace gfx