mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 03:11:29 +00:00
Use the sanitizer to add the decoration only to the variables that are vertex outputs and fragment inputs. Bug: dawn:963, tint:746 Change-Id: I1b91cf3550fb3c6f583d69e822444534a576e0cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56460 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
18 lines
358 B
WebGPU Shading Language
18 lines
358 B
WebGPU Shading Language
struct Interface {
|
|
[[location(0)]] i : i32;
|
|
[[location(1)]] u : u32;
|
|
[[location(2)]] vi : vec4<i32>;
|
|
[[location(3)]] vu : vec4<u32>;
|
|
[[builtin(position)]] pos : vec4<f32>;
|
|
};
|
|
|
|
[[stage(vertex)]]
|
|
fn vert_main() -> Interface {
|
|
return Interface();
|
|
}
|
|
|
|
[[stage(fragment)]]
|
|
fn frag_main(inputs : Interface) -> [[location(0)]] i32 {
|
|
return inputs.i;
|
|
}
|