commit | b4ff8c859a26e8ac060062198cfaf35d6b8c4520 | [log] [tgz] |
---|---|---|

author | Ben Clayton <bclayton@google.com> | Fri Jun 24 23:30:59 2022 +0000 |

committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jun 24 23:30:59 2022 +0000 |

tree | 436c848df94d90ec637c1443db5e6fd6b017023b | |

parent | 268d7b83571ae65b7e59a6df251ecb6ac0f5a806 [diff] |

tint/resolver: Simplify array size evaluation Use the constant evaluated value instead of manually traversing variables to find the literal value. This is a small step towards supporting 'const' values for array sizes. Also make our OOB-byte related error diagnostics consistent. Bug: tint:1580 Change-Id: Idf9eb22cdbf69d750218c554e9f826c30458c6b9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94600 Reviewed-by: David Neto <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>

- src/tint/resolver/resolver.cc[diff]
- src/tint/resolver/type_constructor_validation_test.cc[diff]
- src/tint/resolver/type_validation_test.cc[diff]
- test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.spvasm[diff]
- test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.glsl[diff]
- test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.hlsl[diff]
- test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl[diff]
- test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.spvasm[diff]

75 files changed

tree: 436c848df94d90ec637c1443db5e6fd6b017023b

- .vscode/
- build_overrides/
- docs/
- generator/
- include/
- infra/
- scripts/
- src/
- test/
- third_party/
- tools/
- webgpu-cts/
- .clang-format
- .clang-tidy
- .gitattributes
- .gitignore
- .gn
- AUTHORS
- BUILD.gn
- CMakeLists.txt
- CMakeSettings.json
- CODE_OF_CONDUCT.md
- codereview.settings
- CONTRIBUTING.md
- CPPLINT.cfg
- dawn.json
- dawn_wire.json
- DEPS
- DIR_METADATA
- Doxyfile
- go.mod
- go.sum
- LICENSE
- OWNERS
- PRESUBMIT.py
- README.chromium
- README.md
- tint_overrides_with_defaults.gni

README.md

Dawn is an open-source and cross-platform implementation of the work-in-progress WebGPU standard. More precisely it implements `webgpu.h`

that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.

Dawn provides several WebGPU building blocks:

**WebGPU C/C++ headers**that applications and other building blocks use.- The
`webgpu.h`

version that Dawn implements. - A C++ wrapper for the
`webgpu.h`

.

- The
**A “native” implementation of WebGPU**using platforms' GPU APIs:**D3D12**on Windows 10**Metal**on macOS and iOS**Vulkan**on Windows, Linux, ChromeOS, Android and Fuchsia- OpenGL as best effort where available

**A client-server implementation of WebGPU**for applications that are in a sandbox without access to native drivers**Tint**is a compiler for the WebGPU Shader Language (WGSL).

Helpful links:

- Dawn bug tracker if you find issues with Dawn.
- Tint bug tracker if you find issues with Tint.
- Dawn's mailing list for other discussions related to Dawn.
- Dawn's source code
- Dawn's Matrix chatroom for live discussion around contributing or using Dawn.
- WebGPU's Matrix chatroom
- Tint mirror for standalone usage.

Developer documentation:

- Dawn overview
- Building
- Contributing
- Code of Conduct
- Testing Dawn
- Debugging Dawn
- Dawn's infrastructure
- Dawn errors
- Tint experimental extensions

User documentation: (TODO, figure out what overlaps with the webgpu.h docs)

(TODO)

Apache 2.0 Public License, please see LICENSE.

This is not an officially supported Google product.