diff --git a/Cargo.lock b/Cargo.lock index 04294a0efb..3dfed1e113 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1046,7 +1046,7 @@ dependencies = [ [[package]] name = "naga" version = "0.8.0" -source = "git+https://github.com/gfx-rs/naga?rev=8e2e39e#8e2e39e4d8fa5bbb657c3b170b4f6607d703e284" +source = "git+https://github.com/gfx-rs/naga?rev=a45b9a6#a45b9a6cc691a671aa24a32114b51c5acae02420" dependencies = [ "bit-set", "bitflags", diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index d1dc8ab7c7..0766c85cab 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -40,7 +40,7 @@ thiserror = "1" [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "8e2e39e" +rev = "a45b9a6" #version = "0.8" features = ["span", "validate", "wgsl-in"] diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 29a2a67bce..51168a044a 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -2313,7 +2313,7 @@ impl Device { .any(|ct| ct.write_mask != first.write_mask || ct.blend != first.blend) } { log::info!("Color targets: {:?}", color_targets); - self.require_downlevel_flags(wgt::DownlevelFlags::INDEPENDENT_BLENDING)?; + self.require_downlevel_flags(wgt::DownlevelFlags::INDEPENDENT_BLEND)?; } let mut io = validation::StageIo::default(); diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index a5fd9e1215..80405a261c 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -88,14 +88,14 @@ js-sys = { version = "0.3" } [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "8e2e39e" +rev = "a45b9a6" #version = "0.8" # DEV dependencies [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "8e2e39e" +rev = "a45b9a6" #version = "0.8" features = ["wgsl-in"] diff --git a/wgpu-hal/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index e6283f3502..3d9cd38e34 100644 --- a/wgpu-hal/src/gles/adapter.rs +++ b/wgpu-hal/src/gles/adapter.rs @@ -275,7 +275,7 @@ impl super::Adapter { // as we emulate the `start_instance`. But we can't deal with negatives... downlevel_flags.set(wgt::DownlevelFlags::BASE_VERTEX, ver >= (3, 2)); downlevel_flags.set( - wgt::DownlevelFlags::INDEPENDENT_BLENDING, + wgt::DownlevelFlags::INDEPENDENT_BLEND, ver >= (3, 2) || extensions.contains("GL_EXT_draw_buffers_indexed"), ); downlevel_flags.set( diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index 4334510842..a778cb2885 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -103,7 +103,7 @@ impl PhysicalDeviceFeatures { // Features is a bitfield so we need to map everything manually core: vk::PhysicalDeviceFeatures::builder() .robust_buffer_access(private_caps.robust_buffer_access) - .independent_blend(true) + .independent_blend(downlevel_flags.contains(wgt::DownlevelFlags::INDEPENDENT_BLEND)) .sample_rate_shading( downlevel_flags.contains(wgt::DownlevelFlags::MULTISAMPLED_SHADING), ) @@ -358,6 +358,7 @@ impl PhysicalDeviceFeatures { self.core.fragment_stores_and_atomics != 0, ); dl_flags.set(Df::MULTISAMPLED_SHADING, self.core.sample_rate_shading != 0); + dl_flags.set(Df::INDEPENDENT_BLEND, self.core.independent_blend != 0); features.set( F::INDIRECT_FIRST_INSTANCE, diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index bf0f61cab4..575d48a494 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -901,12 +901,11 @@ bitflags::bitflags! { const CUBE_ARRAY_TEXTURES = 1 << 7; /// Supports comparison samplers. const COMPARISON_SAMPLERS = 1 << 8; - /// Supports different blending modes per color target. - const INDEPENDENT_BLENDING = 1 << 9; + /// Supports different blend operations per color attachment. + const INDEPENDENT_BLEND = 1 << 9; /// Supports storage buffers in vertex shaders. const VERTEX_STORAGE = 1 << 10; - /// Supports samplers with anisotropic filtering. Note this isn't actually required by /// WebGPU, the implementation is allowed to completely ignore aniso clamp. This flag is /// here for native backends so they can comunicate to the user of aniso is enabled. diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index bf875a7c2a..2c7ccf3fcd 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -138,20 +138,20 @@ env_logger = "0.9" [dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "8e2e39e" +rev = "a45b9a6" #version = "0.8" optional = true # used to test all the example shaders [dev-dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "8e2e39e" +rev = "a45b9a6" #version = "0.8" features = ["wgsl-in"] [target.'cfg(target_arch = "wasm32")'.dependencies.naga] git = "https://github.com/gfx-rs/naga" -rev = "8e2e39e" +rev = "a45b9a6" #version = "0.8" features = ["wgsl-out"]