It's just a view on another field. It doesn't add anything.
Change-Id: I52c1939c455d48c067c9c31938be87671328d263
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110560
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds the sketch of how to walk the IR tree in order to rebuild
the format of the original control flow.
Bug: tint:1718
Change-Id: Id9376d51907ea2a60f32506a152928b3a82d14ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110481
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Missed a couple kNone settings in the Tint executable when attempting
to determine the output format. This CL updates the to be kUnknown.
Change-Id: Ia0c4293fe69711cf1de878255bd18c6eeec4bffe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110502
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Track reads and writes to pointer parameters for each function in the
Resolver, as well as accesses to module-scope variables. At function
call sites, check the root identifiers of each pointer argument to
determine if problematic aliasing occurs.
The MSL backend passes pointers to sub-objects to functions when
handling workgroup storage variables, which triggers the alias
analysis. Add a validation override for this scenario.
Bug: tint:1675
Change-Id: I81a40d1309df65521cc5ad39764d6a09a260f51e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110167
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
This CL enables some of the @const disabled test now that the
methods are implemented.
Bug: tint:1581
Change-Id: I2cc0aa33188e439a661e2e7c265c6414881c92a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110169
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Meant to remove this in
https://dawn-review.googlesource.com/c/dawn/+/110482
Bug: tint:1581
Bug: chromium:53440
Change-Id: I38a51873b93c2bfbf6ea20456a7992422ead6208
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110446
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
If count is highest and offset is non-zero, or vice-versa, we'd overflow
the count + offset > bit-width check. This CL fixes this case.
Also folded in error tests into extractBits and insertBits.
Bug: tint:1581
Bug: chromium:53440
Change-Id: Id1e9e737b8076e8075da5992a41d18b6b7c8afd4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110482
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds a `none` format to the tint command in order to allow
skipping the emission of the resulting program. This adds a `unknown`
format to take the place of the original `none`.
Change-Id: Ib25e933857c0acb26e3cf0e04ed8a5d1cca1e633
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110480
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Also add missing unit tests for CheckedMul of floats.
Bug: tint:1581
Bug: tint:1747
Change-Id: I5d0d5d2b010803d6fd65f6feddc619cf1d071fe2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110170
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Fails presubmit if you need to run `./tools/run gen`
Change-Id: I05311cd668c5a1f4f484b25cc1367f680a9d24eb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110140
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
Use a StableSort() to ensure the output is the same between different
versions of golang.
Change-Id: Ic81688d189ce62816ba0aefddcef607b76415a5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110361
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
This CL adds the framework and `tint` option to write the IR to stdout
as text for debug purposes.
Bug: tint:1718
Change-Id: I05bd83635800fbfe3b65d968a84b30931ec1bdb6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110171
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds const-eval for `min` and `max`.
Bug: tint:1581
Change-Id: Ica68ba312f21767c46d57d83570ddc72ee857231
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110166
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This patch adds a test to dawn_end2end_tests to reproduce a driver
issue about creating textures with CreatePlacedResource() on Intel
D3D12 drivers.
Bug: chromium:1237175
Test: dawn_end2end_tests
Change-Id: I26fe6c9b827d8a05cfe2336405e43c549e52ea50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100567
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This Cl removes the internal infrastructor and backend code
generation for the fallthrough statement.
Bug: tint:1644
Change-Id: I2a1de7d527865e5a7221074f4e0fb106599f4c57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109005
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL removes the `fallthrough` parsing from the WGSL parser. The
`fallthrough` token is left so we can generate a nicer error message
in the case `fallthrough` is used.
Bug: tint:1644
Change-Id: Ifb23d78d1219cba9c64b80c9b098a248bc68e5c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109001
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL removes support for fallthrough from the SPIRV-Reader.
Bug: tint:1644
Change-Id: I80b63d627960a82ba90de83af407c539b0442080
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109004
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
This is the same as was done for const eval builtin tests, allowing the
error cases to be defined in the same place as we define the positive
cases.
Also got rid fo the 'overflow' flag, which was used to skip abstract
cases in the unit test. Instead, I modified the tests to only add
overflow cases if not abstract.
This change will make it easier to update tests when we make Inf/NaN
failures for concrete float operations.
Bug: tint:1581
Bug: tint:1747
Change-Id: I7e5d8f9b24ca486aaa03a3b1bd07ccedb09411c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110043
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Rename ParserImpl::GetTypeForHandleMemObjDecl to
ParserImpl::GetHandleTypeForSpirvHandle
More importantly, it now returns the texture or sampler type rather
than the pointer type to the texture or sampler.
Most usages only wanted the store type.
Change-Id: I875e11d97e6d3ecb10fdb3317b860c05fc5fe406
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109760
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: David Neto <dneto@google.com>
We cannot explicitly name the result type of this builtin, so we have
to redeclare it manually.
Fixed: oss-fuzz:53347, oss-fuzz:53343
Change-Id: I23816b8b35eb20ae91472143ab30668b573d65bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110160
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: James Price <jrprice@google.com>
Use 'Mock' instead of non-inclusive language 'Dummy' in toggle
MetalUseDummyBlitEncoderForWriteTimestamp to pass PRESUBMIT.py check.
Bug: dawn:1250
Change-Id: I47dff4adec08d4d076b5ae5b4e0a521b235d5868
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110060
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Cache the hash of the test output, and only re-validate if the output changes.
This speeds up incremental end-to-end testing.
Change-Id: I44bc1eff62320df1e80524e8481d1c012fb67f42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/109761
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Passing a dereferenced value from Hashmap::Find() directly into Hashmap::Add() is a potential cause of UAF, as the insertion may reallocate the map, invalidating the input reference.
I'll try to think of ways to make this foot-gun harder to do, but this CL fixes the immediate bug found by fuzzers.
Bug: chromium:1383755
Change-Id: I4f8b2fcb0745b008a47ef9947c330afb9ac4e78f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110020
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>