Commit Graph

253 Commits

Author SHA1 Message Date
Ryan Harrison f813959302 Convert libtint deps to be public
This removes the requirement of targets that depend on libtint needing
to include the transitive deps to access somethings like headers.

BUG=tint:447

Change-Id: I52a86b93e517f2745f04711f508a838f8f6850b6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37720
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-13 15:42:51 +00:00
Ryan Harrison 0b5d1dd5d8 Re-land fuzzing work with fix
Revert "Revert 3 fuzzing CLs, since they are preventing rolling into Chromium."

This reverts commit 1d9935cf37.

Also adjusts BUILD.gn file, so that Chromium build can find all the
needed symbols.

BUG=tint:58,tint:59,tint:193,tint:194,tint:199,tint:436

Change-Id: I3fe71ff52c8156f30fccfaab0bf7f647f158aea4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37460
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-12 16:23:48 +00:00
dan sinclair 987376cd21 Revert the namer changes.
This CL reverts the changes to use the top level namer in the various
backends. This is causing issues when rolling into Dawn in the case
where the tint generator is used to create SPIR-V which is sent to
SPIRV-Cross but then generator and inspector aren't used. The entry
points end up being incorrect as SPIRV-Cross gets the renamed entry
points.

Change-Id: I4749e1d773f2bd9edcce83e63555f07a443d5ca5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37342
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2021-01-12 04:34:53 +00:00
dan sinclair f74b90b3dd Use a test namer in the MSL generator.
This CL updates the MSL generator to use a test namer, the various
places where the incorrect name was emitted have been fixed.

Change-Id: I20c990bdddc4f0580b09269920abe8376fa3ca07
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36900
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-11 16:24:32 +00:00
dan sinclair 8d6e625ef4 Convert HLSL to higher level namer.
This CL switches the HLSL generator to use the top level UnsafeNamer
instead of a custom namer.

Change-Id: I7643ee6586955ed2bc493104004fb9f9c524e951
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36660
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-11 16:24:32 +00:00
dan sinclair 05b64849b2 Convert MSL generator to unsafe namer.
This Cl updates the MSL generator to use the unsafe namer internally.

Change-Id: Ibeea747da1d7675c05a0dcb2416fbd491bb5d64b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36581
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-11 16:24:32 +00:00
Ryan Harrison 1d9935cf37 Revert 3 fuzzing CLs, since they are preventing rolling into Chromium.
Revert "Adding fuzzing for Transforms"

This reverts commit 4a29008c7e.

Revert "Add fuzzers for various emission paths"

This reverts commit 39545b7e7c.

Revert "Create common utility class for fuzzing"

This reverts commit 766e31d507.

Change-Id: Ia4e4ea2a4a5f423ea5bfa8ca9659c4028b558b45
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37180
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-11 15:22:19 +00:00
Ryan Harrison 4a29008c7e Adding fuzzing for Transforms
Fuzz all transforms being applied together, and fuzz each transform
separately.

BUG=tint:436

Change-Id: I53cf2e05c69f495f27bfa428f55ec033a85a612a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36945
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-08 02:42:43 +00:00
Ryan Harrison 39545b7e7c Add fuzzers for various emission paths
BUG=tint:58,tint:59,tint:194,tint:195

Change-Id: Ibca5efbcd608489dcb7c6c45a5fcf596b97165dc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36901
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-01-07 20:33:22 +00:00
Ryan Harrison 766e31d507 Create common utility class for fuzzing
This moves the usage of Tint in the fuzzers into a single class. This
will be expanded in the future to support emitting shaders, so fuzzing
tests, just need to indicate which reader & writer they want to use,
instead of having each test implement all of the API usage logic
directly.

BUG=tint:199

Change-Id: Id081a374014b7640a07b267e544ddeba3e6329dd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36760
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-01-07 16:20:32 +00:00
Ben Clayton e9d7f7e640 src/transform: Reimplement tests in WGSL
Easier to read and write, and ensures that the tests exercise valid AST instead of synthetic structures that can never exist.

Change-Id: I5d361ef96383c71943a424f5765952f21d740042
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36422
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-06 12:57:41 +00:00
Ben Clayton 1523f5c276 Start cleaning up tests (3/N)
Remove Source{} with ast::Builder::create<>
Use Builder helpers where possible

Change-Id: I7b3188fa8239bf11e88ff6b396a57c23d76a3152
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35660
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-14 22:30:57 +00:00
dan sinclair 2d0282b308 Add a demangler
This CL adds a simple demangler to convert the `tint_symbol_YYY` back to
the original symbol name.

Change-Id: I532ed13dc4c52e0f0e3568b8b7d8d0a5c67d8472
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35440
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-12-11 18:29:03 +00:00
Ben Clayton a80511e021 ast: Merge DecoratedVariable into Variable
Remove all Variable setters (with exception to set_storage_class() which is called by the TypeDeterminer)

Bug: tint:390
Change-Id: I172667e21e2b02e85dcea6703aa1e608ec718250
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35015
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-11 13:07:02 +00:00
dan sinclair 89caee197c Add a symbol table.
This CL adds a table which maps symbols to strings. This will allow us
to remove the use of std::string in the various AST nodes and refer to
the symbols instead.

Change-Id: I902641b3e546a2a44b3b2a39ce4f019cdcbeacc7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35100
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
2020-12-10 16:56:02 +00:00
Ben Clayton 7f04e5c1e2 Implement textureLoad()
Bug: tint:140
Bug: tint:143
Bug: tint:144
Bug: tint:145
Bug: tint:146
Bug: tint:147
Change-Id: I8f41abac2e355c121e8868aa708ae51d0db87665
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34960
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-09 15:57:00 +00:00
Enrico Galli 3d449d2be5 [transform] Add first index offset transform
Adding new transform to workaround D3D's vertex/instance_index always
starting from 0

Bug: dawn:548
Change-Id: I048f39e76e236570f3ce337a77d804384ee659a4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34600
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-08 21:07:24 +00:00
dan sinclair c35176eadf Remove the context object.
This CL strips the context object out of Tint.

Change-Id: Id0dcb9c557b217c03a8d9ac08fc9fe1c799f3fdc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34742
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-12-07 16:03:54 +00:00
Ben Clayton 00b77a80ab Rework all transforms to transform-on-copy
instead of transform-in-place.

This is a public API breaking change, so I've added the `DAWN_USE_NEW_TINT_TRANSFORM_API` define which is used by Dawn to know which API to use.

As we're going to have to go through the effort of an API breaking change, use this as an opportunity to rename Transformer to Transform, and remove 'Transform' from each of the transforms themselves (they're already in the transform namespace).

Bug: tint:390
Bug: tint:389
Change-Id: I1017507524b76bb4ffd26b95e550ef53ddc891c9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34800
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-04 09:06:09 +00:00
Ben Clayton 2bc6840d3c Add ast::CloneContext::ReplaceAll()
ReplaceAll() registers `replacer` to be called whenever the Clone() method is called with a type that matches (or derives from) the type of the first parameter of `replacer`.

`replacer` must be function-like with the signature: `T* (T*)`, where `T` is a type deriving from CastableBase.

If `replacer` returns a nullptr then Clone() will attempt the next registered replacer function that matches the object type. If no replacers match the object type, or all returned nullptr then Clone() will call `T::Clone()` to clone the object.

Example:

```
  // Replace all ast::UintLiterals with the number 42
  CloneCtx ctx(mod);
  ctx.ReplaceAll([&] (ast::UintLiteral* in) {
    return ctx.mod->create<ast::UintLiteral>(ctx.Clone(in->type()), 42);
  });
  auto* out = ctx.Clone(tree);
```

This is to be used by Transforms that want to replace parts of the AST on clone.

