Commit Graph

5 Commits

Author SHA1 Message Date
James Price 1bf5af25ad reader/wgsl: Allow identifiers to start with an underscore
Try to lex identifiers before punctuation, and backtrack if we only
see a single underscore or something that starts with two underscores.

Rename the modf and frexp return types to start with two underscores.

Spec PR:
https://github.com/gpuweb/gpuweb/pull/2326

Change-Id: Id283af100babfe84faa183345cb8a60848140caa
Fixed: tint:1292
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/70160
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
2021-11-19 21:52:13 +00:00
Stephen White 2fe0f4b42b GLSL: add .expected.glsl files for all tests.
Bug: tint:1301
Change-Id: Id3a591a2fa0dfdb112046d5c57defbae07483e0d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69480
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-11-16 15:15:36 +00:00
Ben Clayton 9c7cd9e9c3 transform: Avoid symbol collision in Canonicalize IO
Correctly rename fields when combining two or more input structures together into a single input structure.

Bug: chromium:1251009
Change-Id: I0c7ab5ed3116b97035e100d1ef96e772e819f640
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/64545
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-09-27 21:40:33 +00:00
Ben Clayton 3e92e9f8ba Fix structure builtin emission
Fix the Renamer to preserve builtin structure member names.
Fix the HLSL writer to emit the modf / frexp result type even if there is no private / function storage usage of the types.

Fixed: chromium:1236161
Change-Id: I93b9d92980682f9a9cb090d07b04e4c3f6a2f705
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60922
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-08-04 22:03:28 +00:00
Ben Clayton 4d94eee072 ast: Fix nullptr deref in Variable::info_to_str
Varaibles can infer types now, in which case the type_ field is null.

Fixed: chromium:1221120
Change-Id: I0cb2a6a2e8128c56625f48940cf73cf4cadb22ce
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55252
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-06-21 19:20:16 +00:00