mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 03:41:34 +00:00
And force shader code to always use LF endings. Post merge, there were a number of files that crept in with CRLF endings. Some Tint end-to-end tests take objection to CRLF endings. CRLF endings can be detected with: ``` git grep -I --files-with-matches --perl-regexp '\r' HEAD ``` And fixed with: ``` find . -type f -exec dos2unix {} \; ``` Bug: dawn:1339 Change-Id: Iee054bafd15875de744b86e28393cd8229bd3cfa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86140 Kokoro-Run: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
40 lines
824 B
WebGPU Shading Language
40 lines
824 B
WebGPU Shading Language
struct MyStruct {
|
|
f1 : f32,
|
|
};
|
|
|
|
type MyArray = array<f32, 10>;
|
|
|
|
fn ret_i32() -> i32 { return 1; }
|
|
fn ret_u32() -> u32 { return 1u; }
|
|
fn ret_f32() -> f32 { return 1.0; }
|
|
fn ret_MyStruct() -> MyStruct { return MyStruct(); }
|
|
fn ret_MyArray() -> MyArray { return MyArray(); }
|
|
|
|
// Local lets
|
|
fn let_decls() {
|
|
let v1 = 1;
|
|
let v2 = 1u;
|
|
let v3 = 1.0;
|
|
|
|
let v4 = vec3<i32>(1, 1, 1);
|
|
let v5 = vec3<u32>(1u, 1u, 1u);
|
|
let v6 = vec3<f32>(1.0, 1.0, 1.0);
|
|
|
|
let v7 = mat3x3<f32>(v6, v6, v6);
|
|
|
|
let v8 = MyStruct(1.0);
|
|
let v9 = MyArray();
|
|
|
|
let v10 = ret_i32();
|
|
let v11 = ret_u32();
|
|
let v12 = ret_f32();
|
|
let v13 = ret_MyStruct();
|
|
let v14 = ret_MyStruct();
|
|
let v15 = ret_MyArray();
|
|
}
|
|
|
|
@stage(fragment)
|
|
fn main() -> @location(0) vec4<f32> {
|
|
return vec4<f32>(0.0,0.0,0.0,0.0);
|
|
}
|