mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
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>
This commit is contained in:
committed by
Tint LUCI CQ
parent
52b6a004b8
commit
c932b5535f
@@ -2500,6 +2500,7 @@ bool Resolver::UnaryOp(ast::UnaryOpExpression* unary) {
|
||||
const sem::Type* type = nullptr;
|
||||
|
||||
switch (unary->op()) {
|
||||
case ast::UnaryOp::kComplement:
|
||||
case ast::UnaryOp::kNegation:
|
||||
case ast::UnaryOp::kNot:
|
||||
// Result type matches the deref'd inner type.
|
||||
|
||||
@@ -1946,7 +1946,8 @@ TEST_P(UnaryOpExpressionTest, Expr_UnaryOp) {
|
||||
}
|
||||
INSTANTIATE_TEST_SUITE_P(ResolverTest,
|
||||
UnaryOpExpressionTest,
|
||||
testing::Values(ast::UnaryOp::kNegation,
|
||||
testing::Values(ast::UnaryOp::kComplement,
|
||||
ast::UnaryOp::kNegation,
|
||||
ast::UnaryOp::kNot));
|
||||
|
||||
TEST_F(ResolverTest, StorageClass_SetsIfMissing) {
|
||||
|
||||
Reference in New Issue
Block a user