summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-wrap-cbuffer-element.h
blob: a75ec78a33b5ec1790e4e9969f5882d2e7c36756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef SLANG_IR_WRAP_CBUFFER_ELEMENT_H
#define SLANG_IR_WRAP_CBUFFER_ELEMENT_H

namespace Slang
{
struct IRModule;
struct IRParameterGroupType;

class WrapCBufferElementPolicy
{
public:
    virtual bool shouldWrapBufferElementInStruct(IRParameterGroupType* cbufferType) = 0;
};

// Wrap the element type of a ConstantBuffer/ParameterBlock in a struct if the element type is not
// something that allowed directly as a buffer element type by the target.
void wrapCBufferElements(IRModule* module, WrapCBufferElementPolicy* policy);

void wrapCBufferElementsForMetal(IRModule* module);

} // namespace Slang

#endif