Bug: tint:390
Change-Id: I80a0e58aa3711f309f58a504f6b6a06f6c546ea1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34568
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-03 18:10:39 +00:00
Ben Clayton f1f10e6571 Add src/traits.h
Contains some intimidating template magic for inferring the first parameter type of a function or function-like.

Will be used by the CloneContext for transforming the AST while cloning.

Bug: tint:390
Change-Id: I432059d13e65fa0f0f3e52588eb43abe9a4efadd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34566
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-03 17:14:29 +00:00
Ben Clayton 76d12f0f5a Add EmitVertexPointSizeTransform
EmitVertexPointSizeTransform is a Transformer that adds a PointSize builtin global output variable to the module which is assigned 1.0 as the new first statement for all vertex stage entry points.

If the module does not contain a vertex pipeline stage entry point then then this transformer is a no-op.

Bug: tint:321
Change-Id: I0e01236339d9fa1ceab3622af0931a1199c33b99
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34561
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-03 14:54:09 +00:00
dan sinclair b3becb2f25 Fixup gn check.
The new module clone tests require the WGSL reader and writer in order
to function. This Cl adds those dependencies to the BUILD.gn file.

Change-Id: I34cd9a7de13a99145bad1f559c23d181f4fb7739
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34683
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
2020-12-02 16:11:59 +00:00
dan sinclair f7e3bfc1a5 Fixup fuzzer name.
The AST clone fuzzer was accidentally named the same as the
SPIRV-Reader fuzzer. This Cl renames to fixup the conflict.

Change-Id: I757163718dc4e2097564427f4ac9f97a6cba9d55
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34680
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-02 15:23:28 +00:00
Ben Clayton ed2b97811e ast: Add Module.Clone()
Deep-clones all `Node`s and `Type`s into a new module.

Instead of writing a million standalone tests that'll only ever test the
existing fields of each type, I've opted to write the tests using
wgsl<->ast<->wgsl conversion. This means the tests require the enabling
of TINT_BUILD_WGSL_READER and TINT_BUILD_WGSL_WRITER, but I believe this
is much easier to maintain.

I'm aware there are probably gaps in the tests, and that even full
coverage is likely to rapidly rot, so I've also added
fuzzers/tint_ast_clone_fuzzer.cc - a fuzzer based test that ensures that
all AST modules can be cloned with identical reproduction.

I've run this across 100 cores of a 3990x for 4 hours, fixing the
single issue it detected.

Note: Expressions do not currently clone their `TypeManager` determined
types. This is for two reasons:
(a) This initial CL is mahoosive enough.
(b) I'm uncertain whether we actually want to clone this info, or to
    re-run the `TypeDeterminer` after each AST transform. Maybe it should
    be optional. Time will tell.

Fixed: tint:307
Change-Id: Id90fab06aaa740c805d12b66f3f11d1f452c6805
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33300
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-12-01 18:04:17 +00:00
Ben Clayton 95feb99a9d Add Castable template class
Implements `As<Blah>()` and `Is<Blah>()` automatically.

There are several benefits to using this over the pattern of hand-rolled `IsBlah()`, `AsBlah()` methods:
(1) We don't have to maintain a whole lot of hand written code.
(2) These allow us to cast from the base type to _any_ derived type in a single cast. The existing hand-rolled methods usually require a couple of intermediary casts to go from the base type to the leaf type.
(3) The use of a template parameter means these casts can be called from other template logic.

Note: Unlike the hand-rolled `AsBlah()` methods, it is safe to call `As<T>()` even if the type does not derive from `T`. If the object does not derive from `T` then  `As` will simply return `nullptr`. This allows the calling logic to replace the common pattern of:

```
if (obj.IsBlah()) {
   auto* b = obj.AsBlah();
   ...
}
```

with:

```
if (auto* b = obj.As<Blah>()) {
   ...
}
```

This halves the number of virtual method calls, and is one line shorter.

Change-Id: I4312e9831d7de6703a97184640864b8050a34177
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34260
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-11-30 22:50:25 +00:00
Ben Clayton 83b32455c2 writer/msl: Emit texture builtin functions
Bug: tint:145
Change-Id: I8a2d10c2e7239c81a11933c009d9175d4f4d8577
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33782
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-11-26 15:07:52 +00:00
Ben Clayton 41c8cd3e68 writer/hlsl: Move the coord/arrayidx packing to utility function
So we can also use this for the `spirv` backend

Bug: tint:146
Change-Id: I26f70125a5015946d2428a6e669da32bdea23bcd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33780
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
2020-11-26 13:57:32 +00:00
Ben Clayton 3e67c5dba6 Move type_manager to the ast dir/namespace
First step to moving this to the `ast::Module`.

Also remove a bunch of redundant includes to `type_manager.h` as this is already included in `context.h`

Bug: tint:307
Bug: tint:337
Change-Id: Ic4baffa7b76ddefa29f56f758c25b1003ef40888
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33665
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-11-23 19:30:55 +00:00
Kai Ninomiya 4c13659a2a Fix includes and BUILD.gn deps for gn check
Bug: tint:331
Change-Id: If1c1fa7495cf50f2456eb0b150c8b9a692dee12f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33620
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-11-20 20:17:24 +00:00
Ben Clayton 0f4632d0ae writer/hlsl: Emit texture builtin functions
Fixes: tint:146
Change-Id: I2a59fd369c767163ac1b72976883a577fd51a632
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33422
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-20 10:28:24 +00:00
Ben Clayton 2da833d815 writer: Simplify floats when printed
Add `tint::writer::FloatToString()`:

Converts the float `f` to a string using fixed-point notation (not scientific).
The float will be printed with the full precision required to describe the float.
All trailing `0`s will be omitted after the last non-zero fractional number,
unless the fractional is zero, in which case the number will end with `.0`.

Use this for the wgsl, msl and hlsl backends.

Change-Id: If5701136579e4398c31c673942f30e8877e9f813
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33421
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-11-20 10:04:44 +00:00
dan sinclair 7214f407dc [wgsl-reader] Add support for read only storage buffers.
This Cl adds the necessary infrastructure to parse the access decoration
for storage buffers.

This CL incorporates changes from bclayton@ from
https://dawn-review.googlesource.com/c/tint/+/33202 and
https://dawn-review.googlesource.com/c/tint/+/33201

Bug: tint:287
Change-Id: I7479f2cf7ab794b24c682b9927c4c68f6d325839
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33161
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
2020-11-19 18:55:01 +00:00
Ben Clayton f2bfeda1c4 writer/spriv: Move IntrinsicTextureTest to its own file
It's mahoosive, and will only get bigger.

Change-Id: I4593bd5ded9d67a8457676245189638874a8d5b3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33420
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-19 14:08:51 +00:00
Ben Clayton 3ea3c997b5 Implement textureSample builtins
Handle wsgl parsing and spirv writing of:
  textureSample(), textureSampleBias(), textureSampleLevel(),
  textureSampleGrad(), textureSampleCompare()

Handle the different signature for array texture types.
Includes offset overloads.

Change-Id: I6802d97cd9a7083f12439b32725b9a4b666b8c63
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32985
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-18 21:19:22 +00:00
David Neto bd7ab2cd5f spirv-reader: Add (handle) Usage abstraction
Bug: tint:109
Change-Id: I5cb8f35636c61cf2f837271a51c4753117b288be
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32387
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: David Neto <dneto@google.com>
2020-11-17 18:32:18 +00:00
David Neto cebde298f9 spirv-reader: add GetMemoryObjectDeclarationForHandle
Bug: tint:109
Change-Id: Ifb437ce9a39db7f92ca081e7ea551a576b0ecb2b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32740
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: David Neto <dneto@google.com>
2020-11-17 17:59:38 +00:00
Ben Clayton 10d5c6a6b6 ast: Have all tests derive from new TestHelper
It doesn't actually do anything (yet), but will hold the context and
a helper for constructing AST nodes.

