This CL adds the sampler type into the AST.
Bug: tint:141
Change-Id: Id2f7678a2df677cb7dae47f05543c1e0a1999eed
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/26080
Reviewed-by: David Neto <dneto@google.com>
This CL adds support for the LoopStatement emission in HLSL.
Bug: tint:7
Change-Id: Ie42b24abff3a69c9cbfe3d3c8ab6fb9b1823e61d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25849
Reviewed-by: David Neto <dneto@google.com>
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 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>
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 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 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 the assign statement emission to the HLSL backend.
Bug: tint:7
Change-Id: I3e46ac09170ea1af7444ae89267a82e1d1c42c52
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25224
Reviewed-by: David Neto <dneto@google.com>
This CL adds emission of switch statements to the HLSL backend.
Bug: tint:7
Change-Id: Ie6f41031878a1f5a945f9310429d28fb0e4a98c8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25223
Reviewed-by: David Neto <dneto@google.com>
This CL adds emission of case statements to the HLSL backend.
Bug: tint:7
Change-Id: I5d0dd7ecfe4ef032a03777c29f3d0d00e584a93a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25222
Reviewed-by: David Neto <dneto@google.com>
This CL emits unary operators from the HLSL backend.
Bug: tint:7
Change-Id: I997d89d62d279fc7440ba6045c56e290ec7601c1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25221
Reviewed-by: David Neto <dneto@google.com>
This CL updates the HLSL writer to emit break, return and continue
statements.
Bug: tint:7
Change-Id: I03eafc343e57e9e8d1efaf930023099d6f85fc57
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25220
Reviewed-by: David Neto <dneto@google.com>
This CL updates the WGSL parser to handle a void function call.
Fixes: tint:45
Change-Id: If5b2a4b9e62f0b10e0f2e2e10c0ca2586c5268e8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25322
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds identifier emission and an HLSL namer to guard against
names using reserved words.
Bug: tint:7
Change-Id: Id3d73ff683048c26ac99451d21c3dd7ef3c620a3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25001
Reviewed-by: David Neto <dneto@google.com>
This CL adds CallStatement to the AST to allow wrapping a CallExpression
into a statement.
Bug: tint:45
Change-Id: I5a9525514344fcc2cf9900eb2cd78c1fb94ca2ef
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25320
Reviewed-by: David Neto <dneto@google.com>
This CL adds the scaffolding for the HLSL backend.
Bug: tint:7
Change-Id: Iaf9f5159bc409f3ac71fcec281229258bdfa021b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25000
Reviewed-by: David Neto <dneto@google.com>
This CL adds emission of import function calls to the MSL backend.
Bug: tint:8
Change-Id: Ib8b8638b11caee2ff3557d551447b215ef2a4c69
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25262
Reviewed-by: David Neto <dneto@google.com>
Couple of little style issues, and a path to a file that was incorrect.
Change-Id: I21d1a4ca41bc36163602378086989ac712f54469
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25265
Reviewed-by: dan sinclair <dsinclair@chromium.org>
gn gen --check is failing in chromium due to how includes are propagated
out of deps. Re-organizing them to resolve this.
Change-Id: I3c21bbb0cb8b5bc5bdad4ab97d557d718a3cdc33
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/25120
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This CL adds code to emit program constants in the MSL backend.
Bug: tint:8
Change-Id: I63e40983253349d2e293904fbe9b6f543b885b34
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24940
Reviewed-by: David Neto <dneto@google.com>
This CL adds support for calling user defined functions from the MSL
backend. Intrinsics and imports are not handled yet.
Bug: tint:8
Change-Id: I45c3078d014ab89cc0eec76dd626759077e1a890
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24763
Reviewed-by: David Neto <dneto@google.com>
This CL adds generation of the input/output structures for entry points.
Bug: tint:8
Change-Id: I93942496bcea0a2eea944e5e1cd0baf383530f5e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24721
Reviewed-by: David Neto <dneto@google.com>
This CL adds variable declarations to the MSL backend.
Bug: tint:7
Change-Id: Icf63ad44a217213e5036eb76429e25a3031822eb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24540
Reviewed-by: David Neto <dneto@google.com>
This CL adds a namer class to prevent collisions with builtin names in
MSL. The MSL generator has been updated to use the namer anywhere that
names are emitted.
Bug: tint:8
Change-Id: I820f226a7286be1d5b0d613bd0fa41b68cb9f8ba
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24184
Reviewed-by: David Neto <dneto@google.com>
This CL adds support for switch and case statements into the MSL writer.
Bug: tint:8
Change-Id: Ib51f943e8476c0ecfd45e9131404f96934c6e21f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/24180
Reviewed-by: David Neto <dneto@google.com>