This avoids the need to pass the `use_runtime_semantics_` flag at each
callsite.
Change-Id: I2cce3f147226e1295b5dfa0239beeacd519d5bb4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118641
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
SPIR-V tools has been updated with additional validation that rejects
this test.
Change-Id: Ifef29f718acc244d43452dde815e1d7c66128ebb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118900
Reviewed-by: dan sinclair <dsinclair@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Add a flag to resolver::ConstEval to turn all overflow and range
errors into warnings, and return a valid (usually zero) value instead
of utils::Failure as defined by the WGSL spec for expressions
evaluated at runtime.
Change-Id: Icdce512306aabe717591134a1b4ba2d9c668f29c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118640
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This CL adds a second command `tint_info`. The `tint_info` command can
be used to dump information about a WGSL program to the console. This
includes things like the inputs and outputs to an entrypoint along
with structure information like offsets and alignments.
Bug: 1825
Change-Id: Ia2fb4be08b39c1a592f78a388d34edf9af8b6a0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118643
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
A new base class for sem::ValueExpression, which other types of
expression can derive from.
Example: sem::TypeExpression - an expression that resolves to a type.
Bug: tint:1810
Change-Id: I90dfb66b265b67d9fdf0c04eb3dce2442c7e18ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118404
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
New base class to IndexAccessorExpression and MemberAccessorExpression.
Simplfies code that operates on both of these.
Change-Id: I02ce2e8180d7c1836f0b4d8e629e707e19e3539e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118403
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
This is another old cache directory that shouldn't exist any more.
Change-Id: I3725108c49825a41a786e15e30e29ebb920c367e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118721
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The change to use `go run` over `go build` has upset the windows kokoro builds.
Use absolute paths.
Change-Id: Id9700529b3460a5ab579f82f616a95c3498c152c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118722
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
ast::IdentifierExpression may also resolve to a type or core enumerator
Bug: tint:1810
Change-Id: I85e3bea67e1146215079ec47430784f2fb39043d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118402
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
People keep on running the executable from the bin cache, wondering why stuff is out of date.
`go run` has pretty decent builtin caching, so just use that.
Change-Id: I6305a222f3f6b5b0b1ce23d7a89227aea96b9ef4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118720
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
The INT_MIN literal issue was fixed in the SPIR-V reader, so we now
generate valid WGSL for these tests.
Bug: tint:1818
Change-Id: Ib5ae62d08bbf24b2fc0b775dd7ad62bcac1340fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118642
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Add a chained struct for Dawn-specific options for SPIR-V ingestion to
contain this new flag.
Bug: tint:1890
Change-Id: I1332ff20c91f29a84c21550a37f11bc7d9c956ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118421
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
This CL make vulkan adapter checks essential Vulkan extensions and
features in InitializeImpl rather than InitializeSupportedFeaturesImpl.
This change makes InitializeSupportedFeaturesImpl never result in Error
for all backend, and this CL change the return type of
InitializeSupportedFeaturesImpl from MaybeError to void.
Bug: dawn:1495
Change-Id: If59c5aa5281776226c157451ee5119052d33ac24
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118031
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Rename the type_name() method with operator().
`ty.type_name("blah")` becomes `ty("blah")`
Change-Id: Ia0b2bc304e7bb208c2e40a469332044b394535d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118401
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Will be used to replace all type identifiers that take templated arguments.
Bug: tint:1810
Change-Id: I31ad8dc4826375a783143cc33f336d8a4860613c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117893
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Consistency with the other AST nodes.
Change-Id: I8db3d237c27fea44c80101ed3d24b62832d45c18
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118360
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Instead of ast::IdentifierExpression.
The name is not an expression.
Fixed: tint:1257
Change-Id: I3161d20f584bfedf730b9257233f9dfcb064298a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118344
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
When calling the generated helper, the column and row arguments were
swapped.
Improved the unit tests to actually show this, rather than passing in a
single value for both column and row.
Bug: tint:1824
Bug: tint:1333
Change-Id: I32a92dec5e594dabd9d8d2b08474c0d6f3645520
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118420
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Instead of ast::IdentifierExpression
The member is not an expression, but a name.
Fixed: tint:1257
Change-Id: I879ddf09c3e521a18cef85422bb2f8fe78cddf5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118343
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
The additional nesting is somewhat unfortunate for pointer
indirection overhead, but this simplfies logic like
transform::Renamer, which can continue to find all the
identifier nodes in the program.
Bug: tint:1257
Change-Id: I8d51dd80dc4c51ef59238959029b8511f1edf70d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118342
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Change-Id: I4706e517608d436fa646537fec9e930ae47d1c40
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118029
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Instead of ast::IdentifierExpression.
The name is not an expression, as it resolves to a function, builtin or
type.
Bug: tint:1257
Change-Id: I13143f2bbc208e9e2934dad20fe5c9aa59520b68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118341
Kokoro: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
An identifier node that is not an expression.
Will be used by:
* CallExpression
* DiagnosticControl
* IdentifierExpression
* MemberAccessorExpression
* TypeName
Bug: tint:1257
Bug: tint:1810
Change-Id: I1de719d8c570992fed08789c35ca6c4409789520
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118340
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Also for continuing blocks.
Change-Id: Ic4a5f30fc0b882f1051c4995bd2b228c5ccc6d17
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118321
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reset the visited state of nodes before traversing to determine a
parameters requirements with respect to the function return value,
otherwise we may not capture a parameter->retval relationship
correctly.
Fixed: tint:1822
Change-Id: I9802a89fe1c8331b2f9dae594ccb045f339396fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118080
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>