mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-28 10:11:33 +00:00
This CL adds `<<=` and `>>=` to the supported operators in WGSL. The ExpandCompoundAssignment transform is used to convert to the expanded form. Bug: tint:1594 Change-Id: I20519052c52d4b69bc90def1acc5c0a30c36fd8a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97980 Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
18 lines
238 B
GLSL
18 lines
238 B
GLSL
#version 310 es
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
struct S {
|
|
int a;
|
|
};
|
|
|
|
layout(binding = 0, std430) buffer S_1 {
|
|
int a;
|
|
} v;
|
|
void foo() {
|
|
v.a = (v.a << 2u);
|
|
}
|
|
|