Bug: tint:322
Change-Id: Ic7ba92bf39abf64ff2ac51d81c8a6338f5eff608
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32663
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-11-13 21:58:28 +00:00
dan sinclair 196e097730 Place the namer into the context object.
This CL moves the namer into the context object and makes it a parameter
to the various generators. The old constructor is maintained until we've
updated downstream repos.

Bug: tint:273
Change-Id: I49b2519c4250be21fb73374b16e7c702b727078f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32580
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-11-13 18:13:24 +00:00
dan sinclair 20a8d31849 Create an AST builder class.
This Cl adds an ast::Builder class which provides a series of helper
methods to make creating AST nodes simpler.

Change-Id: Ife57f27e598d575681f7192d65fab968191699b1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32560
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-11-12 19:49:10 +00:00
Ben Clayton af8091e353 wsgl parser: support multiple error messages
Use synchronization tokens to ensure the parser can resynchronize on error.

Bug: tint:282
Change-Id: I8bb033f8a723eb8f2bc029e1ffc8350174c964e2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32284
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-11 18:44:36 +00:00
dan sinclair 84f827506a [spirv-writer] Hash names
This Cl hashes the OpName, OpEntryPoint and OpMemberName strings so we
are no longer passing user provided strings through into the resulting
SPIR-V binary.

Bug: tint:273
Change-Id: I0ca2c65d0cd2800c54d867ab698c7751c341778c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32061
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-11-10 21:49:56 +00:00
Ben Clayton 0573714bfd wsgl parser: Have Expect & Maybe operator-> deref
For values of type T* and std::unique_ptr<T>.

This allows us to replace all occurances of `res.value->member` with: `res->member`, which also asserts that `res` is not in an error state.

Brings the verbosity back down to pre-expect and pre-maybe levels.

Bug: tint:282
Change-Id: Ib00018affca53ac5e71ee2140e7e0cd607b83715
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32141
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-09 20:44:34 +00:00
Sarah Mashayekhi 34f90a0097 [validation] make validator directory
Change-Id: Ia5caea84b48b37f0bee9582ee4c8514da4ee3978
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31981
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-11-06 17:31:15 +00:00
Ben Clayton 35298800a6 ast: Have all decorations derive from base class
This is the first step in unifying the way decorations are parsed - i.e. instead of parsing decorations in different ways based on the predicted grammar that follows, we can parse decorations blocks in a unified way, then later verify what we have is as expected.

`StructDecoration` has been transformed from an `enum class` to a proper class so it can derive from `Decoration`.

Bug: tint:282
Bug: tint:291
Change-Id: Iaf12d266068d03edf695acdf2cd21e6cc3ea8eb3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31663
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-11-03 21:40:20 +00:00
Ben Clayton 2e6cc992c8 Implement diagnostic color printing
For linux and windows consoles.

Still needs hooking up to `samples/main.cc`

Bug: tint:282
Change-Id: If8430572708ea7d8788ef05d5379886be89fcb17
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31564
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-11-02 19:26:28 +00:00
Ben Clayton f0740ae0f2 Add tint::diag namespace for diagnostics
Diagnostics will be used for printing parser / validator error mesasges.
Diagnostics are collected into a `diag::List`, and can then be formatted into a human readable message with `diag::Formatter`.

Bug: tint:282
Change-Id: I8bbef3db22b72d62cb9467c878d9a346890589ad
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31480
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-02 15:41:08 +00:00
Ben Clayton 5bee67fced Add File & Range information to tint::Source
This is the first step in improving the error messages produced while parsing.

The `line` and `column` information of `Source` has been moved to `Source::Location`.

`Source::Range` has been added that contains a `Location` interval - allowing error messages to highlight the full region of the error.

The `File` information provides an optional file path, and pre-splits the content into lines. These lines can be used to print the full line containing an error.

This CL contains a few temporary changes that help split up this work, and to ease integration with Tint.

Bug: tint:282
Change-Id: I7aa501b0a9631f286e8e93fd7396bdbe38175727
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31420
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-10-30 20:44:53 +00:00
dan sinclair c55fc39acb [ast] Unify the access control types.
This CL merges the StorageAccess enum with the AccessControl enum. The
enum is moved up to src/ast and placed in its own file for clarity.

Change-Id: I95a905a399b5d2e046ea1ea429b35f2064510c2d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31242
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-10-29 13:36:32 +00:00
Ben Clayton 4dd5665502 Add tests for all reachable parser errors
These are _mostly_ covered in the over various test files, but unlike those, these new tests always parse from the root translation unit.

These new tests also use a new testing class which may be extended to verify error output for different error styles (verbosity, colors, etc).

Change-Id: I105488f9b16d90279af4cc418a1c845b6e239e9e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31263
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-29 13:05:52 +00:00
dan sinclair bfd81096a5 [ast] Add AccessControlType.
This CL adds the AST for an AccessControlType. This type contains an
access control (ReadOnly, WriteOnly, or ReadWrite) along with another
type pointer.

Bug: tint:208 tint:108
Change-Id: I2eed03f8760239f7e71dc2edd4a19a7c1661746e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31060
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: David Neto <dneto@google.com>
2020-10-27 18:50:59 +00:00
Ryan Harrison 8904253837 Add getting constant ID information from Inspector
This also involves a reorganization of the code into its own
subdirectory.

BUG=tint:253

Change-Id: If05018da2662e923e659b485576704f3a6bcd062
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30340
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-16 02:26:54 +00:00
dan sinclair eb5d3e147d [wgsl-reader] Allow array decorations to have multiple blocks.
This CL updates the WGSL parser to allow array decorations to accept
multiple blocks. The stride decoration on arrays was turned into a
proper decoration object instead of just storing the stride directly.

Bug: tint:240
Change-Id: I6cdc7400d8847e3e043b846ea5c9f86cb795cf86
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29780
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 19:34:25 +00:00
Ryan Harrison 1a9a2dd07d Add Inspector class
This class is used to examine a module and get information about its
contents. This is the getting side of shader of reflection. Future
work will add transforms that perform the setting side of reflection.

In addition to the basic class and infrastructure, this CL adds a
GetEntryPoints() function demonstrate it works. More functionality
will be added in later CLs.

BUG=tint:257

Change-Id: If41dbb6c93302e0332754c086c75729d6ffe04d0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29320
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-05 14:52:36 +00:00
dan sinclair 5bb9b75684 [transform] Add a simple transform manager.
This CL holds a simpler manager to hold and execute multiple transforms.

Bug: tint:206
Change-Id: I45f6b55134f871167704f3549c4e4c72ef806c3a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29121
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-29 23:54:03 +00:00
dan sinclair 97b729de10 [transform] Add Transformer base class
This CL adds a Transformer base class from which the transformers will
inherit.

Bug: tint:206
Change-Id: I542eacb05d9a92af46d172a5803c245472c0e22c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29120
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 20:28:21 +00:00
dan sinclair b403cb50ab [transform] Add BufferArrayAccessors transform
This CL adds a buffer array accessor clamping transform to
the available transforms in Tint.

Bug: tint:101
Change-Id: If9d5b0fb2c3adba723ce2185870b0e10981103a6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28980
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 18:40:40 +00:00
dan sinclair 9e7f9dc96c [ast] Add constant_id decoration
This CL adds AST support for the constant_id decoration.

Bug: tint:150
Change-Id: Ifde5a5325f770567ea24129e786953d89f3f514b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 18:07:50 +00:00
dan sinclair 3c02592718 Remove cast operator.
This CL removes the cast operator and converts the tests over to using
type constructors.

Bug: tint:241
Change-Id: I2526acb61f5624b2e1c068612a2ddcc748c92aed
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28860
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 14:38:44 +00:00
dan sinclair 5c948e4f8f [transform] Move the transform folder
This CL moves the transform folder from src/ast to src/. The transforms
operate on the AST, but they aren't part of the AST so I think the top
level folder makes more sense.

