mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 18:55:39 +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
183 B
HLSL
11 lines
183 B
HLSL
[numthreads(1, 1, 1)]
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
|
|
RWByteAddressBuffer buffer : register(u0, space0);
|
|
|
|
void main() {
|
|
buffer.Store(0u, asuint((buffer.Load(0u) + 1u)));
|
|
}
|