diff --git a/CHANGELOG.md b/CHANGELOG.md index 270a1ba251..a0758174f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,13 +39,15 @@ Bottom level categories: --> ## Unreleased -### Bug Fixes -#### GLES -- Fix `Vertex buffer is not big enough for the draw call.` for ANGLE/Web when rendering with instance attributes on a single instance. By @wumpf in [#3596](https://github.com/gfx-rs/wgpu/pull/3596) +## v0.15.3 (2023-03-22) ### Bug Fixes +#### Metal +- Fix incorrect mipmap being sampled when using `MinLod <= 0.0` and `MaxLod >= 32.0` or when the fragment shader samples different Lods in the same quad. By @cwfitzgerald in [#3610](https://github.com/gfx-rs/wgpu/pull/3610). + #### GLES +- Fix `Vertex buffer is not big enough for the draw call.` for ANGLE/Web when rendering with instance attributes on a single instance. By @wumpf in [#3596](https://github.com/gfx-rs/wgpu/pull/3596) - Reset all queue state between command buffers in a submit. By @jleibs [#3589](https://github.com/gfx-rs/wgpu/pull/3589) - Reset the state of `SAMPLE_ALPHA_TO_COVERAGE` on queue reset. By @jleibs [#3589](https://github.com/gfx-rs/wgpu/pull/3589) diff --git a/wgpu-hal/src/metal/adapter.rs b/wgpu-hal/src/metal/adapter.rs index 7ecea2f314..d560e6126d 100644 --- a/wgpu-hal/src/metal/adapter.rs +++ b/wgpu-hal/src/metal/adapter.rs @@ -537,7 +537,6 @@ impl super::PrivateCapabilities { MUTABLE_COMPARISON_SAMPLER_SUPPORT, ), sampler_clamp_to_border: Self::supports_any(device, SAMPLER_CLAMP_TO_BORDER_SUPPORT), - sampler_lod_average: { version.at_least((11, 0), (9, 0), os_is_mac) }, base_instance: Self::supports_any(device, BASE_INSTANCE_SUPPORT), base_vertex_instance_drawing: Self::supports_any(device, BASE_VERTEX_INSTANCE_SUPPORT), dual_source_blending: Self::supports_any(device, DUAL_SOURCE_BLEND_SUPPORT), diff --git a/wgpu-hal/src/metal/device.rs b/wgpu-hal/src/metal/device.rs index 8ba2702ee4..dfb7333a9e 100644 --- a/wgpu-hal/src/metal/device.rs +++ b/wgpu-hal/src/metal/device.rs @@ -407,14 +407,13 @@ impl crate::Device for super::Device { &self, desc: &crate::SamplerDescriptor, ) -> DeviceResult { - let caps = &self.shared.private_caps; objc::rc::autoreleasepool(|| { let descriptor = mtl::SamplerDescriptor::new(); descriptor.set_min_filter(conv::map_filter_mode(desc.min_filter)); descriptor.set_mag_filter(conv::map_filter_mode(desc.mag_filter)); descriptor.set_mip_filter(match desc.mipmap_filter { - wgt::FilterMode::Nearest if desc.lod_clamp.is_none() => { + wgt::FilterMode::Nearest if desc.lod_clamp == Some(0.0..0.0) => { mtl::MTLSamplerMipFilter::NotMipmapped } wgt::FilterMode::Nearest => mtl::MTLSamplerMipFilter::Nearest, @@ -435,10 +434,6 @@ impl crate::Device for super::Device { descriptor.set_lod_max_clamp(range.end); } - if caps.sampler_lod_average { - descriptor.set_lod_average(true); // optimization - } - if let Some(fun) = desc.compare { descriptor.set_compare_function(conv::map_compare_function(fun)); } diff --git a/wgpu-hal/src/metal/mod.rs b/wgpu-hal/src/metal/mod.rs index 37f101cff7..061e990f9d 100644 --- a/wgpu-hal/src/metal/mod.rs +++ b/wgpu-hal/src/metal/mod.rs @@ -151,7 +151,6 @@ struct PrivateCapabilities { shared_textures: bool, mutable_comparison_samplers: bool, sampler_clamp_to_border: bool, - sampler_lod_average: bool, base_instance: bool, base_vertex_instance_drawing: bool, dual_source_blending: bool,