This will possibly cause issues when rolling if the transform is being
used.

Change-Id: Ibd7c94474168a7a4bdf38321f4e12ad111c80323
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28941
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 14:30:34 +00:00
dan sinclair a7d498e060 Rename 'as' to 'bitcast'
This CL updates Tint to use 'bitcast' instead of 'as' for the OpBitcast
conversions.

Bug: tint:241
Change-Id: I53a80de10421b2d9cc009527eebe5ff07e1285c2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28801
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-22 22:07:13 +00:00
dan sinclair b4fee2f824 Update builtin methods.
This CL removes the import mechanism, the identifier paths and updates
all of the standard library methods to be builtins.

Bug: tint:242
Change-Id: If09b98a155ae49ced3986ba2c9b517a060693006
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28720
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-22 19:42:13 +00:00
dan sinclair 5f8126271d Remove EntryPoint.
This CL removes the EntryPoint node and transitions everything to the
stage decoration.

Change-Id: Ib2840155905c8fa60ff35870f0c4b6705efb73ff
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28705
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-22 14:53:03 +00:00
dan sinclair de2a019a7f [spirv-reader] Emit StageDecoration when building the functions
This CL adds the emission of StageDecoration to entry point functions.
EntryPoint nodes are still emitted. We duplicate the function emission
if there are multiple entry points pointing to the same function.

Change-Id: Icb48a063f5c6a30948bbe2c37c7fce7431af5864
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28665
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-22 14:22:12 +00:00
dan sinclair f91b9664e7 [hlsl-writer] Emit function decoration stage
This CL updates the hlsl writer to emit stage decorations.

Change-Id: Ic9ae9fbd47537f141949e27c876d37e6d4dcd97d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28704
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-22 13:47:32 +00:00
dan sinclair b5bb2d91af [msl-writer] Update to emit based on pipeline stage.
This CL updates the MSL writer to emit data base on the pipeline stage.

Change-Id: I9fb2e146f0c898d9703d69a6a92f535757106bba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28703
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-21 18:58:01 +00:00
dan sinclair a8274b2fef [spirv-writer] Emit entrypoint from function decoration.
This CL updates the SPIRV-Writer to emit entry point information based
on the function stage as well as EntryPoint nodes.

Change-Id: I1fa937cbb2159b31516b0189216d679e03f0384d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28702
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 18:49:01 +00:00
dan sinclair 767ea855ab [wgsl-reader] Parse stage decoration
This CL adds parsing of the stage decoration to the WGSL parser. The
decoration is not hooked up yet so it's effectively ignored.

Change-Id: I8d86c55cee189f993c10b6da31a9c388ba452021
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28664
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-21 17:42:10 +00:00
dan sinclair d05f93fd8e [wgsl-reader] Add workgroup_size parsing
This CL adds parsing of the `workgroup_size` function decoration.

Change-Id: Ia90efc2c014ac0e1614429280cc903d30cf8171d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28663
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-21 00:37:08 +00:00
dan sinclair 643827967e [ast][spirv-writer][hlsl-writer][wgsl-writer] Add workgroup_size decoration
This CL adds the workgroup_size decoration to functions and emits as
needed from the various backends.

Change-Id: Ifffde239e68047f6419c6980eca70c4efa9822c0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28662
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 00:28:58 +00:00
dan sinclair 636d588f6e [ast] Add decorations to functions.
This CL extends the function AST object to allow function decorations to
be attached.

Change-Id: I5b16aa2e6927792368b7f88047c0229e258b5bd3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28661
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 19:18:58 +00:00
dan sinclair d3f75ca0e8 Add support for multisampled textures.
This Cl adds the AST, WGSL-Reader and SPIRV-Writer support for the
`texture_multisampled_2d` type.

Bug: tint:237
Change-Id: Ib3eb831227b49f32162801f1e1b4e474774c78b3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28480
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-17 03:53:04 +00:00
Tomek Ponitka bcb6eb0830 [wgsl-reader] Parsing storage texture type
Bug: tint:147
Change-Id: I446786b529e777d709213e100e57cbae78ded75f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28122
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-08 16:48:09 +00:00
Tomek Ponitka 03f5e2fc9d [wgsl-reader] Parsing image storage type
Bug: tint:147
Change-Id: I79713b5dfa0a4b219cff7a6bb3c514557cf4f261
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28121
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-09-08 16:38:39 +00:00
Sarah Mashayekhi bab2a4dd96 [validation] Add disabled tests for validating switch statements
This CL adds 6 unit tests for validating switch statements.
v-switch01: switch statement selector expression must be of a scalar integer type
v-switch02: switch statement must have exactly one default clause
v-switch03: the case selector values must have the same type as the selector expression
v-switch04: a literal value must not appear more than once in the case selectors for a switch statement
v-switch05: a fallthrough statement must not appear as the last statement in last clause of a switch

Bug: tint: 6
Change-Id: I0283afec22e56097b6f63c8455da23b87dfe26dc
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27740
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-02 19:58:06 +00:00
Tomek Ponitka fd3ca9ee47 [wgsl-reader] Parsing sampled texture type
Bug: tint:147
Change-Id: I21c864dd63c2003797c78758358ab4134cd8ff31
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28002
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-02 15:52:15 +00:00
Tomek Ponitka 4beff41b7d [wgsl-reader] Parsing texture sampler types
Change-Id: I6a29d81deca40e89cf5b8ca95cf0373af3dd16b7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28005
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-02 14:16:35 +00:00
Tomek Ponitka cbd1ef8523 [wgsl-reader] Parsing depth texture type
Change-Id: Ie886c85db52b934331abe2d5675d9d0e6cdd7210
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28001
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-02 14:06:45 +00:00
Tomek Ponitka c354200889 [wgsl-reader] Parsing sampler type
Change-Id: I58a3218a5d0b7ccbe6422340c94cdf3dc1bdf17a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28000
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-02 13:26:15 +00:00
Ryan Harrison 464928ed91 Add missing include patch
This missing in Dawn was being shadowed by spvc also including it.

BUG=dawn:521

Change-Id: I609cfcca74821ad07c0fd9e6fadf2c22fba40df0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27901
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-01 21:29:06 +00:00
Tomek Ponitka 6803529d58 [spirv-writer] Convert ast image format types to spv
Change-Id: I987e729a607e69294c472b7667eae82c7339a0df
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27640
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-08-31 15:49:43 +00:00
dan sinclair 63b007d34f [hlsl-writer] Move test helper to a template.
This CL updates TestHelper to be a templated class and converts the test
suites into using statements based off that template.

Bug: tint:7
Change-Id: I747434e7c6a8ecae353df448f06153e982dcec44
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27500
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-26 20:02:26 +00:00
dan sinclair df503f0e85 [hlsl-writer] Refactor output emission.
This CL updates the HLSL backend to take the output stream as a
parameter. This is needed because there are cases where we have to
generate the resulting stream out of order. This will allow that to
happen.

Bug: tint:7
Change-Id: Id1877a07e536a84da0555f207d1030588d44c034
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27440
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-26 19:05:46 +00:00
Sarah Mashayekhi 3fad211a8f [validation] Add a validator test helper class
Change-Id: I12d225dbbda3ceffda6f0f0dbf264a6a6b249fb2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27284
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-08-25 14:06:05 +00:00
Tomek Ponitka 63a5aa7d58 [wgsl-reader] Adding for loops
Implementing ParserImpl::for_stmt(). Also adding
for_stmt and body_stmt to ParserImpl::statement().

Bug: tint:138
Change-Id: Idc3f901648ca115f4d94b3614a940263ef841282
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27261
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-08-24 18:22:22 +00:00
dan sinclair d38df397e3 [hlsl-writer] Add support for import statements.
This Cl adds support for imported methods to the HLSL backend.

