Commit Graph

7 Commits

Author SHA1 Message Date
Ben Clayton 9328d94572 wgsl: Deprecate '-> void' on functions
Was removed with:
https://github.com/gpuweb/gpuweb/pull/1460

Bug: tint:677
Change-Id: If08cb450189c6158561051ef6e8f2439c60bc010
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47140
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-04-08 14:39:47 +00:00
dan sinclair 42e873c6f6 Update comments in test WGSL files.
This CL updates the test WGSL files to use // for comments instead of #.

Change-Id: I5ba31cfe15e9f293bcb82f82e2a3dbe6f6e61e96
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37480
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-12 18:13:28 +00:00
dan sinclair a7c9391dc6 [spirv-writer] Support optional trailing return.
This CL updates the SPIRV-Writer to inject an OpReturn as the trailing
statement in a function if the function does not end with a `discard` or
a `return` statement.

R=bclayton@google.com, dneto@google.com

Fixes: tint:302
Change-Id: I2e7c7beff15ad30c779c591bb75cf97fc0960bf7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/33160
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
2020-11-18 18:25:30 +00:00
dan sinclair a8274b2fef [spirv-writer] Emit entrypoint from function decoration.
This CL updates the SPIRV-Writer to emit entry point information based
on the function stage as well as EntryPoint nodes.

Change-Id: I1fa937cbb2159b31516b0189216d679e03f0384d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28702
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-21 18:49:01 +00:00
dan sinclair 767ea855ab [wgsl-reader] Parse stage decoration
This CL adds parsing of the stage decoration to the WGSL parser. The
decoration is not hooked up yet so it's effectively ignored.

Change-Id: I8d86c55cee189f993c10b6da31a9c388ba452021
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28664
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-21 17:42:10 +00:00
dan sinclair d05f93fd8e [wgsl-reader] Add workgroup_size parsing
This CL adds parsing of the `workgroup_size` function decoration.

Change-Id: Ia90efc2c014ac0e1614429280cc903d30cf8171d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28663
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-21 00:37:08 +00:00
dan sinclair 6366f68121 [metal-writer] Emit constructors.
This Cl adds the code to emit scalar and type constructors from the
Metal backend.

Bug: tint:8
Change-Id: I95c713568ae3a73b82f8c9e10119e29e3469893e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/23707
Reviewed-by: David Neto <dneto@google.com>
2020-06-23 18:22:21 +00:00