diff --git a/examples/gui/platform/Cargo.lock b/examples/gui/platform/Cargo.lock index 98c056e08f..9ce6ea7d8d 100644 --- a/examples/gui/platform/Cargo.lock +++ b/examples/gui/platform/Cargo.lock @@ -101,9 +101,9 @@ checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "ash" -version = "0.34.0+1.2.203" +version = "0.35.1+1.2.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0f780da53d0063880d45554306489f09dd8d1bda47688b4a57bc579119356df" +checksum = "b7fd04def1c9101b5fb488c131022d2d6f87753ef4b1b11b279e2af404fae6b9" dependencies = [ "libloading", ] @@ -1174,6 +1174,7 @@ checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" dependencies = [ "libc", "libloading", + "pkg-config", ] [[package]] @@ -1296,8 +1297,7 @@ dependencies = [ [[package]] name = "metal" version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0514f491f4cc03632ab399ee01e2c1c1b12d3e1cf2d667c1ff5f87d6dcd2084" +source = "git+https://github.com/gfx-rs/metal-rs?rev=44af5cc#44af5cca340617d42d701264f9bf71d1f3e68096" dependencies = [ "bitflags", "block", @@ -1367,9 +1367,8 @@ dependencies = [ [[package]] name = "naga" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3012f2dbcc79e8e0b5825a4836a7106a75dd9b2fe42c528163be0f572538c705" +version = "0.8.0" +source = "git+https://github.com/gfx-rs/naga?rev=8e2e39e#8e2e39e4d8fa5bbb657c3b170b4f6607d703e284" dependencies = [ "bit-set", "bitflags", @@ -2606,8 +2605,7 @@ dependencies = [ [[package]] name = "wgpu" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97cd781ff044d6d697b632a2e212032c2e957d1afaa21dbf58069cbb8f78567" +source = "git+https://github.com/gfx-rs/wgpu?rev=0545e36#0545e36aa82709cca78c14eb3813f10eea7a9275" dependencies = [ "arrayvec", "js-sys", @@ -2626,9 +2624,8 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4688c000eb841ca55f7b35db659b78d6e1cd77d7caf8fb929f4e181f754047d" +version = "0.12.0" +source = "git+https://github.com/gfx-rs/wgpu?rev=0545e36#0545e36aa82709cca78c14eb3813f10eea7a9275" dependencies = [ "arrayvec", "bitflags", @@ -2649,9 +2646,8 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93b1a9400e8d7f32dd4dd909bb9a391015d70633d639775ddd3f14d1104bc970" +version = "0.12.0" +source = "git+https://github.com/gfx-rs/wgpu?rev=0545e36#0545e36aa82709cca78c14eb3813f10eea7a9275" dependencies = [ "arrayvec", "ash", @@ -2688,8 +2684,7 @@ dependencies = [ [[package]] name = "wgpu-types" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549533d9e1cdd4b4cda7718d33ff500fc4c34b5467b71d76b547ae0324f3b2a2" +source = "git+https://github.com/gfx-rs/wgpu?rev=0545e36#0545e36aa82709cca78c14eb3813f10eea7a9275" dependencies = [ "bitflags", ] @@ -2697,8 +2692,7 @@ dependencies = [ [[package]] name = "wgpu_glyph" version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8134edb15ae465caf308125646c9e98bdef7398cdefc69227ac77a5eb795e7fe" +source = "git+https://github.com/Anton-4/wgpu_glyph?rev=257d109#257d1098cbafa3c8a0a2465937b06fc730fc6ffb" dependencies = [ "bytemuck", "glyph_brush", diff --git a/examples/gui/platform/Cargo.toml b/examples/gui/platform/Cargo.toml index 69f6b10a3f..b82712e562 100644 --- a/examples/gui/platform/Cargo.toml +++ b/examples/gui/platform/Cargo.toml @@ -27,8 +27,8 @@ arrayvec = "0.7.2" page_size = "0.4.2" # when changing winit version, check if copypasta can be updated simultaneously so they use the same versions for their dependencies. This will save build time. winit = "0.26.1" -wgpu = "0.12.0" -wgpu_glyph = "0.16.0" +wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "0545e36" } +wgpu_glyph = { git = "https://github.com/Anton-4/wgpu_glyph", rev = "257d109" } glyph_brush = "0.7.2" log = "0.4.14" env_logger = "0.9.0" diff --git a/examples/gui/platform/src/graphics/shaders/quad.wgsl b/examples/gui/platform/src/graphics/shaders/quad.wgsl index 4dbab07fa7..1cd4a008ca 100644 --- a/examples/gui/platform/src/graphics/shaders/quad.wgsl +++ b/examples/gui/platform/src/graphics/shaders/quad.wgsl @@ -4,31 +4,35 @@ struct Globals { ortho: mat4x4; }; -[[group(0), binding(0)]] +@group(0) +@binding(0) var globals: Globals; struct VertexInput { - [[location(0)]] position: vec2; + @location(0) position: vec2; }; struct Quad { - [[location(1)]] position: vec2; - [[location(2)]] width: f32; - [[location(3)]] height: f32; - [[location(4)]] color: vec4; - [[location(5)]] border_color: vec4; - [[location(6)]] border_width: f32; + @location(1) position: vec2; + @location(2) width: f32; + @location(3) height: f32; + @location(4) color: vec4; + @location(5) border_color: vec4; + @location(6) border_width: f32; }; struct VertexOutput { - [[builtin(position)]] position: vec4; - [[location(0)]] color: vec4; - [[location(1)]] border_color: vec4; - [[location(2)]] border_width: f32; + @builtin(position) position: vec4; + @location(0) color: vec4; + @location(1) border_color: vec4; + @location(2) border_width: f32; }; -[[stage(vertex)]] -fn vs_main(input: VertexInput, quad: Quad) -> VertexOutput { +@stage(vertex) +fn vs_main( + input: VertexInput, + quad: Quad +) -> VertexOutput { var transform: mat4x4 = mat4x4( vec4(quad.width, 0.0, 0.0, 0.0), @@ -48,9 +52,9 @@ fn vs_main(input: VertexInput, quad: Quad) -> VertexOutput { } -[[stage(fragment)]] +@stage(fragment) fn fs_main( input: VertexOutput -) -> [[location(0)]] vec4 { +) -> @location(0) vec4 { return input.color; } diff --git a/examples/gui/platform/src/graphics/shaders/shader.wgsl b/examples/gui/platform/src/graphics/shaders/shader.wgsl deleted file mode 100644 index fea9e341ff..0000000000 --- a/examples/gui/platform/src/graphics/shaders/shader.wgsl +++ /dev/null @@ -1,30 +0,0 @@ - -struct VertexOutput { - [[location(0)]] color: vec4; - [[builtin(position)]] position: vec4; -}; - -struct Globals { - ortho: mat4x4; // The ortho transformation keeps everything the same size when the window size is changed. -}; - -[[group(0), binding(0)]] -var u_globals: Globals; - -[[stage(vertex)]] -fn vs_main( - [[location(0)]] in_position: vec2, - [[location(1)]] in_color: vec4, -) -> VertexOutput { - var out: VertexOutput; - - out.position = u_globals.ortho * vec4(in_position, 0.0, 1.0); - out.color = in_color; - - return out; -} - -[[stage(fragment)]] -fn fs_main(in: VertexOutput) -> [[location(0)]] vec4 { - return in.color; -} \ No newline at end of file