Commit Graph

3183 Commits

Author SHA1 Message Date
dan sinclair 481ecff293 [ast] Require StructType to have a name
This CL moves the StructType name into the constructor of the struct
type instead of receiving through an accessor. The |set_name| accessor
is removed as it should not be needed anymore. All call sites have been
updated.

The vertex pulling transform was fixed to correctly register an alias
for the structure being created so it will be emitted.

Bug: tint:175
Change-Id: I8802931d9bdbc6c2f12982eea9032931939d195c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30280
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-15 17:54:13 +00:00
Sarah Mashayekhi 53380f9ed7 [validation] remove tests that have landed in cts
Change-Id: Icf57f1c919b9498385918c9553310d26811c00ed
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30200
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-15 15:26:13 +00:00
dan sinclair ff267ca60e [type-determiner] Fixup handling of unknown identifiers.
This Cl updates the identifier type determination check to fail if the
identifier is not found and is not an intrinsic method.

Bug: tint:139
Change-Id: I332dd7fb42dae62bdee459c4a8819bdb5685c903
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30081
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-10-14 18:26:31 +00:00
dan sinclair 5afb002aa4 Add comments
Change-Id: I85f13d7f115a900ffdbc9411d56bf829619288ae
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30160
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-14 17:37:01 +00:00
dan sinclair f2b8b6e873 Emit validation errors after outputing result.
This Cl removes the SPIR-V validation errors to emit after the desired
output format. This means a SPVASM output will have the error at the
bottom making it more visible.

Change-Id: I010f45ea4f35b2f5489749a49492c3d860410e8a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30080
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-14 15:16:41 +00:00
dan sinclair 435916e544 [spirv-writer] Fixes to constant constructor determination.
The change from `cast` to type constructor casts causes our current
determination if a constructor is constant to no longer be correct.

This Cl updates the determination to match the current spec and adds a
bunch of unit tests to verify the behaviour..

Bug: tint:270
Change-Id: I8ce74eb7c3f849ce62815868313449d8ca2de6be
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/30020
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-14 15:14:11 +00:00
dan sinclair 4311dd05c8 [spirv-writer] Fix accessing array of non-scalars.
Currently, if we access an array of non-scalar items we'll incorrectly
emit an OpVectorExtractDynamic which will fail as the result is not
scalar.

This CL updates the array accessor code such that if the base array is
an array of non-scalars we'll do load of the array and then access chain
into the loaded variable.

Bug: tint:267
Change-Id: Ia4d7052b57d8b31b835714b7b922c7859e3dce1f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29844
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 21:34:25 +00:00
David Neto 6d6aed5460 doc/arch.md: say when numeric parameters are checked
The AST doesn't do detailed checking of numeric parameters.
That's deferred to the separate validation step.

Change-Id: I85aada7292fcc9757f9fd54e2d9a50ad1405ef9c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29940
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-08 21:18:45 +00:00
Ryan Harrison f600d3aa9f Add --dawn-validation flag to sample app
BUG=tint:268

Change-Id: Ie90df82146f4853ef310e32219e5195d36a742db
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29960
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-08 20:22:35 +00:00
dan sinclair c169506c9e [wgsl-reader] Allow global variable decorations to have multiple blocks.
This CL updates the WGSL parser to allow global variable  decorations
to accept multiple blocks.

Bug: tint:240
Change-Id: Iaf8f794d285d87af6e2ff8c93e34d88331eedccb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29840
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-10-08 19:40:15 +00:00
dan sinclair 25f883520e [spirv-writer] Remove push_preamble
The push_preamble method was dealing with multiple sections of the
SPIR-V binary layout. As we changed the way things write (like
extensions getting written later) the preamble section was ending up in
incorrect order.

This CL replaces push_preamble with push methods for each of the
sections at the start of the SPIR-V module which should fixup the
ordering issue.

