Skip to content

Commit 58518fa

Browse files
committed
Updated Tint.
1 parent 866466c commit 58518fa

File tree

205 files changed

+36024
-17103
lines changed

Some content is hidden

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

205 files changed

+36024
-17103
lines changed

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,19 @@
3434
// TODO(tint:88): When implementing support for an install target, all of these
3535
// headers will need to be moved to include/tint/.
3636

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"
37+
#include "src/tint/api/common/binding_point.h" // IWYU pragma: export
38+
#include "src/tint/api/common/resource_type.h" // IWYU pragma: export
39+
#include "src/tint/api/common/subgroup_matrix.h" // IWYU pragma: export
40+
#include "src/tint/api/common/substitute_overrides_config.h" // IWYU pragma: export
41+
#include "src/tint/api/common/vertex_pulling_config.h" // IWYU pragma: export
42+
#include "src/tint/api/common/workgroup_info.h" // IWYU pragma: export
43+
#include "src/tint/api/tint.h" // IWYU pragma: export
44+
#include "src/tint/lang/core/type/manager.h" // IWYU pragma: export
45+
#include "src/tint/lang/wgsl/enums.h" // IWYU pragma: export
46+
#include "src/tint/lang/wgsl/feature_status.h" // IWYU pragma: export
47+
#include "src/tint/lang/wgsl/inspector/inspector.h" // IWYU pragma: export
48+
#include "src/tint/utils/diagnostic/formatter.h" // IWYU pragma: export
49+
#include "src/tint/utils/text/styled_text.h" // IWYU pragma: export
4550

4651
///////////////
4752
// NOTE if adding a new guard include here, it must also appear in src/tint/api/tint.cc for the

3rdparty/dawn/include/webgpu/webgpu.h

Lines changed: 59 additions & 45 deletions
Large diffs are not rendered by default.

3rdparty/dawn/src/tint/api/common/override_id.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#define SRC_TINT_API_COMMON_OVERRIDE_ID_H_
3030

3131
#include <stdint.h>
32+
3233
#include <functional>
3334

3435
#include "src/tint/utils/math/hash.h"

3rdparty/dawn/src/tint/api/common/resource_table_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ struct ResourceTableConfig {
5858
BindingPoint resource_table_binding;
5959

6060
// The binding point for the supporting storage buffer. This is a post-remapping binding point.
61+
// TODO(crbug.com/435317394): Rename to metadata_buffer_binding
6162
BindingPoint storage_buffer_binding;
6263

6364
// The ordering of default bindings which are placed after the user bindings. These will be used
@@ -91,6 +92,7 @@ struct ResourceTableConfig {
9192
resource_table_binding,
9293
storage_buffer_binding,
9394
default_binding_type_order);
95+
TINT_REFLECT_EQUALS(ResourceTableConfig);
9496
};
9597

9698
} // namespace tint

