webgpu/dawn/include/tint/tint.h
 1// Copyright 2020 The Tint Authors.
 2//
 3// Licensed under the Apache License, Version 2.0 (the "License");
 4// you may not use this file except in compliance with the License.
 5// You may obtain a copy of the License at
 6//
 7//     http://www.apache.org/licenses/LICENSE-2.0
 8//
 9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef INCLUDE_TINT_TINT_H_
16#define INCLUDE_TINT_TINT_H_
17
18// Guard for accidental includes to private headers
19#define CURRENTLY_IN_TINT_PUBLIC_HEADER
20
21// TODO(tint:88): When implementing support for an install target, all of these
22//                headers will need to be moved to include/tint/.
23
24#include "src/tint/lang/core/type/manager.h"
25#include "src/tint/lang/wgsl/ast/transform/first_index_offset.h"
26#include "src/tint/lang/wgsl/ast/transform/manager.h"
27#include "src/tint/lang/wgsl/ast/transform/renamer.h"
28#include "src/tint/lang/wgsl/ast/transform/single_entry_point.h"
29#include "src/tint/lang/wgsl/ast/transform/substitute_override.h"
30#include "src/tint/lang/wgsl/ast/transform/vertex_pulling.h"
31#include "src/tint/lang/wgsl/helpers/flatten_bindings.h"
32#include "src/tint/lang/wgsl/inspector/inspector.h"
33#include "src/tint/utils/diagnostic/formatter.h"
34#include "src/tint/utils/diagnostic/printer.h"
35#include "tint/array_length_from_uniform_options.h"
36#include "tint/binding_point.h"
37#include "tint/binding_remapper_options.h"
38#include "tint/external_texture_options.h"
39
40#if TINT_BUILD_SPV_READER
41#include "src/tint/lang/spirv/reader/reader.h"
42#endif  // TINT_BUILD_SPV_READER
43
44#if TINT_BUILD_WGSL_READER
45#include "src/tint/lang/wgsl/reader/reader.h"
46#endif  // TINT_BUILD_WGSL_READER
47
48#if TINT_BUILD_SPV_WRITER
49#include "src/tint/lang/spirv/writer/writer.h"
50#endif  // TINT_BUILD_SPV_WRITER
51
52#if TINT_BUILD_WGSL_WRITER
53#include "src/tint/lang/wgsl/writer/writer.h"
54#endif  // TINT_BUILD_WGSL_WRITER
55
56#if TINT_BUILD_MSL_WRITER
57#include "src/tint/lang/msl/writer/writer.h"
58#endif  // TINT_BUILD_MSL_WRITER
59
60#if TINT_BUILD_HLSL_WRITER
61#include "src/tint/lang/hlsl/writer/writer.h"
62#endif  // TINT_BUILD_HLSL_WRITER
63
64#if TINT_BUILD_GLSL_WRITER
65#include "src/tint/lang/glsl/writer/writer.h"
66#endif  // TINT_BUILD_GLSL_WRITER
67
68namespace tint {
69
70/// Initialize initializes the Tint library. Call before using the Tint API.
71void Initialize();
72
73/// Shutdown uninitializes the Tint library. Call after using the Tint API.
74void Shutdown();
75
76}  // namespace tint
77
78#undef CURRENTLY_IN_TINT_PUBLIC_HEADER
79
80#endif  // INCLUDE_TINT_TINT_H_