mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-04 11:15:46 +00:00
This is required to generate valid MSL code, and will soon be validated by Tint too. Change-Id: I4c5f5c4ecb1c91131c934de1132217d9f6be1f8e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53420 Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
27 lines
437 B
WebGPU Shading Language
27 lines
437 B
WebGPU Shading Language
[[block]]
|
|
struct SB {
|
|
arg_0 : array<u32>;
|
|
};
|
|
|
|
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
|
|
|
fn arrayLength_647a40() {
|
|
var res : u32 = arrayLength(sb.arg_0);
|
|
}
|
|
|
|
[[stage(vertex)]]
|
|
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
|
arrayLength_647a40();
|
|
return vec4<f32>();
|
|
}
|
|
|
|
[[stage(fragment)]]
|
|
fn fragment_main() {
|
|
arrayLength_647a40();
|
|
}
|
|
|
|
[[stage(compute)]]
|
|
fn compute_main() {
|
|
arrayLength_647a40();
|
|
}
|