summaryrefslogtreecommitdiff
path: root/source/slang/emit.h
blob: 98845f9c67bfd78332fe34d2998751d1bf72521f (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
// Emit.h
#ifndef SLANG_EMIT_H_INCLUDED
#define SLANG_EMIT_H_INCLUDED

#include "../core/basic.h"

#include "compiler.h"

namespace Slang
{
    class EntryPointRequest;
    class ProgramLayout;
    class TranslationUnitRequest;

    struct ExtensionUsageTracker;
    void requireGLSLExtension(
        ExtensionUsageTracker*  tracker,
        String const&           name);

    // Emit code for a single entry point, based on
    // the input translation unit.
    String emitEntryPoint(
        EntryPointRequest*  entryPoint,
        ProgramLayout*      programLayout,

        // The target language to generate code in (e.g., HLSL/GLSL)
        CodeGenTarget       target,

        // The full target request
        TargetRequest*      targetRequest);
}
#endif