Commit Graph

18 Commits

Author SHA1 Message Date
dan sinclair 0917fbb147 Reland "Add writer to emit the AST."
This reverts commit 5e56551551.

Change-Id: I2c3da583090ebef87cc71a743746d741345847c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122782
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-03-07 18:28:38 +00:00
Dan Sinclair 5e56551551 Revert "Add writer to emit the AST."
This reverts commit a753ad47a4.

Reason for revert: This seems to be breaking `gn check` when the option is not enabled. Not sure why the preprocessor guard isn't working. Will fix and reland later.

Original change's description:
> Add writer to emit the AST.
>
> This CL adds a new `SyntaxTree` writer and a `dump-syntax-tree` option
> to the `tint` program which emits a copy of the AST to the terminal.
>
> Change-Id: I83f6cd7aad3413b0a823728e8aac0d551421b33a
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122540
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>

TBR=dsinclair@chromium.org,bclayton@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Icaac76f8daba6034658cf05e15f15676ce2bf155
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122760
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2023-03-06 20:30:23 +00:00
dan sinclair a753ad47a4 Add writer to emit the AST.
This CL adds a new `SyntaxTree` writer and a `dump-syntax-tree` option
to the `tint` program which emits a copy of the AST to the terminal.

Change-Id: I83f6cd7aad3413b0a823728e8aac0d551421b33a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122540
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2023-03-06 17:48:33 +00:00
Dan Sinclair 749abeaafb Revert "Add GN build option to build using generated files."
This reverts commit 7cd8db1155.

Reason for revert: Breaking the Skia roll.

Original change's description:
> Add GN build option to build using generated files.
>
> This CL hooks the generated files into the GN build
> behind a `tint_build_use_generator` flag.
>
> Change-Id: I4926b2c9c1a349f26be8a1f8a4508e1e31dab813
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108041
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Reviewed-by: Ben Clayton <bclayton@chromium.org>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>

TBR=dsinclair@chromium.org,bclayton@google.com,bclayton@chromium.org,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I3b920791bc2b6d22d9cbeb1310a2e89fbd1e8cd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108205
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-11-02 17:07:25 +00:00
dan sinclair 7cd8db1155 Add GN build option to build using generated files.
This CL hooks the generated files into the GN build
behind a `tint_build_use_generator` flag.

Change-Id: I4926b2c9c1a349f26be8a1f8a4508e1e31dab813
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108041
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-01 17:03:48 +00:00
dan sinclair 77bf233cef Move tint unittest behind a build flag.
This CL moves the Tint unittest code behind a build flag in order
to hide the //testing/test.gni dependency from downstream consumers.

The unittests are enabled by default and can be disabled by setting
`tint_build_unittests` to false.

Bug: dawn:1517
Change-Id: Id560ed98416ba0725b62a93ddd27caf341699e75
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94481
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-06-22 12:40:43 +00:00
Ryan Harrison 3374f43c31 Normalize DEPS to ease merging with Dawn
- Format specific targets to have the hash in the target rule instead
  of a variable.
- Only have the base part of the URL in a variable
- Use vulkan-deps instead of individual DEPS (spirv-tools,
  spirv-headers & glslang)

BUG=tint:1481

Change-Id: I871a656e26050698da2c77f4f39fec94a9c4f8a4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/84723
Reviewed-by: David Neto <dneto@google.com>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2022-03-28 18:01:02 +00:00
Stephen White a9f8c7db81 Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.

triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.

Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
Ryan Harrison 40f16dde22 Change the default for BUILD.gn to build all the modules
BUG=tint:198

Change-Id: I88684c14506785545968c3366a5f3e485c829d97
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26121
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-07-30 18:44:04 +00:00
Ryan Harrison 7a0b734864 Fix BUILD.gn builds
Change-Id: I4e54b30497e064061baff2dcc205b68db87bee2c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25540
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-07-22 20:41:12 +00:00
dan sinclair 2a59901483 [metal-writer] Stub out the Metal Shading Language backend.
This CL adds the basis of the Metal Shading Language backend.

Bug: tint:8
Change-Id: I85976250eb41ac12203a5db116444e993c3d09d4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/23700
Reviewed-by: David Neto <dneto@google.com>
2020-06-23 17:48:40 +00:00
Ryan Harrison 506fe795b6 Remove unused entries from .gni file
These args were either previously used, but no longer are, or were never
implemented. Removing them since they are just cruft now.

Change-Id: Ie8d755868f8045b4836db608a3817837ddcb4f16
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/21200
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-05-06 18:45:49 +00:00
Ryan Harrison d34b210e73 Add fuzzing target to BUILD.gn
TEST=Built fuzzer in local checkout of Chromium with tint integrated.
BUG=dawn:14

Change-Id: I84aacd41f893070c3af40f5e640361e177689f9e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20343
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-04-27 15:31:27 +00:00
Ryan Harrison 0a196c13c8 Adding support for testing BUILD.gn
BUG=tint:50

Change-Id: Ie19a1af6a97a49a67dcc7474991c960b986ddebe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19782
Reviewed-by: David Neto <dneto@google.com>
2020-04-17 13:18:20 +00:00
Ryan Harrison 460345d993 Add support for WGSL writing to BUILD.gn
BUG=tint:49

Change-Id: I4473176d4177a719b7b2659f765b6b467ac43c84
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19682
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-04-15 20:54:10 +00:00
Ryan Harrison 0caab67e6e Add support for WGSL reading to BUILD.gn
BUG=tint:47

Change-Id: Ic50421f4dc712c614cf5783027ba273b53b2bd83
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19681
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-04-15 20:47:55 +00:00
Ryan Harrison 2b45a52cdf Add support for SPIRV writing to BUILD.gn
BUG=tint:48

Change-Id: I6b92bb372b783ad4498fdc4817d0893851b0bb90
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19680
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-04-15 20:37:02 +00:00
Ryan Harrison d1cf8a8ba5 Add support for SPIRV reading to BUILD.gn
BUG=dawn:16

Change-Id: I1da30fed82a310007674801e3b1e853b25d5b573
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19640
Reviewed-by: dan sinclair <dsinclair@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-04-15 20:35:38 +00:00