From 00e795d88211ec9f991a9c857a88a5309c5326c5 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Tue, 21 Mar 2023 12:01:36 -0400 Subject: [PATCH] Someday I'll stop pushing commits to this damn PR --- CHANGELOG.md | 1 - wgpu-hal/src/vulkan/adapter.rs | 5 +---- wgpu-hal/src/vulkan/device.rs | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c6995d31b..796bfce1f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -114,7 +114,6 @@ By @cwfitzgerald in [#3610](https://github.com/gfx-rs/wgpu/pull/3610). - Improve attachment related errors. By @cwfitzgerald in [#3549](https://github.com/gfx-rs/wgpu/pull/3549) - Make error descriptions all upper case. By @cwfitzgerald in [#3549](https://github.com/gfx-rs/wgpu/pull/3549) - Don't include ANSI terminal color escape sequences in shader module validation error messages. By @jimblandy in [#3591](https://github.com/gfx-rs/wgpu/pull/3591) -- Bring anisotropic filtering in line with the spec. #### WebGPU diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index 6a281077f7..ab07b7f854 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -345,10 +345,7 @@ impl PhysicalDeviceFeatures { caps.supports_extension(vk::KhrSwapchainMutableFormatFn::name()), ); dl_flags.set(Df::CUBE_ARRAY_TEXTURES, self.core.image_cube_array != 0); - dl_flags.set( - Df::ANISOTROPIC_FILTERING, - self.core.sampler_anisotropy >= 16, - ); + dl_flags.set(Df::ANISOTROPIC_FILTERING, self.core.sampler_anisotropy != 0); dl_flags.set( Df::FRAGMENT_WRITABLE_STORAGE, self.core.fragment_stores_and_atomics != 0, diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index 2421572a5e..09b887772c 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -1121,8 +1121,8 @@ impl crate::Device for super::Device { } if desc.anisotropy_clamp != 1 { - // We only enable the downlevel flag if supports 16x anisotropy, - // and wgpu-hal interface guarentees the clamp is in the range [1, 16] + // We only enable anisotropy if it is supported, and wgpu-hal interface guarentees + // the clamp is in the range [1, 16] which is always supported if anisotropy is. vk_info = vk_info .anisotropy_enable(true) .max_anisotropy(desc.anisotropy_clamp as f32);