This CL adds support for generating the OpSMod, OpUMod and OpFMod SPIR-V
instructions.
Bug: tint:5
Change-Id: I9e2183535ba24a2d0bb4257dd797a62151fe04a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19506
Reviewed-by: David Neto <dneto@google.com>
This CL adds generation of the OpFSub and OpISub SPIR-V commands from
the subtraction binary expression.
Bug: tint:5
Change-Id: Ia25a855a972057a4cac70d538946e176e0a0e5c3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19505
Reviewed-by: David Neto <dneto@google.com>
This CL cleans up some lint errors.
Change-Id: Ibfe9768cc4272d015a35a8d7edde0390b8fc66a5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19504
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds support for having elseif statements after an if statement.
Bug: tint:5
Change-Id: I3cd3c5bddaa57c998b1a3fbee7bd87536533301d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19500
Reviewed-by: David Neto <dneto@google.com>
This CL adds the start of support for else statements.
Bug: tint:5
Change-Id: I742fd4582bfee4f31715b94b7aea6cf8383f4e22
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19412
Reviewed-by: David Neto <dneto@google.com>
This CL adds the code to generate simple if statements.
Bug: tint:5
Change-Id: Ied42ad8b3632d7926ac646d1aa21e190a7a2c07e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19411
Reviewed-by: David Neto <dneto@google.com>
This CL adds bitwise xor support to the spirv writer.
Bug: tint:5
Change-Id: I011283ef12840d25c882b95fc664f2b0dc6003da
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19410
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds output of the bitwise or command.
Bug: tint:5
Change-Id: Iad9bafaa0a8394494615922c14c2d33d2d5701bb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19409
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL updates the binary expression to handle the bitwise and command.
Bug: tint:5
Change-Id: I64d53d6aaa1de2fd9ec7959bf084f30736146d78
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19408
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds generation for the binary greater than or equal comparison.
Bug: tint:5
Change-Id: I5c81b7d142d29f388800d8b576ec69dc260b243e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19407
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds generation for the less than equal binary operator.
Bug: tint:5
Change-Id: Ic9d0eb107079c29b2ca1b0eb088e3b2eb7531e1e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19406
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds the binary greater then comparison output.
Bug: tint:5
Change-Id: I86fa90b3d98f3ee81174edafb188c445b94f9d29
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19405
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds support for the less than comparison operator.
Bug: tint:5
Change-Id: Ibfca48652ff0817bacd2badca183cb87f8c8ed31
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19404
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds support for the not equal comparison.
Bug: tint:5
Change-Id: Idb91a02b546e49d67d6dc8570c754e611643a1f2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19403
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds generation for a == operator.
Bug: tint:5
Change-Id: Ib27836a42153f3732927234cfa9aed342d0f9ac1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19402
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL changes the binary tests to be paramaterized to make it easier
to add more tests.
Bug: tint:5
Change-Id: Ib4edb3c368c0cba3252dd139841dd5f1be4bc34c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19401
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL removes the premerge statement and replaces it with a `premerge`
reserved word.
Change-Id: Ic9bc13878ed26e1733eb65dd1ba30d9bef095cb6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19380
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL removes the regardless statement and turns `regardless` into a
reserved word.
Change-Id: I50c521111b90dbadddaeb36674e8c40205186076
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19361
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This Cl adds the start of issuing loads for IdentifierExpressions. This
does not handle the more complicated cases around pointers and
OpAccessChain yet.
Bug: tint:5
Change-Id: Ic858a7d9200399e3066ca92cd5c130bbe527de76
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19100
Reviewed-by: David Neto <dneto@google.com>
Also adds generic support for generating a combinatorial value
as a const definition.
Bug: tint:3
Change-Id: Idae758d146264491679710967e48ea270436be91
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19107
Reviewed-by: dan sinclair <dsinclair@google.com>
Lots of little style nits needed to be fixed for this work.
BUG=tint:44
Change-Id: Ibb45d9e3f6795ee0c09f5eca994bb28e20979d97
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19221
Reviewed-by: dan sinclair <dsinclair@google.com>
This is a minimal config that gets us building the tint binary from samples/
BUG=tint:2
Change-Id: Ifafa903e99a34f1c47177eb954df69ecbe70cb36
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19106
Reviewed-by: dan sinclair <dsinclair@google.com>
This CL adds the source info into the type determiner errors so they
will include line and column number if available. If the line number is
0 then it's considered the source info is missing and it is not emitted.
Add line and colummn to type determiner errors
Change-Id: I18764a71db80082fd31c8509c5e9b193800f1d95
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19105
Reviewed-by: David Neto <dneto@google.com>
This CL converts a few more std::vector<std::unique_ptr<foo>>'s to
FooList aliases.
Change-Id: If0dd672f11beaeabd9e89e82903c2174b11be6e1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19103
Reviewed-by: David Neto <dneto@google.com>
If a non-const variable in a function has a kNone storage class we
update it to kFunction. If there is a storage class other then kFunction
we emit an error.
Bug: tint:5
Change-Id: If45eb91bd0a0095e625eb1d0e1d1e361c784e35d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19102
Reviewed-by: David Neto <dneto@google.com>
BUG=tint:43
Change-Id: If0f6ff0b65af4c66fe7114eb7160e93ef060fbf9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19104
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@google.com>
This CL adds the relational add expression to the spirv writer.
Bug: tint:5
Change-Id: Ideed225c63e60f53a019b79803809f8e973299c6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18605
Reviewed-by: David Neto <dneto@google.com>
Tests FunctionEmitter directly.
This is mostly refactoring to be able to selectively run parts of the
parsing flow, and to access relevant internal data.
Bug: tint:3
Change-Id: Ic2b166a2e9623a7e30e6769806088d12e78dcf45
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18704
Reviewed-by: dan sinclair <dsinclair@google.com>
Change-Id: Icab0d32f199d4b0f95e2c1ebcd9ae9ea9ec7b61c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19020
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This CL completes a few of the DISABLED tests.
Change-Id: I38806fb9381240d6e3da700f1fb2dac5f899ca6d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/19000
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Match the more common usage for the expression type.
Bug: tint:37
Change-Id: Ia5d48a0444742ec4e304ea1036e499b3d7cad682
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18981
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds tests for break, continue and return without attached
expressions.
Bug: tint:5
Change-Id: I8c4221e787af95f5597db3ea4e42b38962223bf4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18980
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL adds type determination for the unary op expression.
Bug: tint:5
Change-Id: I5b9c0c80bb48527f1f26febb2310f9640e5f7849
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18850
Reviewed-by: David Neto <dneto@google.com>
This CL adds the type determination for the unary method expression.
Bug: tint:5
Change-Id: I9f94a79b9715cf74e37c74eb1a612ca84b3c241f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/18849
Reviewed-by: David Neto <dneto@google.com>