From 393abed3873d83019feb5bcebb10a6929133862a Mon Sep 17 00:00:00 2001 From: Leo Kettmeir Date: Sat, 9 Dec 2023 01:19:16 +0100 Subject: feat: bring back WebGPU (#20812) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leo Kettmeir Co-authored-by: Kenta Moriuchi Co-authored-by: Bartek IwaƄczuk --- cli/tests/testdata/webgpu/hellotriangle_shader.wgsl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 cli/tests/testdata/webgpu/hellotriangle_shader.wgsl (limited to 'cli/tests/testdata/webgpu/hellotriangle_shader.wgsl') diff --git a/cli/tests/testdata/webgpu/hellotriangle_shader.wgsl b/cli/tests/testdata/webgpu/hellotriangle_shader.wgsl new file mode 100644 index 000000000..f84ccfe94 --- /dev/null +++ b/cli/tests/testdata/webgpu/hellotriangle_shader.wgsl @@ -0,0 +1,11 @@ +@vertex +fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4 { + let x = f32(i32(in_vertex_index) - 1); + let y = f32(i32(in_vertex_index & 1u) * 2 - 1); + return vec4(x, y, 0.0, 1.0); +} + +@fragment +fn fs_main() -> @location(0) vec4 { + return vec4(1.0, 0.0, 0.0, 1.0); +} -- cgit v1.2.3