mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-09 06:35:54 +00:00
An expression like `b--b` needs the `--` split into two symbols in order to parse correctly. This change was done previously, adding a test case to show the generated output. Bug: tint:988 Change-Id: Id389224e33b7702a90e4c157b02031fb605c1b14 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106580 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
14 lines
248 B
Plaintext
14 lines
248 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
|
|
int tint_unary_minus(const int v) {
|
|
return select(-v, v, v == -2147483648);
|
|
}
|
|
|
|
void tint_symbol() {
|
|
int b = 2;
|
|
int c = as_type<int>((as_type<uint>(b) - as_type<uint>(tint_unary_minus(b))));
|
|
}
|
|
|