dawn-cmake/test/expressions/unary/complement.wgsl
James Price c932b5535f Implement bitwise complement operator
This translates to/from OpNot for SPIR-V, and ~ for all three textual
language backends.

Fixed: tint:866
Change-Id: Id934fb309221e3fca0e7efa33edaaae137fd8085
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54980
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-06-17 08:35:54 +00:00

16 lines
181 B
WebGPU Shading Language

fn i(x : i32) -> i32 {
return ~x;
}
fn u(x : u32) -> u32 {
return ~x;
}
fn vi(x : vec4<i32>) -> vec4<i32> {
return ~x;
}
fn vu(x : vec4<u32>) -> vec4<u32> {
return ~x;
}