diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 29a2a67bc..51168a044 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/src/gles/adapter.rs b/wgpu-hal/src/gles/adapter.rs index e6283f350..3d9cd38e3 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 433451084..a778cb288 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 bf0f61cab..575d48a49 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.