Commit Graph

8 Commits

Author SHA1 Message Date
dan sinclair d7335fa974 Update builtin idx names.
This CL upldates the vertex_idx, instance_idx and global_invocation_idx
builtins to use the full _index names. The original values still exist
until we can update downstream users.

Change-Id: Icd02601eeb15704d5463158541c07816d98e5383
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37940
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-18 15:51:13 +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 5f8126271d Remove EntryPoint.
This CL removes the EntryPoint node and transitions everything to the
stage decoration.

Change-Id: Ib2840155905c8fa60ff35870f0c4b6705efb73ff
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28705
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-22 14:53:03 +00:00
dan sinclair 35552f2a48 [wgsl-reader][wgsl-writer] Update variable decorations to new syntax.
This CL updates the variable decorations to require ()'s around
parameters.

Bug: tint:238
Change-Id: I835879f41349756ace553a52fc2d460173e70dce
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28583
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-20 23:02:48 +00:00
Corentin Wallez 04f5166ac1 Fix triangle.wgsl's floating point literals.
Bug: None
Change-Id: I76a4df338e6354915844822ac1d40cece10ac9e0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/27241
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-08-24 13:04:36 +00:00
dan sinclair df415a8919 [msl-writer] Generate entry point functions.
This CL generates entry point functions and duplicate functions as
needed to call from the entry points.

Bug: tint:8
Change-Id: I8092ce463248e7a887c26ae05b0774e8fa21ab94
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24764
Reviewed-by: David Neto <dneto@google.com>
2020-07-15 18:04:11 +00:00
Dan Sinclair 6e581895a5 Initial commit 2020-03-02 15:47:43 -05:00