diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-11-07 11:57:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-07 11:57:48 -0800 |
| commit | d1b45f3059e100d096327eb178c1bac365e564f1 (patch) | |
| tree | 161fd25105ed7e924f1ad5b53517c55f101ddd5a /source/slang/reflection.cpp | |
| parent | 9919c823938ae929b16efac9d507f6d5eb122bf4 (diff) | |
IR: support for select and negate (#257)
- During IR emit, treat a "select" expression (`?:` operator) like any other `InvokeExpr`, since it will have an `__intrinsic_op` modifier attached to turn it into a `select` instruction.
- During HLSL/GLSL emit from IR, turn a `select` instruction into a `?:` expression
- Also add support for the `neg` instruction during HLSL/GLSL emit
Note that right now we are assuming HLSL semantics for `?:` where it does not short-circuit. Correctly handling the GLSL case would require going back to special-case codegen for `SelectExpr`, but we can cross that bridge when we come to it.
Diffstat (limited to 'source/slang/reflection.cpp')
0 files changed, 0 insertions, 0 deletions
