James Price
8bcecf365d
Remove @block attribute
...
Since this was the only attribute allowed on structures, we can also
remove the parsing code for them. However, we still need to have
attributes on the struct AST node, since the AddSpirvBlockAttribute
transform adds one.
Fixed: tint:1324
Change-Id: I7966237765b1d8a58c59908b59e1f1152a8a0439
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/83740
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2022-03-21 16:09:17 +00:00
Antonio Maiorano
93e600dd54
Fix sem::Swizzle::HasSideEffects() not returning true when structure has side-effects
...
E.g. sem info for "f().x" returned false for HasSideEffects().
Bug: tint:1300
Change-Id: I789f75eef834c58a93e07d93c8334635d39981c3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/83100
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Antonio Maiorano <amaiorano@google.com >
2022-03-15 13:51:17 +00:00
Ben Clayton
41f8d2ad52
Use 'final' specifier on leaf classes
...
Tint makes heavy use of RTTI via virtual methods. Give the compiler the
opportunity to optimize away some of these virtuals.
Bug: tint:1383
Change-Id: I28edfaa0a05bb1a9c506c61c0084542c0aeb37f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82745
Reviewed-by: James Price <jrprice@google.com >
Reviewed-by: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
2022-03-07 18:37:46 +00:00
Ben Clayton
dc0e31cfaa
sem: Remove Type::type_name.
...
Remove last remaining uses, and fix up a whole lot of tests.
Bug: tint:1383
Change-Id: Id2a11fc2d748b72823f4a077bcd6ba7be705a02b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82744
Reviewed-by: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
2022-03-07 18:34:57 +00:00
Ben Clayton
4391975f72
sem: Use UniqueAllocator for types
...
Add a Hash() and Equals() methods to sem::Type.
Have sem::Manager (which should be called sem::TypeManager) derive from
utils::UniqueAllocator. This now uses the Hash() and Equals() for uniquely
constructing semantic types instead of building strings and comparing those.
Bug: tint:1383
Change-Id: I5e3229bd087391ac594d333a0ab4232cfcddf54d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82743
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
2022-03-07 17:05:28 +00:00
Tomasz Śniatowski
0f324efe4f
Avoid a nullptr string in dependency_graph_test
...
Don't define a string member to default to =nullptr, as that would
crash if it was ever used, and wouldn't compile in C++23.
Bug: chromium:1302724
Change-Id: I2ce146183e2fe4427b2d0c5ed8b4c42bff9429e2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82660
Auto-Submit: Tomasz Śniatowski <tsniatowski@vewd.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@chromium.org >
Commit-Queue: Ben Clayton <bclayton@chromium.org >
2022-03-07 13:29:06 +00:00
James Price
bcd9ad2ebb
Remove isNan, isInf, isFinite, and isNormal
...
These were deprecated in M98.
Fixed: tint:1312
Change-Id: Ieec17bfcc729f90d0a9aa8904a162167b9de54ed
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82800
Reviewed-by: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: James Price <jrprice@google.com >
2022-03-05 00:39:14 +00:00
Ben Clayton
4cb1329181
Move BlockAllocator from src/tint to src/tint/utils
...
Change-Id: I4bca9413d73d0095a3e0de23bcc4de956bf3b98e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82740
Auto-Submit: Ben Clayton <bclayton@google.com >
Reviewed-by: James Price <jrprice@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@chromium.org >
2022-03-04 21:09:24 +00:00
Ben Clayton
2e6269acb0
Use the new Switch() inferred types
...
Change-Id: I48ecd18957101631caa27480e7b1937a10791118
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81106
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
2022-02-25 23:02:22 +00:00
Ryan Harrison
dbc13af287
tint->dawn: Shuffle source tree in preperation of merging repos
...
docs/ -> docs/tint/
fuzzers/ -> src/tint/fuzzers/
samples/ -> src/tint/cmd/
src/ -> src/tint/
test/ -> test/tint/
BUG=tint:1418,tint:1433
Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Ryan Harrison <rharrison@chromium.org >
2022-02-21 15:19:07 +00:00