diff --git a/Cargo.lock b/Cargo.lock index 5c811392bef..3e836581210 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -225,6 +225,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" +[[package]] +name = "ash" +version = "0.37.3+1.3.251" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +dependencies = [ + "libloading 0.7.4", +] + [[package]] name = "ash" version = "0.38.0+1.3.281" @@ -925,6 +934,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "d3d12" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b28bfe653d79bd16c77f659305b195b82bb5ce0c0eb2a4846b82ddbd77586813" +dependencies = [ + "bitflags 2.5.0", + "libloading 0.7.4", + "winapi", +] + [[package]] name = "darling" version = "0.13.4" @@ -1085,8 +1105,8 @@ dependencies = [ "raw-window-handle 0.6.2", "serde", "tokio", - "wgpu-core", - "wgpu-types", + "wgpu-core 0.20.0", + "wgpu-types 0.20.0", ] [[package]] @@ -1648,6 +1668,15 @@ dependencies = [ "gl_generator", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + [[package]] name = "glutin_wgl_sys" version = "0.6.0" @@ -1676,6 +1705,19 @@ dependencies = [ "bitflags 2.5.0", ] +[[package]] +name = "gpu-allocator" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +dependencies = [ + "log", + "presser", + "thiserror", + "winapi", + "windows 0.52.0", +] + [[package]] name = "gpu-allocator" version = "0.26.0" @@ -2198,6 +2240,27 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "naga" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" +dependencies = [ + "arrayvec 0.7.4", + "bit-set", + "bitflags 2.5.0", + "codespan-reporting", + "hexf-parse", + "indexmap", + "log", + "num-traits", + "rustc-hash", + "spirv 0.3.0+sdk-1.3.268.0", + "termcolor", + "thiserror", + "unicode-xid", +] + [[package]] name = "naga-cli" version = "0.20.0" @@ -2207,7 +2270,7 @@ dependencies = [ "bincode", "codespan-reporting", "env_logger", - "naga", + "naga 0.20.0", ] [[package]] @@ -2216,7 +2279,7 @@ version = "0.0.0" dependencies = [ "arbitrary", "libfuzzer-sys", - "naga", + "naga 0.20.0", ] [[package]] @@ -2679,8 +2742,8 @@ dependencies = [ "raw-window-handle 0.6.2", "ron", "serde", - "wgpu-core", - "wgpu-types", + "wgpu-core 0.20.0", + "wgpu-types 0.20.0", "winit 0.29.15", ] @@ -4205,7 +4268,7 @@ dependencies = [ "document-features", "js-sys", "log", - "naga", + "naga 0.20.0", "parking_lot", "profiling", "raw-window-handle 0.6.2", @@ -4215,9 +4278,35 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "wgpu-core", - "wgpu-hal", - "wgpu-types", + "wgpu-core 0.20.0", + "wgpu-hal 0.20.0", + "wgpu-types 0.20.0", +] + +[[package]] +name = "wgpu" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90e37c7b9921b75dfd26dd973fdcbce36f13dfa6e2dc82aece584e0ed48c355c" +dependencies = [ + "arrayvec 0.7.4", + "cfg-if", + "cfg_aliases", + "document-features", + "js-sys", + "log", + "naga 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core 0.21.1", + "wgpu-hal 0.21.1", + "wgpu-types 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4227,14 +4316,14 @@ dependencies = [ "bincode", "bytemuck", "criterion", - "naga", + "naga 0.20.0", "nanorand", "once_cell", "pollster", "profiling", "rayon", "tracy-client", - "wgpu", + "wgpu 0.20.1", ] [[package]] @@ -4249,7 +4338,7 @@ dependencies = [ "document-features", "indexmap", "log", - "naga", + "naga 0.20.0", "once_cell", "parking_lot", "profiling", @@ -4259,8 +4348,35 @@ dependencies = [ "serde", "smallvec", "thiserror", - "wgpu-hal", - "wgpu-types", + "wgpu-hal 0.20.0", + "wgpu-types 0.20.0", +] + +[[package]] +name = "wgpu-core" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50819ab545b867d8a454d1d756b90cd5f15da1f2943334ca314af10583c9d39" +dependencies = [ + "arrayvec 0.7.4", + "bit-vec", + "bitflags 2.5.0", + "cfg_aliases", + "codespan-reporting", + "document-features", + "indexmap", + "log", + "naga 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "rustc-hash", + "smallvec", + "thiserror", + "web-sys", + "wgpu-hal 0.21.1", + "wgpu-types 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -4289,7 +4405,7 @@ dependencies = [ "wasm-bindgen-test", "web-sys", "web-time", - "wgpu", + "wgpu 0.20.0", "wgpu-test", "winit 0.29.15", ] @@ -4300,21 +4416,21 @@ version = "0.20.0" dependencies = [ "android_system_properties", "arrayvec 0.7.4", - "ash", + "ash 0.38.0+1.3.281", "bit-set", "bitflags 2.5.0", "block", "cfg-if", "cfg_aliases", "core-graphics-types", - "d3d12", + "d3d12 0.20.0", "env_logger", "glam", "glow", "glutin", "glutin_wgl_sys 0.6.0", "gpu-alloc", - "gpu-allocator", + "gpu-allocator 0.26.0", "gpu-descriptor", "hassle-rs", "js-sys", @@ -4323,7 +4439,7 @@ dependencies = [ "libloading 0.8.3", "log", "metal", - "naga", + "naga 0.20.0", "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", @@ -4337,11 +4453,56 @@ dependencies = [ "thiserror", "wasm-bindgen", "web-sys", - "wgpu-types", + "wgpu-types 0.20.0", "winapi", "winit 0.29.15", ] +[[package]] +name = "wgpu-hal" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "172e490a87295564f3fcc0f165798d87386f6231b04d4548bca458cbbfd63222" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.4", + "ash 0.37.3+1.3.251", + "bit-set", + "bitflags 2.5.0", + "block", + "cfg_aliases", + "core-graphics-types", + "d3d12 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "glow", + "glutin_wgl_sys 0.5.0", + "gpu-alloc", + "gpu-allocator 0.25.0", + "gpu-descriptor", + "hassle-rs", + "js-sys", + "khronos-egl", + "libc", + "libloading 0.7.4", + "log", + "metal", + "naga 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.6.2", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", +] + [[package]] name = "wgpu-info" version = "0.20.0" @@ -4352,7 +4513,7 @@ dependencies = [ "pico-args", "serde", "serde_json", - "wgpu", + "wgpu 0.20.0", ] [[package]] @@ -4392,9 +4553,9 @@ dependencies = [ "wasm-bindgen-futures", "wasm-bindgen-test", "web-sys", - "wgpu", + "wgpu 0.20.0", "wgpu-macros", - "wgpu-types", + "wgpu-types 0.20.0", ] [[package]] @@ -4408,6 +4569,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wgpu-types" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" +dependencies = [ + "bitflags 2.5.0", + "js-sys", + "web-sys", +] + [[package]] name = "which" version = "5.0.0" diff --git a/benches/Cargo.toml b/benches/Cargo.toml index 65ac0eefdb4..28dc0426130 100644 --- a/benches/Cargo.toml +++ b/benches/Cargo.toml @@ -43,4 +43,4 @@ pollster.workspace = true profiling.workspace = true rayon.workspace = true tracy-client = { workspace = true, optional = true } -wgpu.workspace = true +wgpu.workspace = { workspace = true, features = ["wgsl"] } diff --git a/benches/benches/computepass-bindless.wgsl b/benches/benches/computepass-bindless.wgsl index 86e91dcbba2..402ff944894 100644 --- a/benches/benches/computepass-bindless.wgsl +++ b/benches/benches/computepass-bindless.wgsl @@ -3,7 +3,7 @@ var tex: binding_array>; @group(0) @binding(1) // TODO(https://github.com/gfx-rs/wgpu/issues/5765): The extra whitespace between the angle brackets is needed to workaround a parsing bug. -var images: binding_array >; +var images: binding_array >; struct BufferElement { element: vec4f, } @@ -21,6 +21,6 @@ fn cs_main(@builtin(global_invocation_id) global_invocation_id: vec3) { let tex = textureLoad(tex[idx0], vec2u(0), 0) + textureLoad(tex[idx0], vec2u(0), 0); let image = textureLoad(images[idx0], vec2u(0)) + textureLoad(images[idx1], vec2u(0)); - buffers[idx0].element = tex; - buffers[idx1].element = image; + buffers[idx0].element = tex.rrrr; + buffers[idx1].element = image.rrrr; } \ No newline at end of file diff --git a/benches/benches/computepass.rs b/benches/benches/computepass.rs index fdebc5d360c..a1366a6a0d8 100644 --- a/benches/benches/computepass.rs +++ b/benches/benches/computepass.rs @@ -77,7 +77,7 @@ impl ComputepassState { visibility: wgpu::ShaderStages::COMPUTE, ty: wgpu::BindingType::StorageTexture { access: wgpu::StorageTextureAccess::ReadWrite, - format: wgpu::TextureFormat::Rgba32Float, + format: wgpu::TextureFormat::R32Float, view_dimension: wgpu::TextureViewDimension::D2, }, count: None, @@ -144,7 +144,7 @@ impl ComputepassState { mip_level_count: 1, sample_count: 1, dimension: wgpu::TextureDimension::D2, - format: wgpu::TextureFormat::Rgba32Float, + format: wgpu::TextureFormat::R32Float, usage: wgpu::TextureUsages::STORAGE_BINDING, view_formats: &[], }); @@ -236,7 +236,6 @@ impl ComputepassState { module: &sm, entry_point: "cs_main", compilation_options: wgpu::PipelineCompilationOptions::default(), - cache: None, }); let (bindless_bind_group, bindless_pipeline) = if supports_bindless { @@ -263,7 +262,7 @@ impl ComputepassState { visibility: wgpu::ShaderStages::COMPUTE, ty: wgpu::BindingType::StorageTexture { access: wgpu::StorageTextureAccess::ReadWrite, - format: wgpu::TextureFormat::Rgba32Float, + format: wgpu::TextureFormat::R32Float, view_dimension: wgpu::TextureViewDimension::D2, }, count: Some(NonZeroU32::new(STORAGE_TEXTURE_COUNT as u32).unwrap()), @@ -331,7 +330,6 @@ impl ComputepassState { module: &bindless_sm, entry_point: "cs_main", compilation_options: wgpu::PipelineCompilationOptions::default(), - cache: None, }); (Some(bindless_bind_group), Some(bindless_pipeline)) diff --git a/benches/benches/computepass.wgsl b/benches/benches/computepass.wgsl index bc2f8e284f2..83d7d497859 100644 --- a/benches/benches/computepass.wgsl +++ b/benches/benches/computepass.wgsl @@ -5,10 +5,10 @@ var tex_0: texture_2d; var tex_1: texture_2d; @group(0) @binding(2) -var image_0: texture_storage_2d; +var image_0: texture_storage_2d; @group(0) @binding(3) -var image_1: texture_storage_2d; +var image_1: texture_storage_2d; @group(0) @binding(4) var buffer0 : array; @@ -21,6 +21,6 @@ var buffer1 : array; fn cs_main(@builtin(global_invocation_id) global_invocation_id: vec3) { let tex = textureLoad(tex_0, vec2u(0), 0) + textureLoad(tex_1, vec2u(0), 0); let image = textureLoad(image_0, vec2u(0)) + textureLoad(image_1, vec2u(0)); - buffer0[0] = tex; - buffer1[0] = image; + buffer0[0] = tex.rrrr; + buffer1[0] = image.rrrr; } diff --git a/benches/benches/renderpass.rs b/benches/benches/renderpass.rs index fcb35c38641..30543839a41 100644 --- a/benches/benches/renderpass.rs +++ b/benches/benches/renderpass.rs @@ -207,7 +207,6 @@ impl RenderpassState { compilation_options: wgpu::PipelineCompilationOptions::default(), }), multiview: None, - cache: None, }); let render_target = device_state @@ -305,7 +304,6 @@ impl RenderpassState { compilation_options: wgpu::PipelineCompilationOptions::default(), }), multiview: None, - cache: None, }, )); }