diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90568f919..169818cf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -334,6 +334,13 @@ jobs: # If we don't check this then errors inside `profiling::scope!()` will not be caught. cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --benches --all-features --features test-build-with-profiling + # Check wgpu-hal with main backends in isolation to catch missing feature/dependencies activations which may be overlooked when they are dragged in via other features. + # (best effort: in theory we'd need to test all combinations) + cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features vulkan + cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features gles + cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features metal + cargo --locked clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features dx12 + # build docs cargo --locked doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --all-features --no-deps diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ac0beee1..7c249e1f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Bottom level categories: - BLAS support for procedural AABB geometry (`BlasGeometrySizeDescriptors::AABBs`, `BlasAabbGeometry`, and related descriptors). By @dylanblokhuis in [#9290](https://github.com/gfx-rs/wgpu/pull/9290) - Added "limit bucketing" functionality which can adjust adapter limits and features to match one of several pre-defined buckets. This is controlled by the new `apply_limit_buckets` member in `RequestAdapterOptions`, which is `false` by default. By @andyleiserson in [#9119](https://github.com/gfx-rs/wgpu/pull/9119). +- Fix missing dependency feature activations when building wgpu-hal with gles/dx12 in isolation. By @wumpf in [#9325](https://github.com/gfx-rs/wgpu/pull/9325) - Make `wgpu_types::texture::format::TextureChannel` accessible as `wgpu::TextureChannel`. By @TornaxO7 in [#9394](https://github.com/gfx-rs/wgpu/pull/9349). - Add support for `per_vertex` in Metal and DX12, as well as some validation for `per_vertex`, and a new enable extension, `wgpu_per_vertex`. By @inner-daemons in [#9219](https://github.com/gfx-rs/wgpu/pull/9219). diff --git a/Cargo.lock b/Cargo.lock index a368b8517..c91689ee8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4870,6 +4870,7 @@ dependencies = [ "wgpu-types", "windows", "windows-core", + "windows-result", "winit", ] diff --git a/Cargo.toml b/Cargo.toml index 87ef78a12..2b4c60837 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -274,6 +274,7 @@ gpu-descriptor = "0.3.2" range-alloc = "0.1" mach-dxcompiler-rs = { version = "0.1.4", default-features = false } # remember to increase max_shader_model if applicable windows-core = { version = "0.62", default-features = false } +windows-result = { version = "0.4", default-features = false } # DX12 and Vulkan dependencies gpu-allocator = { version = "0.28", default-features = false, features = [ diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 290970f85..f5ff1ed1c 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -109,7 +109,6 @@ vulkan = [ "windows/Win32", ] gles = [ - "naga/glsl-out", "dep:arrayvec", "dep:bytemuck", "dep:glow", @@ -117,39 +116,43 @@ gles = [ "dep:hashbrown", "dep:js-sys", "dep:khronos-egl", - "dep:wayland-sys", "dep:libloading", "dep:ndk-sys", "dep:objc2", "dep:parking_lot", "dep:profiling", "dep:wasm-bindgen", + "dep:wayland-sys", "dep:web-sys", + "dep:windows-result", + "naga/glsl-out", "wgpu-types/web", - "windows/Win32_Graphics_OpenGL", + "windows-result/std", # Need to enable this for the `Error` impl on `windows_result::Error` to work. "windows/Win32_Graphics_Gdi", + "windows/Win32_Graphics_OpenGL", "windows/Win32_System_LibraryLoader", "windows/Win32_UI_WindowsAndMessaging", ] ## Enables the DX12 backend when targeting Windows. dx12 = [ - "naga/hlsl-out", "dep:arrayvec", "dep:bit-set", "dep:bytemuck", + "dep:gpu-allocator", "dep:hashbrown", "dep:libloading", - "dep:ordered-float", "dep:once_cell", + "dep:ordered-float", "dep:parking_lot", "dep:profiling", "dep:range-alloc", "dep:windows-core", - "dep:gpu-allocator", "gpu-allocator/d3d12", + "naga/hlsl-out", + "once_cell/std", "windows/Win32_Devices_DeviceAndDriverInstallation", - "windows/Win32_Graphics_Direct3D_Fxc", "windows/Win32_Graphics_Direct3D_Dxc", + "windows/Win32_Graphics_Direct3D_Fxc", "windows/Win32_Graphics_Direct3D", "windows/Win32_Graphics_Direct3D12", "windows/Win32_Graphics_DirectComposition", @@ -263,6 +266,7 @@ drm = { version = "0.15", optional = true } # Backend: Dx12 and GLES windows = { workspace = true, optional = true } windows-core = { workspace = true, optional = true } +windows-result = { workspace = true, optional = true } # Backend: Dx12 bit-set = { workspace = true, optional = true } range-alloc = { workspace = true, optional = true }