3rdparty/dawn/src/tint/api/common/resource_type.h

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,28 @@ namespace tint {
3535
enum class ResourceType : uint32_t {
3636
kEmpty,
3737

38-
kTexture1d_f32,
38+
kTexture1d_f32_filterable,
39+
kTexture1d_f32_unfilterable,
3940
kTexture1d_i32,
4041
kTexture1d_u32,
41-
kTexture2d_f32,
42+
kTexture2d_f32_filterable,
43+
kTexture2d_f32_unfilterable,
4244
kTexture2d_i32,
4345
kTexture2d_u32,
44-
kTexture2dArray_f32,
46+
kTexture2dArray_f32_filterable,
47+
kTexture2dArray_f32_unfilterable,
4548
kTexture2dArray_i32,
4649
kTexture2dArray_u32,
47-
kTexture3d_f32,
50+
kTexture3d_f32_filterable,
51+
kTexture3d_f32_unfilterable,
4852
kTexture3d_i32,
4953
kTexture3d_u32,
50-
kTextureCube_f32,
54+
kTextureCube_f32_filterable,
55+
kTextureCube_f32_unfilterable,
5156
kTextureCube_i32,
5257
kTextureCube_u32,
53-
kTextureCubeArray_f32,
58+
kTextureCubeArray_f32_filterable,
59+
kTextureCubeArray_f32_unfilterable,
5460
kTextureCubeArray_i32,
5561
kTextureCubeArray_u32,
5662

@@ -63,6 +69,10 @@ enum class ResourceType : uint32_t {
6369
kTextureDepthCube,
6470
kTextureDepthCubeArray,
6571
kTextureDepthMultisampled2d,
72+
73+
kSampler_filtering,
74+
kSampler_non_filtering,
75+
kSampler_comparison,
6676
};
6777
TINT_REFLECT_ENUM_RANGE(tint::ResourceType, kEmpty, kTextureDepthMultisampled2d);
6878

3rdparty/dawn/src/tint/api/common/subgroup_matrix.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include <unordered_set>
3232

3333
#include "src/tint/utils/math/hash.h"
34-
3534
#include "src/tint/utils/reflection.h"
3635

3736
namespace tint {

3rdparty/dawn/src/tint/lang/core/ir/transform/decompose_uniform_access.h renamed to 3rdparty/dawn/src/tint/api/common/workgroup_info.h

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 The Dawn & Tint Authors
1+
// Copyright 2026 The Dawn & Tint Authors
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions are met:
@@ -25,25 +25,31 @@
2525
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2626
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

28-
#ifndef SRC_TINT_LANG_CORE_IR_TRANSFORM_DECOMPOSE_UNIFORM_ACCESS_H_
29-
#define SRC_TINT_LANG_CORE_IR_TRANSFORM_DECOMPOSE_UNIFORM_ACCESS_H_
28+
#ifndef SRC_TINT_API_COMMON_WORKGROUP_INFO_H_
29+
#define SRC_TINT_API_COMMON_WORKGROUP_INFO_H_
3030

31-
#include "src/tint/utils/result.h"
31+
#include <cstddef>
32+
#include <cstdint>
33+
#include <optional>
3234

33-
// Forward declarations.
34-
namespace tint::core::ir {
35-
class Module;
36-
} // namespace tint::core::ir
35+
namespace tint {
3736

38-
namespace tint::core::ir::transform {
37+
/// Workgroup size information, which is part of the output of shader generation.
38+
struct WorkgroupInfo {
39+
/// The x-component
40+
uint32_t x = 0;
41+
/// The y-component
42+
uint32_t y = 0;
43+
/// The z-component
44+
uint32_t z = 0;
3945

40-
/// DecomposeUniformAccess is a transform used to replace uniform buffer accesses with a
41-
/// the correct load of the HLSL primitive objects
42-
///
43-
/// @param module the module to transform
44-
/// @returns success or failure
45-
Result<SuccessType> DecomposeUniformAccess(core::ir::Module& module);
46+
/// The needed workgroup storage size
47+
size_t storage_size = 0;
4648

47-
} // namespace tint::core::ir::transform
49+
/// The `@subgroup_size` attribute
50+
std::optional<uint32_t> subgroup_size;
51+
};
4852

49-
#endif // SRC_TINT_LANG_CORE_IR_TRANSFORM_DECOMPOSE_UNIFORM_ACCESS_H_
53+
} // namespace tint
54+
55+
#endif // SRC_TINT_API_COMMON_WORKGROUP_INFO_H_

3rdparty/dawn/src/tint/lang/core/constant/invalid.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#define SRC_TINT_LANG_CORE_CONSTANT_INVALID_H_
3030

3131
#include <variant>
32+
3233
#include "src/tint/lang/core/constant/value.h"
3334
#include "src/tint/lang/core/number.h"
3435
#include "src/tint/lang/core/type/invalid.h"

3rdparty/dawn/src/tint/lang/core/constant/manager.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "src/tint/lang/core/type/i8.h"
4343
#include "src/tint/lang/core/type/manager.h"
4444
#include "src/tint/lang/core/type/matrix.h"
45+
#include "src/tint/lang/core/type/u16.h"
4546
#include "src/tint/lang/core/type/u32.h"
4647
#include "src/tint/lang/core/type/u64.h"
4748
#include "src/tint/lang/core/type/u8.h"
@@ -115,6 +116,10 @@ const Scalar<u8>* Manager::Get(u8 value) {
115116
return Get<Scalar<u8>>(types.u8(), value);
116117
}
117118

119+
const Scalar<u16>* Manager::Get(u16 value) {
120+
return Get<Scalar<u16>>(types.u16(), value);
121+
}
122+
118123
const Scalar<f32>* Manager::Get(f32 value) {
119124
return Get<Scalar<f32>>(types.f32(), value);
120125
}
@@ -182,6 +187,7 @@ const Value* Manager::Zero(const core::type::Type* type) {
182187
[&](const core::type::U32*) { return Get(u32(0)); }, //
183188
[&](const core::type::I8*) { return Get(i8(0)); }, //
184189
[&](const core::type::U8*) { return Get(u8(0)); }, //
190+
[&](const core::type::U16*) { return Get(u16(0)); }, //
185191
[&](const core::type::U64*) { return Get(u64(0)); }, //
186192
[&](const core::type::F32*) { return Get(f32(0)); }, //
187193
[&](const core::type::F16*) { return Get(f16(0)); }, //

3rdparty/dawn/src/tint/lang/core/constant/manager.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ class Manager final {
118118
/// @return a Scalar holding the u8 value @p value
119119
const Scalar<u8>* Get(u8 value);
120120

121+
/// @param value the constant value
122+
/// @return a Scalar holding the u16 value @p value
123+
const Scalar<u16>* Get(u16 value);
124+
121125
/// @param value the constant value
122126
/// @return a Scalar holding the f32 value @p value
123127
const Scalar<f32>* Get(f32 value);

0 commit comments

Comments
 (0)