Commit Graph

14 Commits

Author SHA1 Message Date
dan sinclair b0391c6fa4 [msl-writer] Add struct offset support.
This CL adds support for injecting padding into structs in the MSL
backend.

Bug: tint:8
Change-Id: I83631a71ce4a2f00b61974ee2c0c7ca1b97f3028
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24601
Reviewed-by: David Neto <dneto@google.com>
2020-07-15 20:54:48 +00:00
David Neto 5b46d71ae7 Enable Tint as part of a larger CMake project
- Add googletest and spirv-tools local builds only if their CMake targets
  are not already configured.
- Add local spirv-headers as an include directory only if the associated
  CMake directory does not already point to a directory.

Change-Id: I53ebb0d8fdf7703e8219000b78c75c30859c91a4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24020
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-26 22:29:27 +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 be45ff5081 Create tint.h for external users
tint.h selectively includes headers depending on what features are enabled. It
is based off of the original sample code, so should give users access to all of
the functionality demonstrated in there.

This is located in include/tint/, so that users can have a pretty include of
tint/tint.h.

BUG=tint:87

Change-Id: I8659c789c154349e4e8e7730dc334da4fb6eba70
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/23124
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-06-11 19:35:20 +00:00
dan sinclair 6ca2699eaf Windows fixes.
This CL fixes up some issues which give compile errors when building
with Visual Studio.

Change-Id: Ib76644d869dd2adccd579621d18804d84b65a74c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20940
Reviewed-by: David Neto <dneto@google.com>
2020-05-04 18:58:24 +00:00
Ryan Harrison 563d3e9975 Add support for running [chromium-style] checks in CMake builds
Adds a new option to insert the needed flags, as well instructions on
how to run the checks to README.md.

BUG=tint:62

Change-Id: Id154555c4846f1dea29bad1fba5a3cd73ac7fb04
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20540
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-04-28 19:27:38 +00:00
Ryan Harrison 13a652963c Rename tint_fuzz to tint_wgsl_reader_fuzzer
This is in anticipation of future fuzzer implementations.

BUG=tint:56

Change-Id: I73492c135bed7d5bee9c114ec336a837b4f447ac
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20243
Reviewed-by: David Neto <dneto@google.com>
2020-04-23 13:51:39 +00:00
Ryan Harrison 3170bebba1 Fix building fuzzer
BUG=tint:53

Change-Id: I0462baf302d5183b089dbdfd595045f8376f7a53
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20145
Reviewed-by: David Neto <dneto@google.com>
2020-04-22 00:25:10 +00:00
dan sinclair b595052ea3 Set root folder for linter.
This CL sets the root folder to be used by the linter when determining
header guards.

Bug: tint:23
Change-Id: I52ce8d3cd67e9882d4ea8a2c9cbd2d5d5650d5b7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/17205
Reviewed-by: David Neto <dneto@google.com>
2020-03-19 13:03:35 +00:00
dan sinclair 4b71b9ed2b Expand build flags for Tint.
This CL extends the build options to Tint to make the various readers
and writers all optional.

Change-Id: I913e1830b1bb2243eff5deb4b8079ba592dd52e1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16801
Reviewed-by: David Neto <dneto@google.com>
2020-03-18 14:08:48 +00:00
dan sinclair e4392c9ab5 Create SPIR-V writer skeleton.
This CL creates the skeleton for the SPIR-V writer.

Bug: tint:5
Change-Id: I849d8766d32d48314a51096710272f9821e2c1c4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16641
Reviewed-by: David Neto <dneto@google.com>
2020-03-17 21:00:22 +00:00
dan sinclair 37dbf99e34 Always define TINT_BUILD_SPV_PARSER.
This CL always sets the define for building the SPV_PARSER. This fixes
undefined errors on certian platforms.

Change-Id: I5f84295cb7ddf23d64efd9a4d00717c84bc698aa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16800
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: David Neto <dneto@google.com>
2020-03-11 18:43:12 +00:00
David Neto bbd8987e71 Instantiate a stubbed SPIR-V parser if file ends in .spv
- spv parser just errors out for now
- link against SPIRV-Tools-opt
- Fixe CMake variable TINT_ENABLE_SPV_PARSER --> TINT_BUILD_SPV_PARSER

Bug: tint:3
Change-Id: Ie4ef9b03e001fca3cc11f65a425612755857feac
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/16600
Reviewed-by: dan sinclair <dsinclair@google.com>
2020-03-10 22:54:12 +00:00
Dan Sinclair 6e581895a5 Initial commit 2020-03-02 15:47:43 -05:00