Bug: tint:7
Change-Id: Ib906542915670dcc916d48d9e5d64d7032ba829a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26928
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-19 19:19:04 +00:00
dan sinclair a1087ee513 [hlsl-writer] Generate intrinsics.
This CL adds the beginning of intrinsic emission for the HLSL backend.
The `outer_product`, `is_normal` and `select` intrinsics are currently
missing.

Bug: tint:7
Change-Id: Ice7a2b285eeb52041e3accd9751e127d6c5a0177
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26927
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-19 19:17:54 +00:00
dan sinclair 3739a23f24 [hlsl-writer] Emit cast expressions.
This CL adds support for cast expressions to the HLSL backend.

Bug: tint:7
Change-Id: Ie7e180dc89abf137ab7d9b8790cc4206b3d5a672
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26926
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-19 19:14:44 +00:00
dan sinclair 10585f0ac3 [hlsl-writer] Add tests for entry point data.
This CL adds the missing tests for emission of Entry Point Data
structures.

Bug: tint:7
Change-Id: If21071b07584780243ccd0629a92efa653640251
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26925
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-19 19:04:54 +00:00
dan sinclair 6fdc77a966 [hlsl-writer] Emit module constants.
This CL adds emission of module constants to the HLSL backend.

Bug: tint:7
Change-Id: Iff07b0c0de7351f400dc35ca2ac07b44b22f8499
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26924
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-19 19:03:24 +00:00
dan sinclair 7df4a845d9 [hlsl-writer] Add CallExpression.
This Cl adds support for call expressions into the HLSL backend.

Bug: tint:7
Change-Id: Id07e3d95e745aa016a658c3ec5d099f74f21a80e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26781
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-08-19 17:44:45 +00:00
dan sinclair be89a06b03 [hlsl-writer] Add function handling.
This CL adds the beginning of function handling to the HLSL generator.

Bug: tint:7
Change-Id: Id40109c342e7a128b1fe79a0c50967e1dbd125eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26662
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-08-19 17:32:25 +00:00
Sarah Mashayekhi f16250b8ac [validation] Validates functions return statement
This CL adds a disabled test for validation rule v-0002: functions must
end with a return statement

Bug: Tint: 6
Change-Id: I127aa1bd7d236ff353fd89024b274c9f9b463f15
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26680
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-08-12 19:31:42 +00:00
Idan Raiter 63551e3b2f Add vertex pulling transform
Adds a first-pass version of vertex pulling. This is missing several important things such as buffer offsets, support for more types, and clamping.

Bug: dawn:480, tint:206
Change-Id: Ia8a3abc446bca4c5a40e064f85fb59de1c3f5af9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26260
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-08-12 17:23:58 +00:00
Ryan Harrison f18d737b4e Rolling 7 dependencies and fix BUILD.gn
Roll build/ 9b01e295f..6c915ac2a (140 commits)

9b01e295f8..6c915ac2af

$ git log 9b01e295f..6c915ac2a --date=short --no-merges --format='%ad %ae %s'
2020-08-04 chromium-autoroll Roll Fuchsia SDK from 0.20200803.3.1 to 0.20200804.1.1
2020-08-04 chromium-autoroll Roll Fuchsia SDK from 0.20200803.2.1 to 0.20200803.3.1
2020-08-04 brucedawson Fix gn gen after vcvarsall.bat
2020-08-03 hypan Revert "Reland "emulator: Disable the feature GLDMA.""
2020-08-03 chromium-autoroll Roll Fuchsia SDK from 0.20200803.1.1 to 0.20200803.2.1
2020-08-03 bpastene chromeos: Don't swallow test args when '--' is present.
2020-08-03 hans [build] Disable call-graph-profile-sort by default
2020-08-03 chromium-autoroll Roll Fuchsia SDK from 0.20200803.0.1 to 0.20200803.1.1
2020-08-03 chromium-autoroll Roll Fuchsia SDK from 0.20200802.3.1 to 0.20200803.0.1
2020-08-02 chromium-autoroll Roll Fuchsia SDK from 0.20200802.1.1 to 0.20200802.3.1
2020-08-02 chromium-autoroll Roll Fuchsia SDK from 0.20200802.0.1 to 0.20200802.1.1
2020-08-02 chromium-autoroll Roll Fuchsia SDK from 0.20200801.3.1 to 0.20200802.0.1
2020-08-02 chromium-autoroll Roll Fuchsia SDK from 0.20200801.2.1 to 0.20200801.3.1
2020-08-01 chromium-autoroll Roll Fuchsia SDK from 0.20200801.1.1 to 0.20200801.2.1
2020-08-01 chromium-autoroll Roll Fuchsia SDK from 0.20200731.4.1 to 0.20200801.1.1
2020-08-01 chromium-autoroll Roll Fuchsia SDK from 0.20200731.2.1 to 0.20200731.4.1
2020-08-01 steveroe Log system statistics at beginning and end of emulator session.
2020-08-01 steveroe Fix fuchsia test runner_logs.py directory creation and error format bugs.
2020-07-31 avi Finish conversion to OS_MAC/OS_APPLE
2020-07-31 liaoyuke [lacros] Further increase timeout waiting for ash-chrome
2020-07-31 chromium-autoroll Roll Fuchsia SDK from 0.20200731.1.1 to 0.20200731.2.1
2020-07-31 hypan emulator: Add ram_size to avd.proto
2020-07-31 hans Build with -Wl,--no-call-graph-profile-sort on Android
2020-07-31 chromium-autoroll Roll Fuchsia SDK from 0.20200730.3.1 to 0.20200731.1.1
2020-07-31 smcallis Rewrite is_linux flag for base and build components.
2020-07-31 chromium-autoroll Roll Fuchsia SDK from 0.20200730.2.1 to 0.20200730.3.1
2020-07-31 hypan emulator: Add advanced_features to avd.proto
2020-07-31 ntfschr Permit bundletool to emit stderr
2020-07-30 chouinard Remove unneccessary UnusedResources suppressions
2020-07-30 liaoyuke [lacros] Increase timeout waiting for ash-chrome
2020-07-30 chromium-autoroll Roll Fuchsia SDK from 0.20200730.1.1 to 0.20200730.2.1
2020-07-30 wnwen Android: Removing baseline.xml regenerates it
2020-07-30 torne Remove obsolete build constant.
2020-07-30 bjoyce Fix Jacoco Report exclusion variable.
2020-07-30 agrieve android: Make treat_warnings_as_errors=false work for enable_jdk_library_desugaring
2020-07-30 chromium-autoroll Roll Fuchsia SDK from 0.20200730.0.1 to 0.20200730.1.1
2020-07-30 chromium-autoroll Roll Fuchsia SDK from 0.20200729.3.1 to 0.20200730.0.1
2020-07-29 chromium-autoroll Roll Fuchsia SDK from 0.20200729.1.1 to 0.20200729.3.1
2020-07-29 steveroe Fix typo in comment.
2020-07-29 agrieve Android: Make manifest expectations a bit more diff-friendly
2020-07-29 hans Roll clang n359864-04b9a46c-1 : n361601-7e8d5a90-1.
2020-07-29 avi Migrate to OS_MAC and OS_APPLE in build
2020-07-29 liaoyuke [lacros] Run Lacros test targets with ash_chrome if needed
2020-07-29 wnwen Android: Use a unified lint target
2020-07-29 chromium-autoroll Roll Fuchsia SDK from 0.20200729.0.1 to 0.20200729.1.1
2020-07-29 chromium-autoroll Roll Fuchsia SDK from 0.20200728.3.1 to 0.20200729.0.1
2020-07-29 huangdarwin ChromeOS: Expand build flag comment.
2020-07-29 chromium-autoroll Roll Fuchsia SDK from 0.20200728.1.1 to 0.20200728.3.1
2020-07-28 mheikal Allow material design to be pulled from outside of android_deps
2020-07-28 bjoyce Run host and device code coverage separately.
(...)
2020-07-22 liaoyuke [lacros] Run tests with ash-chrome
2020-07-22 sokcevic Add missing commit change footer
2020-07-22 wnwen Android: Add comments for lint
2020-07-22 chromium-autoroll Roll Fuchsia SDK from 0.20200721.3.1 to 0.20200722.0.1
2020-07-22 chromium-autoroll Roll Fuchsia SDK from 0.20200721.2.1 to 0.20200721.3.1
2020-07-22 hypan android: Update the css/javascript for test_results_presentation.py
2020-07-22 bjoyce Only use device__jacoco_source files.
2020-07-22 liaoyuke [lacros] Download and isolate ash-chrome on bots
2020-07-21 ntfschr [AW][Dev-UI] fix lint issues
2020-07-21 ntfschr Android: expose CommandLine java methods
2020-07-21 agrieve Allow anyone to modify //build/android/lint/baseline.xml
2020-07-21 wfh Allow CFG guards to be generated with gn config.
2020-07-21 ntfschr AW docs: update references to go/clank-webview
2020-07-21 sebmarchand Few fixes for PGO on Linux
2020-07-21 chromium-autoroll Roll Fuchsia SDK from 0.20200721.1.1 to 0.20200721.2.1
2020-07-21 agrieve Reland #2 of "Android: Updates to warnings-as-errors when building"
2020-07-21 tmartino Revert #2 of "Android: Updates to warnings-as-errors when building"
2020-07-21 brucedawson Fix vs_toolchain.py for Python 3
2020-07-21 mheikal Fix build issues with creating R.java in java_library targets (Reland)
2020-07-21 agrieve Reland "Android: Updates to warnings-as-errors when building"
2020-07-21 chromium-autoroll Roll Fuchsia SDK from 0.20200720.3.1 to 0.20200721.1.1
2020-07-21 andruud Revert "Android: Updates to warnings-as-errors when building"
2020-07-21 chromium-autoroll Roll Fuchsia SDK from 0.20200720.2.2 to 0.20200720.3.1
2020-07-21 agrieve Android: Updates to warnings-as-errors when building
2020-07-21 wnwen Android: Fix lint and add baseline
2020-07-20 etiennep Reland "[Clank SSM]: Enable stack sampling in android browsertests."
2020-07-20 Richard.Townsend Fix MIDL cross-compilation for ARM64 Win32 targets
2020-07-20 chromium-autoroll Roll Fuchsia SDK from 0.20200720.1.1 to 0.20200720.2.2
2020-07-20 torne Try to fix ProcessSkiaGoldRenderTestResults.
2020-07-20 bpastene chromeos: Flash the right type of DUT image based on chrome-branding.
2020-07-20 wnwen Android: Add direct deps for chrome/browser
2020-07-20 treib Remove various references to third_party/cacheinvalidation
2020-07-20 agrieve Silence build logs about d8's desugaring
2020-07-20 agrieve Android: Suppress unused resource warning for *_expand_*
2020-07-20 chromium-autoroll Roll Fuchsia SDK from 0.20200719.3.1 to 0.20200720.1.1
2020-07-20 chromium-autoroll Roll Fuchsia SDK from 0.20200718.1.1 to 0.20200719.3.1
2020-07-19 chromium-autoroll Roll Fuchsia SDK from 0.20200717.3.1 to 0.20200718.1.1
2020-07-18 chromium-autoroll Roll Fuchsia SDK from 0.20200717.2.1 to 0.20200717.3.1
2020-07-18 liaoyuke [lacros] Make test runner differentiate different test targets
2020-07-18 mheikal Revert "Fix build issues with creating R.java in java_library targets"
2020-07-17 mheikal Fix build issues with creating R.java in java_library targets
2020-07-17 bjoyce Run jacoco on host jar files.
2020-07-17 chromium-autoroll Roll Fuchsia SDK from 0.20200717.1.1 to 0.20200717.2.1
2020-07-17 bpastene Reland "Simplify Simple Chrome's gclient and GN conditionals."
2020-07-17 chouinard Remove unnecessary UnusedResources suppressions
2020-07-17 liaoyuke [lacros] Remove unused ash-chrome versions
2020-07-17 wfh Re-enable CFG loader config in component builds.
2020-07-17 oysteine Revert "[Clank SSM]: Enable stack sampling in android browsertests."
2020-07-17 etiennep [Clank SSM]: Enable stack sampling in android browsertests.
2020-07-17 sdefresne [ios] Assert that Xcode version is recent enough

