From bdca20fc4a3e8f6bd8ffb59de75e6ca0f8a94b6a Mon Sep 17 00:00:00 2001 From: Vladyslav Nikonov Date: Thu, 21 Oct 2021 22:42:14 +0300 Subject: Experimental wgpu WebGL backend support - Added missing `draw_cache_align_4x4` call for `brush_glyph` on wasm32 target - Added WebGL support to `integratio_wgpu` example - Fixed test.yml CI workflow - Removed spir-v shader in `integration_wgpu`; Fixed formatting - Removed redundant `BoxStream` typedef --- examples/integration_wgpu/src/shader/frag.spv | Bin 352 -> 0 bytes examples/integration_wgpu/src/shader/frag.wgsl | 4 ++++ examples/integration_wgpu/src/shader/vert.spv | Bin 904 -> 0 bytes examples/integration_wgpu/src/shader/vert.wgsl | 6 ++++++ 4 files changed, 10 insertions(+) delete mode 100644 examples/integration_wgpu/src/shader/frag.spv create mode 100644 examples/integration_wgpu/src/shader/frag.wgsl delete mode 100644 examples/integration_wgpu/src/shader/vert.spv create mode 100644 examples/integration_wgpu/src/shader/vert.wgsl (limited to 'examples/integration_wgpu/src/shader') diff --git a/examples/integration_wgpu/src/shader/frag.spv b/examples/integration_wgpu/src/shader/frag.spv deleted file mode 100644 index 9d6807c9..00000000 Binary files a/examples/integration_wgpu/src/shader/frag.spv and /dev/null differ diff --git a/examples/integration_wgpu/src/shader/frag.wgsl b/examples/integration_wgpu/src/shader/frag.wgsl new file mode 100644 index 00000000..a6f61336 --- /dev/null +++ b/examples/integration_wgpu/src/shader/frag.wgsl @@ -0,0 +1,4 @@ +[[stage(fragment)]] +fn main() -> [[location(0)]] vec4 { + return vec4(1.0, 0.0, 0.0, 1.0); +} diff --git a/examples/integration_wgpu/src/shader/vert.spv b/examples/integration_wgpu/src/shader/vert.spv deleted file mode 100644 index 0cabc9c0..00000000 Binary files a/examples/integration_wgpu/src/shader/vert.spv and /dev/null differ diff --git a/examples/integration_wgpu/src/shader/vert.wgsl b/examples/integration_wgpu/src/shader/vert.wgsl new file mode 100644 index 00000000..7ef47fb2 --- /dev/null +++ b/examples/integration_wgpu/src/shader/vert.wgsl @@ -0,0 +1,6 @@ +[[stage(vertex)]] +fn main([[builtin(vertex_index)]] in_vertex_index: u32) -> [[builtin(position)]] vec4 { + let x = f32(1 - i32(in_vertex_index)) * 0.5; + let y = f32(1 - i32(in_vertex_index & 1u) * 2) * 0.5; + return vec4(x, y, 0.0, 1.0); +} -- cgit