mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 10:45:36 +00:00
In https://dawn-review.googlesource.com/c/tint/+/62444 the Resolver validated that there are no parameters of the same function with the same name, but this also introduced validation that errors if parameters shadow a module-scope variable. The WGSL spec allows for shadowing, but Tint so far has not implemented this support. There are transforms that generate functions that presume parameter <-> module-scope variable shadowing is okay. DecomposeMemoryAccess is one of these. This fixes those transforms which could generate programs that fail validation. Bug: chromium:1242330 Fixed: tint:1136 Change-Id: Id6ec59bbdb398b3b2a23312115a7c1dadf433e98 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62900 Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
11 lines
162 B
WebGPU Shading Language
11 lines
162 B
WebGPU Shading Language
[[block]]
|
|
struct Buffer {
|
|
data : u32;
|
|
};
|
|
|
|
[[group(0), binding(0)]] var<storage, read_write> buffer : Buffer;
|
|
|
|
fn main() {
|
|
buffer.data = (buffer.data + 1u);
|
|
}
|