Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
Ehsan ec9cfae3b6 [spirv] Translation of while loops (#532)
Also added the translation for `loop` and `unroll` attributes.

Similar to for loops, the current implementation does not support
early exits, or early returns.
2017-08-08 22:18:51 -07:00
Lei Zhang d3d5dd789d [spirv] Add doc for vector and matrix types (#507) 2017-08-02 16:27:56 -07:00
Lei Zhang 694c35a47e [spirv] Translate vector truncation and splatting (#502)
* [spirv] Translate vector truncation and splatting

* Also added tests for vector<|type|, |count|> format.

* [spirv] Remove duplicated vector splatting tests

Although they appear as binary operator tests, they are essentially
testing vector splatting, which we already have dedicated tests.
2017-08-02 09:38:20 -07:00
Lei Zhang c760e02232 [spirv] Support casting to bool/int/float (vector) values (#500)
* [spirv] Translate casting to bool (vector) values

* Supported converting scalar/vector sint/uint/float values into
  scalar/vector bool values.

* [spirv] Translate casting to int (vector) values

* Supported converting scalar/vector bool/float values into
  scalar/vector sint/uint values.

* [spirv] Translate casting to float (vector) values

* Supported implicit/explicit casting from scalar/vector
  bool/sint/uint into scalar/vector float values
2017-08-01 16:31:25 -07:00
Lei Zhang f38109c154 [spirv] Translate boolean math operators: &&, ||, ?: (#499) 2017-08-01 11:25:32 -07:00
Lei Zhang c8ff1681be [spirv] Support unary operators: ++, --, !, +, - (#497)
* [spirv] Translate prefix/postfix increment/decrement

* [spirv] Translate unary operator !, +, and -
2017-08-01 09:10:48 -07:00
Ehsan e6685a310d [spirv] Translate intrinsic dot product. (#496)
The translation supports dot product of vectors of floats using
SPIR-V's OpDot.

The translation also supports dot product of vectros of integers
using multiplication and addition.
2017-07-31 18:09:02 -07:00
Lei Zhang 399e987298 [spirv] Translate bitwise operators (#495)
* Covers ~, &, |, ^, <<, >>, &=, |=, ^=, <<=, >>=
* For int/uint and vector of int/uint
2017-07-31 16:14:59 -07:00
Lei Zhang 660a367778 [spirv] Vector types, variable initializers, and comparison (#488)
* [spirv] Translate vector types and handle variable initializers

* Translated vector types and operations on vector types
  * +, -, *, /, % on vector <op> vector and vector <op> scalar
  * Prefix increment on vectors
  * < on vector <op> vector and vector <op> scalar
* Covered both constant initializer and variable initializer
* Applied constant modifier to variables

* [spirv] Translate all comparision operators

* Covers <, <=, >, >=, ==, !=
* For both scalars and vectors
* Also update docs about arithmetic and comparison operators
2017-07-31 09:13:45 -07:00
Lei Zhang dc240f47e7 [spirv] Translate non-entry functions and function calls (#487) 2017-07-28 08:59:49 -07:00
Lei Zhang 9cab7fd909 Add doc for SPIR-V codegen (#215) 2017-04-14 18:18:21 -07:00