blob: f739ade919b15c4681034ae7df5ed6972af51729 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#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 {
struct CUDAComputeUtil
{
/// NOTE! MUST match up to definitions in the CUDA prelude
struct ByteAddressBuffer
{
void* data;
size_t sizeInBytes;
};
struct StructuredBuffer
{
void* data;
size_t count;
};
struct Array
{
void* 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)
List<BindSet::Value*> m_buffers;
};
static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout, Context& outContext);
static bool canCreateDevice();
};
} // renderer_test
#endif //CPU_MEMORY_BINDING_H
|