Skip to content

Commit 1c08bab

Browse files
authored
shaderc: Add WGSL support. (#3542)
1 parent fbff26d commit 1c08bab

File tree

1,199 files changed

+357030
-36
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,199 files changed

+357030
-36
lines changed

3rdparty/dawn/LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2017-2023 The Dawn & Tint Authors
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are met:
5+
//
6+
// 1. Redistributions of source code must retain the above copyright notice, this
7+
// list of conditions and the following disclaimer.
8+
//
9+
// 2. Redistributions in binary form must reproduce the above copyright notice,
10+
// this list of conditions and the following disclaimer in the documentation
11+
// and/or other materials provided with the distribution.
12+
//
13+
// 3. Neither the name of the copyright holder nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3rdparty/dawn/include/tint/tint.h

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// Copyright 2020 The Dawn & Tint Authors
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are met:
5+
//
6+
// 1. Redistributions of source code must retain the above copyright notice, this
7+
// list of conditions and the following disclaimer.
8+
//
9+
// 2. Redistributions in binary form must reproduce the above copyright notice,
10+
// this list of conditions and the following disclaimer in the documentation
11+
// and/or other materials provided with the distribution.
12+
//
13+
// 3. Neither the name of the copyright holder nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
28+
#ifndef INCLUDE_TINT_TINT_H_
29+
#define INCLUDE_TINT_TINT_H_
30+
31+
// Guard for accidental includes to private headers
32+
#define CURRENTLY_IN_TINT_PUBLIC_HEADER
33+
34+
// TODO(tint:88): When implementing support for an install target, all of these
35+
// headers will need to be moved to include/tint/.
36+
37+
#include "src/tint/api/common/subgroup_matrix.h"
38+
#include "src/tint/api/common/substitute_overrides_config.h"
39+
#include "src/tint/api/common/vertex_pulling_config.h"
40+
#include "src/tint/api/tint.h"
41+
#include "src/tint/lang/core/type/manager.h"
42+
#include "src/tint/lang/wgsl/inspector/inspector.h"
43+
#include "src/tint/utils/diagnostic/formatter.h"
44+
#include "src/tint/utils/text/styled_text.h"
45+
46+
///////////////
47+
// NOTE if adding a new guard include here, it must also appear in src/tint/api/tint.cc for the
48+
// build to work correctly.
49+
///////////////
50+
51+
#if TINT_BUILD_SPV_READER
52+
#include "src/tint/lang/spirv/reader/reader.h"
53+
#endif // TINT_BUILD_SPV_READER
54+
55+
#if TINT_BUILD_WGSL_READER
56+
#include "src/tint/lang/wgsl/reader/reader.h"
57+
#endif // TINT_BUILD_WGSL_READER
58+
59+
#if TINT_BUILD_SPV_WRITER
60+
#include "src/tint/lang/spirv/writer/writer.h"
61+
#endif // TINT_BUILD_SPV_WRITER
62+
63+
#if TINT_BUILD_WGSL_WRITER
64+
#include "src/tint/lang/wgsl/writer/writer.h"
65+
#endif // TINT_BUILD_WGSL_WRITER
66+
67+
#if TINT_BUILD_MSL_WRITER
68+
#include "src/tint/lang/msl/writer/writer.h"
69+
#endif // TINT_BUILD_MSL_WRITER
70+
71+
#if TINT_BUILD_HLSL_WRITER
72+
#include "src/tint/lang/hlsl/writer/writer.h"
73+
#endif // TINT_BUILD_HLSL_WRITER
74+
75+
#if TINT_BUILD_GLSL_WRITER
76+
#include "src/tint/lang/glsl/writer/writer.h"
77+
#endif // TINT_BUILD_GLSL_WRITER
78+
79+
#if TINT_BUILD_NULL_WRITER
80+
#include "src/tint/lang/null/writer/writer.h"
81+
#endif // TINT_BUILD_NULL_WRITER
82+
83+
#undef CURRENTLY_IN_TINT_PUBLIC_HEADER
84+
85+
#endif // INCLUDE_TINT_TINT_H_

0 commit comments

Comments
 (0)