From 3dc3aef8a4497e06270e859a855fd1340cbcf8e6 Mon Sep 17 00:00:00 2001 From: williamhCode <83525937+williamhCode@users.noreply.github.com> Date: Thu, 13 Jul 2023 17:48:16 +0800 Subject: [PATCH] Backends: WebGPU: fix webgpu changes for Dawn. (#6602, #6188) --- backends/imgui_impl_wgpu.cpp | 5 +++-- docs/CHANGELOG.txt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backends/imgui_impl_wgpu.cpp b/backends/imgui_impl_wgpu.cpp index de7128bc8..e21ef81dd 100644 --- a/backends/imgui_impl_wgpu.cpp +++ b/backends/imgui_impl_wgpu.cpp @@ -13,6 +13,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) +// 2023-07-13: Use WGPUShaderModuleWGSLDescriptor's code instead of source. use WGPUMipmapFilterMode_Linear instead of WGPUFilterMode_Linear. (#6602) // 2023-04-11: Align buffer sizes. Use WGSL shaders instead of precompiled SPIR-V. // 2023-04-11: Reorganized backend to pull data from a single structure to facilitate usage with multiple-contexts (all g_XXXX access changed to bd->XXXX). // 2023-01-25: Revert automatic pipeline layout generation (see https://github.com/gpuweb/gpuweb/issues/2470) @@ -231,7 +232,7 @@ static WGPUProgrammableStageDescriptor ImGui_ImplWGPU_CreateShaderModule(const c WGPUShaderModuleWGSLDescriptor wgsl_desc = {}; wgsl_desc.chain.sType = WGPUSType_ShaderModuleWGSLDescriptor; - wgsl_desc.source = wgsl_source; + wgsl_desc.code = wgsl_source; WGPUShaderModuleDescriptor desc = {}; desc.nextInChain = reinterpret_cast(&wgsl_desc); @@ -512,7 +513,7 @@ static void ImGui_ImplWGPU_CreateFontsTexture() WGPUSamplerDescriptor sampler_desc = {}; sampler_desc.minFilter = WGPUFilterMode_Linear; sampler_desc.magFilter = WGPUFilterMode_Linear; - sampler_desc.mipmapFilter = WGPUFilterMode_Linear; + sampler_desc.mipmapFilter = WGPUMipmapFilterMode_Linear; sampler_desc.addressModeU = WGPUAddressMode_Repeat; sampler_desc.addressModeV = WGPUAddressMode_Repeat; sampler_desc.addressModeW = WGPUAddressMode_Repeat; diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 2cd2eb3ba..b0b053a32 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -77,6 +77,7 @@ Other changes: - Demo: Better showcase use of SetNextItemAllowOverlap(). (#6574, #6512, #3909, #517) - Demo: Showcase a few more InputText() flags. - Backends: Made all backends sources files support global IMGUI_DISABLE. (#6601) +- Backends: WebGPU: Update for changes in Dawn. (#6602, #6188) [@williamhCode] -----------------------------------------------------------------------