yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f65d756bf
master
1// cuda-texture.h 2#pragma once 3#include "cuda-base.h" 4#include "cuda-context.h" 5 6namespace gfx 7{ 8#ifdef GFX_ENABLE_CUDA 9using namespace Slang ; 10 11namespace cuda 12{ 13 14class TextureResourceImpl :public TextureResource 15{ 16public : 17TextureResourceImpl (const TextureResource ::Desc & desc ) 18 :TextureResource (desc ) 19 { 20 } 21 ~TextureResourceImpl (); 22 23uint64_t getBindlessHandle (); 24 25// The texObject is for reading 'texture' like things. This is an opaque type, that's backed by 26// a long long 27CUtexObject m_cudaTexObj = CUtexObject (); 28 29// The surfObj is for reading/writing 'texture like' things, but not for sampling. 30CUsurfObject m_cudaSurfObj = CUsurfObject (); 31 32CUarray m_cudaArray = CUarray (); 33CUmipmappedArray m_cudaMipMappedArray = CUmipmappedArray (); 34 35void * m_cudaExternalMemory = nullptr ; 36 37RefPtr < CUDAContext > m_cudaContext ; 38 39virtual SLANG_NO_THROW Result SLANG_MCALL 40getNativeResourceHandle (InteropHandle * outHandle )override ; 41}; 42 43}// namespace cuda 44#endif 45}// namespace gfx