summaryrefslogtreecommitdiffstats
path: root/tools/gfx/d3d12/d3d12-shader-program.h
blob: b95eb030c5c458457c684e184cb97ec8a2e71190 (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
// d3d12-shader-program.h
#pragma once

#include "d3d12-base.h"
#include "d3d12-shader-object-layout.h"

namespace gfx
{
namespace d3d12
{

using namespace Slang;

struct ShaderBinary
{
    SlangStage stage;
    slang::EntryPointReflection* entryPointInfo;
    String actualEntryPointNameInAPI;
    List<uint8_t> code;
};

class ShaderProgramImpl : public ShaderProgramBase
{
public:
    RefPtr<RootShaderObjectLayoutImpl> m_rootObjectLayout;
    List<ShaderBinary> m_shaders;

    virtual Result createShaderModule(
        slang::EntryPointReflection* entryPointInfo,
        List<ComPtr<ISlangBlob>>& kernelCodes) override;
};

} // namespace d3d12
} // namespace gfx