mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 04:11:25 +00:00
Implemented in both the reader and writer with E2E tests. Other backends detect compound assignment and ICE for now. Bug: tint:1325 Change-Id: Ie3f51e03627a38b12bd1513c4bcf1bebb3282863 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/74363 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
22 lines
256 B
WebGPU Shading Language
22 lines
256 B
WebGPU Shading Language
struct S {
|
|
a : array<vec4<i32>, 4>,
|
|
}
|
|
|
|
var<private> counter : i32;
|
|
|
|
fn foo() -> i32 {
|
|
counter += 1;
|
|
return counter;
|
|
}
|
|
|
|
fn bar() -> i32 {
|
|
counter += 2;
|
|
return counter;
|
|
}
|
|
|
|
fn main() {
|
|
var x = S();
|
|
let p = &(x);
|
|
(*(p)).a[foo()][bar()] += 5;
|
|
}
|