From c8d770b52a1394b15d4772f952222dec9396a5f7 Mon Sep 17 00:00:00 2001 From: Elie Michel Date: Fri, 24 Feb 2023 00:22:31 +0100 Subject: [PATCH] Use WGPUMipmapFilterMode enum when available --- backends/imgui_impl_wgpu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backends/imgui_impl_wgpu.cpp b/backends/imgui_impl_wgpu.cpp index 00bcb140a75b..9db904a46b5b 100644 --- a/backends/imgui_impl_wgpu.cpp +++ b/backends/imgui_impl_wgpu.cpp @@ -529,7 +529,11 @@ static void ImGui_ImplWGPU_CreateFontsTexture() WGPUSamplerDescriptor sampler_desc = {}; sampler_desc.minFilter = WGPUFilterMode_Linear; sampler_desc.magFilter = WGPUFilterMode_Linear; +#if defined(WEBGPU_BACKEND_WGPU) + sampler_desc.mipmapFilter = WGPUMipmapFilterMode_Linear; +#else sampler_desc.mipmapFilter = WGPUFilterMode_Linear; +#endif sampler_desc.addressModeU = WGPUAddressMode_Repeat; sampler_desc.addressModeV = WGPUAddressMode_Repeat; sampler_desc.addressModeW = WGPUAddressMode_Repeat;