Bug: tint:267
Change-Id: Ib73a66d0fdb2c67dd6e80582289dd18475fad9f9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29841
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-08 19:37:45 +00:00
dan sinclair eb5d3e147d [wgsl-reader] Allow array decorations to have multiple blocks.
This CL updates the WGSL parser to allow array decorations to accept
multiple blocks. The stride decoration on arrays was turned into a
proper decoration object instead of just storing the stride directly.

Bug: tint:240
Change-Id: I6cdc7400d8847e3e043b846ea5c9f86cb795cf86
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29780
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 19:34:25 +00:00
dan sinclair 71d69e5ed3 Update struct member decorations to allow multiple blocks.
This CL updates the struct member decoration parsing to allow multiple
blocks of decorations.

Bug: tint:240
Change-Id: I97293ef30333f63c33bbc6e728dba11abc020c7c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29280
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 19:17:45 +00:00
Ryan Harrison 5118c07261 Add In/Out variables to returned EntryPoint
BUG=tint:257

Change-Id: Iec0dca854dfa6380991c04544848c24f21496a93
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29524
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-08 18:38:45 +00:00
dan sinclair 1a63c49b4e Update structs to allow multiple decorations
This CL updates to match the spec change allowing multiple struct
decorations.

Bug: tint:240
Change-Id: Id859c6a331c67c46597fc3c70de06d6cc0f486ec
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29260
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 18:33:25 +00:00
dan sinclair 007dc42cbb [type-determiner][spirv-writer] Add arrayLength support
This CL adds support for retrieving the array length of a Runtime Array
in the SPIR-V backend.

Bug: tint:252
Change-Id: Ic13c4a99da5760738d57702c45f52c6a194a172d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29220
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 17:01:55 +00:00
dan sinclair fc5c5ab60b [hlsl-writer] Emit specialization variables
This CL adds specialization to the HLSL backend. The specialization is
emulated using defined preprocessor macros.

Bug: tint:154
Change-Id: I73ab42360558967eee9a0da6bbe74d513fe4cc57
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29720
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-10-08 16:22:45 +00:00
dan sinclair 66377ce9be Add Inspector to doc
This CL adds the inspector into the architecture document.

Change-Id: I17f06e0ae29398a39b5082b0b4399c9c5e65769f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29800
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-08 14:24:55 +00:00
dan sinclair 28ae1471bf Exclude spirv-tools from the all build target.
This CL moves spirv-tools so that it will only build what is requested.
This means that the tool binaries will not be built as part of tint as
they aren't needed.

Change-Id: Idd89b45facbe835948c57fe6dda6068657a2f822
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29660
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-07 15:55:13 +00:00
dan sinclair a388d56d99 [spirv-writer] Fixup constructor with bitcast parameters.
Currently if a constructor contains constructors we consider it const.
This falls down with the new type constructor syntax if the types don't
match. In the case they don't match we no longer consider the
constructor const as we'll generate OpBitcast and OpCopyObject
instructions which we need to build the composite from.

Bug: tint: 263
Change-Id: Ic85f58c8410e862a2ec30c7d93c9b87a61822f6d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29523
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-07 14:06:28 +00:00
Ben Clayton c9110b93cb Add missing #include - fixes build on vs2019
Change-Id: I68bdf5ad1028ac344bca91c055045e5bf81318a3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29580
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-07 13:13:58 +00:00
dan sinclair 488d7a9346 [spirv-writer] Fix emission of OpExecutionMode
All of the OpEntryPoint declarations must come before OpExecutionMode.
Currently if you have multiple fragment shaders we'll interleave the
OpEntryPoint and OpExeutionMode which will fail to validate.

Bug: tint:263
Change-Id: I7c925cf6b5345c03bfaf1aa15115caa1bdb9af4c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29522
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-06 21:20:28 +00:00
dan sinclair 56acec91b1 [msl-writer] Emit function constant information
This CL adds the code to emit function_constant attributes to the
generated MSL.

Bug: tint:153
Change-Id: I0e4f50257fde7e8db8f53e15bc9f460ebfc809ee
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29520
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-06 21:05:18 +00:00
dan sinclair 90ee6c4360 Doxy comments
Add some missing doxygen comments

