diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c864629f0..af69c6d30 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/Cargo.lock b/Cargo.lock index 305b5789a..5c2bd7587 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4779,6 +4779,7 @@ dependencies = [ "wgpu-types", "windows", "windows-core", + "windows-result", "winit", ] diff --git a/Cargo.toml b/Cargo.toml index f668552af..7f1a4eb1c 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 d91b56404..302652683 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -108,7 +108,6 @@ vulkan = [ "windows/Win32", ] gles = [ - "naga/glsl-out", "dep:arrayvec", "dep:bytemuck", "dep:glow", @@ -116,39 +115,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", @@ -259,6 +262,7 @@ wayland-sys = { version = "0.31.3", features = [ # 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 }