From a59a8ad52d60982a75d271f72de4a0ae45c1f4e0 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 10:27:06 -0500 Subject: [PATCH 01/10] refactor: resolve `clippy::bool_to_int_with_if` --- wgpu-hal/src/dx12/conv.rs | 9 ++++++--- wgpu-hal/src/dx12/device.rs | 12 ++++-------- wgpu-hal/src/gles/egl.rs | 6 +----- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/wgpu-hal/src/dx12/conv.rs b/wgpu-hal/src/dx12/conv.rs index 4114fba002b..bc0f45677d1 100644 --- a/wgpu-hal/src/dx12/conv.rs +++ b/wgpu-hal/src/dx12/conv.rs @@ -1,5 +1,8 @@ use std::iter; -use winapi::um::{d3d12, d3dcommon}; +use winapi::{ + shared::minwindef::BOOL, + um::{d3d12, d3dcommon}, +}; pub fn map_buffer_usage_to_resource_flags(usage: crate::BufferUses) -> d3d12::D3D12_RESOURCE_FLAGS { let mut flags = 0; @@ -329,14 +332,14 @@ fn map_stencil_face(face: &wgt::StencilFaceState) -> d3d12::D3D12_DEPTH_STENCILO pub fn map_depth_stencil(ds: &wgt::DepthStencilState) -> d3d12::D3D12_DEPTH_STENCIL_DESC { d3d12::D3D12_DEPTH_STENCIL_DESC { - DepthEnable: if ds.is_depth_enabled() { 1 } else { 0 }, + DepthEnable: BOOL::from(ds.is_depth_enabled()), DepthWriteMask: if ds.depth_write_enabled { d3d12::D3D12_DEPTH_WRITE_MASK_ALL } else { d3d12::D3D12_DEPTH_WRITE_MASK_ZERO }, DepthFunc: map_comparison(ds.depth_compare), - StencilEnable: if ds.stencil.is_enabled() { 1 } else { 0 }, + StencilEnable: BOOL::from(ds.stencil.is_enabled()), StencilReadMask: ds.stencil.read_mask as u8, StencilWriteMask: ds.stencil.write_mask as u8, FrontFace: map_stencil_face(&ds.stencil.front), diff --git a/wgpu-hal/src/dx12/device.rs b/wgpu-hal/src/dx12/device.rs index 92bbefef65f..94a87dd466d 100644 --- a/wgpu-hal/src/dx12/device.rs +++ b/wgpu-hal/src/dx12/device.rs @@ -7,7 +7,7 @@ use super::{conv, descriptor, view}; use parking_lot::Mutex; use std::{ffi, mem, num::NonZeroU32, ptr, slice, sync::Arc}; use winapi::{ - shared::{dxgiformat, dxgitype, winerror}, + shared::{dxgiformat, dxgitype, minwindef::BOOL, winerror}, um::{d3d12, d3dcompiler, synchapi, winbase}, Interface, }; @@ -1358,8 +1358,8 @@ impl crate::Device for super::Device { DepthBias: bias.constant, DepthBiasClamp: bias.clamp, SlopeScaledDepthBias: bias.slope_scale, - DepthClipEnable: if desc.primitive.unclipped_depth { 0 } else { 1 }, - MultisampleEnable: if desc.multisample.count > 1 { 1 } else { 0 }, + DepthClipEnable: BOOL::from(!desc.primitive.unclipped_depth), + MultisampleEnable: BOOL::from(desc.multisample.count > 1), ForcedSampleCount: 0, AntialiasedLineEnable: 0, ConservativeRaster: if desc.primitive.conservative { @@ -1388,11 +1388,7 @@ impl crate::Device for super::Device { RasterizedStream: 0, }, BlendState: d3d12::D3D12_BLEND_DESC { - AlphaToCoverageEnable: if desc.multisample.alpha_to_coverage_enabled { - 1 - } else { - 0 - }, + AlphaToCoverageEnable: BOOL::from(desc.multisample.alpha_to_coverage_enabled), IndependentBlendEnable: 1, RenderTarget: conv::map_render_targets(desc.color_targets), }, diff --git a/wgpu-hal/src/gles/egl.rs b/wgpu-hal/src/gles/egl.rs index 1f4cae00a17..88581c4d6dd 100644 --- a/wgpu-hal/src/gles/egl.rs +++ b/wgpu-hal/src/gles/egl.rs @@ -702,11 +702,7 @@ impl crate::Instance for Instance { EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE as egl::Attrib, EGL_PLATFORM_X11_KHR as egl::Attrib, EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED as egl::Attrib, - if desc.flags.contains(crate::InstanceFlags::VALIDATION) { - 1 - } else { - 0 - }, + usize::from(desc.flags.contains(crate::InstanceFlags::VALIDATION)), egl::ATTRIB_NONE, ]; let display = egl From e85e8b5299d5f5b6028ef7b5442a6760d568b17c Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 10:27:46 -0500 Subject: [PATCH 02/10] refactor: resolve `clippy::explicit_auto_deref` --- wgpu-core/src/hub.rs | 12 ++++++------ wgpu-hal/src/dx12/device.rs | 4 ++-- wgpu-hal/src/metal/surface.rs | 2 +- wgpu-hal/src/vulkan/device.rs | 2 +- wgpu/examples/mipmap/main.rs | 4 ++-- wgpu/tests/shader/mod.rs | 2 +- wgpu/tests/shader_primitive_index/mod.rs | 2 +- wgpu/tests/vertex_indices/mod.rs | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/wgpu-core/src/hub.rs b/wgpu-core/src/hub.rs index 38918b8cbe9..f07010477c2 100644 --- a/wgpu-core/src/hub.rs +++ b/wgpu-core/src/hub.rs @@ -1156,7 +1156,7 @@ impl Global { let mut surface_guard = self.surfaces.data.write(); let hub = A::hub(self); // this is used for tests, which keep the adapter - hub.clear(&mut *surface_guard, false); + hub.clear(&mut surface_guard, false); } pub fn generate_report(&self) -> GlobalReport { @@ -1205,23 +1205,23 @@ impl Drop for Global { // destroy hubs before the instance gets dropped #[cfg(vulkan)] { - self.hubs.vulkan.clear(&mut *surface_guard, true); + self.hubs.vulkan.clear(&mut surface_guard, true); } #[cfg(metal)] { - self.hubs.metal.clear(&mut *surface_guard, true); + self.hubs.metal.clear(&mut surface_guard, true); } #[cfg(dx12)] { - self.hubs.dx12.clear(&mut *surface_guard, true); + self.hubs.dx12.clear(&mut surface_guard, true); } #[cfg(dx11)] { - self.hubs.dx11.clear(&mut *surface_guard, true); + self.hubs.dx11.clear(&mut surface_guard, true); } #[cfg(gl)] { - self.hubs.gl.clear(&mut *surface_guard, true); + self.hubs.gl.clear(&mut surface_guard, true); } // destroy surfaces diff --git a/wgpu-hal/src/dx12/device.rs b/wgpu-hal/src/dx12/device.rs index 94a87dd466d..3809470ebef 100644 --- a/wgpu-hal/src/dx12/device.rs +++ b/wgpu-hal/src/dx12/device.rs @@ -1231,7 +1231,7 @@ impl crate::Device for super::Device { Some(inner) => { let dual = descriptor::upload( self.raw, - &*inner, + &inner, &self.shared.heap_views, &desc.layout.copy_counts, )?; @@ -1243,7 +1243,7 @@ impl crate::Device for super::Device { Some(inner) => { let dual = descriptor::upload( self.raw, - &*inner, + &inner, &self.shared.heap_samplers, &desc.layout.copy_counts, )?; diff --git a/wgpu-hal/src/metal/surface.rs b/wgpu-hal/src/metal/surface.rs index 1e0f1070b8e..6206453ad1c 100644 --- a/wgpu-hal/src/metal/surface.rs +++ b/wgpu-hal/src/metal/surface.rs @@ -207,7 +207,7 @@ impl crate::Surface for super::Surface { let () = msg_send![*render_layer, setFrame: bounds]; } } - render_layer.set_device(&*device_raw); + render_layer.set_device(&device_raw); render_layer.set_pixel_format(self.raw_swapchain_format); render_layer.set_framebuffer_only(framebuffer_only); render_layer.set_presents_with_transaction(self.present_with_transaction); diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index 65d5c70e243..f30cd57dc41 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -1445,7 +1445,7 @@ impl crate::Device for super::Device { crate::ShaderInput::SpirV(spv) => Cow::Borrowed(spv), }; - let raw = self.create_shader_module_impl(&*spv)?; + let raw = self.create_shader_module_impl(&spv)?; if let Some(label) = desc.label { self.shared diff --git a/wgpu/examples/mipmap/main.rs b/wgpu/examples/mipmap/main.rs index 70ecbd91a08..5e62e35c060 100644 --- a/wgpu/examples/mipmap/main.rs +++ b/wgpu/examples/mipmap/main.rs @@ -400,9 +400,9 @@ impl framework::Example for Example { .slice(pipeline_statistics_offset()..) .get_mapped_range(); // Convert the raw data into a useful structure - let timestamp_data: &TimestampQueries = bytemuck::from_bytes(&*timestamp_view); + let timestamp_data: &TimestampQueries = bytemuck::from_bytes(×tamp_view); let pipeline_stats_data: &PipelineStatisticsQueries = - bytemuck::from_bytes(&*pipeline_stats_view); + bytemuck::from_bytes(&pipeline_stats_view); // Iterate over the data for (idx, (timestamp, pipeline)) in timestamp_data .iter() diff --git a/wgpu/tests/shader/mod.rs b/wgpu/tests/shader/mod.rs index cec5f9f33b8..c1cca4e4d7e 100644 --- a/wgpu/tests/shader/mod.rs +++ b/wgpu/tests/shader/mod.rs @@ -347,7 +347,7 @@ fn shader_input_output_test( let mapped = mapping_buffer.slice(..).get_mapped_range(); - let typed: &[u32] = bytemuck::cast_slice(&*mapped); + let typed: &[u32] = bytemuck::cast_slice(&mapped); // -- Check results -- diff --git a/wgpu/tests/shader_primitive_index/mod.rs b/wgpu/tests/shader_primitive_index/mod.rs index 41902f72253..5e6c6b1b707 100644 --- a/wgpu/tests/shader_primitive_index/mod.rs +++ b/wgpu/tests/shader_primitive_index/mod.rs @@ -237,7 +237,7 @@ fn capture_rgba_u8_texture( let slice = output_buffer.slice(..); slice.map_async(wgpu::MapMode::Read, |_| ()); ctx.device.poll(wgpu::Maintain::Wait); - let data: Vec = bytemuck::cast_slice(&*slice.get_mapped_range()).to_vec(); + let data: Vec = bytemuck::cast_slice(&slice.get_mapped_range()).to_vec(); // Chunk rows from output buffer, take actual pixel // bytes from each row and flatten into a vector. data.chunks_exact(bytes_per_row as usize) diff --git a/wgpu/tests/vertex_indices/mod.rs b/wgpu/tests/vertex_indices/mod.rs index d76b4367841..177b857448a 100644 --- a/wgpu/tests/vertex_indices/mod.rs +++ b/wgpu/tests/vertex_indices/mod.rs @@ -125,7 +125,7 @@ fn pulling_common( let slice = buffer.slice(..); slice.map_async(wgpu::MapMode::Read, |_| ()); ctx.device.poll(wgpu::Maintain::Wait); - let data: Vec = bytemuck::cast_slice(&*slice.get_mapped_range()).to_vec(); + let data: Vec = bytemuck::cast_slice(&slice.get_mapped_range()).to_vec(); assert_eq!(data, expected); } From 078b1b9fe0f72b8eed4a53a9bf70c8fa96fcb947 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Sun, 9 Oct 2022 10:42:07 -0400 Subject: [PATCH 03/10] refactor: fix label shadow warning for `new_alpha_mode` --- wgpu-core/src/device/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 57c6b943fcf..bfe0322ed1a 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -5147,7 +5147,7 @@ impl Global { .composite_alpha_modes .contains(&config.composite_alpha_mode) { - let new_alpha_mode = 'b: loop { + let new_alpha_mode = 'alpha: loop { // Automatic alpha mode checks. let fallbacks = match config.composite_alpha_mode { wgt::CompositeAlphaMode::Auto => &[ @@ -5164,7 +5164,7 @@ impl Global { for &fallback in fallbacks { if caps.composite_alpha_modes.contains(&fallback) { - break 'b fallback; + break 'alpha fallback; } } From 11237a560ac16bea998ad26559061ea1f6dc7928 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Thu, 6 Oct 2022 04:26:07 -0400 Subject: [PATCH 04/10] refactor: resolve `clippy::needless_return` in `raw-gles` example --- wgpu-hal/examples/raw-gles.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-hal/examples/raw-gles.rs b/wgpu-hal/examples/raw-gles.rs index 1620794fb01..4c793bba684 100644 --- a/wgpu-hal/examples/raw-gles.rs +++ b/wgpu-hal/examples/raw-gles.rs @@ -48,7 +48,7 @@ fn main() { *control_flow = ControlFlow::Wait; match event { - Event::LoopDestroyed => return, + Event::LoopDestroyed => (), Event::WindowEvent { event, .. } => match event { WindowEvent::CloseRequested | WindowEvent::KeyboardInput { From e153d7a5da248942e1594a60b8d4c435d75ec515 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 13:40:51 -0500 Subject: [PATCH 05/10] refactor: resolve `clippy::needless_borrow` --- wgpu-hal/src/gles/adapter.rs | 2 +- wgpu-hal/src/gles/egl.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index 53b11029d04..784f855b875 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -797,7 +797,7 @@ impl crate::Adapter for super::Adapter { wgt::TextureFormat::Bgra8Unorm, ]; if surface.supports_srgb() { - formats.extend(&[ + formats.extend([ wgt::TextureFormat::Rgba8UnormSrgb, #[cfg(not(target_arch = "wasm32"))] wgt::TextureFormat::Bgra8UnormSrgb, diff --git a/wgpu-hal/src/gles/egl.rs b/wgpu-hal/src/gles/egl.rs index 88581c4d6dd..e2c2c01f9ad 100644 --- a/wgpu-hal/src/gles/egl.rs +++ b/wgpu-hal/src/gles/egl.rs @@ -654,17 +654,17 @@ impl crate::Instance for Instance { client_ext_str.split_whitespace().collect::>() ); - let wayland_library = if client_ext_str.contains(&"EGL_EXT_platform_wayland") { + let wayland_library = if client_ext_str.contains("EGL_EXT_platform_wayland") { test_wayland_display() } else { None }; - let x11_display_library = if client_ext_str.contains(&"EGL_EXT_platform_x11") { + let x11_display_library = if client_ext_str.contains("EGL_EXT_platform_x11") { open_x_display() } else { None }; - let angle_x11_display_library = if client_ext_str.contains(&"EGL_ANGLE_platform_angle") { + let angle_x11_display_library = if client_ext_str.contains("EGL_ANGLE_platform_angle") { open_x_display() } else { None @@ -731,7 +731,7 @@ impl crate::Instance for Instance { }; if desc.flags.contains(crate::InstanceFlags::VALIDATION) - && client_ext_str.contains(&"EGL_KHR_debug") + && client_ext_str.contains("EGL_KHR_debug") { log::info!("Enabling EGL debug output"); let function: EglDebugMessageControlFun = From 88363ab6ddda7fe5a4c35dd96db59e67de0c2bf3 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 14:16:03 -0500 Subject: [PATCH 06/10] build(ci): use `RUST_VERSION` for CTS consistently --- .github/workflows/ci.yml | 4 +++- .github/workflows/cts.yml | 6 ++++-- README.md | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ac07b69a38..e29079901be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -327,11 +327,13 @@ jobs: - name: checkout repo uses: actions/checkout@v3 - - name: install rust + - name: install rust ${{ env.RUST_VERSION }} uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ env.RUST_VERSION }} + override: true + components: clippy - name: disable debug shell: bash diff --git a/.github/workflows/cts.yml b/.github/workflows/cts.yml index 8fd788c7dd1..3fe7e268569 100644 --- a/.github/workflows/cts.yml +++ b/.github/workflows/cts.yml @@ -9,6 +9,7 @@ on: env: RUST_BACKTRACE: 1 + RUST_VERSION: 1.64 jobs: cts: @@ -46,12 +47,13 @@ jobs: cd cts git checkout $(cat ../wgpu/cts_runner/revision.txt) - - name: install rust + - name: install rust ${{ env.RUST_VERSION }} uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: ${{ env.RUST_VERSION }} target: ${{ matrix.target }} profile: minimal + override: true - name: caching uses: Swatinem/rust-cache@v1 diff --git a/README.md b/README.md index 46dbd914b67..e4b4ae1c5a3 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ For an overview of all the components in the gfx-rs ecosystem, see [the big pict ### MSRV policy Minimum Supported Rust Version is **1.64**. -It is enforced on CI (in "/.github/workflows/ci.yml") with `RUST_VERSION` variable. +It is enforced on CI (in "/.github/workflows/ci.yml", "/.github/workflows/cts.yml") with `RUST_VERSION` variable. This version can only be upgraded in breaking releases. ## Getting Started From 7c2e7f095e414a71adb6d3804b7def3bb59a55c8 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 10:30:19 -0500 Subject: [PATCH 07/10] build: migrate Rust 1.64 -> 1.65 --- .clippy.toml | 1 + .github/workflows/ci.yml | 2 +- .github/workflows/cts.yml | 2 +- CHANGELOG.md | 2 +- Cargo.toml | 2 +- README.md | 4 ++-- 6 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .clippy.toml diff --git a/.clippy.toml b/.clippy.toml new file mode 100644 index 00000000000..1fdcf3e5ac6 --- /dev/null +++ b/.clippy.toml @@ -0,0 +1 @@ +large-error-threshold = 225 # bytes diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e29079901be..5ad04a7f8c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: env: RUST_BACKTRACE: 1 - RUST_VERSION: 1.64 + RUST_VERSION: 1.65 PKG_CONFIG_ALLOW_CROSS: 1 # allow android to work RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings RUSTDOCFLAGS: -Dwarnings diff --git a/.github/workflows/cts.yml b/.github/workflows/cts.yml index 3fe7e268569..84695334a71 100644 --- a/.github/workflows/cts.yml +++ b/.github/workflows/cts.yml @@ -9,7 +9,7 @@ on: env: RUST_BACKTRACE: 1 - RUST_VERSION: 1.64 + RUST_VERSION: 1.65 jobs: cts: diff --git a/CHANGELOG.md b/CHANGELOG.md index 27200b170da..8e6ac9a6b28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,7 +96,7 @@ Bottom level categories: ### Testing/Internal -- Update the `minimum supported rust version` to 1.62 +- Update the `minimum supported rust version` to 1.65 - Use cargo 1.64 workspace inheritance feature. By @jinleili in [#3107](https://github.com/gfx-rs/wgpu/pull/3107) #### Vulkan diff --git a/Cargo.toml b/Cargo.toml index 1eb3768f0ef..211736a5fac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ default-members = ["wgpu", "wgpu-hal", "wgpu-info"] [workspace.package] edition = "2021" -rust-version = "1.64" +rust-version = "1.65" keywords = ["graphics"] license = "MIT OR Apache-2.0" homepage = "https://wgpu.rs/" diff --git a/README.md b/README.md index e4b4ae1c5a3..315606cb3dc 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ For an overview of all the components in the gfx-rs ecosystem, see [the big pict ### MSRV policy -Minimum Supported Rust Version is **1.64**. -It is enforced on CI (in "/.github/workflows/ci.yml", "/.github/workflows/cts.yml") with `RUST_VERSION` variable. +Minimum Supported Rust Version is **1.65**. +It is enforced on CI (in "/.github/workflows/ci.yml") with `RUST_VERSION` variable. This version can only be upgraded in breaking releases. ## Getting Started From a5d68be675d3abc0adc32bb30c97de5ade654cdb Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 14:32:31 -0500 Subject: [PATCH 08/10] style: EOF newline for `ctx.yml` --- .github/workflows/cts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cts.yml b/.github/workflows/cts.yml index 84695334a71..0c76a861daa 100644 --- a/.github/workflows/cts.yml +++ b/.github/workflows/cts.yml @@ -93,4 +93,4 @@ jobs: echo "=== Running $test ==="; DENO_WEBGPU_BACKEND=$backend cargo run --manifest-path ../wgpu/cts_runner/Cargo.toml --frozen -- ./tools/run_deno --verbose "$test"; done - done \ No newline at end of file + done From d5f4031e8a2ba9d1b2a31e01d831c15d4c559ca0 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 13:32:23 -0500 Subject: [PATCH 09/10] style: strip trailing whitespace from `README.md` --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 315606cb3dc..38d3847fd61 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Note that the WGSL specification is still under development, so the [draft specification][wgsl spec] does not exactly describe what `wgpu` supports. See [below](#tracking-the-webgpu-and-wgsl-draft-specifications) for details. -To enable SPIR-V shaders, enable the `spirv` feature of wgpu. +To enable SPIR-V shaders, enable the `spirv` feature of wgpu. To enable GLSL shaders, enable the `glsl` feature of wgpu. ### Angle @@ -101,7 +101,7 @@ To enable GLSL shaders, enable the `glsl` feature of wgpu. [Angle](http://angleproject.org) is a translation layer from GLES to other backends, developed by Google. We support running our GLES3 backend over it in order to reach platforms with GLES2 or DX11 support, which aren't accessible otherwise. In order to run with Angle, "angle" feature has to be enabled, and Angle libraries placed in a location visible to the application. -These binaries can be downloaded from [gfbuild-angle](https://github.com/DileSoft/gfbuild-angle) artifacts, [manual compilation](https://github.com/google/angle/blob/main/doc/DevSetup.md) may be required on Macs with Apple silicon. +These binaries can be downloaded from [gfbuild-angle](https://github.com/DileSoft/gfbuild-angle) artifacts, [manual compilation](https://github.com/google/angle/blob/main/doc/DevSetup.md) may be required on Macs with Apple silicon. On Windows, you generally need to copy them into the working directory, in the same directory as the executable, or somewhere in your path. On Linux, you can point to them using `LD_LIBRARY_PATH` environment. @@ -204,7 +204,7 @@ Exactly which WGSL features `wgpu` supports depends on how you are using it: for catching up to the WGSL specification, but in general there is no up-to-date summary of the differences between Naga and the WGSL spec. - + - When running in a web browser (by compilation to WebAssembly) without the `"webgl"` feature enabled, `wgpu` relies on the browser's own WebGPU implementation. From d68428b3bc9173a6fe023d35243de7232eee9dd1 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 7 Nov 2022 13:32:41 -0500 Subject: [PATCH 10/10] style: strip trailing whitespace from `ci.yml` --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ad04a7f8c1..0561adeb800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ env: # entirely on clippy jobs and reduce it to line-numbers # only for ones where we run tests. # -# Additionally, we disable incremental builds entirely +# Additionally, we disable incremental builds entirely # as our caching system doesn't actually cache our crates. # It adds overhead to the build and another point of failure. @@ -38,7 +38,7 @@ jobs: os: windows-2022 target: x86_64-pc-windows-msvc kind: native - + # MacOS - name: MacOS x86_64 os: macos-12 @@ -49,7 +49,7 @@ jobs: os: macos-12 target: aarch64-apple-darwin kind: native - + # IOS - name: IOS aarch64 os: macos-12 @@ -175,7 +175,7 @@ jobs: - name: Linux x86_64 os: ubuntu-22.04 backends: vulkan gl - + name: Test ${{ matrix.name }} runs-on: ${{ matrix.os }} @@ -195,24 +195,24 @@ jobs: uses: taiki-e/install-action@nextest - name: install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov - + - name: install swiftshader if: matrix.os == 'ubuntu-22.04' shell: bash run: | set -e - + mkdir -p swiftshader curl -LsSf https://github.com/gfx-rs/ci-build/releases/latest/download/swiftshader-linux-x86_64.tar.xz | tar -xf - -C swiftshader echo "LD_LIBRARY_PATH=$PWD/swiftshader" >> $GITHUB_ENV - + - name: install llvmpipe, vulkan sdk if: matrix.os == 'ubuntu-22.04' shell: bash run: | set -e - + sudo apt-get update -y -qq # vulkan sdk @@ -264,7 +264,7 @@ jobs: uses: codecov/codecov-action@v3 with: files: lcov.info - + doctest: name: Doctest runs-on: ubuntu-22.04