This CL adds if/else statement emission to the HLSL writer.
Bug: tint:7
Change-Id: Idd6e6d8c329ed270676fa0276474a68c715dd9eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25847
Reviewed-by: David Neto <dneto@google.com>
This CL adds variable declarations to the HLSL backend.
Bug: tint:7
Change-Id: I5c1e42ca26029f1595bf4f23b3b867a492ddacc1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25846
Reviewed-by: David Neto <dneto@google.com>
Also clean up the mess I made of the build rules, so they actually work.
BUG=tint:57
Change-Id: I9c92d043a7be8f51ed7885a29eb153f078cc66d9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26125
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This CL adds stride support to the WGSL reader.
Bug: tint:178
Change-Id: Id6b5163438e562a371255ad3fb992d0a716543e7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26040
Reviewed-by: David Neto <dneto@google.com>
This CL adds array stride decorations to the WGSL writer.
Bug: tint:179
Change-Id: I39d7625e1bdc876bbf9a83da7af76eb98bd09c28
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26002
Reviewed-by: David Neto <dneto@google.com>
Insert will be used for adding code at the beginning of a function, and
non-const global_variables to edit decorations.
Bug: dawn:480
Change-Id: I9fbb0210a95b8488c9ce6d9a536a68f169b0cc33
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25850
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds emitting MemberAccessorExpressions to the HLSL backend.
Bug: tint:7
Change-Id: Ic6c99232e98322c8145700d5f1a3a8314cf60feb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25844
Reviewed-by: David Neto <dneto@google.com>
This CL adds as casts to the HLSL backend.
Bug: tint:7
Change-Id: I599527d665a3ec1ab6cf80b4f550f7aee8fdf294
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25843
Reviewed-by: David Neto <dneto@google.com>
This CL adds support for BlockStatement to the HLSL backend.
Bug: tint:7
Change-Id: I953a1b85a05cd84e8e296d677204ae9b5a3ae669
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25860
Reviewed-by: David Neto <dneto@google.com>
This CL adds the discard statement to the HLSL writer.
Bug: tint:7, tint:166
Change-Id: I292e9b97a1246c9b79a9660ec229ff7855aeb2a9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25842
Reviewed-by: David Neto <dneto@google.com>
This CL adds array accessor expressions to the HLSL backend.
Bug: tint:7
Change-Id: I46d60f5d8ef74fee2a2f4da48c2d792969bfa365
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25820
Reviewed-by: David Neto <dneto@google.com>
This CL adds support for emitting type aliases to the HLSL backend.
Bug: tint:7
Change-Id: Ibd2c2d3bbe6c9a86033e379b4e1cb494259b4df2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25800
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This CL adds scalar and type constructor emission to the HLSL backend.
Bug: tint:7
Change-Id: I2b402b7eb66f266c3a111c9b07502ef17cc1a679
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25726
Reviewed-by: David Neto <dneto@google.com>
The check to add the HLSL tests if needed into the BUILD.gn test list
was missing. This CL adds it.
Bug: tint:7
Change-Id: I662bc49fb4f88543cfb9b3b315deb5a678d169b4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26001
Reviewed-by: Ryan Harrison <rharrison@google.com>
This Cl adds the start of type emission to the HLSL backend.
Bug: tint:7
Change-Id: I403635080841c63382afe162ac80ae2be30b4faa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25780
Reviewed-by: David Neto <dneto@google.com>
- drop ColMajor, MatrixStride member decoration
- RowMajor matrix decoration is an error
Bug: tint:3, tint:99, tint:31
Change-Id: I7eb1ec53813a4b1ada971e8725dc91ffdf97bd43
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25920
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Rebasing I saw chromium style issue with auto pointers and a missing BUILD.gn file.
Change-Id: I7666595664b5eb95f681b3d2edd1d84df7d6fe63
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25848
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This CL removes the StatementList define now that BlockStatement is used
everywhere.
Bug: tint:130
Change-Id: Id51de13cd1ca0cd69023523c762fe719bc2da999
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25725
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL updates the SPIR-V Reader to create BlockStatements instead of
StatementLists.
Bug: tint:136
Change-Id: I957019446ca00306187de701f86ae3e0dd5c5eb8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25740
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL updates the WGSL Reader to create BlockStatements instead of
StatementLists.
Bug: tint:135
Change-Id: Ifda394023553a625dad67be7d4e0dc815292282a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25724
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL converts the LoopStatement class to using a BlockStatement
internally. All usages have been updated execept for the two readers.
Bug: tint:130
Change-Id: Ied4b82f0ef49c7b92caa040bcf73050093022df7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25723
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL converts the IfStatement and ElseStatement classes to using a
BlockStatement internally. All usages have been updated execept for the
two readers.
Bug: tint:130
Change-Id: I59a5b92f22f35f27f17e005aa9b266f4a2b0ef25
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25722
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL converts the CaseStatement class to using a BlockStatement
internally. All usages have been updated execept for the two readers.
Bug: tint:130
Change-Id: Idb9114230f7d9eb0f2208af635316edb0a0e8f99
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25721
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL converts the Function class to using a BlockStatement
internally. All usages have been updated execept for the two readers.
Bug: tint:130
Change-Id: I7159cf2d3ed5cb8a34d51fbe848b88f0e5479605
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25720
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL adds BlockStatement support to the spirv-writer. The type
determiner is also updated as needed.
Bug: tint:134
Change-Id: I91e08c3acafd67401a010fff21abde7feec46e8e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25609
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL adds BlockStatement emission to the MSL backend.
Bug: tint:132
Change-Id: Ie64c02b81760787f6d8aa8833b9756ede3deddf9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25608
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL adds BlockStatement writting to the WGSL writer.
Bug: tint:131
Change-Id: I6d1d286134311cea13e19c7381ed344da8205199
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25607
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL adds a BlockStatement to wrap the statements in a given block.
Bug: tint:130
Change-Id: Idc2389e001d9d87ef7f45dcd8aa90bbd27ff7dce
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25606
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
This CL adds intrinsics to the MSL backend.
Bug: tint:8, tint:159
Change-Id: I03e3c4bdf234ec4ca437ab1b1a0d4835e3342b0c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25500
Reviewed-by: David Neto <dneto@google.com>
This CL removes the KillStatement from the AST and replaces all test
usage with DiscardStatement.
Bug: tint:169
Change-Id: Ie68dd3cdd54056f144d10506f05cc1f6903d1cda
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25605
Reviewed-by: David Neto <dneto@google.com>
This CL changes the SPIRV-Reader to generate DiscardStatements instead
of KillStatements for an OpKill.
Bug: tint:168
Change-Id: Ic4223b614c822c6ad449f61aedaddc9605c42535
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25642
Reviewed-by: David Neto <dneto@google.com>
This CL adds parsing of the `discard` keyword to the WGSL reader.
Bug: tint:167
Change-Id: Iff91076a65715131f5f0f9bd1c8b6bf3a37cd3c7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25604
Reviewed-by: David Neto <dneto@google.com>
This CL adds the DiscardStatement to the WGSL writer.
Bug: tint:165
Change-Id: I012bc030482e097fd9a957ed96f15d8360f621a5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25603
Reviewed-by: David Neto <dneto@google.com>
This CL adds the DiscardStatement to the MSL backend.
Bug: tint:164
Change-Id: I1e201d3b6a167690af7bb799e1c93e48232f4a0a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25602
Reviewed-by: David Neto <dneto@google.com>
This CL updates the spirv-writer to emit the DiscardStatement as an
OpKill.
Bug: tint:163
Change-Id: Ic2514ee8a4ef7ef0220fc2e1145f8df0c3d32069
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25641
Reviewed-by: David Neto <dneto@google.com>
This CL adds DiscardStatement to the AST.
Bug: tint:162
Change-Id: I1905023eb8297d9a983884e77c6a2267fd43a076
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25601
Reviewed-by: David Neto <dneto@google.com>
This CL implements review feedback from previous CL.
Change-Id: I913c09d11b4eeb1831494653c38227387775b346
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25600
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds a script to run tint over the shaders in a given folder and
attempt to generate the WGSL, HLSL, MSL and SPIRV-ASM shaders. The
GPUWeb CTS is added to third_party and the validation folder set as the
default folder to execute.
Change-Id: I63a0af056416e2f99ed8e3f92f9e2ca31c2b3e49
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25561
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>