Roll buildtools/ eb3987ec7..613921787 (3 commits)

eb3987ec70..6139217878

$ git log eb3987ec7..613921787 --date=short --no-merges --format='%ad %ae %s'
2020-08-03 tikuta sort buildtools/.gitignore
2020-07-31 smcallis Rewrite is_linux flag for base and build components.
2020-07-20 sdefresne Roll GN from d585128c..3028c6a4

Roll testing/ cadd4e1eb..dc9b1969e (124 commits)

cadd4e1eb3..dc9b1969e7

$ git log cadd4e1eb..dc9b1969e --date=short --no-merges --format='%ad %ae %s'
2020-08-04 sinhak Revert "Bring parity between mac coverage and non-coverage build"
2020-08-04 mcdermottm Enable MediaApp in fieldtrial_testing_config.json.
2020-08-03 drubery Add fieldtrial_testing_config for CSD vision model
2020-08-03 pasthana Bring parity between mac coverage and non-coverage build
2020-08-03 svenzheng [lacros] LUCI config for linux-lacros-builder-rel and linux-lacros-tester-rel
2020-08-03 skare Remove "DesktopStudy" suffix from QRCodeGenerator study to match gcl.
2020-08-03 bpastene chromeos: Don't swallow test args when '--' is present.
2020-08-03 mohsen Remove stale field trial testing configs
2020-08-03 dtrainor Add support for reengagement notification
2020-08-03 rmcilroy [Perf] Move android-pixel2-perf bot to 64-bits.
2020-08-03 martiniss Remove production freeze
2020-08-03 seblalancette [iOS] Cleanup Bling QR Code Generation Flag
2020-08-03 ianstruiksma Add target to blink_web_tests for Win10 x64 1909 builder
2020-08-03 talp Create field trial testing config for Per-agent Scheduling experiment.
2020-07-31 mpdenton Add CertVerifierService to field trial testing config.
2020-07-31 isamsonov Remove mac10.13_retina-blink-rel's configurations.
2020-07-31 behdadb Removed Experimental tag from representaives
2020-07-31 liviutinta Enable Field Trial for Browser Verified Mouse User Activation Trigger
2020-07-31 mattm Reland: Add CertVerifierBuiltin fieldtrial_testing_config for mac.
2020-07-31 liviutinta Enable Field Trial for Browser Verified Keyboard User Activation Trigger
2020-07-30 lindsayw [ios] Add missing 2nd generation identifier
2020-07-30 smcallis Rewrite is_linux flag for sandbox, servicse, ski and testing directories.
2020-07-30 jdeblasio [MIX-DL] Update field testing config for M84 stable launch.
2020-07-30 wenbinzhang [benchmarking] stop running ref build for android-pixel2
2020-07-30 lindsayw [ios] Update the iPad Pro naming to include 2nd gen.
2020-07-30 lindsayw [mac]Roll osxbeta to macOS 11.0
2020-07-30 skare Add field trial testing config for desktop QR code generator.
2020-07-30 justincohen Revert "[iOS] Add fieldtrial config for IOSRequestDesktopByDefault"
2020-07-30 collinbaker Include in-product help in DesktopTabGroups default field trial
2020-07-29 svenzheng [lacros] LUCI config for linux-ash-chromium-builder-fyi-rel
2020-07-29 pbos Add UseTextForUpdateButton to fieldtrial test config
2020-07-29 zhaoyangli [iOS][infra] Roll iOS13 builders & tests to Xcode 11e708
2020-07-29 hypan emulator: Disable flaky tests in weblayer_browsertests on MM
2020-07-29 ynovikov Shard SwANGLE angle_deqp_egl_tests
2020-07-29 avi Migrate to OS_MAC and OS_APPLE in testing
2020-07-29 svenzheng [lacros] LUCI rename fyi linux-lacros-builder-rel and linux-lacros-tester-rel
2020-07-29 michaeldo Revert "Roll bots to Xcode 12 beta 3"
2020-07-29 rmhasan weblayer, skew tests: Put Weblayer job configurations in variants.pyl
2020-07-29 mvanouwerkerk Remove Shared Clipboard WebRTC from testing config.
2020-07-29 liaoyuke [lacros] Run Lacros test targets with ash_chrome if needed
2020-07-29 bpastene Revert "Remove telemetry_unittests from the CrOS VM CQ bot."
2020-07-29 asanka [privacy_budget] Enable study for waterfall testing.
2020-07-29 wez [base] Add DisableOffSequenceTaskCancelation fieldtrial test config.
2020-07-29 gambard [iOS] Add fieldtrial config for IOSRequestDesktopByDefault
2020-07-29 alanlxl Add fieldtrial config for SmartDimNewMlAgent
2020-07-29 rushans Add SyncReuploadBookmarkFullTitles experiment to field trial testing config.
2020-07-29 jwata Revert "[mac-rel-swarming] add arm-64 Mac to the target bots"
2020-07-29 kimstephanie Remove chrome_public_test_apk temporarily from android-pie-arm64-rel
2020-07-28 jwata [mac-rel-swarming] add arm-64 Mac to the target bots
2020-07-28 dproy tools/perf: Add system_health.common benchmark with TBMv3 to FYI bots
(...)
2020-07-27 jonross Disable angle_white_box_tests on Linux FYI Release (AMD R7 240) This test suite has been failing consistently for 11 days.
2020-07-27 sdefresne [apple] Add a `is_apple` gn variable and use it
2020-07-27 rsorokin [Sheriff] Disable */PlatformKeysServicePerUnavailableTokenBrowserTest.GenerateRsa/0
2020-07-26 liaoyuke Add xvfb.py as a data deps
2020-07-26 gangwu add field trial config for Omnibox tab switch suggestions
2020-07-25 svenzheng Disable BookmarkBubbleViewBrowserTest.InvokeUi_bookmark_details_signed_in
2020-07-25 gbeaty Revert "Remove GPU's Linux tests from the CQ."
2020-07-25 thestig Add SaveEditedPDFForm experiment to field trial testing config.
2020-07-25 behdadb Failure invalidation of rep_perf tests should show green status
2020-07-24 gbeaty Revert "Remove gl_tests_passthrough and gl_tests_validating from the Linux builders"
2020-07-23 hypan Remove gl_tests_passthrough and gl_tests_validating from the Linux builders
2020-07-23 jonross Revert "Re-add field trial testing config for DisableLatencyRecoveryDesktop"
2020-07-23 hypan Remove GPU's Linux tests from the CQ.
2020-07-23 fdoray [blink scheduler] Enable intensive wake up throttling in testing config.
2020-07-23 hypan android: Add test configs for android-nougat-arm64-rel
2020-07-23 kelvinjiang Revert "Add CertVerifierBuiltin fieldtrial_testing_config for mac."
2020-07-22 ianstruiksma Add luci and test configurations for Win10 x64 Tests 1909.
2020-07-22 gab [base] Enable PM_QS_ALLEVENTS in ProcessPumpReplacementMessage by default
2020-07-22 wylieb Update fieldtrial testing config for Assistant voice search
2020-07-22 ynovikov Revert "Explicitly name webgl/2 conformance tests on Windows"
2020-07-22 mattm Add CertVerifierBuiltin fieldtrial_testing_config for mac.
2020-07-22 jonahr Explicitly name webgl/2 conformance tests on Windows
2020-07-22 bpastene Move perf-fyi's CrOS tester to standard test pool.
2020-07-22 bttk ADCP: Add Field Trial config
2020-07-22 jdapena GCC: in perf result reporter, fix kInvalidCharacters initialization.
2020-07-22 pkotwicz Add compile target for errorprone plugin tests
2020-07-22 jds Adding a field trial config for the context menu performance hints experiment.
2020-07-22 natlee Add --use-gpu-in-tests flag to webgpu blink web tests.
2020-07-22 bpastene Move all CrOS HW tests to standard test pools.
2020-07-22 chriscycheng Adding 'android_lollipop_marshmallow_coverage_gtests'
2020-07-22 liaoyuke [lacros] Download and isolate ash-chrome on bots
2020-07-21 gbeaty Temporarily disable chrome_public_test_apk on android-pie-arm64-rel.
2020-07-21 gatong Infra: Moving mac-arm64 builder from FYI to being part of mac waterfall
2020-07-21 mohsen Re-add field trial testing config for DisableLatencyRecoveryDesktop
2020-07-21 wfh Allow CFG guards to be generated with gn config.
2020-07-21 svenzheng Mark some test suites as experimental
2020-07-21 sreejakshetty Filter out new content_browsertest failure with BackForwardCache
2020-07-21 ewannpv PageInfoRefactoring to Field Trial Testing Configuration
2020-07-21 rakina Check for bfcache flags on places where we check for Proactive BI swap
2020-07-21 hypan emulator: Have the android-marshmallow-x86-rel run on 4-cores GCE bots
2020-07-20 bpastene Enable pre-test flashing for all CrOS HW tests.
2020-07-20 mthiesse Migrate Omnibox native java unittests to batched Instrumentation tests
2020-07-20 bpastene Decrease primary task slice expiration from 10m to 5m for CrOS HW tests.
2020-07-20 alcooper Reland "Update vr_pixeltests exceptions"
2020-07-20 aboxhall Revert "Update vr_pixeltests exceptions"
2020-07-20 xiaochengh Enable FontPreloadingDelaysRendering by default on trunk
2020-07-18 liaoyuke [lacros] Make linux-lacros-tester-rel Run all targets
2020-07-17 alcooper Update vr_pixeltests exceptions
2020-07-17 liaoyuke Fix win coverage config - part 3
2020-07-17 wanderview Update CacheStorageSequenceChromeOS fieldtrial testing config.

