The headers have changed.
Change-Id: I45046ceb05d205015c3b462136ecf10c0057162e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97147
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Rename to 'gen', so that more templating can be added without having a confusing name.
Can now be run with './tools/run gen'
Move the bulk of the intrinsic-gen logic to `tools/src/tint/intrinsic`
Change-Id: I750989a5aa86272c10c2ad37adffe7def11c61f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97141
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
When the `next` token is requested, if we're already at EOF or Error
we can just return that token and stay at that index.
Bug: crbug:1347298
Change-Id: I1c31cf32a7030166c174d336455c7adabf97c6c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97220
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Replace the temporary file name with 'shader.hlsl', so that
skip-expectations can be stably re-generated.
Change-Id: I5ead2235e6e0d84ad67c8d90f8d06b812c8fd593
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97145
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Unlike on Windows, where command line argument splitting is done by the
callee, on 'nix systems, the arguments need to be split by the caller.
Fixes issues where validation was different on windows to other
operating systems.
Change-Id: If55738c431586f706e3edf0ac683661f34b53391
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97144
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Use the new vector type in some of the hot code paths of the resolver.
Bug: tint:1613
Change-Id: Ie56d8c96f73c9112f37934ad67e588513aafb982
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96282
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This CL removes the copies of the `Source` and, in some cases, the token
name in the parser implementation.
Change-Id: I91c0797244a19fa5a36d39029d02823a20cee0cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97072
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
* Added a class template argument deduction guide (CTAD) to infer the
`T` and `N` template arguments. This lets you write `Vector{1,2,3}`
instead of `Vector<int, 3>{1,2,3}`. This is important as a mismatch
between the number of constructor arguments and the `N` template
argument can cause silent heap allocations, which we're trying to
avoid. The `T` deduction uses the same smarts as the return-type
deduction of `Switch()`, so:
* `Vector{1, 2.0}` would construct a `Vector<double, 2>`
* `Vector{i32, u32}` would construct a `Vector<const sem::Type*, 2>`
* Removed the Vector(size_t) and Vector(size_t, const T&) constructors.
This is a move away from the std::vector style API, but these are
rarely more efficient than calling Reserve() and Push(), as you remove
the redundant initialization. The main reason for doing this is to
remove ambiguity between `Vector{1}` and `Vector(1)`.
* Added support for covariance conversion
(`Vector<Derived*, N>` -> `Vector<Base*, N>`).
Only supports pointers to `Castable`, as this can only safely work
with single-inheritance.
* Added support for conversion of `Vector<T*, N>` -> `Vector<const T*, N>`.
This will remove pointless vector copies from the sem package.
Bug: tint:1613
Change-Id: I79b9f82d623f90afa14f8ba1613ee49cccceafeb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97020
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL updates the parser and lexer to pre-parse the token list and
then the parser works off the list of tokens. This allows the parser to
work with references to the tokens and not have to worry about them
going stale.
For any splittable token a placeholder token is injected after the
token. If the token ends up getting split the placeholder is overwritten
with the new type.
Change-Id: I5a8ccca15d8c14b5027df7dd2734be6753e46fa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97070
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL updates match to compare against characters instead of strings.
If the prefix character doesn't match we stop checking for any
punctuation which starts with that character.
Change-Id: Ifddc1ff3f3936ab3a53c37e080394ed35dc2aecf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97065
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL expands the ASCII short circuit to add the number range and _
into IsXIDContinue.
IsXIDStart is updated to filter out anything less then the first
sequence after the (a-zA-Z) blocks as they won't be XIDStart but do cover
all of the common ASCII punctuation characters.
Change-Id: Ib839d9840f5a1ecc3d2e80774b11af2444e9f439
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97071
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This patch fix a nullptr dereference case in Validator::BuiltinCall,
which check if a no-return-value built-in is called in something other
than call statement. Such call may don't have a statement context at all.
Bug: chromium:1346830
Change-Id: Ieef02daa5c93a3ac253cd7a7366a53e0fc7887b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96986
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
We saved the string in the lexer try_float for use in error messages,
then changed the message to not show the string. This CL removes the
creation of the float string.
Change-Id: I9bb381bebe31f25609c66d5ccda91de0277199cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97069
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Our common case is ASCII characters but, because those come at the start
of the XID Start range they'll end up being checked _last_ as we binary
search through the range. This means we're getting the worst case
behaviour for our common character.
This CL adds a quick check for [a-zA-Z] at the start of IsXIDStart to
quickly determine if we're an ascii character.
Change-Id: Iae733b0e8a64c855764cf58c0563a407e6a81f7d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97068
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This VVL check seems either impossible to satisfy, or difficult due to
underspecification of the error in the Vulkan spec.
Bug: angleproject:7513
Change-Id: I82873fb41aa7f03413114ed6672ba2bebd98f009
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96982
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Also parallelize some of the more lengthy file generation steps
Bug: dawn:1479
Change-Id: I7674fca4958e4d9948e287008916c4b0d33e1ca1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97022
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Change tint's `--fxc` flag to take the path of the FXC compiler DLL.
Have tint attempt to validate with both FXC and DXC if `--validate` is
passed.
Fix the 'dirsWithNoPassExpectations' logic which looks like it got
broken with the tint -> dawn merge. It also incorrectly applied
filepath.FromSlash() on windows.
Change-Id: I0f46aa5c21bc48a2abc48402c41f846aff4a8633
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96800
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This Cl remoevs the address space names from the keyword list and
makes their parsing context dependant. The mechanism in the parser
is the same, we just change to looking for an `ident` in
`expect_address_space`.
`storage_buffer` is kept for now, this keeps the functionality the same.
Bug: tint:1621
Change-Id: I928a5472d8ac194b2bef2da56a224e9f4abb65a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96905
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
The spec talks about initializers for `var`, `const` and `let`
constructs. The parser was emitting `constructor`. This CL updates
the terminology to match the spec in order to make searching for
answers easier.
Bug: tint:1600
Change-Id: Ic135856ba9afbfd2580b648d8f2e402059bac8be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96906
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL renames paren_rhs_stmt to match the new spec name of
paren_expression.
Bug: tint:891
Change-Id: I040137d8264916ce2fecce90edad97f622be354d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96940
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds a SubstituteOverride transform which will convert
an `override` into a `const`. The transform is provided a map of
(string, double) which matches what the WebGPU API accepts as
data for overrides.
Bug: tint:1582
Change-Id: I6e6bf51b98ce4d4746f8de55128666c36735e585
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96760
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Update:
- expectations.txt
- ts_sources.txt
- resource_files.txt
- webtest .html files
a41bc407a8..72e3a22491
- 72e3a2 Expand map_detach test for buffer should detach on device.destroy (#1699)
- d5e662 Enhance val:render_pass_descriptor:depth_stencil_attachment_depth_clear_value (#1674)
- 12b775 Implement val:CopyExternalImageToTexture,destination_texture,dimension (#1695)
- 2834ce Add an out-of-range check to the ranges test in writeBuffer.spec.ts (#1663)
- bee493 Implement val:queue:writeTexture:usage (#1675)
- ea0057 Add GPURenderPassDescriptor.maxDrawCount test plan (#1614)
- d30940 Generate full range of `atan2` cases (#1679)
- 5b9641 Correct the order of params in atan2 message (#1677)
- 228c28 Implement f32 `degrees` tests (#1668)
- 4786c2 Remove obsolete f32 testing infrastructure (#1665)
- 8e1167 Add f32 tests for `pow` (#1658)
- aa0719 Make `render_pass_descriptor:resolveTarget,usage` test a valid case together (#1660)
- 6dfee4 Submit all shader batches before checking for results
- bbd744 Convert `ldexp` tests to use interval framework (#1659)
- 9d3043 Update f32 tests to handle returning undefined for infinity (#1655)
Created with './tools/run cts roll'
Change-Id: Ibdf6a28ea84e2115103c9c9637b3e648a62b8364
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96880
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Use the new utils::Bitset to replace the much slower unordered_map.
Bug: tint:1613
Change-Id: I80503d2b897f754408c4ce14a221210d6abc18f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96403
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>