diff options
Diffstat (limited to 'tools/render-test/cuda/cuda-compute-util.h')
| -rw-r--r-- | tools/render-test/cuda/cuda-compute-util.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/tools/render-test/cuda/cuda-compute-util.h b/tools/render-test/cuda/cuda-compute-util.h deleted file mode 100644 index 9c6c8b9b4..000000000 --- a/tools/render-test/cuda/cuda-compute-util.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef CUDA_COMPUTE_UTIL_H -#define CUDA_COMPUTE_UTIL_H - -#include "../slang-support.h" -#include "../options.h" - -#include "source/core/slang-smart-pointer.h" - -namespace renderer_test { - -// Base class for CUDA resources. This includes textures but also -// memory allocations -class CUDAResource : public Slang::RefObject -{ -public: - virtual uint64_t getBindlessHandle() = 0; -}; - -struct CUDAComputeUtil -{ - // Define here, so we don't need to include the CUDA header - typedef size_t CUdeviceptr; - - /// NOTE! MUST match up to definitions in the CUDA prelude - struct ByteAddressBuffer - { - CUdeviceptr data; - size_t sizeInBytes; - }; - struct StructuredBuffer - { - CUdeviceptr data; - size_t count; - }; - struct Array - { - CUdeviceptr data; - size_t count; - }; - - struct Context - { - /// Holds the binding information - BindSet m_bindSet; - CPULikeBindRoot m_bindRoot; - /// Buffers are held in same order as entries in layout (useful for dumping out bindings) - Slang::List<BindSet::Value*> m_buffers; - Slang::OrderedDictionary<Slang::String, Slang::RefPtr<CUDAResource>> m_bindlessResources; - void releaseBindlessResources(); - }; - - static SlangResult parseFeature(const Slang::UnownedStringSlice& feature, bool& outResult); - - static bool hasFeature(const Slang::UnownedStringSlice& feature); - - static SlangResult createTextureResource( - const ShaderInputLayoutEntry& srcEntry, - slang::TypeLayoutReflection* typeLayout, - Slang::RefPtr<CUDAResource>& outResource); - - static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout, const uint32_t dispatchSize[3], Context& outContext); - - static bool canCreateDevice(); -}; - - -} // renderer_test - -#endif //CPU_MEMORY_BINDING_H |