Change-Id: Ic5d6684d90f5b2fe9ed3914bbb7c4058effc040c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29500
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-06 17:47:57 +00:00
Ryan Harrison 8a9007221c Add Workgroup size information to EntryPoint struct
BUG=tint:257

Change-Id: Iaf03bfaeb622b7315d65e46eccfe90244bced339
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29420
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-06 16:28:57 +00:00
dan sinclair dd516e6b64 Doxygen cleanup
This CL suppresses some Doxygen warnings for code doxygen doesn't
process correctly and adds the missing return for GenerateEntryPoint
method.

Change-Id: If97443a7177caa51c1054de83fb0711692a7ab22
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29461
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-06 15:35:37 +00:00
dan sinclair b8d90ead93 Move visibility=hidden directive.
This CL moves the visibility=hidden directive from the top level applied
flags to libtint specifically. This fixes up an issue between
SPIRV-Tools and the sample app when using std::rfind which ends up with
different visibility.

Change-Id: Ib06949b3755db66027d3656d3d6ce2504bfda81e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29460
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-06 15:11:17 +00:00
dan sinclair b5e5b804c3 Reduce duplication of type format strings.
This CL makes the AST type format name match the WGSL name so the
overloaded operator<< can be used in the WGSL writer. This removes a
bunch of duplication of WGSL type format name strings.

Bug: tint:230
Change-Id: I14aaefd21ced267ceed31f21faba3bd291275f0d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29402
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-05 19:55:56 +00:00
dan sinclair 94b7c66858 [msl-writer][hlsl-writer] Add countOneBits and reverseBits
This Cl adds countOneBits and reverseBits intrinsic support to the MSL
and HLSL backends.

Bug: tint:250
Change-Id: Idb572da32e9c10767a27326cacf58aafef44a77a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29401
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-05 19:46:16 +00:00
dan sinclair 44b043d46a Remove unused function.
This Cl removes the unused ctx method from the inspector helper.

Change-Id: I3c35aeb18c29078d5bdb46e3d1a2c5d4d6dcce54
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29400
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-10-05 19:29:26 +00:00
Ryan Harrison 1a9a2dd07d Add Inspector class
This class is used to examine a module and get information about its
contents. This is the getting side of shader of reflection. Future
work will add transforms that perform the setting side of reflection.

In addition to the basic class and infrastructure, this CL adds a
GetEntryPoints() function demonstrate it works. More functionality
will be added in later CLs.

BUG=tint:257

Change-Id: If41dbb6c93302e0332754c086c75729d6ffe04d0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29320
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-10-05 14:52:36 +00:00
Sarah Mashayekhi 60a272a86e [validation] Update switch error numbers
fix clang error

Bug: tint: 6
Change-Id: Ib387258387e1f5069585a7fe3af3990df6fc8ddd
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29043
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-30 20:12:50 +00:00
dan sinclair 00000b57e8 [spirv-writer] Emit spec constants for non-constructor scalars.
In WGSL you can provide a constant_id variable without a constructor. In
SPIR-V we must synthesize a constant to attach the SpecId too. This CL
adds that variable creation.

Bug: tint:254
Change-Id: I2f25fdc3cb7e2c9c0f9e2129885865bd24298416
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29200
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
2020-09-30 18:44:40 +00:00
dan sinclair d2d7ce6e31 Fixup computeboids example.
This Cl converts the cast in computeboids to a type constructor.

Change-Id: Ie1e7183226bb2f629f25cb2d35fc917d8ca68564
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29140
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-30 14:00:10 +00:00
dan sinclair 70b4c3baad [transform] Add transforms to the sample app.
This CL extends the sample app to allow running the bound array accessor
transform.

Bug: tint:206
Change-Id: I226a947a2e0a9e0945aa044b2847b4fd62b7c277
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29122
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-30 00:05:23 +00:00
dan sinclair af780816ca [wgsl-writer] Emit constant_id decorations.
This CL adds constant_id decorations to the WGSL writer.