Roll third_party/googletest/ a781fe29b..e6e2d3b76 (5 commits)

a781fe29bc..e6e2d3b761

$ git log a781fe29b..e6e2d3b76 --date=short --no-merges --format='%ad %ae %s'
2020-07-28 absl-team Googletest export
2020-07-28 absl-team Googletest export
2020-07-26 ofats Googletest export
2020-07-19 jasjuang fix clang tidy modernize-use-equals-default warnings
2020-07-02 siliconearth Fix test failing when simple regex is used

Roll third_party/spirv-headers/ 308bd0742..3fdabd0da (6 commits)

308bd07424..3fdabd0da2

$ git log 308bd0742..3fdabd0da --date=short --no-merges --format='%ad %ae %s'
2020-08-03 44190824+mmerecki Reserve SPIR-V token range for upcoming Intel extensions. (#165)
2020-07-29 alanbaker Update BUILD.bazel and BUILD.gn (#166)
2020-07-29 alanbaker Publish the headers for the clspv embedded reflection non-semantic extended instruction set (#164)
2020-07-29 johnkslang Update the registry in spir-v.xml to modernize and split out opcodes. (#156)
2020-07-21 alanbaker Support SPV_KHR_terminate_invocation (#163)
2020-07-19 vkushwaha Add changes for SPV_EXT_shader_atomic_float

Roll third_party/spirv-tools/ 717e7877c..d9c73ebd9 (52 commits)

717e7877ca..d9c73ebd9e

$ git log 717e7877c..d9c73ebd9 --date=short --no-merges --format='%ad %ae %s'
2020-08-04 vasniktel spirv-fuzz: Handle capabilities during module donation (#3651)
2020-08-04 vasniktel spirv-fuzz: Refactor boilerplate in TransformationAddParameter (#3625)
2020-08-03 vasniktel spirv-fuzz: TransformationMoveInstructionDown (#3477)
2020-07-31 jaebaek Remove DebugDeclare only for target variables in ssa-rewrite (#3511)
2020-07-31 vasniktel Fix typo in ASAN CI build (#3623)
2020-07-30 stefanomil spirv-fuzz: Transformation to add loop preheader (#3599)
2020-07-30 stefanomil spirv-fuzz: Pass to replace int operands with ints of opposite signedness (#3612)
2020-07-30 jaebaek Debug info preservation in loop-unroll pass (#3548)
2020-07-30 alanbaker Validator support for non-semantic clspv reflection (#3618)
2020-07-30 vasniktel spirv-fuzz: Fix memory bugs (#3622)
2020-07-29 andreperezmaselco.developer spirv-fuzz: Implement the OpOuterProduct linear algebra case (#3617)
2020-07-30 vasniktel spirv-fuzz: Compute corollary facts from OpBitcast (#3538)
2020-07-29 dj2 Update some language usage. (#3611)
2020-07-29 vasniktel spirv-fuzz: Relax type constraints in DataSynonym facts (#3602)
2020-07-29 vasniktel spirv-fuzz: Remove non-deterministic behaviour (#3608)
2020-07-29 afdx Avoid use of 'sanity' and 'sanity check' in the code base (#3585)
2020-07-27 andreperezmaselco.developer spirv-fuzz: Add condition to make functions livesafe (#3587)
2020-07-27 rharrison Rolling 4 dependencies (#3601)
2020-07-27 andreperezmaselco.developer spirv-fuzz: Implement the OpTranspose linear algebra case (#3589)
2020-07-27 rdb Fix SyntaxWarning in Python 3.8 (#3388)
2020-07-27 bclayton CMake: Enable building with BUILD_SHARED_LIBS=1 (#3490)
2020-07-27 dneto Avoid operand type range checks (#3379)
2020-07-27 jaebaek Preserve debug info in scalar replacement pass (#3461)
2020-07-27 pierremoreau Update OpenCL capabilities validation (#3149)
2020-07-27 stevenperron build(deps): bump lodash from 4.17.15 to 4.17.19 in /tools/sva (#3596)
2020-07-27 antonikarp spirv-fuzz: adds TransformationReplaceLoadStoreWithCopyMemory (#3586)
2020-07-27 jaebaek Preserve OpenCL.DebugInfo.100 through private-to-local pass (#3571)
2020-07-27 stefanomil spirv-fuzz: Relax type checking for int contants (#3573)
2020-07-27 stefanomil spirv-fuzz: Generalise transformation access chain (#3546)
2020-07-27 stefanomil spirv-fuzz: Split blocks starting with OpPhi before trying to outline (#3581)
2020-07-27 afdx spirv-fuzz: Set message consumer in replayer when shrinking (#3591)
2020-07-24 vasniktel spirv-fuzz: Don't use default parameters (#3583)
2020-07-23 rharrison Change DEPS rolling script to point at external/ (#3584)
2020-07-23 vasniktel spirv-fuzz: Create a helper in fuzzerutil to reuse function type (#3572)
2020-07-23 vasniktel spirv-fuzz: Test usages of IdIsIrrelevant fact (#3578)
2020-07-23 antonikarp spirv-fuzz: adds TransformationReplaceCopyMemoryWithLoadStore (#3575)
2020-07-23 antonikarp spirv-fuzz: adds TransformationReplaceCopyObjectWithStoreLoad (#3567)
2020-07-22 stevenperron Start SPIRV-Tools v2020.5
2020-07-22 stevenperron Finalize SPIRV-Tools v2020.4
2020-07-22 vasniktel spirv-fuzz: Fix usages of irrelevant constants (#3566)
2020-07-22 stevenperron Update CHANGES
2020-07-22 alanbaker Support SPV_KHR_terminate_invocation (#3568)
2020-07-22 stevenperron Sink pointer instructions in merge return (#3569)
2020-07-21 greg Preserve OpenCL.DebugInfo.100 through elim-dead-code-aggressive (#3542)
2020-07-21 vasniktel spirv-fuzz: TransformationReplaceParamsWithStruct (#3455)
2020-07-21 38144211+vkushwaha-nv Add changes for SPV_EXT_shader_atomic_float (#3562)
2020-07-21 vasniktel spirv-fuzz: Use irrelevant constants (#3565)
2020-07-21 stefanomil spirv-fuzz: Extend TransformationRecordSynonymousConstants to allow composite constants (#3537)
2020-07-21 vasniktel spirv-fuzz: Add is_irrelevant parameter (#3563)
2020-07-20 vasniktel spirv-fuzz: Add IdIsIrrelevant fact (#3561)
2020-07-20 stefanomil spirv-fuzz: refactor to use RemoveAtRandomIndex (#3560)
2020-07-20 antonikarp spirv-fuzz: add TransformationAddRelaxedDecoration (#3545)

Roll tools/clang/ 6412135b3..1078c4141 (5 commits)

6412135b39..1078c4141a

$ git log 6412135b3..1078c4141 --date=short --no-merges --format='%ad %ae %s'
2020-08-02 thakis Roll clang n361601-7e8d5a90-1 : n362116-1bd7046e-2.
2020-08-01 lukasza Skip `ExprWithCleanup` AST node via `ignoringImplicit` AST matcher.
2020-07-29 hans Roll clang n359864-04b9a46c-1 : n361601-7e8d5a90-1.
2020-07-22 aeubanks Clang build.py: Open instrumented temp file as binary
2020-07-22 aeubanks Allow building Clang with ThinLTO

Created with:
  roll-dep build buildtools testing third_party/googletest third_party/gpuweb-cts third_party/spirv-headers third_party/spirv-tools tools/clang

Change-Id: I841ccb15000269ca48d09ac550bc36a06c2b354a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26280
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-08-04 17:56:27 +00:00
dan sinclair 3125a8d73f [ast] Add texture types to the AST.
This CL adds the texture types into the AST.

Bug: tint:141
Change-Id: I8e95aa23849af737e63d9cacc8c57f23aedec73d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26123
Reviewed-by: David Neto <dneto@google.com>
2020-07-30 23:26:28 +00:00
dan sinclair fe8c59ace9 Add SamplerType to AST.
This CL adds the sampler type into the AST.

Bug: tint:141
Change-Id: Id2f7678a2df677cb7dae47f05543c1e0a1999eed
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26080
Reviewed-by: David Neto <dneto@google.com>
2020-07-30 22:27:25 +00:00
dan sinclair 8278f2c6f0 [hlsl-writer] Add loop support.
This CL adds support for the LoopStatement emission in HLSL.

Bug: tint:7
Change-Id: Ie42b24abff3a69c9cbfe3d3c8ab6fb9b1823e61d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25849
Reviewed-by: David Neto <dneto@google.com>
2020-07-30 22:27:09 +00:00
dan sinclair 97bc4ad8d6 [hlsl-writer] Add if/else statements.
This CL adds if/else statement emission to the HLSL writer.

Bug: tint:7
Change-Id: Idd6e6d8c329ed270676fa0276474a68c715dd9eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25847
Reviewed-by: David Neto <dneto@google.com>
2020-07-30 22:26:55 +00:00
dan sinclair cbe0668f9b [hlsl-writer] Emit variable declarations.
This CL adds variable declarations to the HLSL backend.

Bug: tint:7
Change-Id: I5c1e42ca26029f1595bf4f23b3b867a492ddacc1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25846
Reviewed-by: David Neto <dneto@google.com>
2020-07-30 22:26:46 +00:00