Bug: tint:152
Change-Id: I637d158c0ef4d0ace2ce70a6fb3cbe6f0b8b3b4e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29102
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2020-09-29 23:57:03 +00:00
dan sinclair 5bb9b75684 [transform] Add a simple transform manager.
This CL holds a simpler manager to hold and execute multiple transforms.

Bug: tint:206
Change-Id: I45f6b55134f871167704f3549c4e4c72ef806c3a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29121
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-29 23:54:03 +00:00
dan sinclair 58f2e9cf6a [spirv-writer] Emit specialization constants.
This CL adds OpSpec constants to the SPIRV-Writer.

Bug: tint:151
Change-Id: I309013ca0b4cb514edd92fab3dab2e4faa15969a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29101
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 21:11:43 +00:00
dan sinclair 97b729de10 [transform] Add Transformer base class
This CL adds a Transformer base class from which the transformers will
inherit.

Bug: tint:206
Change-Id: I542eacb05d9a92af46d172a5803c245472c0e22c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29120
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 20:28:21 +00:00
dan sinclair 9caffa4491 [ast] Add constant id helper.
This CL adds constant id helper methods to the decorated variable class.

Bug: tint:150
Change-Id: Icfdc516f37d4f2680d2b990879bff722085cf732
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29082
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-09-29 20:00:00 +00:00
dan sinclair b403cb50ab [transform] Add BufferArrayAccessors transform
This CL adds a buffer array accessor clamping transform to
the available transforms in Tint.

Bug: tint:101
Change-Id: If9d5b0fb2c3adba723ce2185870b0e10981103a6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28980
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 18:40:40 +00:00
dan sinclair 9e7f9dc96c [ast] Add constant_id decoration
This CL adds AST support for the constant_id decoration.

Bug: tint:150
Change-Id: Ifde5a5325f770567ea24129e786953d89f3f514b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-29 18:07:50 +00:00
Sarah Mashayekhi 095f5f71b5 fix clang error
Change-Id: I7e68da53821b143d7ec55ef323822982b8f0b336
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29042
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-09-26 02:00:53 +00:00
dan sinclair 816764dbd4 [ast] Remove IsCast
This was missed in the general removal, cleanup.

Change-Id: I7912bb86e73cd9e38d497fab5995f7740a9dfbc6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/29000
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
2020-09-25 18:41:02 +00:00
dan sinclair 571bce6b8d [spirv-writer] Add struct constructor test.
This CL adds a test for struct constructors in the SPIR-V backend.

Change-Id: I9ae82ce86cde159b87cce2ee95d0b16910aadc7f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28901
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 18:18:05 +00:00
dan sinclair 8a220a6f40 [spirv-writer] Add array constructors.
This CL emits array type constructors in the SPIR-V backend.

Change-Id: I796e81964df1af39ad1aacdd4ab8181852f661fa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28900
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 16:48:35 +00:00
dan sinclair d6e063d13e [spirv-writer] Add matrix constructors.
This CL adds the matrix constructors to the SPIR-V output.

Change-Id: I7471700c262b499f843ffa4e3c49bcac0b0c7565
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28881
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 16:38:35 +00:00
dan sinclair b2a0c8aee7 [msl-writer][hlsl-writer] Remove space between builtin and (.
The builting CL accidentally inserted indenting between the name of the
builtin and the opening paren. This CL removes the extraneous spacing.

Change-Id: If684ec6f2fb4bf13b559c16b246f57f7975d019d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28944
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 15:12:55 +00:00
dan sinclair 3c02592718 Remove cast operator.
This CL removes the cast operator and converts the tests over to using
type constructors.

Bug: tint:241
Change-Id: I2526acb61f5624b2e1c068612a2ddcc748c92aed
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28860
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 14:38:44 +00:00
dan sinclair f367eadeef [msl-writer] Emit zero values for private, function and output vars.
This CL updates the MSL writer to emit the needed zero initializers for
Private, Function and Output variables.

Bug: tint:172
Change-Id: I73b1c3bb4c87a8ec7b1fb9d17a35e907c9a42095
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/28943
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2020-09-24 14:33:24 +00:00